Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Dec 2014 23:45:41 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r375810 - head/games/0ad
Message-ID:  <201412292345.sBTNjf2o030048@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Mon Dec 29 23:45:40 2014
New Revision: 375810
URL: https://svnweb.freebsd.org/changeset/ports/375810
QAT: https://qat.redports.org/buildarchive/r375810/

Log:
  Add option to allow linking to lang/spidermonkey24 port instead of
  using the boundled one.
  
  PR:		196304
  Submitted by:	Kevin Zheng <kevinz5000 at gmail.com>

Modified:
  head/games/0ad/Makefile
  head/games/0ad/pkg-plist

Modified: head/games/0ad/Makefile
==============================================================================
--- head/games/0ad/Makefile	Mon Dec 29 23:06:29 2014	(r375809)
+++ head/games/0ad/Makefile	Mon Dec 29 23:45:40 2014	(r375810)
@@ -2,7 +2,7 @@
 
 PORTNAME=	0ad
 PORTVERSION=	0.0.17
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	games
 MASTER_SITES=	SF/zero-ad/releases
 DISTFILES=	${PORTNAME}-${PORTVERSION}-alpha-unix-build.tar.xz \
@@ -41,10 +41,22 @@ WX_COMPS=	wx:lib
 WX_UNICODE=	yes
 MAKE_ENV+=	JOBS=${_MAKE_JOBS}
 
+OPTIONS_DEFINE=	PORTSSM
+PORTSSM_DESC=	Use lang/spidermonkey24 instead of bundled one
+
+OPTIONS_SUB=	yes
+PORTSSM_LIB_DEPENDS=	libmozjs-24.so:${PORTSDIR}/lang/spidermonkey24
+
 MANUAL_PACKAGE_BUILD=	huge
 
 PORTDATA=	*
 
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MPORTSSM}
+SMOPT=		--with-system-mozjs24
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
 			-e 's|%%CC%%|${CC}|' \
@@ -55,14 +67,17 @@ post-patch:
 		${WRKSRC}/build/resources/0ad.sh
 
 pre-build:
-	(cd ${WRKSRC}/build/workspaces && ${SETENV} ${MAKE_ENV} ./update-workspaces.sh --with-system-miniupnpc --bindir=${PREFIX}/bin --datadir=${DATADIR} --libdir=${PREFIX}/lib/${PORTNAME})
+	(cd ${WRKSRC}/build/workspaces && ${SETENV} ${MAKE_ENV} ./update-workspaces.sh --with-system-miniupnpc ${SMOPT} --bindir=${PREFIX}/bin --datadir=${DATADIR} --libdir=${PREFIX}/lib/${PORTNAME})
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/binaries/system/pyrogenesis ${STAGEDIR}${PREFIX}/bin
 	${INSTALL_SCRIPT} ${WRKSRC}/build/resources/0ad.sh ${STAGEDIR}${PREFIX}/bin/0ad
 	${INSTALL_PROGRAM} ${WRKSRC}/binaries/system/ActorEditor ${STAGEDIR}${PREFIX}/bin
 	${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
-	(cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} libAtlasUI.so libCollada.so libmozjs24-ps-release.so libnvcore.so libnvimage.so libnvmath.so libnvtt.so ${STAGEDIR}${PREFIX}/lib/${PORTNAME})
+	(cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} libAtlasUI.so libCollada.so libnvcore.so libnvimage.so libnvmath.so libnvtt.so ${STAGEDIR}${PREFIX}/lib/${PORTNAME})
+.if ! ${PORT_OPTIONS:MPORTSSM}
+	(cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} libmozjs24-ps-release.so ${STAGEDIR}${PREFIX}/lib/${PORTNAME})
+.endif
 	${INSTALL_DATA} ${WRKSRC}/build/resources/0ad.desktop ${STAGEDIR}${PREFIX}/share/applications
 	${INSTALL_DATA} ${WRKSRC}/build/resources/0ad.png ${STAGEDIR}${PREFIX}/share/pixmaps
 	${MKDIR} ${STAGEDIR}${DATADIR}

Modified: head/games/0ad/pkg-plist
==============================================================================
--- head/games/0ad/pkg-plist	Mon Dec 29 23:06:29 2014	(r375809)
+++ head/games/0ad/pkg-plist	Mon Dec 29 23:45:40 2014	(r375810)
@@ -3,7 +3,7 @@ bin/0ad
 bin/ActorEditor
 lib/0ad/libAtlasUI.so
 lib/0ad/libCollada.so
-lib/0ad/libmozjs24-ps-release.so
+%%NO_PORTSSM%%lib/0ad/libmozjs24-ps-release.so
 lib/0ad/libnvcore.so
 lib/0ad/libnvimage.so
 lib/0ad/libnvmath.so



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412292345.sBTNjf2o030048>