aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authordanilo <danilo@FreeBSD.org>2013-11-02 07:28:31 +0800
committerdanilo <danilo@FreeBSD.org>2013-11-02 07:28:31 +0800
commitdee7d29adf6996db335704f13e7c175f57d0906f (patch)
tree796daed8cf6a7dfbb24429b53cb36e84651787e2 /games
parent8ec3296818f0595ceb91447e682987ea419c0341 (diff)
downloadfreebsd-ports-gnome-dee7d29adf6996db335704f13e7c175f57d0906f.tar.gz
freebsd-ports-gnome-dee7d29adf6996db335704f13e7c175f57d0906f.tar.zst
freebsd-ports-gnome-dee7d29adf6996db335704f13e7c175f57d0906f.zip
- Add stage support
- Convert USE_GMAKE to USES - Convert LIB_DEPENDS to new syntax - Use options helpers - Fix build with clang
Diffstat (limited to 'games')
-rw-r--r--games/glbsp/Makefile35
-rw-r--r--games/glbsp/files/patch-GUI_unx.mak9
-rw-r--r--games/glbsp/files/patch-wad.c11
-rw-r--r--games/glbsp/pkg-plist3
4 files changed, 23 insertions, 35 deletions
diff --git a/games/glbsp/Makefile b/games/glbsp/Makefile
index fc796e03a5a6..fc5b253dc6d2 100644
--- a/games/glbsp/Makefile
+++ b/games/glbsp/Makefile
@@ -11,31 +11,19 @@ DISTNAME= ${PORTNAME}_src_${PORTVERSION:S/.//}
MAINTAINER= ports@FreeBSD.org
COMMENT= BSP node builder for OpenGL ports of the DOOM game engine
-USE_GMAKE= yes
+USES= gmake
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/[[:alpha:]]//}
OPTIONS_DEFINE= GUI PLUGIN DOCS
GUI_DESC= Build FLTK based GUI
PLUGIN_DESC= Build plugin used in DOOM engines
+OPTIONS_SUB= yes
-MAN1= glbsp.1
PORTDOCS= README.txt USAGE.txt
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+GUI_LIB_DEPENDS= libfltk.so:${PORTSDIR}/x11-toolkits/fltk
-.if ${PORT_OPTIONS:MGUI}
-LIB_DEPENDS+= fltk.1:${PORTSDIR}/x11-toolkits/fltk
-PLIST_SUB= GUI_VERSION=""
-.else
-PLIST_SUB= GUI_VERSION="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MPLUGIN}
-PLIST_SUB+= PLUGIN=""
-.else
-PLIST_SUB+= PLUGIN="@comment "
-.endif
+.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -i '' -e 's|CC=|CC\?=|; s|CFLAGS=|CFLAGS\+=|' \
@@ -50,18 +38,15 @@ post-build:
.endif
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/glbsp ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/glbsp ${STAGEDIR}${PREFIX}/bin
.if ${PORT_OPTIONS:MGUI}
- ${INSTALL_PROGRAM} ${WRKSRC}/glBSPX ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/glBSPX ${STAGEDIR}${PREFIX}/bin
.endif
.if ${PORT_OPTIONS:MPLUGIN}
- ${INSTALL_DATA} ${WRKSRC}/libglbsp.a ${PREFIX}/lib
-.endif
-
- ${INSTALL_MAN} ${MAN1:S|^|${WRKSRC}/|} ${MANPREFIX}/man/man1
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/libglbsp.a ${STAGEDIR}${PREFIX}/lib
.endif
+ ${INSTALL_MAN} ${WRKSRC}/glbsp.1 ${STAGEDIR}${MANPREFIX}/man/man1
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/games/glbsp/files/patch-GUI_unx.mak b/games/glbsp/files/patch-GUI_unx.mak
index ff5e934fdad0..9e8a3187ada7 100644
--- a/games/glbsp/files/patch-GUI_unx.mak
+++ b/games/glbsp/files/patch-GUI_unx.mak
@@ -1,6 +1,6 @@
---- GUI_unx.mak.orig 2005-09-16 07:29:39.000000000 +0200
-+++ GUI_unx.mak 2010-01-08 15:40:37.000000000 +0100
-@@ -8,16 +8,15 @@
+--- ./GUI_unx.mak.orig 2005-09-16 02:29:39.000000000 -0300
++++ ./GUI_unx.mak 2013-11-01 20:56:43.000000000 -0200
+@@ -8,16 +8,16 @@
PROGNAME=glBSPX
@@ -10,7 +10,8 @@
- -lfltk -lX11 -lXext
+FLTK_PREFIX=${LOCALBASE}
+FLTK_CFLAGS=`fltk-config --use-images --cflags`
-+FLTK_LIBS=`fltk-config --use-images --ldflags`
++FLTK_LIBSTMP=$(shell fltk-config --use-images --ldflags)
++FLTK_LIBS=$(subst -R,-L,$(FLTK_LIBSTMP))
-CC=gcc
-CXX=g++
diff --git a/games/glbsp/files/patch-wad.c b/games/glbsp/files/patch-wad.c
index 1c88a4044dad..a13e911d8105 100644
--- a/games/glbsp/files/patch-wad.c
+++ b/games/glbsp/files/patch-wad.c
@@ -1,6 +1,6 @@
---- wad.c.orig
-+++ wad.c
-@@ -1632,13 +1632,12 @@
+--- ./wad.c.orig 2005-09-13 07:19:36.000000000 -0300
++++ ./wad.c 2013-11-01 20:55:13.000000000 -0200
+@@ -1632,14 +1632,13 @@
void ReportV5Switches(void)
{
lump_t *cur;
@@ -10,8 +10,9 @@
"V5 FORMAT UPGRADES. The following levels require a Doom port\n"
"which supports V5 GL-Nodes, otherwise they will fail (or crash).\n\n"
);
--
-- int saw_zdbsp = FALSE;
+- int saw_zdbsp = FALSE;
+-
for (cur=wad.dir_head; cur; cur=cur->next)
{
+ level_t *lev = cur->lev_info;
diff --git a/games/glbsp/pkg-plist b/games/glbsp/pkg-plist
index d629ac9cbb21..c55a243659a8 100644
--- a/games/glbsp/pkg-plist
+++ b/games/glbsp/pkg-plist
@@ -1,3 +1,4 @@
bin/glbsp
-%%GUI_VERSION%%bin/glBSPX
+man/man1/glbsp.1.gz
+%%GUI%%bin/glBSPX
%%PLUGIN%%lib/libglbsp.a