Skip to contentSkip to conversation

chocolate-doom: new package

PATCH Superseded Rodrigo Rebello 2 participants 5 messages Oct 26, 2015 – Nov 5, 2015

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 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 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 ++++++++++++++++++++++
 package/chocolate-doom/Config.in                   | 12 ++++
 package/chocolate-doom/chocolate-doom.hash         |  2 +
 package/chocolate-doom/chocolate-doom.mk           | 43 ++++++++++++++
 6 files changed, 174 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/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 10ff94e..d4917a3 100644
@@ -205,6 +205,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/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 +43 -0

43 lines not on this page · raw message

Signature · 1 line
2.1.4
#1 lore raw

PATCH v3 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 v3 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
#3 lore raw

PATCH v3 1/3 chocolate-doom: new package

In reply to Rodrigo Rebello

Hi Rodrigo,

Le 26/10/2015 18:12, Rodrigo Rebello a ?crit :

Quoted 24 lines

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 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 ++++++++++++++++++++++
 package/chocolate-doom/Config.in                   | 12 ++++
 package/chocolate-doom/chocolate-doom.hash         |  2 +
 package/chocolate-doom/chocolate-doom.mk           | 43 ++++++++++++++
 6 files changed, 174 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/Config.in
 create mode 100644 package/chocolate-doom/chocolate-doom.hash
 create mode 100644 package/chocolate-doom/chocolate-doom.mk

[snip]

package/chocolate-doom/Config.in line 6

Quoted 12 lines
package/chocolate-doom/Config.in new file +6 -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

I build tested your package with several toolchains and there is an issue with uClibc/uClibc-ng toolchain on powerpc (at least).

For some architectures there is no sys/io.h (see opl_linux.c:26:20)

Quoted 22 lines
package/chocolate-doom/Config.in new file +6 -0
+	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 +2 -0
new file mode 100644
index 0000000..78e6628
@@ -0,0 +1,43 @@
+################################################################################
+#

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

Quoted 10 lines
package/chocolate-doom/chocolate-doom.mk new file +10 -0
+# chocolate-doom
+#
+################################################################################
+
+CHOCOLATE_DOOM_VERSION = 2.2.1
+CHOCOLATE_DOOM_SOURCE = chocolate-doom-$(CHOCOLATE_DOOM_VERSION).tar.gz
+CHOCOLATE_DOOM_SITE = http://www.chocolate-doom.org/downloads/$(CHOCOLATE_DOOM_VERSION)
+CHOCOLATE_DOOM_LICENSE = GPLv2+
+CHOCOLATE_DOOM_LICENSE_FILES = COPYING
+CHOCOLATE_DOOM_AUTORECONF = YES

Can you add a comment to say why the package needs autoreconf ?

