From 2c723a0bdcb9def9bbd2f3e64e5379f8d930cee5 Mon Sep 17 00:00:00 2001 From: Steve Wills Date: Tue, 22 Jul 2014 19:30:31 +0000 Subject: databases/memcached: fix build when xml2rfc is installed The docs for require xml2rfc and aren't built in the case where it's not installed. However when they are installed, they fail due to make issues. This patches the doc Makefile to avoid the gmake specific extensions as well as ensuring that network access is not needed to build the docs. It also ensure that xml2rfc is always there in the case where the DOCS option is enabled so that the docs are always built the same. While here, I decided to include some of the cleanup from the PR including the LICENSE change ane enabling the SASL and DOCS options by default since they don't add much in the way of dependencies. Also switched to static plist. PR: 192009 Reported by: jaap@NLnetLabs.nl --- databases/memcached/Makefile | 24 +++--- databases/memcached/files/patch-doc-local | 104 +++++++++++++++++++++++ databases/memcached/files/patch-doc__Makefile.in | 28 ++++++ databases/memcached/pkg-plist | 11 +++ 4 files changed, 157 insertions(+), 10 deletions(-) create mode 100644 databases/memcached/files/patch-doc-local create mode 100644 databases/memcached/files/patch-doc__Makefile.in create mode 100644 databases/memcached/pkg-plist (limited to 'databases/memcached') diff --git a/databases/memcached/Makefile b/databases/memcached/Makefile index 371fe4913a89..c66a2a2db853 100644 --- a/databases/memcached/Makefile +++ b/databases/memcached/Makefile @@ -3,6 +3,7 @@ PORTNAME= memcached PORTVERSION= 1.4.20 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} \ ${MASTER_SITE_GENTOO} @@ -11,6 +12,9 @@ MASTER_SITE_SUBDIR= distfiles MAINTAINER= swills@FreeBSD.org COMMENT= High-performance distributed memory object cache system +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/COPYING + LIB_DEPENDS= libevent-2.0.so:${PORTSDIR}/devel/libevent2 TEST_DEPENDS= prove:${PORTSDIR}/lang/${PERL_PORT} \ @@ -19,7 +23,8 @@ TEST_DEPENDS= prove:${PORTSDIR}/lang/${PERL_PORT} \ CONFLICTS= memcached-1.2* # Dtrace option disabled until it is fixed upstream -OPTIONS_DEFINE= SASL DOCS +OPTIONS_DEFINE= SASL DOCS DTRACE +OPTIONS_DEFAULT= SASL DOCS DTRACE_DESC= Enable dtrace probes SASL_DESC= Enable SASL Authentication @@ -35,14 +40,6 @@ GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-libevent=${LOCALBASE}/lib/event2 --program-prefix= \ --disable-coverage -PLIST_FILES= bin/memcached \ - bin/memcached-tool \ - include/memcached/protocol_binary.h \ - man/man1/memcached.1.gz -PLIST_DIRS= include/memcached - -PORTDOCS= protocol.txt readme.txt - CFLAGS+= -fstack-protector \ -I${LOCALBASE}/include/event2/compat \ -I${LOCALBASE}/include @@ -65,15 +62,22 @@ CONFIGURE_ARGS+= --enable-64bit BROKEN= DTRACE broken with gcc/clang - reported upstream .endif +.if ${PORT_OPTIONS:MDOCS} +BUILD_DEPENDS= xml2rfc:${PORTSDIR}/textproc/xml2rfc +.endif + post-patch: @${REINPLACE_CMD} -e "s,-levent,-levent-2.0,g" ${WRKSRC}/configure post-install: ${INSTALL_SCRIPT} ${WRKSRC}/scripts/memcached-tool ${STAGEDIR}${PREFIX}/bin +.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR} -.for i in ${PORTDOCS} +.for i in protocol-binary-range.txt protocol-binary.txt protocol.txt \ + readme.txt threads.txt ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${STAGEDIR}${DOCSDIR} .endfor +.endif regression-test: test test: build diff --git a/databases/memcached/files/patch-doc-local b/databases/memcached/files/patch-doc-local new file mode 100644 index 000000000000..b288668f7451 --- /dev/null +++ b/databases/memcached/files/patch-doc-local @@ -0,0 +1,104 @@ +--- doc/xml2rfc/reference.RFC.2119.xml.orig 2014-07-22 05:09:55.000000000 +0000 ++++ doc/xml2rfc/reference.RFC.2119.xml 2014-07-22 05:09:55.000000000 +0000 +@@ -0,0 +1,44 @@ ++ ++ ++ ++ ++ ++Key words for use in RFCs to Indicate Requirement Levels ++ ++Harvard University ++
++ ++1350 Mass. Ave. ++Cambridge ++MA 02138 ++- +1 617 495 3864 ++sob@harvard.edu
++ ++General ++keyword ++ ++ ++ In many standards track documents several words are used to signify ++ the requirements in the specification. These words are often ++ capitalized. This document defines these words as they should be ++ interpreted in IETF documents. Authors who follow these guidelines ++ should incorporate this phrase near the beginning of their document: ++ ++ ++ ++ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL ++ NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and ++ "OPTIONAL" in this document are to be interpreted as described in ++ RFC 2119. ++ ++ ++ Note that the force of these words is modified by the requirement ++ level of the document in which they are used. ++
++ ++ ++ ++ ++ ++ ++
+--- doc/xml2rfc/rfc2629-noinc.xsl.orig 2014-07-22 05:09:15.000000000 +0000 ++++ doc/xml2rfc/rfc2629-noinc.xsl 2014-07-22 05:09:23.000000000 +0000 +@@ -47,9 +47,7 @@ + + + +- http://xml.resource.org/public/rfc/ + +- .xml + + + +--- doc/protocol-binary.xml.orig 2013-12-07 08:37:04.000000000 +0000 ++++ doc/protocol-binary.xml 2014-07-22 15:02:07.000000000 +0000 +@@ -7,7 +7,7 @@ + + + +- ++ + + Memcache Binary Protocol + +@@ -1436,7 +1436,7 @@ + + + +- ++ + + +
+--- doc/protocol-binary-range.xml.orig 2013-12-07 08:37:04.000000000 +0000 ++++ doc/protocol-binary-range.xml 2014-07-22 15:02:01.000000000 +0000 +@@ -7,7 +7,7 @@ + + + +- ++ + + + +@@ -215,10 +215,10 @@ + + + +- +- ++ ++ + +- ++ + + + diff --git a/databases/memcached/files/patch-doc__Makefile.in b/databases/memcached/files/patch-doc__Makefile.in new file mode 100644 index 000000000000..a86d0c0ec0f5 --- /dev/null +++ b/databases/memcached/files/patch-doc__Makefile.in @@ -0,0 +1,28 @@ +--- doc/Makefile.in.orig 2014-07-22 02:34:37.000000000 +0000 ++++ doc/Makefile.in 2014-07-22 02:35:43.000000000 +0000 +@@ -424,14 +424,21 @@ + uninstall-am uninstall-man uninstall-man1 + + +-%.txt: %.full +- @XML2RFC@ $< $@ ++protocol-binary.txt: $(.TARGET:R).full ++ @XML2RFC@ -c @abs_builddir@ $(.TARGET:R).full $@ ++ ++protocol-binary-range.txt: $(.TARGET:R).full ++ @XML2RFC@ -c @abs_builddir@ $(.TARGET:R).full $@ + + %.chk: %.xml xml2rfc/rfc2629-refchk.xsl + @XSLTPROC@ xml2rfc/rfc2629-refchk.xsl $< >$@ + +-%.full: %.xml xml2rfc/rfc2629-noinc.xsl +- @XSLTPROC@ xml2rfc/rfc2629-noinc.xsl $< >$@ ++protocol-binary.full: $(.TARGET:R).xml xml2rfc/rfc2629-noinc.xsl ++ @XSLTPROC@ --nonet xml2rfc/rfc2629-noinc.xsl $(.TARGET:R).xml > $@ ++ ++protocol-binary-range.full: $(.TARGET:R).xml xml2rfc/rfc2629-noinc.xsl ++ @XSLTPROC@ --nonet xml2rfc/rfc2629-noinc.xsl $(.TARGET:R).xml > $@ ++ + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/databases/memcached/pkg-plist b/databases/memcached/pkg-plist new file mode 100644 index 000000000000..b34338fc87ab --- /dev/null +++ b/databases/memcached/pkg-plist @@ -0,0 +1,11 @@ +bin/memcached +bin/memcached-tool +include/memcached/protocol_binary.h +man/man1/memcached.1.gz +%%PORTDOCS%%%%DOCSDIR%%/protocol-binary-range.txt +%%PORTDOCS%%%%DOCSDIR%%/protocol-binary.txt +%%PORTDOCS%%%%DOCSDIR%%/protocol.txt +%%PORTDOCS%%%%DOCSDIR%%/readme.txt +%%PORTDOCS%%%%DOCSDIR%%/threads.txt +@dirrmtry include/memcached +%%PORTDOCS%%@dirrmtry %%DOCSDIR%% -- cgit v1.2.3