Skip to contentSkip to conversation

chocolate-doom: new package

PATCH New Rodrigo Rebello 3 participants 12 messages Nov 6, 2015 – Feb 21, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/3 chocolate-doom: new package

Chocolate Doom is a set of conservative source ports for Doom, Heretic, Hexen and Strife, with a philosophy of preserving the look, feel, and bugs of the vanilla versions of each.

http://www.chocolate-doom.org

---
Changes v3 -> v4:
- Add patch to fix build for non-x86 architectures (Romain Naour);
- Add comment to chocolate-doom.mk explaining why autoreconf is

    necessary (Romain Naour);

- Fix indentation in chocolate-doom.mk (Romain Naour);
- Remove CHOCOLATE_DOOM_SOURCE from chocolate-doom.mk since it's equal to the default value.

Changes v2 -> v3:
- Rewrite commit message for upstream patch 2 (hopefully clearer now);
- Include upstream status in patches.

---
 package/Config.in                                  |  1 +
 ...ruct-attribute-directive-ignored-warnings.patch | 49 +++++++++++++
 ...-configure-fix-with-PACKAGE-option-checks.patch | 67 ++++++++++++++++++
 ...se-of-ioperm-inb-outb-to-x86-architecture.patch | 80 ++++++++++++++++++++++
 package/chocolate-doom/Config.in                   | 12 ++++
 package/chocolate-doom/chocolate-doom.hash         |  2 +
 package/chocolate-doom/chocolate-doom.mk           | 44 ++++++++++++
 7 files changed, 255 insertions(+)
 create mode 100644 package/chocolate-doom/0001-Fix-gcc_struct-attribute-directive-ignored-warnings.patch
 create mode 100644 package/chocolate-doom/0002-configure-fix-with-PACKAGE-option-checks.patch
 create mode 100644 package/chocolate-doom/0003-opl-limit-use-of-ioperm-inb-outb-to-x86-architecture.patch
 create mode 100644 package/chocolate-doom/Config.in
 create mode 100644 package/chocolate-doom/chocolate-doom.hash
 create mode 100644 package/chocolate-doom/chocolate-doom.mk
package/Config.in +1 -0
index bdc3063..1eb9ccf 100644
@@ -204,6 +204,7 @@ comment "Themes"
 endmenu
 
 menu "Games"
+	source "package/chocolate-doom/Config.in"
 	source "package/doom-wad/Config.in"
 	source "package/gnuchess/Config.in"
 	source "package/lbreakout2/Config.in"
package/chocolate-doom/0001-Fix-gcc_struct-attribute-directive-ignored-warnings.patch new file +49 -0

49 lines not on this page · raw message

package/chocolate-doom/0002-configure-fix-with-PACKAGE-option-checks.patch new file +67 -0

67 lines not on this page · raw message

package/chocolate-doom/0003-opl-limit-use-of-ioperm-inb-outb-to-x86-architecture.patch new file +80 -0

80 lines not on this page · raw message

package/chocolate-doom/Config.in new file +12 -0
new file mode 100644
index 0000000..5e0d9c1
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_CHOCOLATE_DOOM
+	bool "chocolate-doom"
+	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_SDL
+	select BR2_PACKAGE_SDL_MIXER
+	select BR2_PACKAGE_SDL_NET
+	help
+	  Chocolate Doom is a set of conservative source ports for Doom,
+	  Heretic, Hexen and Strife, with a philosophy of preserving the
+	  look, feel, and bugs of the vanilla versions of each.
+
+	  http://www.chocolate-doom.org
package/chocolate-doom/chocolate-doom.hash new file +2 -0
new file mode 100644
index 0000000..bdf5698
@@ -0,0 +1,2 @@
+# Locally computed
+sha256	ad11e2871667c6fa0658abf2dcba0cd9b26fbd651ee8df55adfdc18ad8fd674a	chocolate-doom-2.2.1.tar.gz
package/chocolate-doom/chocolate-doom.mk new file +44 -0

44 lines not on this page · raw message

