ports/80940: WITH_MENU and WITH_STATIC_PLUGINS options for quakeforge port

Jurij Ivliev yury at black.cat.kazan.su
Thu May 12 13:20:02 UTC 2005


>Number:         80940
>Category:       ports
>Synopsis:       WITH_MENU and WITH_STATIC_PLUGINS options for quakeforge port
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 12 13:20:00 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Jurij Ivliev
>Release:        FreeBSD 5.3-RELEASE-p10 i386
>Organization:
EsterDev, Ltd.
>Environment:
System: FreeBSD smaug.esterdev.com 5.3-RELEASE-p10 FreeBSD 5.3-RELEASE-p10 #0: Tue May 3 00:06:42 UTC 2005 build at smaug.esterdev.com:/usr/obj/usr/src/sys/SMAUG i386
>Description:
Defining WITH_MENU option allows building, installing and packaging 
menu.dat.gz file when making clients without tools (WITHOUT_TOOLS defined 
and WITHOUT_CLIENTS undefined).
Defining WITH_STATIC_PLUGINS options allows building plugins statically 
linked. This is workaround to resolve a strange problem loading 
console_client.so plugin.
>How-To-Repeat:
>Fix:
--- quakeforge.diff begins here ---
diff -ru quakeforge.orig/Makefile quakeforge/Makefile
--- quakeforge.orig/Makefile	Tue Apr 12 03:25:34 2005
+++ quakeforge/Makefile	Mon May  9 09:31:28 2005
@@ -98,6 +98,15 @@
 WITHOUT_VORBIS=	yes
 .else
 PLIST_SUB+=	CLIENT=""
+.if defined(WITH_MENU) && defined(WITHOUT_TOOLS)
+CONFIGURE_ARGS+=--with-tools=qfcc,pak
+.endif
+.endif
+
+.if defined(WITHOUT_TOOLS) && (defined(WITHOUT_CLIENTS) || !defined(WITH_MENU))
+PLIST_SUB+=	MENU="@comment "
+.else
+PLIST_SUB+=	MENU=""
 .endif
 
 .if !defined(WITHOUT_SVGALIB) && defined(WITH_SVGALIB)
@@ -150,6 +159,13 @@
 PLIST_SUB+=	SKIN="@comment "
 .endif
 
+.if defined(WITH_STATIC_PLUGINS)
+PLIST_SUB+=	PLUGIN="@comment "
+CONFIGURE_ARGS+=--with-static-plugins
+.else
+PLIST_SUB+=	PLUGIN=""
+.endif
+
 pre-everything::
 .if !defined(NO_WAD)
 	@${ECHO_MSG} "Define NO_WAD to stop from using shareware version!"
@@ -181,6 +197,12 @@
 .if !defined(WITHOUT_CLIENTS)
 	@${ECHO_MSG} "Define WITHOUT_CLIENTS to disable building of the clients"
 .endif
+.if !defined(WITH_MENU) && defined(WITHOUT_TOOLS) && !defined(WITHOUT_CLIENTS)
+	@${ECHO_MSG} "Define WITH_MENU to enable building and installing menu.dat.gz"
+.endif
+.if !defined(WITH_STATIC_PLUGINS)
+	@${ECHO_MSG} "Define WITH_STATIC_PLUGINS to disable building plugins as shared objects"
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's/-lpthread/${PTHREAD_LIBS}/g' ${WRKSRC}/configure
@@ -212,5 +234,19 @@
 
 post-install:
 	@${SED} -e 's#$${PREFIX}#${PREFIX}#g' ${PKGMESSAGE}
