Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Sep 2011 01:27:26 +0400
From:      h h <aakuusta@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/160668: [patch] graphics/zathura: add zathurarc.5 under NOPORTDOCS
Message-ID:  <868vpuydkx.fsf@gmail.com>
Resent-Message-ID: <201109112130.p8BLUIkx015849@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         160668
>Category:       ports
>Synopsis:       [patch] graphics/zathura: add zathurarc.5 under NOPORTDOCS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 11 21:30:18 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     h h
>Release:        FreeBSD 9.0-BETA2 amd64
>Organization:
>Environment:
>Description:
- fix plist when rst2man is in PATH
- respect PREFIX for system-wide config file
>How-To-Repeat:
1. install textproc/py-docutils
2. install graphics/zathura
3. deinstall zathura
4. check plist orphans, PREFIX/man5/zathurarc.5

1. install graphics/zathura
2. add `set recolor 1' to PREFIX/etc/zathurarc
3. open a pdf file, check if it's white-on-black
>Fix:
--- a.diff begins here ---
Index: graphics/zathura/Makefile
===================================================================
RCS file: /a/.csup/ports/graphics/zathura/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- graphics/zathura/Makefile	23 Aug 2011 18:36:20 -0000	1.8
+++ graphics/zathura/Makefile	11 Sep 2011 21:13:08 -0000
@@ -26,8 +26,13 @@ PLIST_FILES=	bin/zathura	\
 		share/applications/zathura.desktop
 PLIST_DIRSTRY=	share/applications
 
+.if !defined(NOPORTDOCS)
+BUILD_DEPENDS+=	rst2html:${PORTSDIR}/textproc/py-docutils
+MAN5+=		zathurarc.5
+.endif
+
 post-patch:	.SILENT
-	${REINPLACE_CMD} -e 's|man1|man/man1|g' \
+	${REINPLACE_CMD} -e 's|man[15]|man/&|g' \
 		-e '/CC/s/$${SFLAGS}/${STRIP} /' \
 		-e '/CFLAGS/!s/$${LDFLAGS}/$${CFLAGS} &/' \
 		-e 's/{DFLAGS/{DEBUG_FLAGS/g' \
@@ -39,10 +44,16 @@ post-patch:	.SILENT
 		-e 's/cp[[:space:]]$$</cp $$>/' \
 		-e 's/\(include\)[[:space:]]\(.*\)/.\1 "\2"/' \
 		${WRKSRC}/Makefile
+.if defined(NOPORTDOCS)
+	${REINPLACE_CMD} 's|which rst2man|${FALSE}|' ${WRKSRC}/Makefile
+.endif
 	${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include|' \
 		-e 's/-lpthread/${PTHREAD_LIBS}/' \
 		-e 's/-lc//' \
 		-e 's/$$(shell[[:space:]]\(.*\))/`\1`/' \
 		${WRKSRC}/config.mk
+	${REINPLACE_CMD} -e 's|/etc|${PREFIX}&|g' \
+		${WRKSRC}/config.def.h \
+		${WRKSRC}/zathurarc.5.rst
 
 .include <bsd.port.mk>
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?868vpuydkx.fsf>