Date: Sat, 24 Oct 2009 13:07:22 GMT From: Marco Bröder <marco.broeder@gmx.eu> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/139885: [maintainer-update][patch] devel/diffuse: Add path fix, add NOPORTDATA support Message-ID: <200910241307.n9OD7MJq040094@www.freebsd.org> Resent-Message-ID: <200910241310.n9ODA2v8052851@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 139885 >Category: ports >Synopsis: [maintainer-update][patch] devel/diffuse: Add path fix, add NOPORTDATA support >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Oct 24 13:10:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Marco Bröder >Release: RELENG_8 amd64 >Organization: >Environment: >Description: Changelog: Add additional path fix for etc directory. Bump 'PORTREVISION' to ensure a new package build. Add 'NOPORTDATA=yes' conditional patch / installation handling. Notified by FreeBSD QAT email about a mtree error regarding '${DATADIR}/syntax' leftovers when defining 'NOPORTDATA=yes'. It was never intended to support a 'NOPORTDATA=yes' installation, because it was assumed, the software expects the syntax files to be always present. 'PORTDATA' was just defined to allow reduce of 'pkg-plist' file size. So all syntax files were always installed. But QAT really wants a support for the 'NOPORTDATA=yes' case. The software seems to work fine without syntax files, so it is possible to add such a support. Many thanks! Regards >How-To-Repeat: >Fix: Patch attached with submission follows: diff --git a/devel/diffuse/Makefile b/devel/diffuse/Makefile index 1f1b750..cc91fe9 100644 --- a/devel/diffuse/Makefile +++ b/devel/diffuse/Makefile @@ -7,6 +7,7 @@ PORTNAME= diffuse PORTVERSION= 0.4.1 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= SF @@ -20,7 +21,6 @@ USE_GNOME= pygtk2 USE_BZIP2= yes MAN1= diffuse.1 -PORTDATA= syntax OPTIONS= MENU "Add desktop menu (needs desktop-file-utils)" on \ OMF "Install OMF manual (needs scrollkeeper)" on \ @@ -32,6 +32,10 @@ OPTIONS= MENU "Add desktop menu (needs desktop-file-utils)" on \ PORTDOCS= AUTHORS COPYING ChangeLog README .endif +.ifndef (NOPORTDATA) +PORTDATA= syntax +.endif + .ifdef (WITH_MENU) PLIST_SUB+= MENU="" USE_GNOME+= desktopfileutils @@ -56,8 +60,18 @@ PLIST_SUB+= NLS="@comment " .endif post-patch: +.ifndef (NOPORTDATA) ${REINPLACE_CMD} -e 's|../usr|${PREFIX}|g; s|/etc|${PREFIX}/etc|g' \ ${WRKSRC}/src/etc/${PORTNAME}rc +.else + ${REINPLACE_CMD} -e 's|import ../usr|\#(Disabled by NOPORTDATA !) \ + import ${PREFIX}|g; s|/etc|${PREFIX}/etc|g' \ + ${WRKSRC}/src/etc/${PORTNAME}rc +.endif + + ${REINPLACE_CMD} -e 's|../../etc|${PREFIX}/etc|g' \ + ${WRKSRC}/src/usr/bin/${PORTNAME} + ${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \ ${WRKSRC}/src/usr/share/omf/${PORTNAME}/${PORTNAME}-C.omf @@ -67,9 +81,6 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/src/etc/${PORTNAME}rc ${PREFIX}/etc/ post-install: - ${MKDIR} ${DATADIR}/syntax - (cd ${WRKSRC}/src/usr/share/${PORTNAME}/ && \ - ${COPYTREE_SHARE} \* ${DATADIR}/) ${INSTALL_MAN} ${WRKSRC}/src/usr/share/man/man1/*.1 \ ${MANPREFIX}/man/man1/ @@ -80,6 +91,12 @@ post-install: done .endif +.ifndef (NOPORTDATA) + ${MKDIR} ${DATADIR}/syntax + (cd ${WRKSRC}/src/usr/share/${PORTNAME}/ && \ + ${COPYTREE_SHARE} \* ${DATADIR}/) +.endif + .ifndef (WITHOUT_NLS) for x in ${TRANSLATIONS}; do \ ${MKDIR} ${PREFIX}/share/locale/$${x}/LC_MESSAGES; \ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910241307.n9OD7MJq040094>