summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2013-02-09 23:03:05 +0000
committerJulian Ospald <hasufell@gentoo.org>2013-02-09 23:03:05 +0000
commitd176551e776eb194897dc2cba800f312fae7aa33 (patch)
tree5b0cf5cd7fe5e7f3ee4336d11efd5cb89917d23e /games-fps
parentarm/ppc64 stable wrt #452556 (diff)
downloadgentoo-2-d176551e776eb194897dc2cba800f312fae7aa33.tar.gz
gentoo-2-d176551e776eb194897dc2cba800f312fae7aa33.tar.bz2
gentoo-2-d176551e776eb194897dc2cba800f312fae7aa33.zip
version bump
(Portage version: 2.2.0_alpha161/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-20130207.3467.ebuild150
-rw-r--r--games-fps/eduke32/files/eduke32-20130207.3467-QA.patch153
3 files changed, 310 insertions, 1 deletions
diff --git a/games-fps/eduke32/ChangeLog b/games-fps/eduke32/ChangeLog
index 4f79f96a6c9b..ed34b3955826 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.2 2013/02/09 14:05:48 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/eduke32/ChangeLog,v 1.3 2013/02/09 23:03:05 hasufell Exp $
+
+*eduke32-20130207.3467 (09 Feb 2013)
+
+ 09 Feb 2013; Julian Ospald <hasufell@gentoo.org>
+ +eduke32-20130207.3467.ebuild, +files/eduke32-20130207.3467-QA.patch:
+ version bump
09 Feb 2013; Julian Ospald <hasufell@gentoo.org>
files/eduke32-20130201.3453-QA.patch:
diff --git a/games-fps/eduke32/eduke32-20130207.3467.ebuild b/games-fps/eduke32/eduke32-20130207.3467.ebuild
new file mode 100644
index 000000000000..4b43cfcbc19d
--- /dev/null
+++ b/games-fps/eduke32/eduke32-20130207.3467.ebuild
@@ -0,0 +1,150 @@
+# 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-20130207.3467.ebuild,v 1.1 2013/02/09 23:03:05 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#*.}
+
+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"
+
+LICENSE="GPL-2 BUILDLIC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cdinstall debug demo +opengl +png +server tools +vpx"
+REQUIRED_USE="vpx? ( opengl )"
+
+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
+ x11-libs/gtk+:2
+ opengl? ( virtual/glu
+ virtual/opengl )
+ png? ( media-libs/libpng:0
+ sys-libs/zlib )
+ vpx? ( media-libs/libvpx )"
+DEPEND="${RDEPEND}
+ x86? ( dev-lang/nasm )"
+PDEPEND="cdinstall? ( games-fps/duke3d-data )
+ demo? ( games-fps/duke3d-demodata )"
+
+S=${WORKDIR}/${PN}_${MY_PV}-${MY_BUILD}
+
+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;" \
+ -e "s;mapster32.log;${GAMES_LOGDIR}/mapster32.log;" \
+ source/astub.c || die "sed astub.c path update failed"
+ sed -i \
+ -e "s;/usr/local/share/games/${PN};${GAMES_DATADIR}/duke3d;" \
+ -e "s;${PN}.log;${GAMES_LOGDIR}/${PN}.log;" \
+ source/game.c || die "sed game.c path update failed"
+}
+
+src_compile() {
+ local MY_OPTS=(
+ ARCH=
+ LTO=0
+ PRETTY_OUTPUT=0
+ RELEASE=1
+ LUNATIC=0
+ STRIP=touch
+ LINKED_GTK=1
+ CPLUSPLUS=0
+ $(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() {
+ dogamesbin ${PN} mapster32
+
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins package/{SEHELP.HLP,STHELP.HLP,m32help.hlp,names.h,tiles.cfg}
+ 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
+
+ make_desktop_entry ${PN} EDuke32 ${PN}
+ make_desktop_entry mapster32 Mapster32 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
+
+ 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-20130207.3467-QA.patch b/games-fps/eduke32/files/eduke32-20130207.3467-QA.patch
new file mode 100644
index 000000000000..534c507e0a4a
--- /dev/null
+++ b/games-fps/eduke32/files/eduke32-20130207.3467-QA.patch
@@ -0,0 +1,153 @@
+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
+@@ -308,10 +308,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
+@@ -163,7 +163,6 @@
+ FORCEWARNINGS?=0
+ EFENCE?=0
+ DMALLOC?=0
+-OPTLEVEL?=2
+ PROFILER?=0
+ MUDFLAP?=0
+
+@@ -269,10 +268,9 @@
+
+ # compiler flags etc.
+ BASECFLAGS=
+-BASECONLYFLAGS=-Wimplicit -Wdeclaration-after-statement
+-BASECXXFLAGS= -fno-exceptions -fno-rtti -fpermissive -Wno-write-strings -Wno-narrowing
+-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)))
+@@ -300,14 +298,11 @@
+ debug=-g
+ else ifeq ($(PLATFORM), WII)
+ debug=-g
+- else
+- debug=-ggdb
+ endif
+ endif
+
+ ifneq (0,$(RELEASE))
+ # Debugging disabled
+- debug+= -O$(OPTLEVEL)
+ ifeq (0,$(CLANG))
+ debug+= -funswitch-loops
+ ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \< 4)))
+@@ -330,7 +325,6 @@
+ endif
+ else
+ # Debugging enabled
+- debug+= -O0
+
+ ifeq (0,$(DEBUGANYWAY))
+ debug+= -DDEBUGGINGAIDS
+@@ -411,7 +405,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.0-beta8/src
+@@ -424,14 +418,14 @@
+ 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
+
+ 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
+@@ -166,13 +166,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
+
++ifeq ($(PRETTY_OUTPUT),1)
+ .SILENT:
++endif
+ .PHONY: clean cleanutils veryclean all utils dxutils sdlutils printutils printsdlutils printdxutils enginelib editorlib
+
+ # TARGETS
+@@ -265,7 +267,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