svn commit: r362306 - head/misc/freebsd-doc-en
Marc Fonvieille
blackend at FreeBSD.org
Sun Jul 20 09:16:06 UTC 2014
Author: blackend (doc committer)
Date: Sun Jul 20 09:16:05 2014
New Revision: 362306
URL: http://svnweb.freebsd.org/changeset/ports/362306
QAT: https://qat.redports.org/buildarchive/r362306/
Log:
- Fix use of DESTDIRNAME variable [1]
- Fix image links for HTML file: links are generated at build with
absolute path, make these paths relative. This should allow a
proper display of the HTML version of the docs.
Submitted by: wblock [1]
Approved by: doceng (implicit)
Modified:
head/misc/freebsd-doc-en/Makefile
Modified: head/misc/freebsd-doc-en/Makefile
==============================================================================
--- head/misc/freebsd-doc-en/Makefile Sun Jul 20 09:02:14 2014 (r362305)
+++ head/misc/freebsd-doc-en/Makefile Sun Jul 20 09:16:05 2014 (r362306)
@@ -3,6 +3,7 @@
PORTNAME= freebsd-doc
PORTVERSION= 45106
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= misc docs
MASTER_SITES= LOCAL/blackend
@@ -24,7 +25,11 @@ MAKE_ARGS= FORMATS="${DOCFORMAT}" \
DOCOWN=${SHAREOWN} \
DOCGRP=${SHAREGRP}
MAKE_JOBS_UNSAFE= yes
-DESTDIRNAME= ${STAGEDIR}${PREFIX}/${DOCBASE}
+
+# To populate correctly the stage directory
+TMPDESTDIR= ${STAGEDIR}${DESTDIR}/${PREFIX}/${DOCBASE}
+DESTDIRNAME= TMPDESTDIR
+
PLIST= ${WRKDIR}/pkg-plist
NEED_ROOT= yes
@@ -78,4 +83,14 @@ PLIST_FORMATS+= extras common
pre-build:
${CAT} ${PLIST_FORMATS:S,^,${.CURDIR}/pkg-plist.,} > ${PLIST}
+# For HTML files, images links are hardcoded during the build
+# with absolute pathnames. Make these pathnames relative.
+post-build:
+.if ${PORT_OPTIONS:MHTML} || ${PORT_OPTIONS:MHTML_SPLIT}
+ ${FIND} ${WRKSRC} -name "*.html" -exec \
+ ${REINPLACE_CMD} -e 's,img src=\"${WRKSRC}.*share/images,img src=\"../..,g' {} \;
+ ${FIND} ${WRKSRC} -name "*.html" -exec \
+ ${REINPLACE_CMD} -e 's,img src=\"${WRKSRC}.*imagelib,img src=\"imagelib,g' {} \;
+.endif
+
.include <bsd.port.mk>
More information about the svn-ports-head
mailing list