aboutsummaryrefslogtreecommitdiffstats
path: root/devel/gnatcoll/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'devel/gnatcoll/Makefile')
-rw-r--r--devel/gnatcoll/Makefile112
1 files changed, 112 insertions, 0 deletions
diff --git a/devel/gnatcoll/Makefile b/devel/gnatcoll/Makefile
new file mode 100644
index 000000000000..24759d1c38ed
--- /dev/null
+++ b/devel/gnatcoll/Makefile
@@ -0,0 +1,112 @@
+# Created by: John Marino <marino@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= gnatcoll
+PORTVERSION= 2014
+CATEGORIES= devel
+MASTER_SITES= http://downloads.dragonlace.net/src/
+DISTNAME= ${PORTNAME}-gpl-${PORTVERSION}-src
+
+MAINTAINER= marino@FreeBSD.org
+COMMENT= GNAT Component Collection from Adacore
+
+LICENSE= GPLv3
+
+BUILD_DEPENDS= gprbuild>=20120510:${PORTSDIR}/devel/gprbuild \
+ gnat_util>=20140422:${PORTSDIR}/lang/gnat_util
+LIB_DEPENDS= libgmp.so:${PORTSDIR}/math/gmp
+
+USES= ada gmake
+GNU_CONFIGURE= yes
+PORTDOCS= html gnatcoll.pdf
+PORTEXAMPLES= *
+
+OPTIONS_DEFINE= READLINE SYSLOG SQLITE PYTHON GTK PGSQL ICONV \
+ DOCS EXAMPLES
+OPTIONS_DEFAULT= READLINE SYSLOG SQLITE PYTHON GTK PGSQL ICONV
+OPTIONS_SUB= yes
+DOCS_BUILD_DEPENDS= sphinx-build:${PORTSDIR}/textproc/py-sphinx
+GTK_LIB_DEPENDS= libgtkada.so:${PORTSDIR}/x11-toolkits/gtkada3
+SYSLOG_CONFIGURE_ENABLE=syslog
+
+GTK_DESC= GTK3 toolkit support
+
+CONFIGURE_TARGET= ${ARCH:S/amd64/x86_64/}-aux-${OPSYS:tl}${OSREL}
+CONFIGURE_ARGS= --with-gmp=${PREFIX} \
+ --disable-shared \
+ --disable-pygtk
+
+MAKE_ARGS+= PROCESSORS=${MAKE_JOBS_NUMBER}
+MAKE_ARGS+= Gnatcoll_Build=Production
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MREADLINE}
+USES+= readline:port
+CONFIGURE_ARGS+= --enable-gpl
+.else
+CONFIGURE_ARGS+= --disable-readline
+.endif
+
+.if ${PORT_OPTIONS:MSQLITE}
+CONFIGURE_ARGS+= --with-sqlite=embedded
+.else
+CONFIGURE_ARGS+= --without-sqlite
+.endif
+
+.if ${PORT_OPTIONS:MPGSQL}
+USES+= pgsql
+CONFIGURE_ARGS+= --with-postgresql=${PREFIX}
+.else
+CONFIGURE_ARGS+= --without-postgresql
+.endif
+
+.if ${PORT_OPTIONS:MICONV}
+USES+= iconv
+CONFIGURE_ARGS+= --with-iconv=${ICONV_PREFIX}
+.else
+CONFIGURE_ARGS+= --with-iconv
+.endif
+
+.if ${PORT_OPTIONS:MPYTHON}
+CONFIGURE_ARGS+= --with-python=${PREFIX} \
+ --enable-pygobject
+USE_PYTHON= 2
+USE_GNOME= pygobject3
+PYCOMPILE= ${PREFIX}/lib/${PYTHON_VERSION}/compileall.py
+.else
+CONFIGURE_ARGS+= --without-python \
+ --disable-pygobject
+.endif
+
+.if ${PORT_OPTIONS:MGTK}
+USES+= pkgconfig
+CONFIGURE_ARGS+= --with-gtk=3.0
+.else
+CONFIGURE_ARGS+= --without-gtk
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|@PREFIX@|${PREFIX}|g" \
+ ${WRKSRC}/src/gnatcoll_readline.gpr.in
+.if ! ${PORT_OPTIONS:MDOCS}
+ ${MV} ${WRKSRC}/docs/_build ${WRKSRC}/docs/_hide_build
+.endif
+
+do-build:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET}
+
+pre-install:
+.if ${PORT_OPTIONS:MPYTHON}
+ ${PYTHON_CMD} ${PYCOMPILE} ${WRKSRC}/share/plug-ins
+ ${PYTHON_CMD} ${PYCOMPILE} ${WRKSRC}/share/library
+.endif
+
+post-install:
+ ${RM} -rf ${STAGEDIR}${DOCSDIR}/html/_sources
+.if ! ${PORT_OPTIONS:MEXAMPLES}
+ ${RM} -rf ${STAGEDIR}${EXAMPLESDIR}
+.endif
+
+.include <bsd.port.mk>