diff options
author | jbeich <jbeich@FreeBSD.org> | 2015-05-04 19:16:47 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2015-05-04 19:16:47 +0800 |
commit | e9f3cd4d4f7b628bd251431c6408afb91235e0a8 (patch) | |
tree | 9305a4cd66421b5305c301bdb0262ba735157d5f /games | |
parent | ba711a6a1ff0ed84dcebc1921999f4cee0cfee75 (diff) | |
download | freebsd-ports-gnome-e9f3cd4d4f7b628bd251431c6408afb91235e0a8.tar.gz freebsd-ports-gnome-e9f3cd4d4f7b628bd251431c6408afb91235e0a8.tar.zst freebsd-ports-gnome-e9f3cd4d4f7b628bd251431c6408afb91235e0a8.zip |
games/assaultcube: unbreak on DragonFly and the package cluster
- Disable PCH (precompiled header) to unbreak build with GCC in
jails for older branches and recent 11.0C kernel
- Add upstream patch for bundled libenet to unbreak build on DragonFly [1]
- Convert patch for ${BUILD_WRKSRC}/Makefile into sed(1) variant
- Pet portlint since r383894 by formatting patches with makepatch target
PR: 199912
Submitted by: lightside <lightside@gmx.com> (maintainer)
Obtained from: https://github.com/lsalzman/enet/commit/8df6e58 [1]
Diffstat (limited to 'games')
-rw-r--r-- | games/assaultcube/Makefile | 10 | ||||
-rw-r--r-- | games/assaultcube/files/patch-source_enet_unix.c | 20 | ||||
-rw-r--r-- | games/assaultcube/files/patch-source_src_Makefile | 35 | ||||
-rw-r--r-- | games/assaultcube/files/patch-source_src_bot_bot_waypoint.cpp | 4 | ||||
-rw-r--r-- | games/assaultcube/files/patch-source_src_console.h | 4 | ||||
-rw-r--r-- | games/assaultcube/files/patch-source_src_master.cpp | 4 |
6 files changed, 36 insertions, 41 deletions
diff --git a/games/assaultcube/Makefile b/games/assaultcube/Makefile index 4e64ea63985b..fafd27359f8f 100644 --- a/games/assaultcube/Makefile +++ b/games/assaultcube/Makefile @@ -64,6 +64,16 @@ DESKTOP_ENTRIES="AssaultCube" "${COMMENT}" \ "Game;" false .endif +post-patch: .SILENT + ${REINPLACE_CMD} -e '/^CXXFLAGS=/d ; /^CXX=/d ; /^CLIENT_PCH/d ; \ + /^INCLUDES=/s|$$| -I$$(LOCALBASE)/include| ; \ + s|-I/usr/include || ; \ + s|sdl-config|$$(SDL_CONFIG)| ; \ + s|$$(USRLIB)|$$(LOCALBASE)/lib| ; \ + /^CLIENT_LIBS=/s|$$| -lintl| ; \ + /^SERVER_LIBS=/s|$$| -L$$(LOCALBASE)/lib|' \ + ${BUILD_WRKSRC}/Makefile + do-install: .for f in ${PLIST_FILES:Mbin/*} ${INSTALL_SCRIPT} ${WRKDIR}/${f:T} ${STAGEDIR}${PREFIX}/${f} diff --git a/games/assaultcube/files/patch-source_enet_unix.c b/games/assaultcube/files/patch-source_enet_unix.c new file mode 100644 index 000000000000..b148e09dddb8 --- /dev/null +++ b/games/assaultcube/files/patch-source_enet_unix.c @@ -0,0 +1,20 @@ +--- source/enet/unix.c.orig 2013-10-22 18:57:22 UTC ++++ source/enet/unix.c +@@ -97,7 +97,7 @@ enet_address_set_host (ENetAddress * add + char buffer [2048]; + int errnum; + +-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) + gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum); + #else + hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum); +@@ -150,7 +150,7 @@ enet_address_get_host (const ENetAddress + + in.s_addr = address -> host; + +-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) + gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum); + #else + hostEntry = gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & errnum); diff --git a/games/assaultcube/files/patch-source_src_Makefile b/games/assaultcube/files/patch-source_src_Makefile deleted file mode 100644 index 2b964aad33d7..000000000000 --- a/games/assaultcube/files/patch-source_src_Makefile +++ /dev/null @@ -1,35 +0,0 @@ ---- source/src/Makefile.orig 2013-10-29 13:20:58.000000000 +0400 -+++ source/src/Makefile 2013-10-29 17:00:06.000000000 +0400 -@@ -1,9 +1,7 @@ --CXXFLAGS= -O3 -fomit-frame-pointer --CXX=clang++ # Use clang++, as g++ optimizations cause crashes... - override CXXFLAGS+= -Wall -fsigned-char - - PLATFORM= $(shell uname -s) --PLATFORM_PREFIX=native -+PLATFORM_PREFIX=FreeBSD - - INCLUDES= -I. -Ibot -I../enet/include - -@@ -22,8 +20,8 @@ - else - USRLIB=$(shell if [ -e /usr/lib64 ]; then echo "/usr/lib64"; else echo "/usr/lib"; fi) - # override CXXFLAGS+= -rdynamic # clang++ doesn't use this... --CLIENT_INCLUDES= $(INCLUDES) -I/usr/include `sdl-config --cflags` -idirafter ../include --CLIENT_LIBS= -L../enet/.libs -lenet -L$(USRLIB) -lX11 `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile -lcurl -+CLIENT_INCLUDES= $(INCLUDES) -I${LOCALBASE}/include `${SDL_CONFIG} --cflags` -idirafter ../include -+CLIENT_LIBS= -L../enet/.libs -lenet -L${LOCALBASE}/lib -lX11 `${SDL_CONFIG} --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile -lcurl -lintl - endif - - CLIENT_OBJS= \ -@@ -87,8 +85,8 @@ - SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I../include - SERVER_LIBS= -L../lib -lzdll -lenet -llibintl -lws2_32 -lwinmm - else --SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) --SERVER_LIBS= -L../enet/.libs -lenet -lz -+SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I${LOCALBASE}/include -+SERVER_LIBS= -L../enet/.libs -lenet -lz -L${LOCALBASE}/lib - endif - - SERVER_OBJS= \ diff --git a/games/assaultcube/files/patch-source_src_bot_bot_waypoint.cpp b/games/assaultcube/files/patch-source_src_bot_bot_waypoint.cpp index a530cb036823..273c1e2660f3 100644 --- a/games/assaultcube/files/patch-source_src_bot_bot_waypoint.cpp +++ b/games/assaultcube/files/patch-source_src_bot_bot_waypoint.cpp @@ -1,5 +1,5 @@ ---- source/src/bot/bot_waypoint.cpp.orig 2013-11-10 22:50:03.000000000 +0400 -+++ source/src/bot/bot_waypoint.cpp 2015-02-13 07:33:14.000000000 +0400 +--- source/src/bot/bot_waypoint.cpp.orig 2013-11-10 18:50:03 UTC ++++ source/src/bot/bot_waypoint.cpp @@ -848,7 +848,7 @@ if (!pWP) diff --git a/games/assaultcube/files/patch-source_src_console.h b/games/assaultcube/files/patch-source_src_console.h index 4d12dc4370d2..22352e443fea 100644 --- a/games/assaultcube/files/patch-source_src_console.h +++ b/games/assaultcube/files/patch-source_src_console.h @@ -1,5 +1,5 @@ ---- source/src/console.h.orig 2013-10-09 12:27:31.000000000 +0400 -+++ source/src/console.h 2013-10-11 02:23:35.000000000 +0400 +--- source/src/console.h.orig 2013-10-09 08:27:31 UTC ++++ source/src/console.h @@ -127,7 +127,7 @@ } }; diff --git a/games/assaultcube/files/patch-source_src_master.cpp b/games/assaultcube/files/patch-source_src_master.cpp index 4e646df7a132..dafcf9df0f74 100644 --- a/games/assaultcube/files/patch-source_src_master.cpp +++ b/games/assaultcube/files/patch-source_src_master.cpp @@ -1,5 +1,5 @@ ---- source/src/master.cpp.orig 2013-10-09 12:27:37.000000000 +0400 -+++ source/src/master.cpp 2013-10-11 02:26:24.000000000 +0400 +--- source/src/master.cpp.orig 2013-10-09 08:27:37 UTC ++++ source/src/master.cpp @@ -510,7 +510,7 @@ authreq &a = c.authreqs.add(); a.reqtime = servtime; |