Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Mar 2014 02:11:21 +0000 (UTC)
From:      "Timur I. Bakeyev" <timur@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r348021 - head/devel/talloc
Message-ID:  <201403130211.s2D2BLkL026306@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: timur
Date: Thu Mar 13 02:11:21 2014
New Revision: 348021
URL: http://svnweb.freebsd.org/changeset/ports/348021
QAT: https://qat.redports.org/buildarchive/r348021/

Log:
  Convert port to support STAGE

Modified:
  head/devel/talloc/Makefile

Modified: head/devel/talloc/Makefile
==============================================================================
--- head/devel/talloc/Makefile	Thu Mar 13 02:10:51 2014	(r348020)
+++ head/devel/talloc/Makefile	Thu Mar 13 02:11:21 2014	(r348021)
@@ -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
 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>



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