diff options
-rw-r--r-- | games/glbsp/Makefile | 43 | ||||
-rw-r--r-- | games/glbsp/distinfo | 4 | ||||
-rw-r--r-- | games/glbsp/files/patch-GUI.mak | 25 | ||||
-rw-r--r-- | games/glbsp/files/patch-GUI_unx.mak | 26 | ||||
-rw-r--r-- | games/glbsp/files/patch-Makefile | 16 | ||||
-rw-r--r-- | games/glbsp/files/patch-wad.c | 17 | ||||
-rw-r--r-- | games/glbsp/pkg-plist | 4 |
7 files changed, 75 insertions, 60 deletions
diff --git a/games/glbsp/Makefile b/games/glbsp/Makefile index 544ea5f33b4e..4d537fce5c94 100644 --- a/games/glbsp/Makefile +++ b/games/glbsp/Makefile @@ -6,7 +6,7 @@ # PORTNAME= glbsp -PORTVERSION= 2.10c +PORTVERSION= 2.20 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -21,31 +21,43 @@ LIB_DEPENDS= fltk.1:${PORTSDIR}/x11-toolkits/fltk USE_GMAKE= yes USE_REINPLACE= yes +MAKE_ENV= CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" X11BASE="${X11BASE}" WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/[[:alpha:]]//} +MAN1= glbsp.1 +PORTDOCS= README.txt USAGE.txt + .if !defined (WITH_GUI_VERSION) PLIST_SUB= GUI_VERSION="@comment " .else PLIST_SUB= GUI_VERSION="" .endif -.ifndef (WITH_GUI_VERSION) +.if !defined (WITH_PLUGIN) +PLIST_SUB+= PLUGIN="@comment " +.else +PLIST_SUB+= PLUGIN="" +.endif + pre-everything:: - @${ECHO_CMD} "***********************************************************" +.ifndef (WITH_GUI_VERSION) @${ECHO_CMD} "Define WITH_GUI_VERSION=yes to build FLTK based GUI version" - @${ECHO_CMD} "***********************************************************" +.endif +.ifndef (WITH_PLUGIN) + @${ECHO_CMD} "Define WITH_PLUGIN=yes to build plugin version of glBSP used in DOOM engines" .endif -.ifdef (WITH_GUI_VERSION) +post-patch: + @${REINPLACE_CMD} -i '' -e 's|CC=|CC\?=|; s|CFLAGS=|CFLAGS\+=|' \ + ${WRKSRC}/Makefile ${WRKSRC}/Plugin_unx.mak + post-build: - ${SETENV} CC=${CC} \ - CXX=${CXX} \ - CFLAGS="${CFLAGS}" \ - CXXFLAGS="${CXXFLAGS}" \ - X11BASE=${X11BASE} \ - LOCALBASE=${LOCALBASE} \ - ${GMAKE} -C ${WRKSRC} -f GUI.mak all +.ifdef (WITH_GUI_VERSION) + ${SETENV} ${MAKE_ENV} ${GMAKE} -C ${WRKSRC} -f GUI_unx.mak all +.endif +.ifdef (WITH_PLUGIN) + ${SETENV} ${MAKE_ENV} ${GMAKE} -C ${WRKSRC} -f Plugin_unx.mak all .endif do-install: @@ -53,11 +65,14 @@ do-install: .ifdef (WITH_GUI_VERSION) ${INSTALL_PROGRAM} ${WRKSRC}/glBSPX ${PREFIX}/bin .endif +.ifdef (WITH_PLUGIN) + ${INSTALL_DATA} ${WRKSRC}/libglbsp.a ${PREFIX}/lib +.endif .ifndef (NOPORTDOCS) @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README.txt ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/USAGE.txt ${DOCSDIR} + ${INSTALL_MAN} ${MAN1:S|^|${WRKSRC}/|} ${MANPREFIX}/man/man1 + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR} .endif .include <bsd.port.mk> diff --git a/games/glbsp/distinfo b/games/glbsp/distinfo index 8f61864b9c44..8dec73fffa0d 100644 --- a/games/glbsp/distinfo +++ b/games/glbsp/distinfo @@ -1,2 +1,2 @@ -MD5 (glbsp_src_210c.tar.gz) = 6d4891492866543ee81febf8b2b19dfb -SIZE (glbsp_src_210c.tar.gz) = 184427 +MD5 (glbsp_src_220.tar.gz) = 67936f6ba13e6acdf8a0b8022dad8694 +SIZE (glbsp_src_220.tar.gz) = 172283 diff --git a/games/glbsp/files/patch-GUI.mak b/games/glbsp/files/patch-GUI.mak deleted file mode 100644 index 0ca2a31b913f..000000000000 --- a/games/glbsp/files/patch-GUI.mak +++ /dev/null @@ -1,25 +0,0 @@ - -$FreeBSD$ - ---- GUI.mak.orig -+++ GUI.mak -@@ -8,14 +8,14 @@ - - PROGNAME=glBSPX - --FLTK_CFLAGS=-I/usr/local/lib -+FLTK_CFLAGS=-I${X11BASE}/include - FLTK_LIBS=-lfltk_images -lfltk -lX11 -lXext -lpng -ljpeg - --CC=gcc --CXX=g++ --CFLAGS=-O2 -Wall -DGLBSP_GUI -DUNIX -DINLINE_G=inline $(FLTK_CFLAGS) -+CC?=gcc -+CXX?=g++ -+CFLAGS+=-O2 -Wall -DGLBSP_GUI -DUNIX -DINLINE_G=inline $(FLTK_CFLAGS) - CXXFLAGS=$(CFLAGS) --LDFLAGS=-L/usr/X11R6/lib -+LDFLAGS=-L${X11BASE}/lib -L${LOCALBASE}/lib - LIBS=-lm $(FLTK_LIBS) - - OBJS=$(SYSDIR)/main.o \ diff --git a/games/glbsp/files/patch-GUI_unx.mak b/games/glbsp/files/patch-GUI_unx.mak new file mode 100644 index 000000000000..c7eb7396bd81 --- /dev/null +++ b/games/glbsp/files/patch-GUI_unx.mak @@ -0,0 +1,26 @@ +--- GUI_unx.mak.orig ++++ GUI_unx.mak +@@ -8,16 +8,16 @@ + + PROGNAME=glBSPX + +-FLTK_PREFIX=../fltk-1.1.6 +-FLTK_CFLAGS=-I$(FLTK_PREFIX) -I$(FLTK_PREFIX)/zlib +-FLTK_LIBS=-L$(FLTK_PREFIX)/lib -lfltk_images -lfltk_png -lfltk_z -lfltk_jpeg \ ++FLTK_PREFIX=${X11BASE} ++FLTK_CFLAGS=-I$(FLTK_PREFIX)/include ++FLTK_LIBS=-L$(FLTK_PREFIX)/lib -lfltk_images \ + -lfltk -lX11 -lXext + +-CC=gcc +-CXX=g++ +-CFLAGS=-O2 -Wall -DGLBSP_GUI -DUNIX -DINLINE_G=inline $(FLTK_CFLAGS) ++CC?=gcc ++CXX?=g++ ++CFLAGS+=-O2 -Wall -DGLBSP_GUI -DUNIX -DINLINE_G=inline $(FLTK_CFLAGS) + CXXFLAGS=$(CFLAGS) +-LDFLAGS=-L/usr/X11R6/lib ++LDFLAGS=-L${X11BASE}/lib + LIBS=-lm $(FLTK_LIBS) + + OBJS=$(SYSDIR)/main.o \ diff --git a/games/glbsp/files/patch-Makefile b/games/glbsp/files/patch-Makefile deleted file mode 100644 index 9165a5474026..000000000000 --- a/games/glbsp/files/patch-Makefile +++ /dev/null @@ -1,16 +0,0 @@ - -$FreeBSD$ - ---- Makefile.orig -+++ Makefile -@@ -8,8 +8,8 @@ - - PROGNAME=glbsp - --CC=cc --CFLAGS=-O3 -Wall -DGLBSP_TEXT -DUNIX -DINLINE_G=inline -+CC?=cc -+CFLAGS+=-O3 -Wall -DGLBSP_TEXT -DUNIX -DINLINE_G=inline - LIBS=-lm - - OBJS=$(SYSDIR)/main.o \ diff --git a/games/glbsp/files/patch-wad.c b/games/glbsp/files/patch-wad.c new file mode 100644 index 000000000000..1c88a4044dad --- /dev/null +++ b/games/glbsp/files/patch-wad.c @@ -0,0 +1,17 @@ +--- wad.c.orig ++++ wad.c +@@ -1632,13 +1632,12 @@ + void ReportV5Switches(void) + { + lump_t *cur; ++ int saw_zdbsp = FALSE; + + PrintMsg( + "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; + + for (cur=wad.dir_head; cur; cur=cur->next) + { diff --git a/games/glbsp/pkg-plist b/games/glbsp/pkg-plist index dc7ad49a8069..d629ac9cbb21 100644 --- a/games/glbsp/pkg-plist +++ b/games/glbsp/pkg-plist @@ -1,5 +1,3 @@ bin/glbsp %%GUI_VERSION%%bin/glBSPX -%%PORTDOCS%%%%DOCSDIR%%/README.txt -%%PORTDOCS%%%%DOCSDIR%%/USAGE.txt -%%PORTDOCS%%@dirrm %%DOCSDIR%% +%%PLUGIN%%lib/libglbsp.a |