Signature · 1 line
2.1.4
#1 lore raw

PATCH v4 2/3 doom-wad: bump to version 1.9

Also add a hash file.

The extraction method had to be changed, since the WAD file for this version is not distributed as a stand-alone file, but comes inside a 2-part DOS self-extracting zip archive.

---
Changes v1 -> v2:
- Upgrade shareware Doom WAD file to the latest 1.9 version. This allows dropping the comment in the next commit about having to pass the option "-gameversion 1.8" to the chocolate-doom-* executables.

---
 package/doom-wad/doom-wad.hash |  2 ++
 package/doom-wad/doom-wad.mk   | 10 ++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
 create mode 100644 package/doom-wad/doom-wad.hash
package/doom-wad/doom-wad.hash new file +2 -0
new file mode 100644
index 0000000..fa069c1
@@ -0,0 +1,2 @@
+# Locally computed
+sha256	cacf0142b31ca1af00796b4a0339e07992ac5f21bc3f81e7532fe1b5e1b486e6	doom19s.zip
package/doom-wad/doom-wad.mk +6 -4
index 6f4f9da..6c870d0 100644
@@ -4,16 +4,18 @@
 #
 ################################################################################
 
-DOOM_WAD_VERSION = 1.8
-DOOM_WAD_SOURCE = doom-$(DOOM_WAD_VERSION).wad.gz
+DOOM_WAD_VERSION = 1.9
+DOOM_WAD_SOURCE = doom19s.zip
 DOOM_WAD_SITE = ftp://ftp.idsoftware.com/idstuff/doom
 
 define DOOM_WAD_EXTRACT_CMDS
-	$(ZCAT) $(DL_DIR)/$($(PKG)_SOURCE) > $(@D)/doom1.wad
+	$(UNZIP) -p $(DL_DIR)/$($(PKG)_SOURCE) 'DOOMS_19.[12]' > \
+		$(@D)/doom-$(DOOM_WAD_VERSION).zip
+	$(UNZIP) -d $(@D) $(@D)/doom-$(DOOM_WAD_VERSION).zip DOOM1.WAD
 endef
 
 define DOOM_WAD_INSTALL_TARGET_CMDS
-	$(INSTALL) -m 0644 -D $(@D)/doom1.wad \
+	$(INSTALL) -m 0644 -D $(@D)/DOOM1.WAD \
 		$(TARGET_DIR)/usr/share/games/doom/doom1.wad
 endef
 
Signature · 1 line
2.1.4
#2 lore raw

PATCH v4 2/3 doom-wad: bump to version 1.9

Dear Rodrigo Rebello,

Quoted 13 lines · Rodrigo Rebello
package/doom-wad/doom-wad.hash new file +2 -0
new file mode 100644
index 0000000..fa069c1
@@ -0,0 +1,2 @@
+# Locally computed
+sha256	cacf0142b31ca1af00796b4a0339e07992ac5f21bc3f81e7532fe1b5e1b486e6	doom19s.zip
package/doom-wad/doom-wad.mk +0 -0
index 6f4f9da..6c870d0 100644

package/doom-wad/doom-wad.mk line 8

Quoted 7 lines
package/doom-wad/doom-wad.mk +2 -2
@@ -4,16 +4,18 @@
 #
 ################################################################################
 
-DOOM_WAD_VERSION = 1.8
-DOOM_WAD_SOURCE = doom-$(DOOM_WAD_VERSION).wad.gz
+DOOM_WAD_VERSION = 1.9
+DOOM_WAD_SOURCE = doom19s.zip

So shouldn't the version be "19" and not "1.9" ? It is a bit weird to have a version not used in the _SOURCE variable. Or if you really want to have 1.9 as the version, then:

	DOOM_WAD_SOURCE = doom$(subst .,,$(DOOM_WAD_VERSION))s.zip

package/doom-wad/doom-wad.mk line 9

Quoted 1 line
package/doom-wad/doom-wad.mk +0 -0
 DOOM_WAD_SITE = ftp://ftp.idsoftware.com/idstuff/doom