Quoted 9 lines
package/chocolate-doom/chocolate-doom.mk new file +9 -0
+CHOCOLATE_DOOM_DEPENDENCIES = sdl sdl_mixer sdl_net
+
+# Avoid installing desktop entries, icons, etc.
+CHOCOLATE_DOOM_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec
+
+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`"

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

Quoted 10 lines
package/chocolate-doom/chocolate-doom.mk new file +10 -0
+endif
+
+CHOCOLATE_DOOM_CONF_OPTS = \
+	--disable-sdltest \
+	--with-sdl-prefix=$(STAGING_DIR)/usr \
+	--with-sdl-exec-prefix=$(STAGING_DIR)/usr
+
+ifeq ($(BR2_PACKAGE_LIBPNG),y)
+	CHOCOLATE_DOOM_DEPENDENCIES += libpng
+	CHOCOLATE_DOOM_CONF_OPTS += --with-libpng

Please don't indent here.

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

Quoted 2 lines
package/chocolate-doom/chocolate-doom.mk new file +2 -0
+else
+	CHOCOLATE_DOOM_CONF_OPTS += --without-libpng

same

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

Quoted 5 lines
package/chocolate-doom/chocolate-doom.mk new file +5 -0
+endif
+
+ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
+	CHOCOLATE_DOOM_DEPENDENCIES += libsamplerate
+	CHOCOLATE_DOOM_CONF_OPTS += --with-libsamplerate

same

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

Quoted 2 lines
package/chocolate-doom/chocolate-doom.mk new file +2 -0
+else
+	CHOCOLATE_DOOM_CONF_OPTS += --without-libsamplerate

same

Otherwise, the packaging looks good.

Best regards,
Romain

Quoted 4 lines
package/chocolate-doom/chocolate-doom.mk new file +3 -0
+endif
+
+$(eval $(autotools-package))
#4 lore raw

PATCH v3 1/3 chocolate-doom: new package

Dear Romain Naour,

2015-11-04 21:12 GMT-02:00 Romain Naour <[email protected]>:

Quoted 46 lines

Hi Rodrigo,

Le 26/10/2015 18:12, Rodrigo Rebello a ?crit :

Quoted 24 lines

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 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 ++++++++++++++++++++++
 package/chocolate-doom/Config.in                   | 12 ++++
 package/chocolate-doom/chocolate-doom.hash         |  2 +
 package/chocolate-doom/chocolate-doom.mk           | 43 ++++++++++++++
 6 files changed, 174 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/Config.in
 create mode 100644 package/chocolate-doom/chocolate-doom.hash
 create mode 100644 package/chocolate-doom/chocolate-doom.mk

[snip]

package/chocolate-doom/Config.in line 6

Quoted 12 lines
package/chocolate-doom/Config.in new file +6 -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

I build tested your package with several toolchains and there is an issue with uClibc/uClibc-ng toolchain on powerpc (at least).

Quoted 2 lines

For some architectures there is no sys/io.h (see opl_linux.c:26:20)

Hmmm, interesting. I'll look into that and try to come up with a solution ASAP. Thanks for taking the time to run all those build tests (I've tested ARM/x86 builds only with both uClibc-ng and glibc).

Quoted 26 lines
Quoted 26 lines
package/chocolate-doom/Config.in new file +6 -0
+     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 +6 -0
new file mode 100644
index 0000000..78e6628
@@ -0,0 +1,43 @@
+################################################################################
+#
+# chocolate-doom
+#
+################################################################################
+
Quoted 9 lines

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

Quoted 6 lines
package/chocolate-doom/chocolate-doom.mk new file +6 -0
+CHOCOLATE_DOOM_VERSION = 2.2.1
+CHOCOLATE_DOOM_SOURCE = chocolate-doom-$(CHOCOLATE_DOOM_VERSION).tar.gz
+CHOCOLATE_DOOM_SITE = http://www.chocolate-doom.org/downloads/$(CHOCOLATE_DOOM_VERSION)
+CHOCOLATE_DOOM_LICENSE = GPLv2+
+CHOCOLATE_DOOM_LICENSE_FILES = COPYING
+CHOCOLATE_DOOM_AUTORECONF = YES

Can you add a comment to say why the package needs autoreconf ?

Sure. I'll add a comment explaining autoreconf is necessary because autoconf.ac is being patched.

Quoted 34 lines
Quoted 9 lines
package/chocolate-doom/chocolate-doom.mk new file +9 -0
+CHOCOLATE_DOOM_DEPENDENCIES = sdl sdl_mixer sdl_net
+
+# Avoid installing desktop entries, icons, etc.
+CHOCOLATE_DOOM_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec
+
+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`"

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

Quoted 10 lines
package/chocolate-doom/chocolate-doom.mk new file +10 -0
+endif
+
+CHOCOLATE_DOOM_CONF_OPTS = \
+     --disable-sdltest \
+     --with-sdl-prefix=$(STAGING_DIR)/usr \
+     --with-sdl-exec-prefix=$(STAGING_DIR)/usr
+
+ifeq ($(BR2_PACKAGE_LIBPNG),y)
+     CHOCOLATE_DOOM_DEPENDENCIES += libpng
+     CHOCOLATE_DOOM_CONF_OPTS += --with-libpng

Please don't indent here.

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

Quoted 2 lines
package/chocolate-doom/chocolate-doom.mk new file +2 -0
+else
+     CHOCOLATE_DOOM_CONF_OPTS += --without-libpng

same

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

Quoted 5 lines
package/chocolate-doom/chocolate-doom.mk new file +5 -0
+endif
+
+ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
+     CHOCOLATE_DOOM_DEPENDENCIES += libsamplerate
+     CHOCOLATE_DOOM_CONF_OPTS += --with-libsamplerate

same

Quoted 5 lines

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

Quoted 2 lines
package/chocolate-doom/chocolate-doom.mk new file +2 -0
+else
+     CHOCOLATE_DOOM_CONF_OPTS += --without-libsamplerate

same

Ugh, careless mistakes. I'll fix those.

Quoted 9 lines

Otherwise, the packaging looks good.

Best regards,
Romain

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

Quoted 4 lines
package/chocolate-doom/chocolate-doom.mk new file +3 -0
+endif
+
+$(eval $(autotools-package))

Regards,
Rodrigo