summaryrefslogtreecommitdiff
path: root/devel/geany-plugins/files/Makefile.common
blob: 4253bf0bc851f552683e5e37f838aa16b80f589b (plain) (blame)
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
# $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

BUILD_DEPENDS+=	${LOCALBASE}/bin/geany:${PORTSDIR}/devel/geany
RUN_DEPENDS+=	${LOCALBASE}/bin/geany:${PORTSDIR}/devel/geany

CONFLICTS_INSTALL=	geany-plugins-0.*

EXTRA_PATCHES=  ${.CURDIR}/../../devel/geany-plugins/files/extrapatch-configure

GNU_CONFIGURE=	yes
USES+=		gmake libtool pkgconfig tar:bzip2
USE_GNOME+=	gtk20

# geany-plugins-l10n is not a plugin, thus special treatment
.if ${PORTNAME} == "geany-plugins-l10n"
GEANY_PLUGIN=	NLS
NLS_DIR=	po
NLS_SWITCH=	--enable-nls
CPPFLAGS+=	-I${LOCALBASE}/include
LIBS+=		-L${LOCALBASE}/lib
.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

.include <bsd.port.options.mk>

.if ${PORTNAME} != "geany-plugins-l10n"
. if ${PORT_OPTIONS:MNLS}
USES+=	gettext
. else
CONFIGURE_ARGS+=	--disable-nls
. endif
.endif

pre-configure:
	${REINPLACE_CMD} -e 's,zlib,,g' \
		${WRKSRC}/configure

post-configure:
	${FIND} ${BUILD_WRKSRC} -name Makefile | ${XARGS} \
		${REINPLACE_CMD} -e '/^geanypluginsdir/s,${LOCALBASE},${PREFIX},'