mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
- 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)
This commit is contained in:
parent
8ecbb368fb
commit
a3aa980c8f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=362306
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user