diff options
author | swills <swills@FreeBSD.org> | 2014-07-23 03:30:31 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2014-07-23 03:30:31 +0800 |
commit | 66941e1b3d6537c5b870f78ff8ff2dcd7b251e4d (patch) | |
tree | fe9d3f110fa48003af5e459224e526fe6eeecca0 /databases/memcached | |
parent | ca0451ed7fb13218789f0a0c079e623a7ff2337f (diff) | |
download | freebsd-ports-gnome-66941e1b3d6537c5b870f78ff8ff2dcd7b251e4d.tar.gz freebsd-ports-gnome-66941e1b3d6537c5b870f78ff8ff2dcd7b251e4d.tar.zst freebsd-ports-gnome-66941e1b3d6537c5b870f78ff8ff2dcd7b251e4d.zip |
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
Diffstat (limited to 'databases/memcached')
-rw-r--r-- | databases/memcached/Makefile | 24 | ||||
-rw-r--r-- | databases/memcached/files/patch-doc-local | 104 | ||||
-rw-r--r-- | databases/memcached/files/patch-doc__Makefile.in | 28 | ||||
-rw-r--r-- | databases/memcached/pkg-plist | 11 |
4 files changed, 157 insertions, 10 deletions
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 @@ ++<?xml version='1.0' encoding='UTF-8'?> ++ ++<reference anchor='RFC2119'> ++ ++<front> ++<title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title> ++<author initials='S.' surname='Bradner' fullname='Scott Bradner'> ++<organization>Harvard University</organization> ++<address> ++<postal> ++<street>1350 Mass. Ave.</street> ++<street>Cambridge</street> ++<street>MA 02138</street></postal> ++<phone>- +1 617 495 3864</phone> ++<email>sob@harvard.edu</email></address></author> ++<date year='1997' month='March' /> ++<area>General</area> ++<keyword>keyword</keyword> ++<abstract> ++<t> ++ 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: ++ ++<list> ++<t> ++ 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. ++</t></list></t> ++<t> ++ Note that the force of these words is modified by the requirement ++ level of the document in which they are used. ++</t></abstract></front> ++ ++<seriesInfo name='BCP' value='14' /> ++<seriesInfo name='RFC' value='2119' /> ++<format type='TXT' octets='4723' target='http://www.rfc-editor.org/rfc/rfc2119.txt' /> ++<format type='HTML' octets='17970' target='http://xml.resource.org/public/rfc/html/rfc2119.html' /> ++<format type='XML' octets='5777' target='http://xml.resource.org/public/rfc/xml/rfc2119.xml' /> ++</reference> +--- 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 @@ + <xsl:value-of select='@src'/> + </xsl:when> + <xsl:otherwise> +- <xsl:text>http://xml.resource.org/public/rfc/</xsl:text> + <xsl:value-of select='@src'/> +- <xsl:text>.xml</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:param> +--- 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 @@ + <?rfc sortrefs="yes" ?> + <?rfc compact="yes" ?> + <?rfc subcompact="yes" ?> +-<rfc category="info" docName="draft-stone-memcache-binary-01" ipr="none"> ++<rfc category="info" docName="draft-stone-memcache-binary-01" ipr="trust200902"> + <front> + <title> Memcache Binary Protocol </title> + +@@ -1436,7 +1436,7 @@ + </abstract> + </front> + </reference> +- <dwdrfc-ref anchor="KEYWORDS" src='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'/> ++ <dwdrfc-ref anchor="KEYWORDS" src='reference.RFC.2119.xml'/> + </references> + + <section anchor="acknowledgments" title="Acknowledgments"> +--- 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 @@ + <?rfc sortrefs="yes" ?> + <?rfc compact="yes" ?> + <?rfc subcompact="yes" ?> +-<rfc category="info" docName="draft-stone-memcache-udp-01" ipr="none"> ++<rfc category="info" docName="draft-stone-memcache-udp-01" ipr="trust200902"> + + <front> + +@@ -215,10 +215,10 @@ + + <back> + <references title="Normative References"> +- <dwdrfc-ref anchor='UDP' src='http://xml.resource.org/public/rfc/bibxml/reference.RFC.0768.xml'/> +- <dwdrfc-ref anchor='KEYWORDS' src='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'/> ++ <dwdrfc-ref anchor='UDP' src='reference.RFC.0768.xml'/> ++ <dwdrfc-ref anchor='KEYWORDS' src='reference.RFC.2119.xml'/> + <!-- FIXME: Get a draft reference for the base document. --> +- <dwdrfc-ref anchor='MEMCACHE' src='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'/> ++ <dwdrfc-ref anchor='MEMCACHE' src='reference.RFC.2119.xml'/> + </references> + </back> + 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%% |