Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jan 2017 09:01:13 +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: r431071 - head/databases/metakit
Message-ID:  <201701100901.v0A91Dvd079854@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Tue Jan 10 09:01:13 2017
New Revision: 431071
URL: https://svnweb.freebsd.org/changeset/ports/431071

Log:
  - Switch to options helpers
  - Switch to new test framework

Modified:
  head/databases/metakit/Makefile
  head/databases/metakit/pkg-plist

Modified: head/databases/metakit/Makefile
==============================================================================
--- head/databases/metakit/Makefile	Tue Jan 10 08:51:56 2017	(r431070)
+++ head/databases/metakit/Makefile	Tue Jan 10 09:01:13 2017	(r431071)
@@ -23,6 +23,7 @@ BROKEN_mips64=		Fails to build: error: c
 
 OPTIONS_DEFINE=	PYTHON TCL DOCS
 OPTIONS_DEFAULT=	PYTHON
+OPTIONS_SUB=	yes
 
 .include <bsd.port.options.mk>
 
@@ -30,9 +31,6 @@ OPTIONS_DEFAULT=	PYTHON
 USES+=		python
 CONFIGURE_ARGS+=	--with-python=${LOCALBASE}
 CATEGORIES+=	python
-PLIST_SUB+=	WITH_PYTHON=""
-.else
-PLIST_SUB+=	WITH_PYTHON="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MTCL}
@@ -41,25 +39,20 @@ CATEGORIES+=	tcl
 CONFIGURE_ARGS+=--with-tcl=${TCL_INCLUDEDIR}
 CONFIGURE_ENV+=	TCL_LIBDIR=${TCL_LIBDIR}
 PLIST_SUB+=	TCL_V="${TCL_VER}"
-PLIST_SUB+=	WITH_TCL=""
-.else
-PLIST_SUB+=	WITH_TCL="@comment "
 .endif
 
 pre-patch:
-	${REINPLACE_CMD} -e "s=doc/==" ${WRKSRC}/../Metakit.html
-	${REINPLACE_CMD} -e "s|= tclsh|=${TCLSH}|" \
+	@${REINPLACE_CMD} -e "s=doc/==" ${WRKSRC}/../Metakit.html
+	@${REINPLACE_CMD} -e "s|= tclsh|=${TCLSH}|" \
 		${WRKSRC}/../unix/Makefile.in
-	${REINPLACE_CMD} -e "s=python2.[0-9]=${PYTHON_VERSION}=" \
+	@${REINPLACE_CMD} -e "s=python2.[0-9]=${PYTHON_VERSION}=" \
 		${WRKSRC}/../unix/Makefile.in ${WRKSRC}/../unix/configure
 
-post-build:
-.if ${PORT_OPTIONS:MPYTHON}
+post-build-PYTHON-on:
 	${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
 		${WRKSRC}/../python
 	${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
 		${WRKSRC}/../python
-.endif
 
 pre-install:
 	@${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
@@ -74,12 +67,12 @@ post-install:
 	${INSTALL_DATA} ${WRKSRC}/../Metakit.html ${WRKSRC}/../CHANGES \
 		${WRKSRC}/../README ${STAGEDIR}${DOCSDIR}
 
-test:
+do-test:
 	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
 		${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test)
-.if ${PORT_OPTIONS:MTCL}
+
+do-test-TCL-on:
 	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
 		${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test-tcl)
-.endif
 
 .include <bsd.port.mk>

Modified: head/databases/metakit/pkg-plist
==============================================================================
--- head/databases/metakit/pkg-plist	Tue Jan 10 08:51:56 2017	(r431070)
+++ head/databases/metakit/pkg-plist	Tue Jan 10 09:01:13 2017	(r431071)
@@ -4,12 +4,12 @@ include/mk4str.h
 include/mk4str.inl
 lib/libmk4.so
 lib/libmk4.so.0
-%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/Mk4py.so
-%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/metakit.py
-%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/metakit.pyc
-%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/metakit.pyo
-%%WITH_TCL%%lib/tcl%%TCL_V%%/Mk4tcl/Mk4tcl.so
-%%WITH_TCL%%lib/tcl%%TCL_V%%/Mk4tcl/pkgIndex.tcl
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/Mk4py.so
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/metakit.py
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/metakit.pyc
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/metakit.pyo
+%%TCL%%lib/tcl%%TCL_V%%/Mk4tcl/Mk4tcl.so
+%%TCL%%lib/tcl%%TCL_V%%/Mk4tcl/pkgIndex.tcl
 %%PORTDOCS%%%%DOCSDIR%%/api/c4_Bytes.html
 %%PORTDOCS%%%%DOCSDIR%%/api/c4_BytesProp.html
 %%PORTDOCS%%%%DOCSDIR%%/api/c4_BytesProp_desc.html



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