1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-14 07:43:06 +00:00
freebsd-ports/devel/diffuse/Makefile
Sylvio Cesar Teixeira 57a42cc9bf - Convert to new options framework
- Add two additional options and disable automatic sorting
- Add necessary checks for conflicting options vs. make.conf settings
(NOPORTDOCS, NOPORTDATA, WITHOUT_NLS)
- Port passes all tests of all combinations of options, including potentially
conflicting make.conf settings (NOPORTDOCS, NOPORTDATA, WITHOUT_NLS)
- Mark conflict with biology/tinker, both ports install ${PREFIX}/bin/diffuse
- Bump PORTREVISION

PR:		ports/168707
Submitted by:	Marco Bröder <marco.broeder@gmx.eu> (maintainer)
2012-06-06 20:57:59 +00:00

121 lines
3.0 KiB
Makefile

# Ports collection makefile for: diffuse
# Date created: 2009-02-22
# Whom: Marco Broeder <marco.broeder@gmx.eu>
#
# $FreeBSD$
#
PORTNAME= diffuse
PORTVERSION= 0.4.6
PORTREVISION= 2
CATEGORIES= devel python
MASTER_SITES= SF
MAINTAINER= marco.broeder@gmx.eu
COMMENT= A graphical N-way diff and merge tool written in python
LICENSE= GPLv2 GPLv3
LICENSE_COMB= dual
NO_BUILD= yes
USE_PYTHON= yes
USE_GNOME= pygtk2
USE_BZIP2= yes
MAN1= diffuse.1
CONFLICTS= tinker-[0-9]*
NO_OPTIONS_SORT= yes
OPTIONS_DEFINE= MENU DATA NLS DOCS
MENU_DESC= Enable a desktop program menu entry
DATA_DESC= Enable syntax highlighting support
DOCS_DESC= Install some documentation text files
OPTIONS_DEFAULT= MENU DATA NLS DOCS
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MMENU}
USE_GNOME+= desktopfileutils
PLIST_SUB+= MENU=""
.else
PLIST_SUB+= MENU="@comment "
.endif
.if ${PORT_OPTIONS:MDATA}
PORTDATA= syntax
.endif
.if ${PORT_OPTIONS:MNLS} && !defined(WITHOUT_NLS)
# Both checks required. If option is selected, but WITHOUT_NLS is set
# in make.conf, it breaks pkg-plist.
USE_GETTEXT= yes
TRANSLATIONS= de es it ja ko ru zh_CN
MANLANG= "" it ru
PLIST_SUB+= NLS=""
.else
PLIST_SUB+= NLS="@comment "
.endif
.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= AUTHORS COPYING ChangeLog ChangeLog_ru README README_ru
.endif
post-patch:
.if ${PORT_OPTIONS:MDATA} && !defined(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|\#(Option disabled!) \
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}
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/src/usr/bin/${PORTNAME} \
${PREFIX}/bin/
${INSTALL_DATA} ${WRKSRC}/src/etc/${PORTNAME}rc ${PREFIX}/etc/
${INSTALL_MAN} ${WRKSRC}/src/usr/share/man/man1/*.1 \
${MANPREFIX}/man/man1/
post-install:
.if ${PORT_OPTIONS:MMENU}
${INSTALL_DATA} ${WRKSRC}/src/usr/share/pixmaps/${PORTNAME}.png \
${PREFIX}/share/pixmaps/
${INSTALL_DATA} ${WRKSRC}/src/usr/share/applications/*.desktop \
${DESKTOPDIR}
${LOCALBASE}/bin/update-desktop-database -q
.endif
.if ${PORT_OPTIONS:MDATA} && !defined(NOPORTDATA)
${MKDIR} ${DATADIR}/syntax
(cd ${WRKSRC}/src/usr/share/${PORTNAME} && \
${COPYTREE_SHARE} \* ${DATADIR})
.endif
.if ${PORT_OPTIONS:MNLS} && !defined(WITHOUT_NLS)
for x in ${TRANSLATIONS}; do \
${MKDIR} ${WRKSRC}/translations/$${x}; \
${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/; \
done
for y in ${MANLANG}; do \
${MKDIR} ${MANPREFIX}/man/$${y}/man1; \
${INSTALL_MAN} ${WRKSRC}/src/usr/share/man/$${y}/man1/*.1 \
${MANPREFIX}/man/$${y}/man1/; \
done
.endif
.if ${PORT_OPTIONS:MDOCS} && !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
.include <bsd.port.mk>