View | Details | Raw Unified | Return to bug 168707
Collapse All | Expand All

(-)b/devel/diffuse/Makefile (-28 / +36 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	diffuse
8
PORTNAME=	diffuse
9
PORTVERSION=	0.4.6
9
PORTVERSION=	0.4.6
10
PORTREVISION=	1
10
PORTREVISION=	2
11
CATEGORIES=	devel python
11
CATEGORIES=	devel python
12
MASTER_SITES=	SF
12
MASTER_SITES=	SF
13
13
Lines 25-65 USE_BZIP2= yes Link Here
25
25
26
MAN1=		diffuse.1
26
MAN1=		diffuse.1
27
27
28
OPTIONS=	MENU	"Install a desktop menu entry"	on \
28
CONFLICTS=	tinker-[0-9]*
29
		NLS	"Install translations (work in progress)"	on
30
29
31
.include <bsd.port.options.mk>
30
NO_OPTIONS_SORT=	yes
32
31
OPTIONS_DEFINE=	MENU DATA NLS DOCS
33
.ifndef (NOPORTDOCS)
32
MENU_DESC=	Enable a desktop program menu entry
34
PORTDOCS=	AUTHORS COPYING ChangeLog ChangeLog_ru README README_ru
33
DATA_DESC=	Enable syntax highlighting support
35
.endif
34
DOCS_DESC=	Install some documentation text files
35
OPTIONS_DEFAULT=	MENU DATA NLS DOCS
36
36
37
.ifndef (NOPORTDATA)
37
.include <bsd.port.options.mk>
38
PORTDATA=	syntax
39
.endif
40
38
41
.ifdef (WITH_MENU)
39
.if ${PORT_OPTIONS:MMENU}
42
PLIST_SUB+=	MENU=""
43
USE_GNOME+=	desktopfileutils
40
USE_GNOME+=	desktopfileutils
41
PLIST_SUB+=	MENU=""
44
.else
42
.else
45
PLIST_SUB+=	MENU="@comment "
43
PLIST_SUB+=	MENU="@comment "
46
.endif
44
.endif
47
45
48
.ifndef (WITHOUT_NLS)
46
.if ${PORT_OPTIONS:MDATA}
49
PLIST_SUB+=	NLS=""
47
PORTDATA=	syntax
48
.endif
49
50
.if ${PORT_OPTIONS:MNLS} && !defined(WITHOUT_NLS)
51
# Both checks required. If option is selected, but WITHOUT_NLS is set
52
# in make.conf, it breaks pkg-plist.
50
USE_GETTEXT=	yes
53
USE_GETTEXT=	yes
51
TRANSLATIONS=	de es it ja ko ru zh_CN
54
TRANSLATIONS=	de es it ja ko ru zh_CN
52
MANLANG=	"" it ru
55
MANLANG=	"" it ru
56
PLIST_SUB+=	NLS=""
53
.else
57
.else
54
PLIST_SUB+=	NLS="@comment "
58
PLIST_SUB+=	NLS="@comment "
55
.endif
59
.endif
56
60
61
.if ${PORT_OPTIONS:MDOCS}
62
PORTDOCS=	AUTHORS COPYING ChangeLog ChangeLog_ru README README_ru
63
.endif
64
57
post-patch:
65
post-patch:
58
.ifndef (NOPORTDATA)
66
.if ${PORT_OPTIONS:MDATA} && !defined(NOPORTDATA)
59
	${REINPLACE_CMD} -e 's|../usr|${PREFIX}|g; s|/etc|${PREFIX}/etc|g' \
67
	${REINPLACE_CMD} -e 's|../usr|${PREFIX}|g; s|/etc|${PREFIX}/etc|g' \
60
		${WRKSRC}/src/etc/${PORTNAME}rc
68
		${WRKSRC}/src/etc/${PORTNAME}rc
61
.else
69
.else
62
	${REINPLACE_CMD} -e 's|import ../usr|\#(Disabled by NOPORTDATA !) \
70
	${REINPLACE_CMD} -e 's|import ../usr|\#(Option disabled!) \
63
		import ${PREFIX}|g; s|/etc|${PREFIX}/etc|g' \
71
		import ${PREFIX}|g; s|/etc|${PREFIX}/etc|g' \
64
		${WRKSRC}/src/etc/${PORTNAME}rc
72
		${WRKSRC}/src/etc/${PORTNAME}rc
65
.endif
73
.endif
Lines 75-92 do-install: Link Here
75
		${MANPREFIX}/man/man1/
83
		${MANPREFIX}/man/man1/
76
84
77
post-install:
85
post-install:
78
.ifndef (NOPORTDOCS)
86
.if ${PORT_OPTIONS:MMENU}
79
	${MKDIR} ${DOCSDIR}
87
	${INSTALL_DATA} ${WRKSRC}/src/usr/share/pixmaps/${PORTNAME}.png \
80
	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
88
		${PREFIX}/share/pixmaps/
89
	${INSTALL_DATA} ${WRKSRC}/src/usr/share/applications/*.desktop \
90
		${DESKTOPDIR}
91
	${LOCALBASE}/bin/update-desktop-database -q
81
.endif
92
.endif
82
93
83
.ifndef (NOPORTDATA)
94
.if ${PORT_OPTIONS:MDATA} && !defined(NOPORTDATA)
84
	${MKDIR} ${DATADIR}/syntax
95
	${MKDIR} ${DATADIR}/syntax
85
	(cd ${WRKSRC}/src/usr/share/${PORTNAME} && \
96
	(cd ${WRKSRC}/src/usr/share/${PORTNAME} && \
86
		${COPYTREE_SHARE} \* ${DATADIR})
97
		${COPYTREE_SHARE} \* ${DATADIR})
87
.endif
98
.endif
88
99
89
.ifndef (WITHOUT_NLS)
100
.if ${PORT_OPTIONS:MNLS} && !defined(WITHOUT_NLS)
90
	for x in ${TRANSLATIONS}; do \
101
	for x in ${TRANSLATIONS}; do \
91
		${MKDIR} ${WRKSRC}/translations/$${x}; \
102
		${MKDIR} ${WRKSRC}/translations/$${x}; \
92
		${LOCALBASE}/bin/msgfmt -c ${WRKSRC}/translations/$${x}.po \
103
		${LOCALBASE}/bin/msgfmt -c ${WRKSRC}/translations/$${x}.po \
Lines 101-112 post-install: Link Here
101
	done
112
	done
102
.endif
113
.endif
103
114
104
.ifdef (WITH_MENU)
115
.if ${PORT_OPTIONS:MDOCS} && !defined(NOPORTDOCS)
105
	${INSTALL_DATA} ${WRKSRC}/src/usr/share/pixmaps/${PORTNAME}.png \
116
	${MKDIR} ${DOCSDIR}
106
		${PREFIX}/share/pixmaps/
117
	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
107
	${INSTALL_DATA} ${WRKSRC}/src/usr/share/applications/*.desktop \
108
		${DESKTOPDIR}
109
	${LOCALBASE}/bin/update-desktop-database -q
110
.endif
118
.endif
111
119
112
.include <bsd.port.mk>
120
.include <bsd.port.mk>

Return to bug 168707