From a7e7bec3c5cbe4ff063f0ebbf1c33ce323473ba3 Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Fri, 22 Nov 2013 20:28:02 +0000 Subject: [PATCH] - Fix build with clang [1] - Improve COMMENT - Allow staging - Remove DOCS option, it does nothing anyway - Fix install when DOXYGEN=on, use generated plist for doxygen documentation files - Use option helpers - Move declarations to their proper places MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR: ports/184172 [1] Submitted by: Jens Bäckman [1] --- devel/log4cxx/Makefile | 46 ++++++++----------- .../files/patch-include-clocale-and-cstdlib | 24 ++++++++++ 2 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 devel/log4cxx/files/patch-include-clocale-and-cstdlib diff --git a/devel/log4cxx/Makefile b/devel/log4cxx/Makefile index 82b8c7dd7861..7640d000066b 100644 --- a/devel/log4cxx/Makefile +++ b/devel/log4cxx/Makefile @@ -10,46 +10,38 @@ MASTER_SITE_SUBDIR= logging/${PORTNAME}/${PORTVERSION} DISTNAME= apache-${PORTNAME}-${PORTVERSION} MAINTAINER= ports@FreeBSD.org -COMMENT= Log4cxx is a port to C++ of the Log4j project +COMMENT= C++ port of the Log4j project LICENSE= AL2 LIB_DEPENDS= apr-1:${PORTSDIR}/devel/apr1 -OPTIONS_DEFINE= BOOST DOCS DOXYGEN - -NO_STAGE= yes -.include - -.if ${PORT_OPTIONS:MDOCS} && ${PORT_OPTIONS:MDOXYGEN} -BUILD_DEPENDS+= ${LOCALBASE}/bin/doxygen:${PORTSDIR}/devel/doxygen -.else -CONFIGURE_ARGS+= --disable-doxygen -.endif - -.if ${PORT_OPTIONS:MBOOST} -BUILD_DEPENDS+= ${LOCALBASE}/include/boost/regex.hpp:${PORTSDIR}/devel/boost-libs -.endif - GNU_CONFIGURE= yes USE_AUTOTOOLS= automake:env autoconf:env libtool:env - +USES= pathfix +USE_LDCONFIG= yes MAKE_JOBS_UNSAFE= yes -USE_LDCONFIG= yes +OPTIONS_DEFINE= BOOST DOXYGEN -.if ${PORT_OPTIONS:MDOCS} && ${PORT_OPTIONS:MDOXYGEN} -PORTDOCS= * -.endif +BOOST_BUILD_DEPENDS= ${LOCALBASE}/include/boost/regex.hpp:${PORTSDIR}/devel/boost-libs -USES= pathfix +DOXYGEN_CONFIGURE_OFF= --disable-doxygen +DOXYGEN_BUILD_DEPENDS= ${LOCALBASE}/bin/doxygen:${PORTSDIR}/devel/doxygen + +.include + +post-configure: + @${REINPLACE_CMD} -e 's|-dpR|-pr|' \ + -e '/^htmldest/ s|$$(pkgdatadir)|${DOCSDIR}|' \ + ${WRKSRC}/src/site/doxy/Makefile post-install: -.if ${PORT_OPTIONS:MDOCS} && ${PORT_OPTIONS:MDOXYGEN} - ${MKDIR} ${DOCSDIR} - for f in ${PORTDOCS}; do \ - ${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \ - done +.if ${PORT_OPTIONS:MDOXYGEN} + @cd ${STAGEDIR}${PREFIX} && \ + ${FIND} ${DOCSDIR:S|${PREFIX}/||} ! -type d >> ${TMPPLIST} && \ + ${FIND} ${DOCSDIR:S|${PREFIX}/||} -type d | ${SORT} -r | \ + ${SED} 's|^|@dirrm |' >> ${TMPPLIST} .endif .include diff --git a/devel/log4cxx/files/patch-include-clocale-and-cstdlib b/devel/log4cxx/files/patch-include-clocale-and-cstdlib new file mode 100644 index 000000000000..3e9fb6829f43 --- /dev/null +++ b/devel/log4cxx/files/patch-include-clocale-and-cstdlib @@ -0,0 +1,24 @@ +--- src/main/cpp/stringhelper.cpp 2008-04-01 00:34:09.000000000 +0200 ++++ src/main/cpp/stringhelper.cpp 2013-11-22 11:27:50.000000000 +0100 +@@ -28,6 +28,7 @@ + #endif + #include + #include ++#include + #include + + +--- src/main/include/log4cxx/helpers/simpledateformat.h 2008-04-01 00:34:26.000000000 +0200 ++++ src/main/include/log4cxx/helpers/simpledateformat.h 2013-11-22 11:27:27.000000000 +0100 +@@ -27,10 +27,9 @@ + + #include + #include ++#include + #include + +-namespace std { class locale; } +- + namespace log4cxx + { + namespace helpers