+.if defined(WITH_MENU) && defined(WITHOUT_TOOLS) && !defined(WITHOUT_CLIENTS)
+	@${RM} ${PREFIX}/bin/pak
+	@${RM} ${PREFIX}/bin/zpak
+	@${RM} ${PREFIX}/bin/qfcc
+	@${RM} ${PREFIX}/bin/qfprogs
+	@${RM} ${PREFIX}/bin/qfpreqcc
+	@${RM} ${PREFIX}/lib/ruamoko/libr.a
+	@${RM} ${PREFIX}/lib/ruamoko/libqw.a
+	@${RM} ${PREFIX}/lib/ruamoko/libnq.a
+	@${RM} ${PREFIX}/lib/ruamoko/libcsqc.a
+	@${RM} ${PREFIX}/lib/ruamoko/libgui.a
+	@${RM} ${PREFIX}/man/man1/pak.1
+	@${RM} ${PREFIX}/man/man1/qfcc.1
+.endif
 
 .include <bsd.port.post.mk>
diff -ru quakeforge.orig/pkg-plist quakeforge/pkg-plist
--- quakeforge.orig/pkg-plist	Fri Aug 20 19:50:54 2004
+++ quakeforge/pkg-plist	Mon May  9 08:59:48 2005
@@ -74,21 +74,21 @@
 lib/libQFutil.a
 lib/libQFutil.so
 lib/libQFutil.so.1
-%%CLIENT%%lib/quakeforge/cd_file.so
-%%CLIENT%%%%SDL%%lib/quakeforge/cd_sdl.so
-%%CLIENT%%%%XMMS%%lib/quakeforge/cd_xmms.so
-lib/quakeforge/console_client.so
-lib/quakeforge/console_server.so
-%%CLIENT%%lib/quakeforge/snd_output_disk.so
-%%CLIENT%%lib/quakeforge/snd_output_oss.so
-%%CLIENT%%%%SDL%%lib/quakeforge/snd_output_sdl.so
-%%CLIENT%%lib/quakeforge/snd_render_default.so
+%%PLUGIN%%%%CLIENT%%lib/quakeforge/cd_file.so
+%%PLUGIN%%%%CLIENT%%%%SDL%%lib/quakeforge/cd_sdl.so
+%%PLUGIN%%%%CLIENT%%%%XMMS%%lib/quakeforge/cd_xmms.so
+%%PLUGIN%%lib/quakeforge/console_client.so
+%%PLUGIN%%lib/quakeforge/console_server.so
+%%PLUGIN%%%%CLIENT%%lib/quakeforge/snd_output_disk.so
+%%PLUGIN%%%%CLIENT%%lib/quakeforge/snd_output_oss.so
+%%PLUGIN%%%%CLIENT%%%%SDL%%lib/quakeforge/snd_output_sdl.so
+%%PLUGIN%%%%CLIENT%%lib/quakeforge/snd_render_default.so
 %%TOOL%%lib/ruamoko/libcsqc.a
 %%TOOL%%lib/ruamoko/libgui.a
 %%TOOL%%lib/ruamoko/libnq.a
 %%TOOL%%lib/ruamoko/libqw.a
 %%TOOL%%lib/ruamoko/libr.a
-%%TOOL%%share/quakeforge/QF/menu.dat.gz
+%%MENU%%share/quakeforge/QF/menu.dat.gz
 %%WAD%%share/quakeforge/id1/pak0.pak
 %%SERVER%%share/quakeforge/qw/buttons.qc
 %%SERVER%%share/quakeforge/qw/client.qc
@@ -474,8 +474,8 @@
 @dirrm include/QF/ruamoko/gui
 @dirrm include/QF/ruamoko
 @dirrm include/QF
-%%TOOL%%@dirrm lib/ruamoko
- at dirrm lib/quakeforge
+ at unexec rmdir %D/lib/ruamoko/ 2>/dev/null || true
+ at unexec rmdir %D/lib/quakeforge/ 2>/dev/null || true
 @unexec rmdir %D/share/quakeforge/QF/ 2>/dev/null || true
 @unexec rmdir %D/share/quakeforge/id1/ 2>/dev/null || true
 @unexec rmdir %D/share/quakeforge/qw/skins/ 2>/dev/null || true
--- quakeforge.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list