aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authortimur <timur@FreeBSD.org>2014-03-13 10:11:21 +0800
committertimur <timur@FreeBSD.org>2014-03-13 10:11:21 +0800
commit7cc7bfe84cefd4030f1d797e90a4d693757caaf7 (patch)
tree0303fcf86d1748488e4ff0dc4100fab9365f7649 /devel
parent9a5415f8774170856192f137fe5588fe42d78289 (diff)
downloadfreebsd-ports-gnome-7cc7bfe84cefd4030f1d797e90a4d693757caaf7.tar.gz
freebsd-ports-gnome-7cc7bfe84cefd4030f1d797e90a4d693757caaf7.tar.zst
freebsd-ports-gnome-7cc7bfe84cefd4030f1d797e90a4d693757caaf7.zip
Convert port to support STAGE
Diffstat (limited to 'devel')
-rw-r--r--devel/talloc/Makefile73
1 files changed, 50 insertions, 23 deletions
diff --git a/devel/talloc/Makefile b/devel/talloc/Makefile
index 112a56a5c159..c0703c5f859c 100644
--- a/devel/talloc/Makefile
+++ b/devel/talloc/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= talloc
-PORTVERSION= 2.0.8
+PORTVERSION= 2.1.0
PORTREVISION= 0
PORTEPOCH= 0
CATEGORIES= devel
@@ -15,12 +15,10 @@ LICENSE= LGPL3
CONFLICTS= samba33-3.*
-USES= pkgconfig
+USES= compiler pkgconfig
USE_PYTHON_BUILD= 2
USE_LDCONFIG= yes
-HAS_CONFIGURE= yes
WAF_TOOL= buildtools/bin/waf
-CONFIGURE_SCRIPT= ${WAF_TOOL} configure
CONFIGURE_LOG= bin/config.log
PKGCONFIGDIR?= ${PREFIX}/libdata/pkgconfig
@@ -29,28 +27,37 @@ PLIST_SUB+= PKGCONFIGDIR=${PKGCONFIGDIR:S;${PREFIX}/;;}
CONFIGURE_ARGS+= --prefix=${PREFIX} \
--mandir=${MANPREFIX}/man \
--infodir=${PREFIX}/${INFO_PATH}/${INFO_SUBDIR}
-
-OPTIONS_DEFINE= PYTHON
-OPTIONS_DEFAULT= PYTHON
+# Support staging
+DESTDIRNAME= --destdir
.include <bsd.port.options.mk>
+.include <bsd.port.pre.mk>
+
+.if ! ${PORT_OPTIONS:MMANPAGES}
+CONFIGURE_ENV+= XSLTPROC="true"
+.else
+BUILD_DEPENDS+= ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl \
+ xsltproc:${PORTSDIR}/textproc/libxslt
+.endif
+
PLIST_FILES= include/talloc.h \
lib/libtalloc.so \
lib/libtalloc.so.2 \
- %%PKGCONFIGDIR%%/talloc.pc \
- man/man3/talloc.3.gz
+ %%PKGCONFIGDIR%%/talloc.pc
-CONFIGURE_ENV+= XSLTPROC="/usr/bin/true"
+# No fancy color error messages
+.if ${COMPILER_TYPE} == "clang"
+CFLAGS+= -fno-color-diagnostics
+.endif
CONFIGURE_ENV+= NOCOLOR=yes
-MAKE_ENV+= NOCOLOR=yes ${DESTDIRNAME}=${STAGEDIR}
+MAKE_ENV+= NOCOLOR=yes
.if !defined(DISABLE_MAKE_JOBS) && !defined(MAKE_JOBS_UNSAFE)
CONFIGURE_ARGS+= --jobs=${MAKE_JOBS_NUMBER}
-_MAKE_JOBS= --jobs=${MAKE_JOBS_NUMBER}
+_MAKE_JOBS+= --jobs=${MAKE_JOBS_NUMBER}
.endif
-.if ${PORT_OPTIONS:MPYTHON}
USE_PYTHON_RUN= yes
PLIST_FILES+= include/pytalloc.h \
lib/libpytalloc-util.so \
@@ -59,19 +66,18 @@ PLIST_FILES+= include/pytalloc.h \
%%PKGCONFIGDIR%%/pytalloc-util.pc
PLIST_DIRSTRY+= %%PYTHON_SITELIBDIR%% \
%%PYTHON_LIBDIR%%
-.else
-CONFIGURE_ARGS+= --disable-python
-.endif
+TALLOC_MAN3= man/man3/talloc.3.gz
+
+PLIST_FILES+= ${TALLOC_MAN3}
+
+CONFIGURE_TARGET= configure
ALL_TARGET= build
INSTALL_TARGET= install
-.include <bsd.port.pre.mk>
-
IGNORE_NONTHREAD_PYTHON=needs port lang/python${PYTHON_SUFFIX} to be build with THREADS support
post-patch:
- @${REINPLACE_CMD} -e 's|python|python${PYTHON_VER}|' ${BUILD_WRKSRC}/${WAF_TOOL}
@${REINPLACE_CMD} -e 's|%%PKGCONFIGDIR%%|${PKGCONFIGDIR}|g' \
${BUILD_WRKSRC}/wscript
@@ -84,13 +90,34 @@ pre-configure:
${FALSE}; \
fi
+do-configure:
+ @(cd ${CONFIGURE_WRKSRC} && \
+ ${SET_LATE_CONFIGURE_ARGS} \
+ if ! ${SETENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \
+ CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ INSTALL="/usr/bin/install -c ${_BINOWNGRP}" \
+ INSTALL_DATA="${INSTALL_DATA}" \
+ INSTALL_LIB="${INSTALL_LIB}" \
+ INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+ INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
+ ${CONFIGURE_ENV} ${PYTHON_CMD} ${CONFIGURE_WRKSRC}/${WAF_TOOL} ${CONFIGURE_ARGS} ${CONFIGURE_TARGET}; then \
+ ${ECHO_MSG} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \
+ (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
+ ${FALSE}; \
+ fi)
+
pre-build:
- @${MKDIR} ${BUILD_WRKSRC}/bin/default
- @${INSTALL_MAN} ${FILESDIR}/talloc.3 ${BUILD_WRKSRC}/bin/default
+.if ! ${PORT_OPTIONS:MMANPAGES}
+ -${MKDIR} ${BUILD_WRKSRC}/bin/default/man
+. for man in ${TALLOC_MAN3}
+ ${INSTALL_MAN} ${FILESDIR}/`basename ${man} .gz` ${BUILD_WRKSRC}/bin/default/man
+. endfor
+.endif
do-build:
@(cd ${BUILD_WRKSRC}; \
- if ! ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${BUILD_WRKSRC}/${WAF_TOOL} ${_MAKE_JOBS} ${ALL_TARGET}; then \
+ if ! ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${BUILD_WRKSRC}/${WAF_TOOL} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}; then \
if [ x != x${BUILD_FAIL_MESSAGE} ] ; then \
${ECHO_MSG} "===> Compilation failed unexpectedly."; \
(${ECHO_CMD} ${BUILD_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
@@ -99,6 +126,6 @@ do-build:
fi)
do-install:
- @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${INSTALL_WRKSRC}/${WAF_TOOL} ${INSTALL_TARGET})
+ @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${INSTALL_WRKSRC}/${WAF_TOOL} ${MAKE_ARGS} ${INSTALL_TARGET})
.include <bsd.port.post.mk>