Date: Sun, 6 Oct 2013 14:29:13 GMT From: Marco Bröder <marco.broeder@gmx.eu> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/182745: [maintainer-update] [patch] devel/diffuse: Add stage support. Message-ID: <201310061429.r96ETD1X078009@oldred.freebsd.org> Resent-Message-ID: <201310061430.r96EU0kM088866@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 182745 >Category: ports >Synopsis: [maintainer-update] [patch] devel/diffuse: Add stage 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: Sun Oct 06 14:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Marco Bröder >Release: >Organization: >Environment: >Description: Support staging. Simplify options handling by using OPTIONS_SUB and ${OPT}_USES. Add patch to use ${PYTHON_CMD} instead of '/usr/bin/env python' to actually run the script with the same python version the package was built for. Since it is now possible to use the python meta-ports as direct dependencies, just depend on the python 2 meta-port, because a specific minor version is not relevant. Minor fixes / safety belt additions. Tested (amd64) on head, stable/9, releng/9.2, releng/8.4. Thanks! >How-To-Repeat: >Fix: Patch attached with submission follows: diff --git a/devel/diffuse/Makefile b/devel/diffuse/Makefile index 1c22c97..ec10471 100644 --- a/devel/diffuse/Makefile +++ b/devel/diffuse/Makefile @@ -15,41 +15,30 @@ LICENSE_COMB= dual NO_BUILD= yes USE_BZIP2= yes -USE_PYTHON= -2.7 +USE_PYTHON= 2 USE_GNOME= pygtk2 CONFLICTS= tinker-[0-9]* -MAN1= diffuse.1 PORTDOCS= AUTHORS ChangeLog ChangeLog_ru README README_ru OPTIONS_DEFINE= DATA DOCS MENU NLS DATA_DESC= Enable syntax highlighting support MENU_DESC= Enable a desktop program menu entry +OPTIONS_DEFAULT=DATA DOCS MENU NLS +OPTIONS_SUB= yes +MENU_USES= desktop-file-utils +NLS_USES= gettext -OPTIONS_DEFAULT=DATA MENU - -NO_STAGE= yes .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MDATA} PORTDATA= syntax .endif -.if ${PORT_OPTIONS:MMENU} -USES+= desktop-file-utils -PLIST_SUB+= MENU="" -.else -PLIST_SUB+= MENU="@comment " -.endif - .if ${PORT_OPTIONS:MNLS} -USES+= gettext TRANSLATIONS= cs de es it ja ko pl ru zh_CN -MANLANG= "" cs it ru -PLIST_SUB+= NLS="" -.else -PLIST_SUB+= NLS="@comment " +MANUALS= cs it ru .endif post-patch: @@ -61,32 +50,35 @@ post-patch: 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/bin/env python|${PYTHON_CMD}|g; \ + s|../../etc|${PREFIX}/etc|g' ${WRKSRC}/src/usr/bin/${PORTNAME} do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/src/usr/bin/${PORTNAME} ${PREFIX}/bin/ - ${INSTALL_DATA} ${WRKSRC}/src/etc/${PORTNAME}rc ${PREFIX}/etc/ + ${INSTALL_SCRIPT} ${WRKSRC}/src/usr/bin/${PORTNAME} \ + ${STAGEDIR}${PREFIX}/bin/ + ${INSTALL_DATA} ${WRKSRC}/src/etc/${PORTNAME}rc \ + ${STAGEDIR}${PREFIX}/etc/ ${INSTALL_MAN} ${WRKSRC}/src/usr/share/man/man1/*.1 \ - ${MANPREFIX}/man/man1/ + ${STAGEDIR}${MANPREFIX}/man/man1/ post-install: .if ${PORT_OPTIONS:MDATA} - ${MKDIR} ${DATADIR}/${PORTDATA} + ${MKDIR} ${STAGEDIR}${DATADIR}/${PORTDATA} (cd ${WRKSRC}/src/usr/share/${PORTNAME} && \ - ${COPYTREE_SHARE} \* ${DATADIR}) + ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/) .endif .if ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR} - cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/) .endif .if ${PORT_OPTIONS:MMENU} ${INSTALL_DATA} ${WRKSRC}/src/usr/share/pixmaps/${PORTNAME}.png \ - ${PREFIX}/share/pixmaps/ + ${STAGEDIR}${PREFIX}/share/pixmaps/ + ${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKSRC}/src/usr/share/applications/*.desktop \ - ${DESKTOPDIR} + ${STAGEDIR}${DESKTOPDIR}/ .endif .if ${PORT_OPTIONS:MNLS} @@ -95,12 +87,12 @@ post-install: ${LOCALBASE}/bin/msgfmt -c ${WRKSRC}/translations/${x}.po \ -o ${WRKSRC}/translations/${x}/${PORTNAME}.mo ${INSTALL_DATA} ${WRKSRC}/translations/${x}/*.mo \ - ${PREFIX}/share/locale/${x}/LC_MESSAGES/ + ${STAGEDIR}${PREFIX}/share/locale/${x}/LC_MESSAGES/ .endfor -.for y in ${MANLANG} - ${MKDIR} ${MANPREFIX}/man/${y}/man1 +.for y in ${MANUALS} + ${MKDIR} ${STAGEDIR}${MANPREFIX}/man/${y}/man1 ${INSTALL_MAN} ${WRKSRC}/src/usr/share/man/${y}/man1/*.1 \ - ${MANPREFIX}/man/${y}/man1/ + ${STAGEDIR}${MANPREFIX}/man/${y}/man1/ .endfor .endif diff --git a/devel/diffuse/pkg-plist b/devel/diffuse/pkg-plist index 49807de..f7057a3 100644 --- a/devel/diffuse/pkg-plist +++ b/devel/diffuse/pkg-plist @@ -1,7 +1,11 @@ bin/diffuse etc/diffuserc +man/man1/diffuse.1.gz %%MENU%%share/applications/diffuse.desktop %%MENU%%share/pixmaps/diffuse.png +%%NLS%%man/cs/man1/diffuse.1.gz +%%NLS%%man/it/man1/diffuse.1.gz +%%NLS%%man/ru/man1/diffuse.1.gz %%NLS%%share/locale/cs/LC_MESSAGES/diffuse.mo %%NLS%%share/locale/de/LC_MESSAGES/diffuse.mo %%NLS%%share/locale/es/LC_MESSAGES/diffuse.mo @@ -11,9 +15,10 @@ etc/diffuserc %%NLS%%share/locale/pl/LC_MESSAGES/diffuse.mo %%NLS%%share/locale/ru/LC_MESSAGES/diffuse.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/diffuse.mo -@dirrmtry man/cs/man1 -@dirrmtry man/cs -@dirrmtry man/it/man1 -@dirrmtry man/it -@dirrmtry man/ru/man1 -@dirrmtry man/ru +%%MENU%%@dirrmtry share/applications +%%NLS%%@dirrmtry man/cs/man1 +%%NLS%%@dirrmtry man/cs +%%NLS%%@dirrmtry man/it/man1 +%%NLS%%@dirrmtry man/it +%%NLS%%@dirrmtry man/ru/man1 +%%NLS%%@dirrmtry man/ru >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310061429.r96ETD1X078009>