However, the main reason I didn't apply is because this server seems to be unavailable at the moment. So I can't test the package, and it would cause build failures in the autobuilders.

Are you also experiencing the same issue?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v4 2/3 doom-wad: bump to version 1.9

Thomas,

2015-12-23 20:37 GMT-02:00 Thomas Petazzoni
<[email protected]>:

Quoted 29 lines

Dear Rodrigo Rebello,

Quoted 13 lines · Rodrigo Rebello
package/doom-wad/doom-wad.hash new file +2 -0
new file mode 100644
index 0000000..fa069c1
@@ -0,0 +1,2 @@
+# Locally computed
+sha256       cacf0142b31ca1af00796b4a0339e07992ac5f21bc3f81e7532fe1b5e1b486e6        doom19s.zip
package/doom-wad/doom-wad.mk +0 -0
index 6f4f9da..6c870d0 100644

package/doom-wad/doom-wad.mk line 8

Quoted 7 lines
package/doom-wad/doom-wad.mk +2 -2
@@ -4,16 +4,18 @@
 #
 ################################################################################
 
-DOOM_WAD_VERSION = 1.8
-DOOM_WAD_SOURCE = doom-$(DOOM_WAD_VERSION).wad.gz
+DOOM_WAD_VERSION = 1.9
+DOOM_WAD_SOURCE = doom19s.zip

So shouldn't the version be "19" and not "1.9" ? It is a bit weird to have a version not used in the _SOURCE variable. Or if you really want to have 1.9 as the version, then:

Quoted 2 lines
        DOOM_WAD_SOURCE = doom$(subst .,,$(DOOM_WAD_VERSION))s.zip

Indeed, I agree that looks a bit weird. I believe the zip filename carries the number '19' instead of '1.9' merely because it dates back to the old times of DOS, when its FAT filesystem imposed quite a few limitations, like the dot character being allowed in a filename only to separate it from its extension.

The correct version number, however, is really 1.9, so I'd prefer to keep DOOM_WAD_VERSION untouched and apply the substitution you proposed to the zip filename only. Would that be OK to you?

Quoted 8 lines

package/doom-wad/doom-wad.mk line 9

Quoted 1 line
package/doom-wad/doom-wad.mk +0 -0
 DOOM_WAD_SITE = ftp://ftp.idsoftware.com/idstuff/doom

However, the main reason I didn't apply is because this server seems to be unavailable at the moment. So I can't test the package, and it would cause build failures in the autobuilders.

Are you also experiencing the same issue?

Yes, I have confirmed the server is unresponsive at the moment. I have found an alternative URL that seems to work fine, though:

http://www.jbserver.com/downloads/games/doom/misc/shareware/doom19s.zip

Should I respin this patch with that temporary URL?

Regards,
Rodrigo

Quoted 7 lines

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#4 lore raw

PATCH v4 2/3 doom-wad: bump to version 1.9

Rodrigo,

Quoted 9 lines · Rodrigo Rebello

Indeed, I agree that looks a bit weird. I believe the zip filename carries the number '19' instead of '1.9' merely because it dates back to the old times of DOS, when its FAT filesystem imposed quite a few limitations, like the dot character being allowed in a filename only to separate it from its extension.

The correct version number, however, is really 1.9, so I'd prefer to keep DOOM_WAD_VERSION untouched and apply the substitution you proposed to the zip filename only. Would that be OK to you?

Yes, this is perfectly fine.

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

DOOM_WAD_SITE = ftp://ftp.idsoftware.com/idstuff/doom

However, the main reason I didn't apply is because this server seems to be unavailable at the moment. So I can't test the package, and it would cause build failures in the autobuilders.

Quoted 8 lines
Quoted 1 line

Are you also experiencing the same issue?

Yes, I have confirmed the server is unresponsive at the moment. I have found an alternative URL that seems to work fine, though:

http://www.jbserver.com/downloads/games/doom/misc/shareware/doom19s.zip

Should I respin this patch with that temporary URL?

