summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2013-06-28 00:07:21 +0000
committerJulian Ospald <hasufell@gentoo.org>2013-06-28 00:07:21 +0000
commit26eaccbc6e39345d6285a82dd1877fe42331c200 (patch)
treec442b64c7b2f0feca064cff07f1b8a39d6e6b128 /games-fps
parentFix library paths when not cross-compiling. Should resolve bug 474882. Thanks... (diff)
downloadgentoo-2-26eaccbc6e39345d6285a82dd1877fe42331c200.tar.gz
gentoo-2-26eaccbc6e39345d6285a82dd1877fe42331c200.tar.bz2
gentoo-2-26eaccbc6e39345d6285a82dd1877fe42331c200.zip
version bump
(Portage version: 2.2.0_alpha185/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/eduke32/ChangeLog8
-rw-r--r--games-fps/eduke32/eduke32-20130627.3905.ebuild216
-rw-r--r--games-fps/eduke32/files/eduke32-20130627.3905-QA.patch160
3 files changed, 383 insertions, 1 deletions
diff --git a/games-fps/eduke32/ChangeLog b/games-fps/eduke32/ChangeLog
index c3fd726a8070..305fa22f792d 100644
--- a/games-fps/eduke32/ChangeLog
+++ b/games-fps/eduke32/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-fps/eduke32
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/eduke32/ChangeLog,v 1.7 2013/04/11 14:16:54 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/eduke32/ChangeLog,v 1.8 2013/06/28 00:07:21 hasufell Exp $
+
+*eduke32-20130627.3905 (28 Jun 2013)
+
+ 28 Jun 2013; Julian Ospald <hasufell@gentoo.org>
+ +eduke32-20130627.3905.ebuild, +files/eduke32-20130627.3905-QA.patch:
+ version bump
11 Apr 2013; Julian Ospald <hasufell@gentoo.org>
eduke32-20130317.3572-r1.ebuild,
diff --git a/games-fps/eduke32/eduke32-20130627.3905.ebuild b/games-fps/eduke32/eduke32-20130627.3905.ebuild
new file mode 100644
index 000000000000..25645339d2d0
--- /dev/null
+++ b/games-fps/eduke32/eduke32-20130627.3905.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/eduke32/eduke32-20130627.3905.ebuild,v 1.1 2013/06/28 00:07:21 hasufell Exp $
+
+# TODO/FIXME:
+# lunatic broken
+# lunatic? ( >=dev-lang/luajit-2.0.0_beta10:2 )
+# $(usex lunatic "LUNATIC=1" "LUNATIC=0")
+#
+# extras? ( games-fps/${PN}-extras )
+
+EAPI=5
+
+inherit eutils gnome2-utils games
+
+MY_PV=${PV%.*}
+MY_BUILD=${PV#*.}
+
+# extensions
+MY_HRP=5.2
+MY_SC55=3.0
+MY_OPL=2.0
+MY_XXX=1.33
+
+DESCRIPTION="Port of Duke Nukem 3D for SDL"
+HOMEPAGE="http://www.eduke32.com/ http://hrp.duke4.net/"
+SRC_URI="http://dukeworld.duke4.net/eduke32/synthesis/${MY_PV}-${MY_BUILD}/${PN}_src_${MY_PV}-${MY_BUILD}.tar.bz2
+ http://dev.gentoo.org/~hasufell/distfiles/eduke32-icons.tar
+ textures? ( http://www.duke4.org/files/nightfright/duke3d_hrp.zip -> duke3d_hrp_${MY_HRP}.zip )
+ sc55-musicpack? ( http://www.duke4.org/files/nightfright/music/duke3d_mus.zip -> duke3d_mus_${MY_SC55}.zip )
+ opl-musicpack? ( http://www.duke4.org/files/nightfright/music/duke3d_musopl.zip -> duke3d_musopl_${MY_OPL}.zip )
+ offensive? ( http://www.duke4.org/files/nightfright/duke3d_xxx.zip -> duke3d_xxx_${MY_XXX}.zip )"
+
+LICENSE="GPL-2 BUILDLIC textures? ( hrp_art )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cdinstall debug demo gtk offensive +opengl opl-musicpack +png samples sc55-musicpack +server textures tools +vpx"
+REQUIRED_USE="vpx? ( opengl )
+ textures? ( opengl )
+ offensive? ( textures )
+ ?? ( opl-musicpack sc55-musicpack )"
+
+RDEPEND="media-libs/flac
+ media-libs/libogg
+ media-libs/libsdl[X,joystick,opengl?,video]
+ media-libs/libvorbis
+ media-libs/sdl-mixer[timidity]
+ sys-libs/zlib
+ gtk? ( x11-libs/gtk+:2 )
+ opengl? ( virtual/glu
+ virtual/opengl )
+ png? ( media-libs/libpng:0=
+ sys-libs/zlib )
+ vpx? ( media-libs/libvpx )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ x86? ( dev-lang/nasm )"
+PDEPEND="cdinstall? ( games-fps/duke3d-data )
+ demo? ( games-fps/duke3d-demodata )"
+
+S=${WORKDIR}/${PN}_${MY_PV}-${MY_BUILD}
+
+src_unpack() {
+ unpack ${PN}_src_${MY_PV}-${MY_BUILD}.tar.bz2 eduke32-icons.tar
+
+ if use textures; then
+ unzip -q "${DISTDIR}"/duke3d_hrp_${MY_HRP}.zip "hrp_readme.txt" \
+ || die "unzip hrp readme"
+ if use offensive; then
+ unzip -q "${DISTDIR}"/duke3d_xxx_${MY_XXX}.zip "xxx_readme.txt" \
+ || die "unzip xxx readme"
+ fi
+ fi
+ if use opl-musicpack; then
+ unzip -q "${DISTDIR}"/duke3d_musopl_${MY_OPL}.zip "readme.txt" \
+ || die "unzip musopl readme"
+ mv readme.txt musopl_readme.txt || die "mv musopl_readme"
+ elif use sc55-musicpack; then
+ unzip -q "${DISTDIR}"/duke3d_mus_${MY_SC55}.zip "music_readme.txt" \
+ || die "unzip mus readme"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-QA.patch
+
+ # Point eduke32 to data files in shared duke3d folder.
+ # Multiple search paths can be defined, so that with the default configuration as of
+ # the 20130128 release, this adds /usr/share/games/duke3d in ADDITION to
+ # /usr/share/games/eduke32 so that eduke32 and duke3d's base data can be kept separate.
+ # also redirect log file so it's not always written in $PWD
+ sed -i \
+ -e "s;/usr/local/share/games/${PN};${GAMES_DATADIR}/duke3d;" \
+ source/common.c || die "sed common.c path update failed"
+ sed -i \
+ -e "/OSD_SetLogFile/s;mapster32.log;${GAMES_LOGDIR}/mapster32.log;" \
+ source/astub.c || die "sed astub.c path update failed"
+ sed -i \
+ -e "/OSD_SetLogFile/s;${PN}.log;${GAMES_LOGDIR}/${PN}.log;" \
+ source/game.c || die "sed game.c path update failed"
+}
+
+src_compile() {
+ local MY_OPTS=(
+ AS=$(type -P nasm)
+ ARCH=
+ SYSARCH=
+ LTO=0
+ PRETTY_OUTPUT=0
+ RELEASE=1
+ LUNATIC=0
+ STRIP=touch
+ LINKED_GTK=1
+ CPLUSPLUS=0
+ $(usex gtk "WITHOUT_GTK=0" "WITHOUT_GTK=1")
+ $(usex debug "DEBUGANYWAY=1" "DEBUGANYWAY=0")
+ $(usex x86 "NOASM=0" "NOASM=1")
+ $(usex server "NETCODE=1" "NETCODE=0")
+ $(usex opengl "USE_OPENGL=1 POLYMER=1" "USE_OPENGL=0 POLYMER=0")
+ $(usex png "USE_LIBPNG=1" "USE_LIBPNG=0")
+ $(usex vpx "USE_LIBVPX=1" "USE_LIBVPX=0")
+ )
+
+ emake ${MY_OPTS[@]}
+
+ if use tools; then
+ emake -C build ${MY_OPTS[@]}
+ fi
+}
+
+src_install() {
+ local ARGS
+
+ newgamesbin ${PN} ${PN}.bin
+ dogamesbin mapster32
+
+ if use tools; then
+ dobin build/{arttool,bsuite,cacheinfo,generateicon,givedepth,kextract,kgroup,kmd2tool,md2tool,mkpalette,transpal,unpackssi,wad2art,wad2map}
+ dodoc build/doc/*.txt
+ fi
+
+ insinto "${GAMES_DATADIR}/${PN}"
+ # Install optional components
+ if use textures; then
+ newins "${DISTDIR}"/duke3d_hrp_${MY_HRP}.zip duke3d_hrp.zip
+ dodoc "${WORKDIR}"/hrp_readme.txt
+ ARGS+=" -g duke3d_hrp.zip"
+
+ if use offensive; then
+ newins "${DISTDIR}"/duke3d_xxx_${MY_XXX}.zip duke3d_xxx.zip
+ dodoc "${WORKDIR}"/xxx_readme.txt
+ ARGS+=" -g duke3d_xxx.zip"
+ fi
+ fi
+
+ if use opl-musicpack; then
+ newins "${DISTDIR}"/duke3d_musopl_${MY_OPL}.zip duke3d_musopl.zip
+ dodoc "${WORKDIR}"/musopl_readme.txt
+ ARGS+=" -g duke3d_musopl.zip"
+ elif use sc55-musicpack; then
+ newins "${DISTDIR}"/duke3d_mus_${MY_SC55}.zip duke3d_mus.zip
+ dodoc "${WORKDIR}"/music_readme.txt
+ ARGS+=" -g duke3d_mus.zip"
+ fi
+
+ # Install game data
+ doins package/{SEHELP.HLP,STHELP.HLP,m32help.hlp,names.h,tiles.cfg}
+ use samples && doins -r package/samples
+
+ local i
+ for i in 16 32 128 256 ; do
+ newicon -s ${i} "${WORKDIR}"/${PN}_${i}x${i}x32.png ${PN}.png
+ newicon -s ${i} "${WORKDIR}"/mapster32_${i}x${i}x32.png mapster32.png
+ done
+
+ games_make_wrapper "${PN}" "${GAMES_BINDIR}/${PN}.bin ${ARGS}"
+ make_desktop_entry ${PN} EDuke32 ${PN}
+ make_desktop_entry mapster32 Mapster32 mapster32
+
+ dodoc build/buildlic.txt
+
+ dodir "${GAMES_LOGDIR}"
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ use cdinstall || use demo || {
+ elog "Note: You must also install the game data files, either manually or with"
+ elog "games-fps/duke3d-demodata or games-fps/duke3d-data before playing."
+ }
+
+ einfo
+ elog "${PN} reads data files from ${GAMES_DATADIR}/duke3d"
+ einfo
+
+ [[ -e ${ROOT}/${GAMES_LOGDIR} ]] || mkdir -p "${ROOT}/${GAMES_LOGDIR}"
+ touch "${ROOT}/${GAMES_LOGDIR}"/${PN}.log
+ touch "${ROOT}/${GAMES_LOGDIR}"/mapster32.log
+ chown ${GAMES_USER}:${GAMES_GROUP} "${ROOT}/${GAMES_LOGDIR}"/${PN}.log
+ chown ${GAMES_USER}:${GAMES_GROUP} "${ROOT}/${GAMES_LOGDIR}"/mapster32.log
+ chmod g+w "${ROOT}/${GAMES_LOGDIR}"/${PN}.log
+ chmod g+w "${ROOT}/${GAMES_LOGDIR}"/mapster32.log
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-fps/eduke32/files/eduke32-20130627.3905-QA.patch b/games-fps/eduke32/files/eduke32-20130627.3905-QA.patch
new file mode 100644
index 000000000000..1c73fb63b33a
--- /dev/null
+++ b/games-fps/eduke32/files/eduke32-20130627.3905-QA.patch
@@ -0,0 +1,160 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sat Feb 2 01:16:21 UTC 2013
+Subject: build system
+
+ respect CC/CXX etc and CFLAGS/CXXFLAGS/LDFLAGS
+
+--- eduke32_20130201-3453/Makefile
++++ eduke32_20130201-3453/Makefile
+@@ -311,10 +311,10 @@
+ endif
+
+ COMPILER=$(CC) $(OURCONLYFLAGS)
+-LINKER=$(L_CC)
++LINKER=$(L_CC) $(OURCFLAGS) $(OURCONLYFLAGS)
+ ifneq ($(CPLUSPLUS),0)
+ COMPILER=$(CXX) $(OURCXXFLAGS)
+- LINKER=$(L_CXX)
++ LINKER=$(L_CXX) $(OURCXXFLAGS)
+ endif
+
+ ifeq ($(PRETTY_OUTPUT),1)
+--- eduke32_20130201-3453/Makefile.common
++++ eduke32_20130201-3453/Makefile.common
+@@ -8,13 +8,14 @@
+ PRETTY_OUTPUT ?= 1
+
+ # Tools
+-CC=gcc
+-CXX=g++
+-AS=nasm
+-AR=ar
+-RC=windres
+-RANLIB=ranlib
+-STRIP=strip
++CC ?= gcc
++CXX ?= g++
++AS ?= nasm
++AR ?= ar
++RC ?= windres
++RANLIB ?= ranlib
++STRIP ?= strip
++PKG_CONFIG ?= pkgconfig
+
+ L_CC=$(CC)
+ L_CXX=$(CXX)
+@@ -152,7 +153,6 @@
+ # FORCEWARNINGS - 1 = do not disable any compiler warnings within the source
+ # KRANDDEBUG - 1 = include logging of krand() calls for debugging the demo system
+ # EFENCE - 1 = compile with Electric Fence for malloc() debugging
+-# OPTLEVEL - 0..3 = GCC optimization strategy
+ # LTO - 1 = enable link-time optimization, for GCC 4.5 and up
+ #
+ CPLUSPLUS?=0
+@@ -166,13 +166,6 @@
+ PROFILER?=0
+ MUDFLAP?=0
+
+-# Select the default optimization level for release and debug builds.
+-ifeq ($(RELEASE),0)
+- OPTLEVEL?=0
+-else
+- OPTLEVEL?=2
+-endif
+-
+ ifeq ($(RELEASE),0)
+ override STRIP=
+ endif
+@@ -275,11 +268,9 @@
+
+ # compiler flags etc.
+ BASECFLAGS=
+-BASECONLYFLAGS=-Wimplicit -Wdeclaration-after-statement
+-BASECXXFLAGS= -fno-exceptions -fno-rtti -fpermissive -Wno-write-strings
+-BASEASFLAGS=-s #-g
+-BASELDFLAGS=
+-
++BASECONLYFLAGS = $(CFLAGS) -std=gnu89 -Wimplicit -Wdeclaration-after-statement
++BASECXXFLAGS = $(CXXFLAGS) -fno-exceptions -fno-rtti -fpermissive -Wno-write-strings -Wno-narrowing
++BASELDFLAGS = $(LDFLAGS)
+
+ ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
+ ifeq (1,$(strip $(shell expr $(GCC_MINOR) \>= 1)))
+@@ -305,20 +296,6 @@
+ BASELIBS+= -lvpx
+ endif
+
+-
+-ifneq ($(RELEASE)$(DEBUGANYWAY),10)
+- # debug build or DEBUGANYWAY=1 --> -g flag
+- ifneq (0,$(CLANG))
+- debug=-g
+- else ifeq ($(PLATFORM), WII)
+- debug=-g
+- else
+- debug=-ggdb
+- endif
+-endif
+-
+-debug+= -O$(OPTLEVEL)
+-
+ ifneq (0,$(RELEASE))
+ # Debugging disabled
+ ifeq (0,$(CLANG))
+@@ -424,7 +401,7 @@
+
+ #### Lunatic development, do not touch!
+ LUNATIC=0
+-LUAJIT=luajit
++LUAJIT=$(shell command -v luajit || command -v luajit-2 || command -v luajit-2.0)
+
+ # for LJ headers:
+ LUAJIT_WIN_SRC:= g:/mod/luajit-2.0/src
+@@ -437,7 +414,7 @@
+ ifeq ($(PLATFORM),WINDOWS)
+ BASECOMMONFLAGS+= -I$(LUAJIT_WIN_SRC)
+ else
+- BASECOMMONFLAGS+= -I/usr/local/include/luajit-2.0
++ BASECOMMONFLAGS+= $(shell $(PKG_CONFIG) --cflags luajit 2>/dev/null || $(PKG_CONFIG) --cflags luajit-2.0)
+ endif
+ BASECOMMONFLAGS+= -I$(SRC)/lunatic -DLUNATIC
+
+@@ -453,7 +430,7 @@
+ ifeq ($(PLATFORM),WINDOWS)
+ BASELIBS+= -lluajit
+ else
+- BASELIBS+= -lluajit-5.1
++ BASELIBS+= $(shell $(PKG_CONFIG) --libs luajit 2>/dev/null || $(PKG_CONFIG) --libs luajit-2.0)
+ endif
+ endif
+
+--- eduke32_20130201-3453/build/Makefile
++++ eduke32_20130201-3453/build/Makefile
+@@ -167,13 +167,15 @@
+ OURCOMMONFLAGS+= $(BUILDCOMMONFLAGS)
+
+ COMPILER=$(CC) $(OURCONLYFLAGS)
+-LINKER=$(L_CC)
++LINKER=$(L_CC) $(OURCFLAGS) $(OURCONLYFLAGS)
+ ifneq ($(CPLUSPLUS),0)
+ COMPILER=$(CXX) $(OURCXXFLAGS)
+- LINKER=$(L_CXX)
++ LINKER=$(L_CXX) $(OURCXXFLAGS)
+ endif
+
+-.SILENT:
++ifeq ($(PRETTY_OUTPUT),1)
++ .SILENT:
++endif
+ .PHONY: clean cleanutils veryclean all utils dxutils sdlutils printutils printsdlutils printdxutils enginelib editorlib
+
+ # TARGETS
+@@ -266,7 +268,7 @@
+ if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
+ arttool$(EXESUFFIX): $(OBJ)/arttool.$o $(UTILADDOBJS)
+ $(ONESTEP_STATUS)
+- if $(L_CXX) -o $@ $^ $(OURLDFLAGS) $(STATICSTDCPP) $(STDCPPLIB) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
++ if $(L_CXX) $(OURCXXFLAGS) -o $@ $^ $(OURLDFLAGS) $(STATICSTDCPP) $(STDCPPLIB) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
+ givedepth$(EXESUFFIX): $(OBJ)/givedepth.$o $(UTILADDOBJS)
+ $(ONESTEP_STATUS)
+ if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi