Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Apr 2016 14:24:30 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r413347 - head/devel/diffuse
Message-ID:  <201604151424.u3FEOURs058805@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Fri Apr 15 14:24:29 2016
New Revision: 413347
URL: https://svnweb.freebsd.org/changeset/ports/413347

Log:
  - Do not capitalize "n-way", as its position is not the beginning of a
    sentence and COMMENT is not a formal title; capitalize "Python" as it
    is a proper noun (official language name)
  - Retire MENU option: it served a little good, meant to conditionalize
    having `desktop-file-utils' in USES, whereas its sole purpose is to
    handle MimeType in .desktop files that are installed in ${DESKTOPDIR}
    while the port installs *.desktop files unconditionally (it was even
    more confusing since it was used in pkg-plist to guard icon entries,
    but the port sets INSTALLS_ICONS, also unconditionally)
  - Use option helpers for targets and drop .include <bsd.port.options.mk>
  - Mute in-place patching commands like we always do
  - Do not attempt to create ${STAGEDIR}${DESKTOPDIR}: `share/applications'
    was added to mtree (Templates/BSD.local.dist) in r331266 2.5 years ago
  - When calling ${COPYTREE_SHARE}, do not use escaped wild-card argument
    (`\*') when simple dot (`.') is sufficient, shorter, does not require
    escaping and thus less error-prone
  - Drop TRANSLATIONS and MANUALS variables which are only referenced once;
    these language lists are hardcoded in pkg-plist anyway, so there is no
    benefit to factor them out as variables in port's Makefile

Modified:
  head/devel/diffuse/Makefile
  head/devel/diffuse/pkg-plist

Modified: head/devel/diffuse/Makefile
==============================================================================
--- head/devel/diffuse/Makefile	Fri Apr 15 14:22:02 2016	(r413346)
+++ head/devel/diffuse/Makefile	Fri Apr 15 14:24:29 2016	(r413347)
@@ -7,85 +7,70 @@ CATEGORIES=	devel python
 MASTER_SITES=	SF
 
 MAINTAINER=	marco.broeder@posteo.eu
-COMMENT=	Graphical N-way diff and merge tool written in python
+COMMENT=	Graphical n-way diff and merge tool written in Python
 
 LICENSE=	GPLv2 GPLv3
 LICENSE_COMB=	dual
 
-NO_BUILD=	yes
+CONFLICTS_INSTALL=	tinker-[0-9]*
 
-USES=		python:2 tar:bzip2
+USES=		desktop-file-utils python:2 tar:bzip2
 USE_GNOME=	pygtk2
 
-CONFLICTS_INSTALL=	tinker-[0-9]*
+NO_BUILD=	yes
+INSTALLS_ICONS=	yes
 
 PORTDATA=	syntax
 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 MENU
+OPTIONS_DEFINE=	DATA DOCS NLS
+DATA_DESC=	Syntax highlighting support
+OPTIONS_DEFAULT=DATA
 OPTIONS_SUB=	yes
-MENU_USES=	desktop-file-utils
 NLS_USES=	gettext
 
-INSTALLS_ICONS=	yes
-
-TRANSLATIONS=	cs de es it ja ko pl ru zh_CN zh_TW
-MANUALS=	cs it ru
-
-.include <bsd.port.options.mk>
-
 post-patch:
-	${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|g; \
+	@${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|g; \
 		s|../../etc|${PREFIX}/etc|g' ${WRKSRC}/src/usr/bin/${PORTNAME}
 
-.if ${PORT_OPTIONS:MDATA}
-	${REINPLACE_CMD} -e 's|../usr|${PREFIX}|g; s|/etc|${PREFIX}/etc|g' \
+post-patch-DATA-on:
+	@${REINPLACE_CMD} -e 's|../usr|${PREFIX}|g; s|/etc|${PREFIX}/etc|g' \
 		${WRKSRC}/src/etc/${PORTNAME}rc
-.else
-	${REINPLACE_CMD} -e 's|import ../usr|\#(Option disabled!) \
+
+post-patch-DATA-off:
+	@${REINPLACE_CMD} -e 's|import ../usr|\#(Option disabled!) \
 		import ${PREFIX}|g; s|/etc|${PREFIX}/etc|g' \
 		${WRKSRC}/src/etc/${PORTNAME}rc
-.endif
 
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/src/usr/bin/${PORTNAME} \
 		${STAGEDIR}${PREFIX}/bin/
 	${INSTALL_DATA} ${WRKSRC}/src/etc/${PORTNAME}rc \
 		${STAGEDIR}${PREFIX}/etc/
-
 	@${MKDIR} ${STAGEDIR}${DATADIR}
 	(cd ${WRKSRC}/src/usr/share/${PORTNAME} && \
-		${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/)
-
+		${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/)
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/)
-
-	@${MKDIR} ${STAGEDIR}${DESKTOPDIR}
 	${INSTALL_DATA} ${WRKSRC}/src/usr/share/applications/*.desktop \
 		${STAGEDIR}${DESKTOPDIR}/
 	(cd ${WRKSRC}/src/usr/share/icons && \
-		${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/share/icons/)
+		${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share/icons/)
+	${INSTALL_MAN} ${WRKSRC}/src/usr/share/man/man1/*.1 \
+		${STAGEDIR}${MANPREFIX}/man/man1/
 
-.if ${PORT_OPTIONS:MNLS}
-.for x in ${TRANSLATIONS}
+do-install-NLS-on:
+.for x in cs de es it ja ko pl ru zh_CN zh_TW
 	@${MKDIR} ${WRKSRC}/translations/${x}
 	${LOCALBASE}/bin/msgfmt -c ${WRKSRC}/translations/${x}.po \
 		-o ${WRKSRC}/translations/${x}/${PORTNAME}.mo
 	${INSTALL_DATA} ${WRKSRC}/translations/${x}/*.mo \
 		${STAGEDIR}${PREFIX}/share/locale/${x}/LC_MESSAGES/
 .endfor
-.endif
-
-.for y in ${MANUALS}
+.for y in cs it ru
 	@${MKDIR} ${STAGEDIR}${MANPREFIX}/man/${y}/man1
 	${INSTALL_MAN} ${WRKSRC}/src/usr/share/man/${y}/man1/*.1 \
 		${STAGEDIR}${MANPREFIX}/man/${y}/man1/
 .endfor
 
-	${INSTALL_MAN} ${WRKSRC}/src/usr/share/man/man1/*.1 \
-		${STAGEDIR}${MANPREFIX}/man/man1/
-
 .include <bsd.port.mk>

Modified: head/devel/diffuse/pkg-plist
==============================================================================
--- head/devel/diffuse/pkg-plist	Fri Apr 15 14:22:02 2016	(r413346)
+++ head/devel/diffuse/pkg-plist	Fri Apr 15 14:24:29 2016	(r413347)
@@ -1,13 +1,13 @@
 bin/diffuse
 etc/diffuserc
 man/man1/diffuse.1.gz
-%%MENU%%share/applications/diffuse.desktop
-%%MENU%%share/icons/hicolor/16x16/apps/diffuse.png
-%%MENU%%share/icons/hicolor/22x22/apps/diffuse.png
-%%MENU%%share/icons/hicolor/24x24/apps/diffuse.png
-%%MENU%%share/icons/hicolor/256x256/apps/diffuse.png
-%%MENU%%share/icons/hicolor/32x32/apps/diffuse.png
-%%MENU%%share/icons/hicolor/48x48/apps/diffuse.png
+share/applications/diffuse.desktop
+share/icons/hicolor/16x16/apps/diffuse.png
+share/icons/hicolor/22x22/apps/diffuse.png
+share/icons/hicolor/24x24/apps/diffuse.png
+share/icons/hicolor/256x256/apps/diffuse.png
+share/icons/hicolor/32x32/apps/diffuse.png
+share/icons/hicolor/48x48/apps/diffuse.png
 %%NLS%%man/cs/man1/diffuse.1.gz
 %%NLS%%man/it/man1/diffuse.1.gz
 %%NLS%%man/ru/man1/diffuse.1.gz



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