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.
This commit is contained in:
parent
3beade6d15
commit
51eee1642f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=130037
@ -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}
|
||||
|
@ -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;
|
||||
+
|
||||
#include "raceengine.h"
|
||||
#include "racemain.h"
|
||||
#include "racestate.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 char *level_str[] = { ROB_VAL_ROOKIE, ROB_VAL_AMATEUR, ROB_VAL_SEMI_PRO, ROB_VAL_PRO };
|
||||
|
||||
static tModList *reEventModList = 0;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user