diff options
author | stas <stas@FreeBSD.org> | 2006-09-24 20:31:43 +0800 |
---|---|---|
committer | stas <stas@FreeBSD.org> | 2006-09-24 20:31:43 +0800 |
commit | 28c88dd1bc50757b4e4a38478fe3b4ee13847a15 (patch) | |
tree | b5a514e5a07c94e4b2d6c9b181d7e3f95fcb7e32 /games | |
parent | b1ceeaff177a950da5f8372cc4a67f4c24f37762 (diff) | |
download | freebsd-ports-gnome-28c88dd1bc50757b4e4a38478fe3b4ee13847a15.tar.gz freebsd-ports-gnome-28c88dd1bc50757b4e4a38478fe3b4ee13847a15.tar.zst freebsd-ports-gnome-28c88dd1bc50757b4e4a38478fe3b4ee13847a15.zip |
- Unbroke
- Use enet from ports collection rather than from cube distribution
to benefit from local patches [1]
- Fix OPTIONS checking to allow BATCH building
- Fix PLIST_SUB to generate correct pkg-plist when SERVER or CLIENT
not selected
- Add KNOB to build with optimized CFLAGS, also guarantee CFLAGS safety
- CXX safety
- Guarantee permissions safety by using INSTALL instead of CP [2]
- Bump up PORTREVISION because of [1] and [2]
Approved by: sem (mentor)
Diffstat (limited to 'games')
-rw-r--r-- | games/cube/Makefile | 44 | ||||
-rw-r--r-- | games/cube/files/patch-Makefile | 22 | ||||
-rw-r--r-- | games/cube/pkg-plist | 21 |
3 files changed, 52 insertions, 35 deletions
diff --git a/games/cube/Makefile b/games/cube/Makefile index 5cefd03ea1c7..a8b3a4ae34b0 100644 --- a/games/cube/Makefile +++ b/games/cube/Makefile @@ -7,7 +7,7 @@ PORTNAME= cube PORTVERSION= 2005.08.29 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -17,67 +17,75 @@ EXTRACT_ONLY= ${CUBE_SRC} MAINTAINER= ports@FreeBSD.org COMMENT= An OpenGL 3D First Person Shooter game -BROKEN= Does not build +BUILD_DEPENDS= ${LOCALBASE}/lib/libenet.a:${PORTSDIR}/net/enet USE_ZIP= yes USE_DOS2UNIX= yes USE_GMAKE= yes -GNU_CONFIGURE= yes -CONFIGURE_ENV= ACLOCAL=true AUTOCONF=true AUTOMAKE=true -CONFIGURE_WRKSRC= ${WRKSRC}/../enet WRKSRC= ${WRKDIR}/${PORTNAME}_source/src -ALL_TARGET= enet +MAKE_ENV+= CXX="${CXX}" +CFLAGS+= -fsigned-char +ALL_TARGET= #empty -OPTIONS= CLIENT "Build client" on \ - DEDICATED "Build dedicated server" on +OPTIONS= CLIENT "Build client" on \ + DEDICATED "Build dedicated server" on \ + OPT "Optimized CFLAGS" off SUB_FILES= cube_client cube_server CUBE_DATA= ${PORTNAME}_${PORTVERSION:S/./_/g}_unix.tar.gz CUBE_SRC= ${PORTNAME}_${PORTVERSION:S/./_/g}_src.zip +# XXX: exists untill it will be committed to bsd.port.mk +COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \ + 2>&1) && \ + ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} $$1 && \ + ${FIND} $$1/ -type d -exec ${CHMOD} 755 {} \; && \ + ${FIND} $$1/ -type f -exec ${CHMOD} ${SHAREMODE} {} \;' -- + .include <bsd.port.pre.mk> -.if !defined(WITH_CLIENT) && !defined(WITH_DEDICATED) +.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) IGNORE= needs at least one executable (CLIENT and DEDICATED) .endif -.if defined(WITH_CLIENT) +.if !defined(WITHOUT_CLIENT) USE_GL= yes USE_SDL= image mixer sdl ALL_TARGET+= client PLIST_SUB+= CLIENT="" CUBE_BIN+= client .else -PLIST_SUB+= CLIENT="" +PLIST_SUB+= CLIENT="@comment " .endif -.if defined(WITH_DEDICATED) +.if !defined(WITHOUT_DEDICATED) ALL_TARGET+= server PLIST_SUB+= DEDICATED="" CUBE_BIN+= server .else -PLIST_SUB+= DEDICATED="" +PLIST_SUB+= DEDICATED="@comment " +.endif + +.if defined(WITH_OPT) +CFLAGS+= -O3 -fomit-frame-pointer .endif post-extract: @${TAR} zxf ${DISTDIR}/${CUBE_DATA} -C ${WRKDIR} -pre-configure: - @${CHMOD} u+x ${CONFIGURE_WRKSRC}/configure - do-install: .for f in ${CUBE_BIN} ${INSTALL_SCRIPT} ${WRKDIR}/cube_${f} ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/cube_${f} ${PREFIX}/libexec .endfor ${MKDIR} ${DATADIR} - ${CP} -R ${WRKDIR}/cube/data ${WRKDIR}/cube/packages ${DATADIR} + @(cd ${WRKDIR}/cube && ${COPYTREE_SHARE} "data packages" ${DATADIR}/) ${INSTALL_DATA} ${WRKDIR}/cube/autoexec.cfg ${DATADIR} .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKDIR}/cube/readme.html ${DOCSDIR} - ${CP} -R ${WRKDIR}/cube/docs ${DOCSDIR} + @(cd ${WRKDIR}/cube/docs && ${COPYTREE_SHARE} \* ${DOCSDIR}/) .endif .include <bsd.port.post.mk> diff --git a/games/cube/files/patch-Makefile b/games/cube/files/patch-Makefile index 73b19e3a0a48..6bc72191d686 100644 --- a/games/cube/files/patch-Makefile +++ b/games/cube/files/patch-Makefile @@ -1,17 +1,27 @@ ---- ./Makefile.orig Sat Jul 29 19:53:13 2006 -+++ ./Makefile Sat Jul 29 20:57:57 2006 +--- Makefile.orig Sat Sep 23 23:51:57 2006 ++++ Makefile Sat Sep 23 23:54:39 2006 @@ -1,8 +1,8 @@ -CXX=g++ -+CXX?=g++ - CXXOPTFLAGS=-Wall -O3 -fsigned-char -fomit-frame-pointer +-CXXOPTFLAGS=-Wall -O3 -fsigned-char -fomit-frame-pointer -CXXFLAGS=$(CXXOPTFLAGS) -I../enet/include `sdl-config --cflags` -+CXXFLAGS+=$(CXXOPTFLAGS) -I../enet/include `$(SDL_CONFIG) --cflags` -I$(X11BASE)/include ++CXX?=g++ ++CXXOPTFLAGS=-Wall ++CXXFLAGS+=$(CXXOPTFLAGS) -I$(LOCALBASE)/include `$(SDL_CONFIG) --cflags` -I$(X11BASE)/include -CLIENT_LIBS=-L../enet -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL -lGLU -+CLIENT_LIBS=-L../enet -lenet `$(SDL_CONFIG) --libs` -lSDL_image -lSDL_mixer -lz -L$(X11BASE)/lib -lGL -lGLU ++CLIENT_LIBS=-L$(LOCALBASE)/lib -lenet `$(SDL_CONFIG) --libs` -lSDL_image -lSDL_mixer -lz -L$(X11BASE)/lib -lGL -lGLU CLIENT_OBJS= \ client.o \ clientextras.o \ +@@ -37,7 +37,7 @@ + worldocull.o \ + worldrender.o + +-SERVER_LIBS=-L../enet -lenet ++SERVER_LIBS=-L$(LOCALBASE)/lib -lenet + SERVER_OBJS= \ + standalone.o \ + serverms.o \ @@ -49,11 +49,11 @@ all: enet client server diff --git a/games/cube/pkg-plist b/games/cube/pkg-plist index 9f9f78d82a3f..58adeb379f78 100644 --- a/games/cube/pkg-plist +++ b/games/cube/pkg-plist @@ -1061,18 +1061,17 @@ %%DATADIR%%/packages/than_ind/trim21.jpg %%DATADIR%%/packages/than_ind/trlight01.jpg %%DATADIR%%/packages/than_ind/trlight06.jpg -%%PORTDOCS%%%%DOCSDIR%%/docs/config.html -%%PORTDOCS%%%%DOCSDIR%%/docs/editing.html -%%PORTDOCS%%%%DOCSDIR%%/docs/editref.html -%%PORTDOCS%%%%DOCSDIR%%/docs/game.html -%%PORTDOCS%%%%DOCSDIR%%/docs/history.html -%%PORTDOCS%%%%DOCSDIR%%/docs/pics/arch.jpg -%%PORTDOCS%%%%DOCSDIR%%/docs/pics/basic.jpg -%%PORTDOCS%%%%DOCSDIR%%/docs/pics/octa.jpg -%%PORTDOCS%%%%DOCSDIR%%/docs/pics/ocull.jpg +%%PORTDOCS%%%%DOCSDIR%%/config.html +%%PORTDOCS%%%%DOCSDIR%%/editing.html +%%PORTDOCS%%%%DOCSDIR%%/editref.html +%%PORTDOCS%%%%DOCSDIR%%/game.html +%%PORTDOCS%%%%DOCSDIR%%/history.html +%%PORTDOCS%%%%DOCSDIR%%/pics/arch.jpg +%%PORTDOCS%%%%DOCSDIR%%/pics/basic.jpg +%%PORTDOCS%%%%DOCSDIR%%/pics/octa.jpg +%%PORTDOCS%%%%DOCSDIR%%/pics/ocull.jpg %%PORTDOCS%%%%DOCSDIR%%/readme.html -%%PORTDOCS%%@dirrm %%DOCSDIR%%/docs/pics -%%PORTDOCS%%@dirrm %%DOCSDIR%%/docs +%%PORTDOCS%%@dirrm %%DOCSDIR%%/pics %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm %%DATADIR%%/packages/than_ind @dirrm %%DATADIR%%/packages/tech1soc |