Add OpenTyrian package (SDL game)
RFC PATCH 1/1 Add OpenTyrian package (SDL game)
From: Julien Boibessot <[email protected]>
---
Comments are welcome on why DOWNLOAD macro fails to get data and if it's the good way to do !!
package/Config.in | 1 + package/opentyrian/Config.in | 25 +++++++++++++++++ package/opentyrian/opentyrian.mk | 55 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 0 deletions(-) create mode 100644 package/opentyrian/Config.in create mode 100644 package/opentyrian/opentyrian.mk
package/Config.in +1 -0
@@ -159,6 +159,7 @@ source "package/doom-wad/Config.in" source "package/gnuchess/Config.in" source "package/lbreakout2/Config.in" source "package/ltris/Config.in" +source "package/opentyrian/Config.in" source "package/prboom/Config.in" source "package/rubix/Config.in" endmenu
package/opentyrian/Config.in new file +25 -0
@@ -0,0 +1,25 @@ +config BR2_PACKAGE_OPENTYRIAN + bool "OpenTyrian" + select BR2_PACKAGE_SDL + select BR2_PACKAGE_SDL_NET + help + OpenTyrian is a port of the DOS shoot-em-up Tyrian. It uses SDL, + making it easily cross-platform. + The original Tyrian data files, that have since been released as + Freeware, will be installed. + A display with minimum 640x480 resolution and a keyboard are needed + to play the game. + If you want some sound, activate ALSA with OSS emulation. + + http://code.google.com/p/opentyrian/ + +if BR2_PACKAGE_OPENTYRIAN + +config BR2_PACKAGE_OPENTYRIAN_NET + bool "network support" + default y + select BR2_PACKAGE_SDL_NET + help + Activates network support in OpenTyrian. Will add SDL_net. + +endif
package/opentyrian/opentyrian.mk new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
1.7.5.4
RFC PATCH 1/1 Add OpenTyrian package (SDL game)
Hello,
package/opentyrian/Config.in line 4
Quoted 10 lines · julien.boibessot at free.fr
package/opentyrian/Config.in new file +4
-0@@ -0,0 +1,25 @@ +config BR2_PACKAGE_OPENTYRIAN + bool "OpenTyrian" + select BR2_PACKAGE_SDL + select BR2_PACKAGE_SDL_NET
Why are you selecting SDL_NET here, and then provide an option for the network support below? This looks odd.
Quoted 27 lines
package/opentyrian/Config.in new file +21
-0+ help + OpenTyrian is a port of the DOS shoot-em-up Tyrian. It uses SDL, + making it easily cross-platform. + The original Tyrian data files, that have since been released as + Freeware, will be installed. + A display with minimum 640x480 resolution and a keyboard are needed + to play the game. + If you want some sound, activate ALSA with OSS emulation. + + http://code.google.com/p/opentyrian/ + +if BR2_PACKAGE_OPENTYRIAN + +config BR2_PACKAGE_OPENTYRIAN_NET + bool "network support" + default y + select BR2_PACKAGE_SDL_NET + help + Activates network support in OpenTyrian. Will add SDL_net. + +endifpackage/opentyrian/opentyrian.mk new file +0
-0
package/opentyrian/opentyrian.mk line 3
Quoted 3 lines
package/opentyrian/opentyrian.mk new file +3
-0@@ -0,0 +1,55 @@ +############################################################################### +# +# OpenTyrian
All lower-case.
package/opentyrian/opentyrian.mk line 10
Quoted 7 lines
package/opentyrian/opentyrian.mk new file +7
-0+# +############################################################################### + +OPENTYRIAN_VERSION = 2.1.20130907 +OPENTYRIAN_SITE = http://www.camanis.net/opentyrian/releases/ +OPENTYRIAN_SOURCE = opentyrian-$(OPENTYRIAN_VERSION)-src.tar.gz +OPENTYRIAN_LICENSE = GPLv2+ Freeware
What is under GPLv2+ and what is under a Freeware license?
Quoted 7 lines
package/opentyrian/opentyrian.mk new file +7
-0+OPENTYRIAN_LICENSE_FILES = COPYING README + +OPENTYRIAN_DEPENDENCIES = sdl + +ifeq ($(BR2_PACKAGE_OPENTYRIAN_NET),y) +OPENTYRIAN_DEPENDENCIES += sdl_net +OPENTYRIAN_NETWORK = true
package/opentyrian/opentyrian.mk line 27
Quoted 10 lines
package/opentyrian/opentyrian.mk new file +10
-0+else +OPENTYRIAN_NETWORK = false +endif + +OPENTYRIAN_DATA = tyrian21.zip +OPENTYRIAN_DATA_SITE = http://sites.google.com/a/camanis.net/opentyrian/tyrian/ + +define OPENTYRIAN_DOWNLOAD_DATA + @$(call MESSAGE,Downloading data) +# @$(call DOWNLOAD,$(OPENTYRIAN_DATA_SITE),$(OPENTYRIAN_DATA)) << doesn't work !!
Even if it was working, it is not a good solution, because it does not integrate properly with the download and licensing infrastructure.
We have the <pkg>_EXTRA_DOWNLOADS, but it works only if the file has to be downloaded from the same site.
So my recommendation would be to create a separate package called opentyrian-data, that installs this. And unless the data is needed at build time, this package can be a runtime dependency, i.e selected from Config.in, but not mentioned in OPENTYRIAN_DEPENDENCIES.
Quoted 18 lines
package/opentyrian/opentyrian.mk new file +18
-0+ cd $(DL_DIR); $(WGET) -nc $(OPENTYRIAN_DATA_SITE)/$(OPENTYRIAN_DATA) +endef +OPENTYRIAN_POST_DOWNLOAD_HOOKS += OPENTYRIAN_DOWNLOAD_DATA + +define OPENTYRIAN_EXTRACT_DATA + unzip $(DL_DIR)/$(OPENTYRIAN_DATA) -d $(@D) +endef +OPENTYRIAN_POST_EXTRACT_HOOKS += OPENTYRIAN_EXTRACT_DATA + +define OPENTYRIAN_BUILD_CMDS + $(MAKE) PLATFORM=UNIX \ + CC="$(TARGET_CC)" \ + STRIP="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" \ + SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \ + LDFLAGS="-lm" \ + WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \ + -C $(@D) release +endef
package/opentyrian/opentyrian.mk line 55
Quoted 10 lines
package/opentyrian/opentyrian.mk new file +10
-0+ +define OPENTYRIAN_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/games/opentyrian + mkdir -p $(TARGET_DIR)/usr/share/opentyrian/data/ + cp $(@D)/tyrian21/* $(TARGET_DIR)/usr/share/opentyrian/data/ + rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.doc + rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.exe +endef + +$(eval $(generic-package))
Other than that, it looks good.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
RFC PATCH 1/1 Add OpenTyrian package (SDL game)
In reply to julien.boibessot at free.frQuoted 77 lines · julien.boibessot at free.fr
From: Julien Boibessot <[email protected]>
Signed-off-by Julien Boibessot <[email protected]>---
Comments are welcome on why DOWNLOAD macro fails to get data and if it's the good way to do !!package/Config.in | 1 + package/opentyrian/Config.in | 25 +++++++++++++++++ package/opentyrian/opentyrian.mk | 55 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 0 deletions(-) create mode 100644 package/opentyrian/Config.in create mode 100644 package/opentyrian/opentyrian.mkpackage/Config.in +1
-0@@ -159,6 +159,7 @@ source "package/doom-wad/Config.in" source "package/gnuchess/Config.in" source "package/lbreakout2/Config.in" source "package/ltris/Config.in" +source "package/opentyrian/Config.in" source "package/prboom/Config.in" source "package/rubix/Config.in" endmenupackage/opentyrian/Config.in new file +25
-0@@ -0,0 +1,25 @@ +config BR2_PACKAGE_OPENTYRIAN + bool "OpenTyrian" + select BR2_PACKAGE_SDL + select BR2_PACKAGE_SDL_NET + help + OpenTyrian is a port of the DOS shoot-em-up Tyrian. It uses SDL, + making it easily cross-platform. + The original Tyrian data files, that have since been released as + Freeware, will be installed. + A display with minimum 640x480 resolution and a keyboard are needed + to play the game. + If you want some sound, activate ALSA with OSS emulation. + + http://code.google.com/p/opentyrian/ + +if BR2_PACKAGE_OPENTYRIAN + +config BR2_PACKAGE_OPENTYRIAN_NET + bool "network support" + default y + select BR2_PACKAGE_SDL_NET + help + Activates network support in OpenTyrian. Will add SDL_net. + +endifpackage/opentyrian/opentyrian.mk new file +13
-0@@ -0,0 +1,55 @@ +############################################################################### +# +# OpenTyrian +# +############################################################################### + +OPENTYRIAN_VERSION = 2.1.20130907 +OPENTYRIAN_SITE = http://www.camanis.net/opentyrian/releases/ +OPENTYRIAN_SOURCE = opentyrian-$(OPENTYRIAN_VERSION)-src.tar.gz +OPENTYRIAN_LICENSE = GPLv2+ Freeware +OPENTYRIAN_LICENSE_FILES = COPYING README + +OPENTYRIAN_DEPENDENCIES = sdl
package/opentyrian/opentyrian.mk line 23
Quoted 10 lines
package/opentyrian/opentyrian.mk new file +10
-0+ +ifeq ($(BR2_PACKAGE_OPENTYRIAN_NET),y) +OPENTYRIAN_DEPENDENCIES += sdl_net +OPENTYRIAN_NETWORK = true +else +OPENTYRIAN_NETWORK = false +endif + +OPENTYRIAN_DATA = tyrian21.zip +OPENTYRIAN_DATA_SITE = http://sites.google.com/a/camanis.net/opentyrian/tyrian/
Why not simply http://www.camanis.net/opentyrian/tyrian21.zip ?
package/opentyrian/opentyrian.mk line 27
Quoted 4 lines
package/opentyrian/opentyrian.mk new file +4
-0+ +define OPENTYRIAN_DOWNLOAD_DATA + @$(call MESSAGE,Downloading data) +# @$(call DOWNLOAD,$(OPENTYRIAN_DATA_SITE),$(OPENTYRIAN_DATA)) << doesn't work !!
DOWNLOAD expects the full URL as the first argument. The optional second
argument exists for cases where the local file should be different than the base of the URL (e.g. if it contains question marks or other madness).
package/opentyrian/opentyrian.mk line 40
Quoted 13 lines
package/opentyrian/opentyrian.mk new file +13
-0+ cd $(DL_DIR); $(WGET) -nc $(OPENTYRIAN_DATA_SITE)/$(OPENTYRIAN_DATA) +endef +OPENTYRIAN_POST_DOWNLOAD_HOOKS += OPENTYRIAN_DOWNLOAD_DATA + +define OPENTYRIAN_EXTRACT_DATA + unzip $(DL_DIR)/$(OPENTYRIAN_DATA) -d $(@D) +endef +OPENTYRIAN_POST_EXTRACT_HOOKS += OPENTYRIAN_EXTRACT_DATA + +define OPENTYRIAN_BUILD_CMDS + $(MAKE) PLATFORM=UNIX \ + CC="$(TARGET_CC)" \ + STRIP="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" \
Everything in target is already stripped automatically at the end, so
it's usually not needed to pass this.
package/opentyrian/opentyrian.mk line 48
Quoted 8 lines
package/opentyrian/opentyrian.mk new file +8
-0+ SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \ + LDFLAGS="-lm" \ + WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \ + -C $(@D) release +endef + +define OPENTYRIAN_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/games/opentyrian
We prefer to install everything in /usr/bin.
Regards,
Arnout
Quoted 8 lines
package/opentyrian/opentyrian.mk new file +7
-0+ mkdir -p $(TARGET_DIR)/usr/share/opentyrian/data/ + cp $(@D)/tyrian21/* $(TARGET_DIR)/usr/share/opentyrian/data/ + rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.doc + rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.exe +endef + +$(eval $(generic-package))
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
RFC PATCH 1/1 Add OpenTyrian package (SDL game)
Dear Arnout Vandecappelle,
Quoted 5 lines · Arnout Vandecappelle
package/opentyrian/opentyrian.mk line 23
Quoted 2 lines
package/opentyrian/opentyrian.mk new file +2
-0+OPENTYRIAN_DATA = tyrian21.zip +OPENTYRIAN_DATA_SITE = http://sites.google.com/a/camanis.net/opentyrian/tyrian/Why not simply http://www.camanis.net/opentyrian/tyrian21.zip ?
Quoted 8 lines
package/opentyrian/opentyrian.mk line 27
Quoted 4 lines
package/opentyrian/opentyrian.mk new file +4
-0+ +define OPENTYRIAN_DOWNLOAD_DATA + @$(call MESSAGE,Downloading data) +# @$(call DOWNLOAD,$(OPENTYRIAN_DATA_SITE),$(OPENTYRIAN_DATA)) << doesn't work !!DOWNLOAD expects the full URL as the first argument. The optional second
argument exists for cases where the local file should be different than the base of the URL (e.g. if it contains question marks or other madness).
As I've replied separately, packages should not directly use the DOWNLOAD macro, I believe.
Quoted 7 lines
package/opentyrian/opentyrian.mk line 40
Quoted 4 lines
package/opentyrian/opentyrian.mk new file +4
-0+define OPENTYRIAN_BUILD_CMDS + $(MAKE) PLATFORM=UNIX \ + CC="$(TARGET_CC)" \ + STRIP="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" \Everything in target is already stripped automatically at the end, so
it's usually not needed to pass this.
Except if the package does its own stripping, and defaults to the host strip to do this. In this case, we can either pass STRIP=/bin/true, or pass the real STRIP value.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
RFC PATCH 1/1 Add OpenTyrian package (SDL game)
In reply to Arnout VandecappelleHello,
Arnout, Thomas,
thanks for the reviews !
Quoted 81 lines · Arnout Vandecappelle
Quoted 80 lines · julien.boibessot at free.fr
From: Julien Boibessot <[email protected]>
Signed-off-by Julien Boibessot <[email protected]>---
Comments are welcome on why DOWNLOAD macro fails to get data and if it's the good way to do !!package/Config.in | 1 + package/opentyrian/Config.in | 25 +++++++++++++++++ package/opentyrian/opentyrian.mk | 55 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 0 deletions(-) create mode 100644 package/opentyrian/Config.in create mode 100644 package/opentyrian/opentyrian.mkpackage/Config.in +1
-0@@ -159,6 +159,7 @@ source "package/doom-wad/Config.in" source "package/gnuchess/Config.in" source "package/lbreakout2/Config.in" source "package/ltris/Config.in" +source "package/opentyrian/Config.in" source "package/prboom/Config.in" source "package/rubix/Config.in" endmenupackage/opentyrian/Config.in new file +25
-0@@ -0,0 +1,25 @@ +config BR2_PACKAGE_OPENTYRIAN + bool "OpenTyrian" + select BR2_PACKAGE_SDL + select BR2_PACKAGE_SDL_NET + help + OpenTyrian is a port of the DOS shoot-em-up Tyrian. It uses SDL, + making it easily cross-platform. + The original Tyrian data files, that have since been released as + Freeware, will be installed. + A display with minimum 640x480 resolution and a keyboard are needed + to play the game. + If you want some sound, activate ALSA with OSS emulation. + + http://code.google.com/p/opentyrian/ + +if BR2_PACKAGE_OPENTYRIAN + +config BR2_PACKAGE_OPENTYRIAN_NET + bool "network support" + default y + select BR2_PACKAGE_SDL_NET + help + Activates network support in OpenTyrian. Will add SDL_net. + +endifpackage/opentyrian/opentyrian.mk new file +16
-0@@ -0,0 +1,55 @@ +############################################################################### +# +# OpenTyrian +# +############################################################################### + +OPENTYRIAN_VERSION = 2.1.20130907 +OPENTYRIAN_SITE = http://www.camanis.net/opentyrian/releases/ +OPENTYRIAN_SOURCE = opentyrian-$(OPENTYRIAN_VERSION)-src.tar.gz +OPENTYRIAN_LICENSE = GPLv2+ Freeware +OPENTYRIAN_LICENSE_FILES = COPYING README + +OPENTYRIAN_DEPENDENCIES = sdl + +ifeq ($(BR2_PACKAGE_OPENTYRIAN_NET),y) +OPENTYRIAN_DEPENDENCIES += sdl_net
Quoted 8 lines
package/opentyrian/opentyrian.mk line 23
Quoted 7 lines
package/opentyrian/opentyrian.mk new file +7
-0+OPENTYRIAN_NETWORK = true +else +OPENTYRIAN_NETWORK = false +endif + +OPENTYRIAN_DATA = tyrian21.zip +OPENTYRIAN_DATA_SITE = http://sites.google.com/a/camanis.net/opentyrian/tyrian/Why not simply http://www.camanis.net/opentyrian/tyrian21.zip ?
it also works :-)
Quoted 8 lines
package/opentyrian/opentyrian.mk line 27
Quoted 5 lines
package/opentyrian/opentyrian.mk new file +4
-0+ +define OPENTYRIAN_DOWNLOAD_DATA + @$(call MESSAGE,Downloading data) +# @$(call DOWNLOAD,$(OPENTYRIAN_DATA_SITE),$(OPENTYRIAN_DATA)) << doesn't work !!DOWNLOAD expects the full URL as the first argument. The optional second
argument exists for cases where the local file should be different than the base of the URL (e.g. if it contains question marks or other madness).
I think I will create an opentyrian-data package to solve my problem, as Thomas advised.
(sources and data aren't in the same server directories)
Quoted 16 lines
Quoted 4 lines
package/opentyrian/opentyrian.mk new file +3
-0+ cd $(DL_DIR); $(WGET) -nc $(OPENTYRIAN_DATA_SITE)/$(OPENTYRIAN_DATA) +endef +OPENTYRIAN_POST_DOWNLOAD_HOOKS += OPENTYRIAN_DOWNLOAD_DATApackage/opentyrian/opentyrian.mk line 40
Quoted 10 lines
package/opentyrian/opentyrian.mk new file +10
-0+ +define OPENTYRIAN_EXTRACT_DATA + unzip $(DL_DIR)/$(OPENTYRIAN_DATA) -d $(@D) +endef +OPENTYRIAN_POST_EXTRACT_HOOKS += OPENTYRIAN_EXTRACT_DATA + +define OPENTYRIAN_BUILD_CMDS + $(MAKE) PLATFORM=UNIX \ + CC="$(TARGET_CC)" \ + STRIP="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" \Everything in target is already stripped automatically at the end, so
it's usually not needed to pass this.
yes but OpenTyrian Makefile otherwise uses host strip and fails to build. So I will use Thomas method (STRIP=/bin/true).
Quoted 10 lines
package/opentyrian/opentyrian.mk line 48
Quoted 9 lines
package/opentyrian/opentyrian.mk new file +8
-0+ SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \ + LDFLAGS="-lm" \ + WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \ + -C $(@D) release +endef + +define OPENTYRIAN_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/games/opentyrianWe prefer to install everything in
/usr/bin.
prboom & rubix packages already explicitly install everything in /usr/games/... What should I do ?
Best regards,
Julien
Quoted 14 lines
Regards,
ArnoutQuoted 8 lines
package/opentyrian/opentyrian.mk new file +7
-0+ mkdir -p $(TARGET_DIR)/usr/share/opentyrian/data/ + cp $(@D)/tyrian21/* $(TARGET_DIR)/usr/share/opentyrian/data/ + rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.doc + rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.exe +endef + +$(eval $(generic-package))
RFC PATCH 1/1 Add OpenTyrian package (SDL game)
Beno?t, All,
On 2014-02-07 18:17 +0100, Julien Boibessot spake thusly:
[--SNIP--]
Quoted 10 lines
Quoted 9 lines
package/opentyrian/opentyrian.mk line 48
Quoted 8 lines
package/opentyrian/opentyrian.mk new file +8
-0+ SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \ + LDFLAGS="-lm" \ + WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \ + -C $(@D) release +endef + +define OPENTYRIAN_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/games/opentyrianWe prefer to install everything in
/usr/bin.
Quoted 2 lines
prboom & rubix packages already explicitly install everything in
/usr/games/... What should I do ?
Send a patch so they install in /usr instead? ;-)
Those are packages that went in a loooong time ago, even before Peter took over maintainership, so they might not follow the current conventions.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'