diff options
author | 2013-03-20 17:09:56 +0100 | |
---|---|---|
committer | 2013-03-20 17:09:56 +0100 | |
commit | bafbe24595c08ae552bf8c7f6b25e55a33797c9d (patch) | |
tree | 4653692aec8f22db4659922bd15cf38e92cd0f45 /games-fps | |
parent | dev-util/lttng-modules: bump to 2.1.1, convert to linux-mod, #431358 (diff) | |
download | sunrise-bafbe24595c08ae552bf8c7f6b25e55a33797c9d.tar.gz sunrise-bafbe24595c08ae552bf8c7f6b25e55a33797c9d.tar.bz2 sunrise-bafbe24595c08ae552bf8c7f6b25e55a33797c9d.zip |
games-fps/assaultcube: rewrite, do proper QA
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/assaultcube/ChangeLog | 4 | ||||
-rw-r--r-- | games-fps/assaultcube/Manifest | 6 | ||||
-rw-r--r-- | games-fps/assaultcube/assaultcube-1.1.0.4.ebuild | 105 | ||||
-rw-r--r-- | games-fps/assaultcube/files/assaultcube-1.1.0.4-QA.patch | 171 |
4 files changed, 237 insertions, 49 deletions
diff --git a/games-fps/assaultcube/ChangeLog b/games-fps/assaultcube/ChangeLog index b1f198b88..7556a0434 100644 --- a/games-fps/assaultcube/ChangeLog +++ b/games-fps/assaultcube/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 20 Mar 2013; Julian Ospald <hasufell@gentoo.org> assaultcube-1.1.0.4.ebuild, + +files/assaultcube-1.1.0.4-QA.patch: + rewrite, do proper QA + *assaultcube-1.1.0.4 (18 Mar 2013) 18 Mar 2013; Patrick Lauer <patrick@gentoo.org> -assaultcube-1.0.4.ebuild, diff --git a/games-fps/assaultcube/Manifest b/games-fps/assaultcube/Manifest index 42dc3cafe..02329d7f9 100644 --- a/games-fps/assaultcube/Manifest +++ b/games-fps/assaultcube/Manifest @@ -1,5 +1,7 @@ +AUX assaultcube-1.1.0.4-QA.patch 4701 SHA256 9ba7cae5ecb8e459949cf9e4709c04ecc2bed60380a55bd508cb3c9563b5d5da SHA512 4957f93233b774e0fd465afe6d089395dfb5f7b97fe69b512249607873d118709b0590fb82c366a2e833acb193845bbd55af2f35b11ab9ebb8214a03c045b116 WHIRLPOOL 0999e74a76a0d8e08ab768f85eefb24c6b017ddb7e138dd375ea09a10101566f22970b649e39cba09028b9cb2f7e270c6f3477a67dff251637770a1461e47b78 DIST AssaultCube_v1.1.0.4.tar.bz2 47051151 SHA256 fea2056aa7262617b96b06ea0b85422bcec54d88cd88689c2c73ade3bd0ba029 SHA512 5cfe967a1df27b7c294ae1460c9aa7ba26b83430b0ddaa448b3efc5f8244e9a2ce43ba7fcf678d0e9f1c1810c45de7c521186cf19a5ea0028d754836fdc5858d WHIRLPOOL 990a7c0797d2dfbbc3ba3f8da5a66fd0e9450ef4b643b7989c2956170cb79ad4ae7bed93286ebefac9d37e9c286e92edf24a8f3a4a0e7f30050a2a05bd1ff6e6 DIST AssaultCube_v1.1.0.4_source.tar.bz2 2560572 SHA256 045925610c54b2764a79286aeb1942df2cc5ce52b710c26b447eea69fa6b1129 SHA512 0248fe9e504863725fa627de823422fa47fdb263fffdbb6cad8eb23096390ffdec2a219fcf1e3c4e41fb944970a4f292fa4f5dd9a4a485f022d9dc49ee2743bf WHIRLPOOL 89ec7660a7883abd16178497c609b980e9a08cf3be6ba5e80c64aea2b23a8b602b1ee3a1670c8f5bcf96d18befec319ce7e1346b13f347585b74c7677ef2d024 -EBUILD assaultcube-1.1.0.4.ebuild 2398 SHA256 3160b8dd14809b0495ef8c3499f48c26bcea30281a37e439396a981ed1869075 SHA512 9bc927cd6ecad7ef058146d3ea3fbaa84865e39d7e45e5b3298e5be528cb98e8a5f7824f8defea990f83f38ba55448fb735ef1386ed8dca5ed1fe24126bea059 WHIRLPOOL 836003590d7d8f18a613e665665ac74e21594c4d8f7c3e129dbc1c758889b8e119e588e945daa83e874eecffc0c7b331669f142aec62a6777d1f28cc16940dff -MISC ChangeLog 1052 SHA256 c35742ff6688f768238ec726b262029cefe8c8a8053d2ea4f52fb2aa1f7a323f SHA512 7f912e0abfdd97e095eb773c067e8f8e6b5847f4a48c82d436f7bcc726dcb86f468a212230f37582e12ab83d19c2491bf5a489b1681b4582431fdf352b95dca3 WHIRLPOOL 69a7b088bb7e002a58a19bc401ac331e1a15bb7cd94358c69cdd44bbde123148535214ea0245cb488d69626ed9993d169648346acc64879aefe5c90d6eefe99b +DIST assaultcube.png 3794 SHA256 a5a8edbe202c025276774e756f169bfe0e0d9597025f3d9e1e69decd7d9b6689 SHA512 1709673463c949d9bf9a1ab8428a76dee29a7e7f19ef5b734c3bc6feb3e7b9eff86b6bf34a286f4bb077356aae2807984c3ab94cf2d84aea32fc6520d55a89fc WHIRLPOOL e182e03ff704a60a0157ed2ea0795263a5bd046429c889eabf37a1c5b45fbb4dea00b83ca0a2e2957c5bfde6acca806e0df75c7cae91b68fe37e79e3a58c8d67 +EBUILD assaultcube-1.1.0.4.ebuild 2230 SHA256 071164671b0b71497efb0a47ff0bc9465d61aebe0abbd8288b52daeae2041361 SHA512 2ff909cc06457ef42e216d66e0247803c28d7154e4a5b952909c4c422b2a1b08ee26d7a4605fb2b29fec3b681eb1d0926824a37b8a5ce29d3269d390874b46b9 WHIRLPOOL 276c248b94ddb94654b39d32d3f51be578f113ea9313e156728620f8c9ceb61a148016c5860d5ffff90c51c91c0880a11ec7b8306e33ca8e5fbacf0dea850146 +MISC ChangeLog 1195 SHA256 f9f5738e9d45696bd55a4aae0d77d81870a120dcce691612100d8f1dfd935043 SHA512 89606d2977bb587a54f1cbdde85d6b64d789b093ce22b460690539951f75989e3e873ad37eb0cc0da2bab3506d5540eb9b634184ab1b1bc1531658024ccb8504 WHIRLPOOL bed2a0263d1665b3c88ababa61f66460899594af1b6c93f20955eefc216ab9554d521cba047002504c8dc0c2ea811331984c0aed6a5d946d88331028c0d70cbb MISC metadata.xml 208 SHA256 c4841c87f0c2b9b5e679a27dc72180be8d508fb3f5df0fbab2ec2c805c0a6d82 SHA512 21d90d4547c76c80e50e134359dfbec42b158bbc16e4741738bdde5f67b7926d158dae1905948a477405b74e754ce4ed63cad910f220a709db8dfccf160e5288 WHIRLPOOL 33ec53f42c7a8c4c419989bd94e083c417574463e19c9c1322e6b96d0f5a6a52e3dd69fbedf2d11a7a77d24a93b81f3a604b6b33cac62548389537bf3e42df0e diff --git a/games-fps/assaultcube/assaultcube-1.1.0.4.ebuild b/games-fps/assaultcube/assaultcube-1.1.0.4.ebuild index 7642499e9..59d405f17 100644 --- a/games-fps/assaultcube/assaultcube-1.1.0.4.ebuild +++ b/games-fps/assaultcube/assaultcube-1.1.0.4.ebuild @@ -2,90 +2,101 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI=2 +EAPI=5 -inherit eutils games multilib toolchain-funcs +inherit eutils gnome2-utils games +MY_PN="AssaultCube" DESCRIPTION="Fast and fun first-person-shooter based on the Cube fps" HOMEPAGE="http://assault.cubers.net" -MY_PN="AssaultCube" - -SRC_URI="mirror://sourceforge/actiongame/${MY_PN}%20Version%20${PV}/${MY_PN}_v${PV}.tar.bz2 - mirror://sourceforge/actiongame/${MY_PN}%20Version%20${PV}/${MY_PN}_v${PV}_source.tar.bz2" +SRC_URI="mirror://sourceforge/actiongame/AssaultCube%20Version%20${PV}/${MY_PN}_v${PV}.tar.bz2 + mirror://sourceforge/actiongame/AssaultCube%20Version%20${PV}/${MY_PN}_v${PV}_source.tar.bz2 + http://dev.gentoo.org/~hasufell/distfiles/${PN}.png" LICENSE="ZLIB" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="dedicated doc opengl" +IUSE="dedicated doc server" -RDEPEND="opengl? ( - media-libs/libsdl +RDEPEND=" + >=net-libs/enet-1.3.0:1.3 + sys-libs/zlib + !dedicated? ( + media-libs/libsdl[X,opengl,video] media-libs/libogg media-libs/libvorbis media-libs/openal - media-libs/sdl-image + media-libs/sdl-image[jpeg,png] virtual/opengl - x11-libs/libX11 )" + x11-libs/libX11 + )" DEPEND="${RDEPEND} - >=net-libs/enet-1.2.1" + virtual/pkgconfig" S=${WORKDIR}/${PV} -pkg_setup() { - if ! use dedicated && ! use opengl ; then - eerror "You need to set USE=dedicated for game server or USE=opengl for game client." - die - fi -} - src_prepare() { + epatch "${FILESDIR}"/${PN}-1.1.0.4-QA.patch + + # remove unsued stuff rm -r bin_unix/* || die - find packages -name readme.txt -exec rm -f {} + || die - #winicontoppm fails with compressed icons - #winicontoppm source/vcpp/buildEnv/icon.ico | ppmtoxpm > ${PN}.xpm || die - mv source/vcpp/buildEnv/icon.ico ${PN}.ico || die - sed -i -e "/^CUBE_DIR=/d ; 2iCUBE_DIR=$(games_get_libdir)/${PN}" ${PN}.sh server.sh || die - sed -i -e "s:bin_unix/\${SYSTEM_NAME}\${MACHINE_NAME}:ac_:" ${PN}.sh server.sh || die - sed -i -e "s:cd \${CUBE_DIR}:cd ${GAMES_DATADIR}/${PN}:" ${PN}.sh server.sh || die + find packages -name readme.txt -delete || die + + # respect FHS and fix binary name + sed -i \ + -e "/^CUBE_DIR=/d ; 2iCUBE_DIR=$(games_get_libdir)/${PN}" \ + -e "s:bin_unix/\${SYSTEM_NAME}\${MACHINE_NAME}:ac_:" \ + -e "s:cd \${CUBE_DIR}:cd ${GAMES_DATADIR}/${PN}:" \ + ${PN}.sh server.sh || die + + # remove bundled enet + rm -r source/enet || die } src_compile() { - tc-export CXX - emake -C source/src CXXOPTFLAGS="${CXXFLAGS}" libenet || die - if use opengl ; then - emake -C source/src CXXOPTFLAGS="${CXXFLAGS}" client || die - fi - if use dedicated ; then - emake -C source/src CXXOPTFLAGS="${CXXFLAGS}" server || die - fi + BUNDLED_ENET=NO \ + emake -C source/src \ + $(usex dedicated "" "client") \ + $(usex dedicated "server" "$(usex server "server" "")") } src_install() { insinto "${GAMES_DATADIR}/${PN}" - - #doins -r bot config packages || die - doins -r config packages || die + doins -r config packages exeinto "$(games_get_libdir)/${PN}" - if use opengl ; then - doexe source/src/ac_client || die - newgamesbin ${PN}.sh ${PN} || die + if ! use dedicated ; then + doexe source/src/ac_client + newgamesbin ${PN}.sh ${PN} make_desktop_entry ${PN} ${MY_PN} ${PN} fi - if use dedicated ; then - doexe source/src/ac_server || die - newgamesbin server.sh ${PN}-server || die + + if use dedicated || use server ; then + doexe source/src/ac_server + newgamesbin server.sh ${PN}-server make_desktop_entry ${PN}-server "${MY_PN} Server" ${PN} fi - insinto /usr/share/pixmaps -# doins ${PN}.xpm || die - doins ${PN}.ico || die + + doicon -s 48 "${DISTDIR}"/${PN}.png if use doc ; then rm -r docs/autogen || die - dohtml -r docs/* || die + dohtml -r docs/* fi prepgamesdirs } +pkg_preinst() { + games_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + games_pkg_postinst + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/games-fps/assaultcube/files/assaultcube-1.1.0.4-QA.patch b/games-fps/assaultcube/files/assaultcube-1.1.0.4-QA.patch new file mode 100644 index 000000000..bf8011d49 --- /dev/null +++ b/games-fps/assaultcube/files/assaultcube-1.1.0.4-QA.patch @@ -0,0 +1,171 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Wed Mar 20 15:05:13 UTC 2013 +Subject: build system + +* respect system CXXFLAGS +* respect LDFLAGS in linking invocation +* use PKG_CONFIG where possible +* make bundled enet switchable +* fix underlinking on X11 + +--- 1.1.0.4/source/src/Makefile ++++ 1.1.0.4/source/src/Makefile +@@ -1,32 +1,77 @@ +-//CXX=g++-gcc-4.2.3 +-CXXFLAGS= -O3 -fomit-frame-pointer ++## options ++# set to YES or NO ++# ++# BUNDLED_ENET=YES (use bundled enet) ++# ++# MINGWBUILD=YES (mingw build) ++ ++ ++CXXFLAGS ?= -O3 -fomit-frame-pointer + override CXXFLAGS+= -Wall -fsigned-char + ++PKG_CONFIG ?= pkg-config ++ + PLATFORM= $(shell uname -s) + PLATFORM_PREFIX=native + +-INCLUDES= -I. -Ibot -I../enet/include ++INCLUDES = -I. -Ibot + +-STRIP= +-ifeq (,$(findstring -g,$(CXXFLAGS))) +-ifeq (,$(findstring -pg,$(CXXFLAGS))) +- STRIP=strip +-endif ++BUNDLED_ENET ?= YES ++ifeq ($(BUNDLED_ENET),YES) ++INCLUDES += -I../enet/include ++else ++INCLUDES += $(shell $(PKG_CONFIG) --cflags libenet) + endif + ++ ++STRIP= ++ + MV=mv + + ifneq (,$(findstring MINGW,$(PLATFORM))) ++MINGWBUILD=YES ++endif ++ ++ifeq ($(MINGWBUILD),YES) + WINDRES= windres + CLIENT_INCLUDES= $(INCLUDES) -I../include + # -lSDL_ttf + CLIENT_LIBS= -mwindows -L../lib -lSDL -lSDL_image -lzdll -lopengl32 -lenet -lOpenAL32 -llibvorbisfile -llibintl -lws2_32 -lwinmm + else +-USRLIB=$(shell if [ -e /usr/lib64 ]; then echo "/usr/lib64"; else echo "/usr/lib"; fi) + override CXXFLAGS+= -rdynamic +-CLIENT_INCLUDES= $(INCLUDES) -I/usr/include `sdl-config --cflags` -idirafter ../include ++CLIENT_INCLUDES= \ ++ $(INCLUDES) \ ++ -I/usr/include \ ++ `sdl-config --cflags` \ ++ -idirafter ../include \ ++ $(shell $(PKG_CONFIG) --cflags SDL_image) \ ++ $(shell $(PKG_CONFIG) --cflags zlib) \ ++ $(shell $(PKG_CONFIG) --cflags gl) \ ++ $(shell $(PKG_CONFIG) --cflags openal) \ ++ $(shell $(PKG_CONFIG) --cflags vorbisfile) \ ++ $(shell $(PKG_CONFIG) --cflags x11) ++ ++ifneq ($(BUNDLED_ENET),YES) ++CLIENT_INCLUDES += $(shell $(PKG_CONFIG) --cflags libenet) ++endif ++ + # -lSDL_ttf +-CLIENT_LIBS= -L../enet/.libs -lenet -L$(USRLIB) `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile ++CLIENT_LIBS= \ ++ `sdl-config --libs` \ ++ $(shell $(PKG_CONFIG) --libs SDL_image) \ ++ $(shell $(PKG_CONFIG) --libs zlib) \ ++ $(shell $(PKG_CONFIG) --libs gl) \ ++ $(shell $(PKG_CONFIG) --libs openal) \ ++ $(shell $(PKG_CONFIG) --libs vorbisfile) \ ++ $(shell $(PKG_CONFIG) --libs x11) ++ ++ ++ifeq ($(BUNDLED_ENET),YES) ++CLIENT_LIBS += -L../enet/.libs -lenet ++else ++CLIENT_LIBS += $(shell $(PKG_CONFIG) --libs libenet) ++endif ++ + endif + + CLIENT_OBJS= \ +@@ -83,17 +128,27 @@ + bot/bot_waypoint.o \ + bot/ac_bot.o \ + bot/ac_bot_ai.o +-ifneq (,$(findstring MINGW,$(PLATFORM))) ++ifeq ($(MINGWBUILD),YES) + CLIENT_OBJS+= ../vcpp/SDL_win32_main.o + endif + CLIENT_PCH= cube.h.gch + +-ifneq (,$(findstring MINGW,$(PLATFORM))) ++ifeq ($(MINGWBUILD),YES) + SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I../include + SERVER_LIBS= -L../lib -lzdll -lenet -llibintl -lws2_32 -lwinmm + else +-SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) +-SERVER_LIBS= -L../enet/.libs -lenet -lz ++SERVER_INCLUDES= \ ++ -DSTANDALONE \ ++ $(INCLUDES) \ ++ $(shell $(PKG_CONFIG) --cflags zlib) ++ ++SERVER_LIBS= $(shell $(PKG_CONFIG) --libs zlib) ++ifeq ($(BUNDLED_ENET),YES) ++SERVER_LIBS += -L../enet/.libs -lenet ++else ++SERVER_LIBS += $(shell $(PKG_CONFIG) --libs libenet) ++endif ++ + endif + + SERVER_OBJS= \ +@@ -146,7 +201,7 @@ + $(SERVER_OBJS): CXXFLAGS += $(SERVER_INCLUDES) + $(filter-out $(SERVER_OBJS),$(MASTER_OBJS)): CXXFLAGS += $(SERVER_INCLUDES) + +-ifneq (,$(findstring MINGW,$(PLATFORM))) ++ifeq ($(MINGWBUILD),YES) + ../vcpp/%.o: + $(CXX) $(CXXFLAGS) -c -o $@ $(subst .o,.c,$@) + +@@ -164,14 +219,25 @@ + server_install: server + + else ++ifeq ($(BUNDLED_ENET),YES) + client: libenet $(CLIENT_OBJS) +- $(CXX) $(CXXFLAGS) -o ac_client $(CLIENT_OBJS) $(CLIENT_LIBS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o ac_client $(CLIENT_OBJS) $(CLIENT_LIBS) + + server: libenet $(SERVER_OBJS) +- $(CXX) $(CXXFLAGS) -o ac_server $(SERVER_OBJS) $(SERVER_LIBS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o ac_server $(SERVER_OBJS) $(SERVER_LIBS) + + master: libenet $(MASTER_OBJS) +- $(CXX) $(CXXFLAGS) -o ac_master $(MASTER_OBJS) $(SERVER_LIBS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o ac_master $(MASTER_OBJS) $(SERVER_LIBS) ++else ++client: $(CLIENT_OBJS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o ac_client $(CLIENT_OBJS) $(CLIENT_LIBS) ++ ++server: $(SERVER_OBJS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o ac_server $(SERVER_OBJS) $(SERVER_LIBS) ++ ++master: $(MASTER_OBJS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o ac_master $(MASTER_OBJS) $(SERVER_LIBS) ++endif + + client_install: client + cp ac_client ../../bin_unix/$(PLATFORM_PREFIX)_client |