diff options
Diffstat (limited to 'games-sports/torcs')
-rw-r--r-- | games-sports/torcs/Manifest | 10 | ||||
-rw-r--r-- | games-sports/torcs/files/torcs-1.3.6-as-needed.patch | 96 | ||||
-rw-r--r-- | games-sports/torcs/files/torcs-1.3.6-flags.patch | 14 | ||||
-rw-r--r-- | games-sports/torcs/files/torcs-1.3.6-format.patch | 34 | ||||
-rw-r--r-- | games-sports/torcs/files/torcs-1.3.6-gcc6.patch | 11 | ||||
-rw-r--r-- | games-sports/torcs/files/torcs-1.3.6-gcc7.patch | 11 | ||||
-rw-r--r-- | games-sports/torcs/files/torcs-1.3.6-no-automake.patch | 21 | ||||
-rw-r--r-- | games-sports/torcs/files/torcs-1.3.6-noXmuXt.patch | 15 | ||||
-rw-r--r-- | games-sports/torcs/metadata.xml | 11 | ||||
-rw-r--r-- | games-sports/torcs/torcs-1.3.6-r1.ebuild | 68 |
10 files changed, 291 insertions, 0 deletions
diff --git a/games-sports/torcs/Manifest b/games-sports/torcs/Manifest new file mode 100644 index 000000000000..240b415007d2 --- /dev/null +++ b/games-sports/torcs/Manifest @@ -0,0 +1,10 @@ +AUX torcs-1.3.6-as-needed.patch 4112 BLAKE2B 376469d3cce24429483abb1a363ee35fd160687659492392019a03001f2f57eaaa91177cf0903ee46249aa716e607a9638cc77d027e1dc21e9a14a5c7ce8118b SHA512 8df4f57b470100c123de5868edc471e4233bf7c8e3d23f759a822536ab28e74403375ecdbcbc404ed442d6820260db97d6c76be7d4fabdef7015722600148b2c +AUX torcs-1.3.6-flags.patch 412 BLAKE2B 40a9336f08209c1bdb7191db05c1e716a337b70573a1f2452b7f037920a19b06481d850ae301b8f9dd8738fb55553d0a1d20b21301b5e517a7b2162e070a7930 SHA512 875ee57815c11b7c12617b6ee7eec08c7759df5d50bf13f52fdc29ffc9d4cec3689368f5eecfd3ae6739dfe1b4031d1335b9dbcf1c5df0472c36f061d031759e +AUX torcs-1.3.6-format.patch 1012 BLAKE2B 4ae32d78675c84db3a1d53c407cf0d2b6df7986e83aa2aa8281171c9e5b1b2ad4d3be684492840dba5871e13b8c1ebbfa06f5e1285de71f24fe937d4b39352a9 SHA512 6368ab1df79005f5dede537b45db7ccc1943c2c53e0c696ff6b743680f2d48508e29b5ad56b10a373beddf28c82d5f123998d9e794b66ce49e0ea2226f2332aa +AUX torcs-1.3.6-gcc6.patch 215 BLAKE2B fd9b8158919590038e4b0503a98938ad7bea6b62a4103c18217c27f0bbf158ff27bc4057dfc62d6bc2c2cae079eb4abbad602f3fa391aa6b3f014fc398a8631d SHA512 9c29c78c4a2f6d2ea187f80c4c10337556ec13cf7dbe4380af37bccd0fa09a67a6209caff319a50c65f9e831b7d07c1af2c1ba8c33d9a3addc55713988fc3e46 +AUX torcs-1.3.6-gcc7.patch 338 BLAKE2B 6d77dfc0d2fa18fa453fc6300a522b87587b1cc5ea7f7fb52e82f109cec5e398a8c67a7266b8294ac013f6050381c97035e85bf1e2d4c9637036bc0487c88860 SHA512 f7627973023cc8ade584858d85e698f1d390ec03d0220cdf45b961c6bbb2cda6bd212e7d6118bbf9167a08f143a3151b09e0453ccc17dd4f2b249016baff99e7 +AUX torcs-1.3.6-no-automake.patch 597 BLAKE2B 452100175b2ee325db488149458d911f13cb073785fae3be1cdfb2ecf2835d387485b0a656f5441212a95b75931c7c9a76d000d2ace13216b31bd0ee236c0549 SHA512 ba450b2e4ed438af241d81fdd0e522f960d2e46b81ce1339a08b0238e7000ccd304b8f74e6906e1742839b754963c9bbb7efae959f4bd7ac1bf9b32d9a94d4e1 +AUX torcs-1.3.6-noXmuXt.patch 2107 BLAKE2B cac50b99f6f1400e86daee84c8aa9ea280f3dd20b4febf18e44b53afefb985499d68bc1f0bf046d227ad280d34e42bc715071061045a86ba9d75d460acb34263 SHA512 573e63f49039b40172517bd876a68b0f35ce1abca9f35b1ae68d579c5f758d1466fcc9f59c85c72aabd4672934d0df006fd9ed5a8b626067c76be1034e8d1ddb +DIST torcs-1.3.6.tar.bz2 477954437 BLAKE2B 294e2775f9d7a88b1781139793fedf1f5e79238ed46ffcda22188bdf9f991180b161ab1057fcfe72205033db43b7a134b9568055e62f2152462de4436b454726 SHA512 4116c920b92ecbf5dcd3f14a137e86685651167f68725f2ad4549b2d3d20e3dc54569685925e08ffff6e7e19e532ecb1a95ec77dfe22a542a26c9e006b0c8c0d +EBUILD torcs-1.3.6-r1.ebuild 1422 BLAKE2B bc7e2c60c9ef05ff8f6e0dfd631fae5d990b1a894197e7043293d83b2299d8e03c9c1e069fa37ba31062665c6f8921c9273ccceb29ca78a9117206aeeb5d7cf5 SHA512 d6f1d346e4b00843889ce517085d8957b27e02a20c8add3cfd0f67c2023abaaced743cd58cd621444b76b2efabecfcb47570733583f7444b7e633747dd32aad8 +MISC metadata.xml 328 BLAKE2B 1831ecefa86b7037ab920bcb5fec61a126efcf0004ba461c8f1a3fa35f7e3104fcc3c85c5834acf761aaff8d719e23c410a56ea36fc145f8731e884de5e96826 SHA512 f146cbabfd1d356485e94c0811bcdaa29b027bf054e319f6c49d8c9c50f3cb235f34f684dab42f5534ab4bfcffb440c9c8b8a2dc9f7d97316b28656d3ad1c91d diff --git a/games-sports/torcs/files/torcs-1.3.6-as-needed.patch b/games-sports/torcs/files/torcs-1.3.6-as-needed.patch new file mode 100644 index 000000000000..d848538c07ea --- /dev/null +++ b/games-sports/torcs/files/torcs-1.3.6-as-needed.patch @@ -0,0 +1,96 @@ +--- torcs-1.3.6.orig/Make-default.mk ++++ torcs-1.3.6/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} ${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} ${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} ${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} ${SOLIBS} ${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 ; \ +--- torcs-1.3.6.orig/configure.in ++++ torcs-1.3.6/configure.in +@@ -123,11 +123,11 @@ + AC_CHECK_LIB(Xxf86vm, XF86VidModeSetViewPort,,AC_MSG_ERROR([Can't find libXxf86vm. 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(Xrender, XRenderSetSubpixelOrder,,AC_MSG_ERROR([Can't find libXrender. 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(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, LDFLAGS="$LDFLAGS -lopenal", AC_MSG_ERROR([Can't find AL/al.h. OpenAL can be found on http://www.openal.org/])) ++AC_CHECK_LIB(openal, alEnable, LIBS="$LIBS -lopenal", 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") +-AC_CHECK_LIB(vorbisfile, ov_fopen, LDFLAGS="$LDFLAGS -lvorbisfile", AC_MSG_ERROR([Can't find libvorbis.])) ++ LIBS="$LIBS -lalut", ) ++AC_CHECK_LIB(vorbisfile, ov_fopen, LIBS="$LIBS -lvorbisfile", AC_MSG_ERROR([Can't find libvorbis.])) ++ + + 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\"])) +--- torcs-1.3.6.orig/src/libs/Makefile ++++ torcs-1.3.6/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 musicplayer + + PKGSUBDIRS = $(SUBDIRS) +--- torcs-1.3.6.orig/src/libs/client/Makefile ++++ torcs-1.3.6/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 +--- torcs-1.3.6.orig/src/libs/tgf/Makefile ++++ torcs-1.3.6/src/libs/tgf/Makefile +@@ -29,6 +29,7 @@ + profiler.cpp \ + hash.cpp + ++SOLIBS = -ltxml + + EXPDIR = include + diff --git a/games-sports/torcs/files/torcs-1.3.6-flags.patch b/games-sports/torcs/files/torcs-1.3.6-flags.patch new file mode 100644 index 000000000000..5f11fd270ef1 --- /dev/null +++ b/games-sports/torcs/files/torcs-1.3.6-flags.patch @@ -0,0 +1,14 @@ +respect cflags + +--- torcs-1.3.6/configure.in ++++ torcs-1.3.6/configure.in +@@ -50,8 +50,7 @@ + ADDCFLAGS="-Wall -fPIC -fno-strict-aliasing" + AC_ARG_ENABLE(debug, + [ --enable-debug set the debug mode], +- ADDCFLAGS="$ADDCFLAGS -g -DDEBUG -DDEBUG_OUT", +- ADDCFLAGS="$ADDCFLAGS -O2") ++ ADDCFLAGS="$ADDCFLAGS -g -DDEBUG -DDEBUG_OUT") + + AC_ARG_ENABLE(xrandr, + [ --disable-xrandr reset the XRANDR mode], diff --git a/games-sports/torcs/files/torcs-1.3.6-format.patch b/games-sports/torcs/files/torcs-1.3.6-format.patch new file mode 100644 index 000000000000..da59c4da4fa0 --- /dev/null +++ b/games-sports/torcs/files/torcs-1.3.6-format.patch @@ -0,0 +1,34 @@ +--- a/src/tools/texmapper/maintexmapper.cpp 2015-12-23 20:55:24.874102363 +0100 ++++ b/src/tools/texmapper/maintexmapper.cpp 2015-12-23 20:55:55.071553325 +0100 +@@ -103,7 +103,7 @@ + { + int i, j; + +- printf(title); ++ printf("%s", title); + for (j = 0; j < 4; j ++){ + for (i = 0; i < 4; i ++) { + printf("%.6f ", m[i][j]); +--- a/src/tools/trackgen/objects.cpp 2015-12-23 20:59:49.671287196 +0100 ++++ b/src/tools/trackgen/objects.cpp 2015-12-23 21:02:21.639523189 +0100 +@@ -234,9 +234,9 @@ +
+ ssgLeaf *vt = (ssgLeaf *)ent;
+ if (vt->getCullFace() == TRUE) {
+- surf = "SURF 0x10\n";
++ surf = "0x10";
+ } else {
+- surf = "SURF 0x30\n";
++ surf = "0x30";
+ }
+
+ int num_verts = vt->getNumVertices();
+@@ -304,7 +304,7 @@ + fprintf (save_fd, "numsurf %d\n", num_tris);
+
+ for (i = 0; i < num_tris; i++) {
+- fprintf (save_fd, surf);
++ fprintf (save_fd, "SURF %s\n", surf);
+ fprintf (save_fd, "mat 0\n");
+ fprintf (save_fd, "refs 3\n");
+ fprintf (save_fd, "%d %g %g\n",
diff --git a/games-sports/torcs/files/torcs-1.3.6-gcc6.patch b/games-sports/torcs/files/torcs-1.3.6-gcc6.patch new file mode 100644 index 000000000000..6daf22a81b11 --- /dev/null +++ b/games-sports/torcs/files/torcs-1.3.6-gcc6.patch @@ -0,0 +1,11 @@ +--- a/src/drivers/olethros/geometry.cpp ++++ b/src/drivers/olethros/geometry.cpp +@@ -27,6 +27,8 @@ + #ifdef WIN32 + #include <float.h> + #define isnan _isnan ++#elif __cplusplus >= 201103L ++using std::isnan; + #endif + + diff --git a/games-sports/torcs/files/torcs-1.3.6-gcc7.patch b/games-sports/torcs/files/torcs-1.3.6-gcc7.patch new file mode 100644 index 000000000000..af139ad509de --- /dev/null +++ b/games-sports/torcs/files/torcs-1.3.6-gcc7.patch @@ -0,0 +1,11 @@ +--- a/src/libs/musicplayer/OpenALMusicPlayer.cpp ++++ b/src/libs/musicplayer/OpenALMusicPlayer.cpp +@@ -161,7 +161,7 @@ + { + char pcm[BUFFERSIZE]; + int size = 0; +- const char* error = '\0'; ++ const char* error = ""; + + if (!stream->read(pcm, BUFFERSIZE, &size, &error)) { + GfError("OpenALMusicPlayer: Stream read error: %s\n", error); diff --git a/games-sports/torcs/files/torcs-1.3.6-no-automake.patch b/games-sports/torcs/files/torcs-1.3.6-no-automake.patch new file mode 100644 index 000000000000..9b47bfb9a64c --- /dev/null +++ b/games-sports/torcs/files/torcs-1.3.6-no-automake.patch @@ -0,0 +1,21 @@ +torcs doesn't use automake, so it shouldn't be calling the macro + +http://bugs.gentoo.org/408473 + +--- torcs-1.3.6.orig/configure.in ++++ torcs-1.3.6/configure.in +@@ -15,9 +15,12 @@ + # + ############################################################################## + +-AC_INIT(Make-config.in) ++AC_INIT(torcs, 1.3.6) + AC_CONFIG_HEADERS(config.h) +-AM_INIT_AUTOMAKE(torcs, 1.3.6) ++dnl Workaround code using old VERSION instead of new PACKAGE_VERSION ++VERSION=$PACKAGE_VERSION ++AC_DEFINE_UNQUOTED([VERSION], "$VERSION", [old VERSION workaround]) ++AC_SUBST(VERSION) + + dnl Checks for programs. + AC_PROG_CC diff --git a/games-sports/torcs/files/torcs-1.3.6-noXmuXt.patch b/games-sports/torcs/files/torcs-1.3.6-noXmuXt.patch new file mode 100644 index 000000000000..f87fb750d199 --- /dev/null +++ b/games-sports/torcs/files/torcs-1.3.6-noXmuXt.patch @@ -0,0 +1,15 @@ +--- a/configure.in ++++ b/configure.in +@@ -116,12 +116,8 @@ + AC_CHECK_LIB(ICE, IceSetIOErrorHandler,,AC_MSG_ERROR([Can't find libICE. 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\"])) + dnl Replace `main' with a function in -lSM: + AC_CHECK_LIB(SM, SmsSetErrorHandler,,AC_MSG_ERROR([Can't find libSM. 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\"])) +-dnl Replace `main' with a function in -lXt: +-AC_CHECK_LIB(Xt, XtDisplay,,AC_MSG_ERROR([Can't find libXt. 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\"])) + dnl Replace `main' with a function in -lXi: + AC_CHECK_LIB(Xi, XOpenDevice,,AC_MSG_ERROR([Can't find libXi. 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\"])) +-dnl Replace `main' with a function in -lXmu: +-AC_CHECK_LIB(Xmu, XmuSimpleErrorHandler,,AC_MSG_ERROR([Can't find libXmu. 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(Xxf86vm, XF86VidModeSetViewPort,,AC_MSG_ERROR([Can't find libXxf86vm. 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(Xrender, XRenderSetSubpixelOrder,,AC_MSG_ERROR([Can't find libXrender. 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(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\"])) diff --git a/games-sports/torcs/metadata.xml b/games-sports/torcs/metadata.xml new file mode 100644 index 000000000000..dd8247bbc427 --- /dev/null +++ b/games-sports/torcs/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">torcs</remote-id> + </upstream> +</pkgmetadata> diff --git a/games-sports/torcs/torcs-1.3.6-r1.ebuild b/games-sports/torcs/torcs-1.3.6-r1.ebuild new file mode 100644 index 000000000000..77612fb8eaa9 --- /dev/null +++ b/games-sports/torcs/torcs-1.3.6-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils multilib + +DESCRIPTION="The Open Racing Car Simulator" +HOMEPAGE="http://torcs.sourceforge.net/" +SRC_URI="mirror://sourceforge/torcs/${P}.tar.bz2" + +LICENSE="GPL-2 FreeArt" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="media-libs/freealut + media-libs/freeglut + media-libs/libpng:0 + media-libs/libvorbis:= + media-libs/openal + >=media-libs/plib-1.8.5 + sys-libs/zlib:0= + virtual/opengl + virtual/glu + x11-libs/libX11 + x11-libs/libXrandr" +DEPEND="${RDEPEND} + x11-base/xorg-proto" + +PATCHES=( + "${FILESDIR}"/${P}-no-automake.patch + "${FILESDIR}"/${P}-as-needed.patch + "${FILESDIR}"/${P}-flags.patch + "${FILESDIR}"/${P}-format.patch + "${FILESDIR}"/${P}-noXmuXt.patch + "${FILESDIR}"/${P}-gcc6.patch + "${FILESDIR}"/${P}-gcc7.patch +) + +src_prepare() { + default + + eautoreconf + ecvs_clean +} + +src_configure() { + addpredict $(echo /dev/snd/controlC? | sed 's/ /:/g') + [[ -e /dev/dsp ]] && addpredict /dev/dsp + econf \ + --datadir=/usr/share \ + --x-libraries=/usr/$(get_libdir) \ + --enable-xrandr +} + +src_compile() { + # So ugly... patches welcome. + emake -j1 +} + +src_install() { + emake -j1 DESTDIR="${D}" install datainstall + newicon Ticon.png ${PN}.png + make_desktop_entry ${PN} TORCS + dodoc README doc/history/history.txt + doman doc/man/*.6 + dodoc -r doc/faq/faq.html doc/tutorials doc/userman +} |