Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Aug 2020 16:00:43 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r544176 - head/science/v_sim
Message-ID:  <202008041600.074G0h4I065182@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Tue Aug  4 16:00:43 2020
New Revision: 544176
URL: https://svnweb.freebsd.org/changeset/ports/544176

Log:
  - Fix build without NLS (missing gettext-tools dependency) and without EXAMPLES (broken patching)
  - Convert patching to options helpers, silence, fix whitespace and make more future proof
  
  Approved by:	portmgr blanket

Modified:
  head/science/v_sim/Makefile
  head/science/v_sim/pkg-plist

Modified: head/science/v_sim/Makefile
==============================================================================
--- head/science/v_sim/Makefile	Tue Aug  4 15:47:49 2020	(r544175)
+++ head/science/v_sim/Makefile	Tue Aug  4 16:00:43 2020	(r544176)
@@ -39,6 +39,7 @@ OPTIONS_DEFINE=	DOCS NLS EXAMPLES
 USES+=		gettext
 PLIST_SUB+=	NLS=""
 .else
+USES+=		gettext-tools
 PLIST_SUB+=	NLS="@comment "
 .endif
 
@@ -61,26 +62,26 @@ PLIST_SUB+=	BABEL="@comment "
 .endif
 
 pre-configure:
-	${REINPLACE_CMD} -e 's|$$datadir/doc/$$PACKAGE/examples|${EXAMPLESDIR}|'	\
+	@${REINPLACE_CMD} -e 's|$$datadir/doc/$$PACKAGE/examples|${EXAMPLESDIR}|'	\
 		-e 's| CFLAGS="-O2"|#CFLAGS="-O2"|;s|Werror ansi pedantic-errors||'	\
 		-e 's| FCFLAGS="-O2"|FCFLAGS=${FFLAGS}|;s|$${docdir}/examples|${EXAMPLESDIR}|'	\
 		${WRKSRC}/${CONFIGURE_SCRIPT}
-.if ! ${PORT_OPTIONS:MNLS}
-	${REINPLACE_CMD} -e 's|	po ||'	\
+
+pre-configure-NLS-off:
+	@${REINPLACE_CMD} -e '/^	po /d'	\
 		${WRKSRC}/Makefile.in
-.endif
-.if ! ${PORT_OPTIONS:MDOCS}
-	${REINPLACE_CMD} -e 's|Documentation||'	\
+
+pre-configure-DOCS-off:
+	@${REINPLACE_CMD} -e '/^	Documentation/d'	\
 		${WRKSRC}/Makefile.in
-.endif
-.if ! ${PORT_OPTIONS:MEXAMPLES}
-	${REINPLACE_CMD} -e 's|pixmaps \\|pixmaps|;s|examples$$||'	\
+
+pre-configure-EXAMPLES-off:
+	@${REINPLACE_CMD} -e '/^	examples/d'	\
 		${WRKSRC}/Makefile.in
-	${FIND} ${WRKSRC}/lib/plug-ins -name Makefile.in | ${XARGS} \
-	${REINPLACE_CMD} -e	\
-	's|install-v_simexamplesDATA install-v_simpixmapsDATA|install-v_simpixmapsDATA|'
-	${REINPLACE_CMD} -e 's|: install-v_simexamplesDATA|:|'	\
+	@${FIND} ${WRKSRC}/lib/plug-ins -name Makefile.in | ${XARGS} \
+		${REINPLACE_CMD} -e	\
+		's|install-v_simexamplesDATA install-v_simpixmapsDATA|install-v_simpixmapsDATA|'
+	@${REINPLACE_CMD} -e 's|: install-v_simexamplesDATA|:|'	\
 		${WRKSRC}/lib/python/Makefile.in
-.endif
 
 .include <bsd.port.mk>

Modified: head/science/v_sim/pkg-plist
==============================================================================
--- head/science/v_sim/pkg-plist	Tue Aug  4 15:47:49 2020	(r544175)
+++ head/science/v_sim/pkg-plist	Tue Aug  4 16:00:43 2020	(r544176)
@@ -186,7 +186,7 @@ share/icons/hicolor/24x24/apps/v_sim.png
 share/icons/hicolor/32x32/apps/v_sim.png
 share/icons/hicolor/48x48/apps/v_sim.png
 share/icons/hicolor/scalable/apps/v_sim.svg
-share/locale/fr/LC_MESSAGES/v_sim.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/v_sim.mo
 share/pixmaps/v_sim.xpm
 %%DATADIR%%/pixmaps/axes-angles.png
 %%DATADIR%%/pixmaps/axes-box.png



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