blob: c269668743d6a0dc962c530fb3987950467df128 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# $FreeBSD$
.include "${.CURDIR}/../../devel/geany-plugins/files/bsd.geany-plugins.mk"
MASTER_SITES= http://plugins.geany.org/geany-plugins/
DISTNAME= geany-plugins-${PORTVERSION}
DISTINFO_FILE= ${.CURDIR}/../../devel/geany-plugins/distinfo
GNU_CONFIGURE= yes
USES+= gettext-tools gmake gnome libtool pkgconfig tar:bzip2
USE_GNOME+= intltool
FLAVORS?= gtk3 gtk2
FLAVOR?= ${FLAVORS:[1]}
gtk2_CONFLICTS_INSTALL= geany-plugin-${GEANY_PLUGIN}
gtk2_PKGNAMESUFFIX= -gtk2
gtk2_LIB_DEPENDS+= libgeany.so:devel/geany@gtk2
gtk3_CONFLICTS_INSTALL= geany-plugin-${GEANY_PLUGIN}-gtk2
gtk3_LIB_DEPENDS+= libgeany.so:devel/geany@gtk3
# geany-plugins-l10n is not a plugin, thus special treatment
.if ${PORTNAME} == "geany-plugins-l10n"
GEANY_PLUGIN= po
po_SWITCH= --enable-nls
USES+= localbase
.else
.if ${PORTNAME} == "geany-plugin-markdown"
# required by this plugin on GCC only archs
USES+= compiler:c++11-lang
.endif
INSTALL_TARGET= install-strip
USE_GNOME+= cairo gdkpixbuf2
.if ${FLAVOR} == gtk3
CONFIGURE_ARGS+= --enable-gtk3
USE_GNOME+= gtk30
.else
LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2
CONFIGURE_ARGS+= --disable-gtk3
USE_GNOME+= gtk20
.endif
.endif
GEANY_PLUGIN?= ${PORTNAME:S,geany-plugin-,,}
${GEANY_PLUGIN}_DIR?= ${GEANY_PLUGIN}
${GEANY_PLUGIN}_SWITCH?= --enable-${${GEANY_PLUGIN}_DIR}
CONFIGURE_ARGS+= ${${GEANY_PLUGIN}_SWITCH}
BUILD_WRKSRC= ${WRKSRC}/${${GEANY_PLUGIN}_DIR}
INSTALL_WRKSRC= ${BUILD_WRKSRC}
DATADIR= share/geany-plugins
DOCSDIR= share/doc/geany-plugins
.if ${GEANY_UTIL:M${GEANY_PLUGIN}}
gtk2_LIB_DEPENDS+= libgeanypluginutils.so:devel/geany-plugin-utilslib@gtk2
gtk3_LIB_DEPENDS+= libgeanypluginutils.so:devel/geany-plugin-utilslib@gtk3
CONFIGURE_ARGS+= --enable-utilslib
pre-build:
(cd ${WRKSRC}/utils; ${DO_MAKE_BUILD} ${ALL_TARGET})
.endif
post-configure:
${FIND} ${BUILD_WRKSRC} -name Makefile | ${XARGS} \
${REINPLACE_CMD} -e '/^geanypluginsdir/s,${LOCALBASE},${PREFIX},'
|