Yes, if the hash matches the one from the original server, it is fine to use an alternate one. Indicate it in the .mk file:

# Official server currently unavailable
# DOOM_WAD_SITE = ....
DOOM_WAD_SITE = http://www.jbserver.com/downloads/games/doom/misc/shareware/

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH v4 3/3 doom-wad: add BR2_PACKAGE_CHOCOLATE_DOOM as alternate dependency

In reply to Rodrigo Rebello

The shareware WAD file is also supported by Chocolate Doom.

---
 package/doom-wad/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/doom-wad/Config.in +1 -1
index aa1d029..edd299b 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_DOOM_WAD
 	bool "shareware Doom WAD file"
-	depends on BR2_PACKAGE_PRBOOM
+	depends on BR2_PACKAGE_CHOCOLATE_DOOM || BR2_PACKAGE_PRBOOM
 	help
 	  This will install the shareware wad data file for the doom game.
 
Signature · 1 line
2.1.4
#6 lore raw

PATCH v4 3/3 doom-wad: add BR2_PACKAGE_CHOCOLATE_DOOM as alternate dependency

Dear Rodrigo Rebello,

Quoted 6 lines · Rodrigo Rebello

The shareware WAD file is also supported by Chocolate Doom.

---
 package/doom-wad/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH v4 1/3 chocolate-doom: new package

In reply to Rodrigo Rebello

Dear Rodrigo Rebello,

Quoted 7 lines · Rodrigo Rebello

Chocolate Doom is a set of conservative source ports for Doom, Heretic, Hexen and Strife, with a philosophy of preserving the look, feel, and bugs of the vanilla versions of each.

http://www.chocolate-doom.org

I've applied, thanks! I'd like to say that I really appreciated the fact that all three patches had already been submitted and accepted upstream. It really gives more confidence in accepting them as a temporary solution until upstream does a new release.

I have one comment though.

package/chocolate-doom/chocolate-doom.mk line 23

Quoted 5 lines
package/chocolate-doom/chocolate-doom.mk new file +5 -0
+ifeq ($(BR2_STATIC_LIBS),y)
+# SDL_mixer uses symbols from SDL, but ends up after it on the link
+# cmdline. Fix it by forcing the SDL libs at the very end.
+CHOCOLATE_DOOM_CONF_ENV = LIBS="`$(STAGING_DIR)/usr/bin/sdl-config --static-libs`"
+endif

It would be great if this was fixed properly in the chocolate-doom build system. An obvious suggestion is to use pkg-config, which handles static linking scenarios a lot better.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#8 lore raw

PATCH v4 1/3 chocolate-doom: new package

Thomas,

2015-12-23 20:34 GMT-02:00 Thomas Petazzoni
<[email protected]>:
[snip]

Quoted 10 lines

package/chocolate-doom/chocolate-doom.mk line 23

Quoted 5 lines
package/chocolate-doom/chocolate-doom.mk new file +5 -0
+ifeq ($(BR2_STATIC_LIBS),y)
+# SDL_mixer uses symbols from SDL, but ends up after it on the link
+# cmdline. Fix it by forcing the SDL libs at the very end.
+CHOCOLATE_DOOM_CONF_ENV = LIBS="`$(STAGING_DIR)/usr/bin/sdl-config --static-libs`"
+endif

It would be great if this was fixed properly in the chocolate-doom build system. An obvious suggestion is to use pkg-config, which handles static linking scenarios a lot better.

Agreed. I have considered exactly that when I was working on the patch, but I have decided to leave it for later since a patch for SDL_mixer is also necessary (SDL_mixer.pc is missing a 'Libs.private' section with libraries necessary for static linking). I've just had a look at it and the solution is actually quite simple, so I'll work on it and propose a patch. That will also be useful to fix a recent ltris autobuild failure related to static linking as well.

Regards,
Rodrigo

Quoted 7 lines

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#9 lore raw

PATCH v4 1/3 chocolate-doom: new package

Dear Rodrigo Rebello,

