summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2008-09-05 23:13:31 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2008-09-05 23:13:31 +0000
commit79b1a8c6cedf5cb514d7ac9879f551098c2ea19a (patch)
tree6747dff352b6f1e3b20afd1daecb6524f2f64bbd /games-sports
parentwhitespace (diff)
downloadgentoo-2-79b1a8c6cedf5cb514d7ac9879f551098c2ea19a.tar.gz
gentoo-2-79b1a8c6cedf5cb514d7ac9879f551098c2ea19a.tar.bz2
gentoo-2-79b1a8c6cedf5cb514d7ac9879f551098c2ea19a.zip
support building with --as-needed with patch from Dannee McGuire via bug #232592
(Portage version: 2.1.4.4)
Diffstat (limited to 'games-sports')
-rw-r--r--games-sports/torcs/ChangeLog7
-rw-r--r--games-sports/torcs/files/torcs-1.3.0-as-needed.patch101
-rw-r--r--games-sports/torcs/torcs-1.3.0.ebuild11
3 files changed, 114 insertions, 5 deletions
diff --git a/games-sports/torcs/ChangeLog b/games-sports/torcs/ChangeLog
index 9b6df2003359..bcbb3fb30457 100644
--- a/games-sports/torcs/ChangeLog
+++ b/games-sports/torcs/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-sports/torcs
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-sports/torcs/ChangeLog,v 1.24 2008/04/08 04:10:26 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-sports/torcs/ChangeLog,v 1.25 2008/09/05 23:13:30 mr_bones_ Exp $
+
+ 05 Sep 2008; Michael Sterrett <mr_bones_@gentoo.org>
+ +files/torcs-1.3.0-as-needed.patch, torcs-1.3.0.ebuild:
+ support building with --as-needed with patch from Dannee McGuire via bug
+ #232592
08 Apr 2008; Michael Sterrett <mr_bones_@gentoo.org>
+files/torcs-1.3.0-gcc43.patch, torcs-1.3.0.ebuild:
diff --git a/games-sports/torcs/files/torcs-1.3.0-as-needed.patch b/games-sports/torcs/files/torcs-1.3.0-as-needed.patch
new file mode 100644
index 000000000000..e0616cd93512
--- /dev/null
+++ b/games-sports/torcs/files/torcs-1.3.0-as-needed.patch
@@ -0,0 +1,101 @@
+--- configure.in
++++ configure.in
+@@ -118,8 +118,7 @@
+ AC_CHECK_LIB(Xrandr, XRRQueryVersion,,AC_MSG_ERROR([Can't find libXrandr. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+ AC_CHECK_LIB(openal, alEnable,, AC_MSG_ERROR([Can't find AL/al.h. OpenAL can be found on http://www.openal.org/]))
+ AC_CHECK_LIB(alut, alutLoadWAVFile,
+- LDFLAGS="$LDFLAGS -lalut",
+- LDFLAGS="$LDFLAGS")
++ LIBS="$LIBS -lalut", )
+
+ AC_CHECK_LIB(dl, dlopen)
+ AC_CHECK_FUNC(dlopen,,AC_MSG_ERROR([Can't find dlopen function. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+--- Make-default.mk
++++ Make-default.mk
+@@ -402,7 +402,7 @@
+ ifdef PROGRAM
+
+ ${PROGRAM}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
+- ${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${SOLIBS} ${EXT_LIBS} -o $@
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+
+ installprogram: ${PROGRAM}
+ @ createdir="${INSTLIBBASE}" ; \
+@@ -420,14 +420,14 @@
+ ifdef LOCALTOOLS
+
+ ${LOCALTOOLS}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
+- ${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${EXT_LIBS} ${SOLIBS} -o $@
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+
+ endif
+
+ ifdef TOOLS
+
+ ${TOOLS}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
+- ${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${EXT_LIBS} ${SOLIBS} -o $@
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+
+ installtools: ${TOOLS}
+ @createdir="${INSTBINBASE}/${TOOLSDIR}" ; \
+@@ -478,7 +478,7 @@
+ ifdef SOLIBRARY
+
+ ${SOLIBRARY}: ${OBJECTS}
+- ${CXX} -shared -o ${SOLIBRARY} ${OBJECTS} ${LDFLAGS} ${LIBSPATH} ${LIBS} ${DEBUG_LIBS}
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -o ${SOLIBRARY} ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+ @D=`pwd` ; \
+ createdir="${EXPORTBASE}/lib" ; \
+ $(mkinstalldirs) $$createdir ; \
+@@ -509,7 +509,7 @@
+ ifdef MODULE
+
+ ${MODULE}: ${OBJECTS}
+- ${CXX} -shared -o ${MODULE} ${OBJECTS} ${LDFLAGS} ${LIBSPATH} ${LIBS}
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -o ${MODULE} ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+ @D=`pwd` ; \
+ createdir="${EXPORTBASE}/${MODULEDIR}" ; \
+ $(mkinstalldirs) $$createdir ; \
+--- src/libs/client/Makefile
++++ src/libs/client/Makefile
+@@ -23,6 +23,8 @@
+ SOURCES = entry.cpp mainmenu.cpp splash.cpp exitmenu.cpp \
+ optionmenu.cpp
+
++SOLIBS = -lconfscreens -lraceengine
++
+ LIBS = -lplibssg -lplibsg -lplibul
+
+ EXPDIR = include
+--- src/libs/Makefile
++++ src/libs/Makefile
+@@ -23,7 +23,7 @@
+
+ TOOLSUBDIRS = txml
+
+-SUBDIRS = confscreens racescreens robottools txml tgf tgfclient client raceengineclient learning \
++SUBDIRS = confscreens racescreens robottools txml tgf tgfclient raceengineclient client learning \
+ portability math
+
+ PKGSUBDIRS = $(SUBDIRS)
+--- src/libs/raceengineclient/Makefile
++++ src/libs/raceengineclient/Makefile
+@@ -23,6 +23,8 @@
+ SOURCES = singleplayer.cpp raceinit.cpp racemain.cpp racemanmenu.cpp racestate.cpp racegl.cpp \
+ raceengine.cpp raceresults.cpp
+
++SOLIBS = -lconfscreens -lrobottools -lracescreens
++
+ EXPDIR = include
+
+ EXPORTS = singleplayer.h raceinit.h
+--- src/libs/tgf/Makefile
++++ src/libs/tgf/Makefile
+@@ -29,6 +29,7 @@
+ profiler.cpp \
+ hash.cpp
+
++SOLIBS = -ltxml
+
+ EXPDIR = include
+
diff --git a/games-sports/torcs/torcs-1.3.0.ebuild b/games-sports/torcs/torcs-1.3.0.ebuild
index 36b569dfd8cd..527c2fcc35a5 100644
--- a/games-sports/torcs/torcs-1.3.0.ebuild
+++ b/games-sports/torcs/torcs-1.3.0.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-sports/torcs/torcs-1.3.0.ebuild,v 1.6 2008/04/08 04:10:26 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-sports/torcs/torcs-1.3.0.ebuild,v 1.7 2008/09/05 23:13:30 mr_bones_ Exp $
-inherit eutils multilib games
+inherit autotools eutils multilib games
DESCRIPTION="The Open Racing Car Simulator"
HOMEPAGE="http://torcs.sourceforge.net/"
@@ -28,7 +28,11 @@ DEPEND="${RDEPEND}
src_unpack() {
unpack ${A}
cd "${S}"
- epatch "${FILESDIR}/${P}-gcc43.patch"
+ epatch \
+ "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-as-needed.patch
+ eautoreconf
+ ecvs_clean
}
src_compile() {
@@ -48,6 +52,5 @@ src_install() {
dodoc README.linux doc/history/history.txt
doman doc/man/*.6
dohtml -r doc/faq/faq.html doc/tutorials doc/userman
- rm -rf $(find "${D}/usr/share/doc" -type d -name CVS)
prepgamesdirs
}