diff options
author | thierry <thierry@FreeBSD.org> | 2005-03-01 02:57:54 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2005-03-01 02:57:54 +0800 |
commit | bb0ee3ed6dac95ddbe70f6ec91201e407d36be57 (patch) | |
tree | 4704a04b1d0e2766b2a7c6e8ba30daf8e7004f11 /games | |
parent | 4342a37283392626a1ea0561d3667918740ae397 (diff) | |
download | freebsd-ports-gnome-bb0ee3ed6dac95ddbe70f6ec91201e407d36be57.tar.gz freebsd-ports-gnome-bb0ee3ed6dac95ddbe70f6ec91201e407d36be57.tar.zst freebsd-ports-gnome-bb0ee3ed6dac95ddbe70f6ec91201e407d36be57.zip |
Yet another attempt to fix on amd64:
don't take strndup from publib, which is not relocatable, but
define it.
Reported by: Kris via pointyhat.
Diffstat (limited to 'games')
-rw-r--r-- | games/torcs/Makefile | 5 | ||||
-rw-r--r-- | games/torcs/files/patch-src::libs::raceengineclient::raceinit.cpp | 29 | ||||
-rw-r--r-- | games/torcs/files/patch-src::libs::tgfclient::screen.cpp | 29 |
3 files changed, 42 insertions, 21 deletions
diff --git a/games/torcs/Makefile b/games/torcs/Makefile index de8fdc0726ea..72e6175cbd46 100644 --- a/games/torcs/Makefile +++ b/games/torcs/Makefile @@ -20,8 +20,7 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \ MAINTAINER= ports@FreeBSD.org COMMENT= The Open Racing Car Simulator -BUILD_DEPENDS= ${LOCALBASE}/lib/libpub.a:${PORTSDIR}/devel/publib \ - ${X11BASE}/lib/libplibsl.a:${PORTSDIR}/x11-toolkits/plib +BUILD_DEPENDS= ${X11BASE}/lib/libplibsl.a:${PORTSDIR}/x11-toolkits/plib LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png RUN_DEPENDS= bash:${PORTSDIR}/shells/bash @@ -34,7 +33,7 @@ CONFIGURE_ARGS= --x-includes=${X11BASE}/include --x-libraries=${X11BASE}/lib CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} ALL_TARGET= default -LDFLAGS+= -L${LOCALBASE}/lib -lpub +LDFLAGS+= -L${LOCALBASE}/lib WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} TARBALL= ${PORTNAME:U}-${PORTVERSION} diff --git a/games/torcs/files/patch-src::libs::raceengineclient::raceinit.cpp b/games/torcs/files/patch-src::libs::raceengineclient::raceinit.cpp index 7d5eb4c23e8f..0ad0944ed99a 100644 --- a/games/torcs/files/patch-src::libs::raceengineclient::raceinit.cpp +++ b/games/torcs/files/patch-src::libs::raceengineclient::raceinit.cpp @@ -1,11 +1,22 @@ ---- src/libs/raceengineclient/raceinit.cpp.orig Mon Feb 14 23:33:57 2005 -+++ src/libs/raceengineclient/raceinit.cpp Mon Feb 14 23:38:17 2005 -@@ -34,6 +34,8 @@ - #include <racescreens.h> - #include <robottools.h> +--- ./src/libs/raceengineclient/raceinit.cpp.orig Fri Feb 4 23:29:59 2005 ++++ ./src/libs/raceengineclient/raceinit.cpp Mon Feb 28 19:23:32 2005 +@@ -42,6 +42,19 @@ -+#include <publib.h> + #include "raceinit.h" + ++#if defined(__FreeBSD__) ++static char *strndup(const char *str, int len) { ++ char *ret; ++ ++ if ((str == NULL || len < 0)) return(NULL); ++ ret = (char *)malloc(len + 1); ++ if (ret == NULL) return(NULL); ++ memcpy(ret, str, len); ++ ret[len] = '\0'; ++ return(ret); ++} ++#endif + - #include "raceengine.h" - #include "racemain.h" - #include "racestate.h" + static char *level_str[] = { ROB_VAL_ROOKIE, ROB_VAL_AMATEUR, ROB_VAL_SEMI_PRO, ROB_VAL_PRO }; + + static tModList *reEventModList = 0; diff --git a/games/torcs/files/patch-src::libs::tgfclient::screen.cpp b/games/torcs/files/patch-src::libs::tgfclient::screen.cpp index f15c28900739..c49df58b37f2 100644 --- a/games/torcs/files/patch-src::libs::tgfclient::screen.cpp +++ b/games/torcs/files/patch-src::libs::tgfclient::screen.cpp @@ -1,11 +1,22 @@ ---- src/libs/tgfclient/screen.cpp.orig Mon Feb 14 23:09:32 2005 -+++ src/libs/tgfclient/screen.cpp Mon Feb 14 23:22:49 2005 -@@ -36,6 +36,8 @@ - #include <process.h> - #endif /* WIN32 */ +--- ./src/libs/tgfclient/screen.cpp.orig Fri Feb 4 23:29:59 2005 ++++ ./src/libs/tgfclient/screen.cpp Mon Feb 28 19:21:11 2005 +@@ -52,6 +52,19 @@ + #include <X11/extensions/Xrandr.h> + #endif // USE_RANDR_EXT -+#include <publib.h> ++#if defined(__FreeBSD__) ++static char *strndup(const char *str, int len) { ++ char *ret; + - #include <tgfclient.h> - #include "gui.h" - #include "fg_gm.h" ++ if ((str == NULL || len < 0)) return(NULL); ++ ret = (char *)malloc(len + 1); ++ if (ret == NULL) return(NULL); ++ memcpy(ret, str, len); ++ ret[len] = '\0'; ++ return(ret); ++} ++#endif ++ + static int GfScrWidth; + static int GfScrHeight; + static int GfViewWidth; |