Quoted 7 lines · Rodrigo Rebello

Agreed. I have considered exactly that when I was working on the patch, but I have decided to leave it for later since a patch for SDL_mixer is also necessary (SDL_mixer.pc is missing a 'Libs.private' section with libraries necessary for static linking). I've just had a look at it and the solution is actually quite simple, so I'll work on it and propose a patch. That will also be useful to fix a recent ltris autobuild failure related to static linking as well.

Indeed, according to your description of the problem, it is really SDL_mixer.pc that needs to be fixed. However, if I looked correctly, chocolate-doom doesn't use pkg-config to find libraries, so it would have to be changed as well.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#10 lore raw

PATCH v4 1/3 chocolate-doom: new package

Thomas,

2015-12-24 5:29 GMT-02:00 Thomas Petazzoni
<[email protected]>:

Quoted 12 lines

Dear Rodrigo Rebello,

Quoted 7 lines · Rodrigo Rebello

Agreed. I have considered exactly that when I was working on the patch, but I have decided to leave it for later since a patch for SDL_mixer is also necessary (SDL_mixer.pc is missing a 'Libs.private' section with libraries necessary for static linking). I've just had a look at it and the solution is actually quite simple, so I'll work on it and propose a patch. That will also be useful to fix a recent ltris autobuild failure related to static linking as well.

Quoted 5 lines

Indeed, according to your description of the problem, it is really SDL_mixer.pc that needs to be fixed. However, if I looked correctly, chocolate-doom doesn't use pkg-config to find libraries, so it would have to be changed as well.

Yes, both SDL_mixer and chocolate-doom need patching. That's actually what I meant in my previous email. I'll be working on that soon.

Regards,
Rodrigo

Quoted 7 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#11 lore raw

PATCH v4 1/3 chocolate-doom: new package

Hi Rodrigo, Thomas, All,

Le 24/12/2015 12:11, Rodrigo Rebello a ?crit :

Quoted 16 lines

Thomas,

2015-12-24 5:29 GMT-02:00 Thomas Petazzoni
<[email protected]>:

Quoted 12 lines

Dear Rodrigo Rebello,

Quoted 7 lines · Rodrigo Rebello

Agreed. I have considered exactly that when I was working on the patch, but I have decided to leave it for later since a patch for SDL_mixer is also necessary (SDL_mixer.pc is missing a 'Libs.private' section with libraries necessary for static linking). I've just had a look at it and the solution is actually quite simple, so I'll work on it and propose a patch. That will also be useful to fix a recent ltris autobuild failure related to static linking as well.

Quoted 8 lines
Quoted 5 lines

Indeed, according to your description of the problem, it is really SDL_mixer.pc that needs to be fixed. However, if I looked correctly, chocolate-doom doesn't use pkg-config to find libraries, so it would have to be changed as well.

Yes, both SDL_mixer and chocolate-doom need patching. That's actually what I meant in my previous email. I'll be working on that soon.

Any update on this topic ?

I looked at chocolate-doom static build failure [1] and I have some comments to complete this discussion.

If libmad is available, SDL_mixer forget to add -lmad in SDL_mixer.pc file for static build only (you're right it should have a 'Libs.private' section). This means that all SDL_mixer will unlikely forget -lmad in their LDFALGS leading to the build failure similar to :

[...]sysroot/usr/lib/libSDL_mixer.a(music_mad.o): In function `read_next_frame':
music_mad.c:(.text+0xbc): undefined reference to mad_stream_buffer' music_mad.c:(.text+0xd0): undefined reference to mad_frame_decode' music_mad.c:(.text+0x134): undefined reference to `mad_timer_add'

So, fixing SDL_mixer and adding pkg-config support to chocolate-doom and ltris (maybe others) is needed if we want to support static only build.

As a quick workaround, we may disable libmad support in SDL_mixer for static build only ? Thomas ?

Best regards,
Romain

[1]
http://autobuild.buildroot.net/results/e09/e09ea3a64d396bbc855acf7c07fcbea28fb2395d/build-end.log