Changeset View
Changeset View
Standalone View
Standalone View
devel/geany-plugins/files/Makefile.common
# $FreeBSD$ | # $FreeBSD$ | ||||
.include "${.CURDIR}/../../devel/geany-plugins/files/bsd.geany-plugins.mk" | .include "${.CURDIR}/../../devel/geany-plugins/files/bsd.geany-plugins.mk" | ||||
PORTREVISION= 1 | |||||
MASTER_SITES= http://plugins.geany.org/geany-plugins/ | MASTER_SITES= http://plugins.geany.org/geany-plugins/ | ||||
DISTNAME= geany-plugins-${PORTVERSION} | DISTNAME= geany-plugins-${PORTVERSION} | ||||
DISTINFO_FILE= ${.CURDIR}/../../devel/geany-plugins/distinfo | DISTINFO_FILE= ${.CURDIR}/../../devel/geany-plugins/distinfo | ||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/geany:devel/geany | |||||
LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \ | |||||
libfreetype.so:print/freetype2 | |||||
RUN_DEPENDS+= ${LOCALBASE}/bin/geany:devel/geany | |||||
GNU_CONFIGURE= yes | GNU_CONFIGURE= yes | ||||
USES+= gettext-tools gmake libtool pkgconfig tar:bzip2 | USES+= gettext-tools gmake gnome libtool pkgconfig tar:bzip2 | ||||
USE_GNOME+= cairo gdkpixbuf2 gtk20 intltool | USE_GNOME+= intltool | ||||
FLAVORS?= gtk3 gtk2 | |||||
FLAVOR?= ${FLAVORS:[1]} | |||||
gtk2_CONFLICTS_INSTALL= geany-plugin-${GEANY_PLUGIN} | |||||
gtk2_PKGNAMESUFFIX= -gtk2 | |||||
gtk3_CONFLICTS_INSTALL= geany-plugin-${GEANY_PLUGIN}-gtk2 | |||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/geany:devel/geany@${FLAVOR} | |||||
RUN_DEPENDS+= ${LOCALBASE}/bin/geany:devel/geany@${FLAVOR} | |||||
mat: `FLAVOR` only make sense to the current port, it is not transitive, it CANNOT be used in a… | |||||
# geany-plugins-l10n is not a plugin, thus special treatment | # geany-plugins-l10n is not a plugin, thus special treatment | ||||
.if ${PORTNAME} == "geany-plugins-l10n" | .if ${PORTNAME} == "geany-plugins-l10n" | ||||
GEANY_PLUGIN= po | GEANY_PLUGIN= po | ||||
po_SWITCH= --enable-nls | po_SWITCH= --enable-nls | ||||
USES+= localbase | USES+= localbase | ||||
.else | .else | ||||
INSTALL_TARGET= install-strip | INSTALL_TARGET= install-strip | ||||
USE_GNOME+= cairo gdkpixbuf2 ${FLAVOR}0 | |||||
matUnsubmitted Done Inline ActionsThat is awful. mat: That is awful. | |||||
madpilotAuthorUnsubmitted Done Inline ActionsIt actually is. I don't even know what possessed me when I wrote this. madpilot: It actually is. I don't even know what possessed me when I wrote this. | |||||
.if ${FLAVOR} == gtk2 | |||||
LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \ | |||||
libfreetype.so:print/freetype2 | |||||
CONFIGURE_ARGS+= --disable-gtk3 | |||||
.elif ${FLAVOR} == gtk3 | |||||
CONFIGURE_ARGS+= --enable-gtk3 | |||||
.endif | .endif | ||||
.endif | |||||
GEANY_PLUGIN?= ${PORTNAME:S,geany-plugin-,,} | GEANY_PLUGIN?= ${PORTNAME:S,geany-plugin-,,} | ||||
${GEANY_PLUGIN}_DIR?= ${GEANY_PLUGIN} | ${GEANY_PLUGIN}_DIR?= ${GEANY_PLUGIN} | ||||
${GEANY_PLUGIN}_SWITCH?= --enable-${${GEANY_PLUGIN}_DIR} | ${GEANY_PLUGIN}_SWITCH?= --enable-${${GEANY_PLUGIN}_DIR} | ||||
CONFIGURE_ARGS+= ${${GEANY_PLUGIN}_SWITCH} | CONFIGURE_ARGS+= ${${GEANY_PLUGIN}_SWITCH} | ||||
BUILD_WRKSRC= ${WRKSRC}/${${GEANY_PLUGIN}_DIR} | BUILD_WRKSRC= ${WRKSRC}/${${GEANY_PLUGIN}_DIR} | ||||
INSTALL_WRKSRC= ${BUILD_WRKSRC} | INSTALL_WRKSRC= ${BUILD_WRKSRC} | ||||
DATADIR= share/geany-plugins | DATADIR= share/geany-plugins | ||||
DOCSDIR= share/doc/geany-plugins | DOCSDIR= share/doc/geany-plugins | ||||
.if ${GEANY_UTIL:M${GEANY_PLUGIN}} | .if ${GEANY_UTIL:M${GEANY_PLUGIN}} | ||||
LIB_DEPENDS+= libgeanypluginutils.so:devel/geany-plugin-utilslib | LIB_DEPENDS+= libgeanypluginutils.so:devel/geany-plugin-utilslib@${FLAVOR} | ||||
madpilotAuthorUnsubmitted Done Inline ActionsThis one also needs to be made a constant, then. madpilot: This one also needs to be made a constant, then. | |||||
CONFIGURE_ARGS+=--enable-utilslib | CONFIGURE_ARGS+=--enable-utilslib | ||||
pre-build: | pre-build: | ||||
(cd ${WRKSRC}/utils; ${DO_MAKE_BUILD} ${ALL_TARGET}) | (cd ${WRKSRC}/utils; ${DO_MAKE_BUILD} ${ALL_TARGET}) | ||||
.endif | .endif | ||||
post-configure: | post-configure: | ||||
${FIND} ${BUILD_WRKSRC} -name Makefile | ${XARGS} \ | ${FIND} ${BUILD_WRKSRC} -name Makefile | ${XARGS} \ | ||||
${REINPLACE_CMD} -e '/^geanypluginsdir/s,${LOCALBASE},${PREFIX},' | ${REINPLACE_CMD} -e '/^geanypluginsdir/s,${LOCALBASE},${PREFIX},' |
FLAVOR only make sense to the current port, it is not transitive, it CANNOT be used in a _DEPENDS line. This is why framework generated flavors have their own flavors to add dependencies.
Please use static flavors in the depends names.