freebsd-ports/databases/libgda4/Makefile
Tijl Coosemans a374acb969 By default libtool replaces -export-symbols <file> with -retain-symbols-file
<file> on ELF systems, but this doesn't really do what -export-symbols is
meant to do.  On GNU ELF systems it converts <file> to a simple version
script first and then uses -version-script instead of -retain-symbols-file.
Let USES=libtool patch libtool scripts to do this on all systems with GNU
ld(1).

Bump PORTREVISION on all ports where the build log contains -export-symbols.

audio/calf: This port builds a module that now exports only one function,
but it also builds a number of executables that link to this module and
expect to see other functions.  Because it's already a bit dodgy to link to
a module (libtool warns about this) let the module continue to export only
one function and instead build an ordinary library from the same source that
the executables can link to.  Fix a number of other issues in the same
Makefile.am and clean up the port Makefile.

japanese/scim-honoka: Tries to hide all symbols that start with an
underscore, but because this library is written in C++ all symbols start
with _Z so it ends up hiding everything.  Just don't hide anything at all
like the textproc/scim configure script does.

multimedia/schroedinger: Apply an upstream patch.

textproc/scim-input-pad: Same as japanese/scim-honoka.

PR:		201922
Approved by:	portmgr (antoine)
Exp-run by:	antoine
2015-08-02 15:03:19 +00:00

168 lines
4 KiB
Makefile

# Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
# $FreeBSD$
# $MCom: ports/databases/libgda4/Makefile,v 1.27 2012/09/01 23:02:08 mezz Exp $
PORTNAME= libgda
PORTVERSION= 4.2.12
PORTREVISION?= 7
CATEGORIES= databases gnome
MASTER_SITES= GNOME
PKGNAMESUFFIX?= 4
DIST_SUBDIR= gnome2
MAINTAINER= gnome@FreeBSD.org
COMMENT?= Provides uniform access to different kinds of data sources
CONFLICTS= libgda5-ui-[0-9]*
PORTSCOUT= ignore:1
USES= tar:xz
LIBGDA4_SLAVE?= no
.if !defined(REFERENCE_PORT)
LIB_DEPENDS= libgcrypt.so:${PORTSDIR}/security/libgcrypt \
libjson-glib-1.0.so:${PORTSDIR}/devel/json-glib
USES+= gettext gmake libtool pathfix pkgconfig
USE_GNOME= gnomeprefix glib20 libxslt intlhack referencehack
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
MAKE_JOBS_UNSAFE=yes
CONFIGURE_ARGS= --without-oracle \
--disable-crypto \
--enable-introspection=no \
--without-gtksourceview \
--without-goocanvas \
--without-graphviz
CPPFLAGS+= -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib
.if ${LIBGDA4_SLAVE}=="no"
OPTIONS_DEFINE= UI SOUP KEYRING
OPTIONS_DEFAULT=UI
UI_DESC= Build UI tools
SOUP_DESC= Web provider
KEYRING_DESC= Support gnome-keyring
.endif
.include <bsd.port.options.mk>
VERSION= 4.0
PLIST_SUB= VERSION=${VERSION}
.if ${LIBGDA4_SLAVE}=="no"
.if ${PORT_OPTIONS:MUI}
CONFIGURE_ARGS+=--with-ui
BUILD_DEPENDS+= xml2po:${PORTSDIR}/textproc/gnome-doc-utils
USE_GNOME+= gtk20
INSTALLS_ICONS= yes
PLIST_SUB+= UI=""
.else
CONFIGURE_ARGS+=--without-ui
PLIST_SUB+= UI="@comment "
.endif
.if ${PORT_OPTIONS:MSOUP}
CONFIGURE_ARGS+=--with-libsoup
LIB_DEPENDS+= libsoup-2.so:${PORTSDIR}/devel/libsoup
PLIST_SUB+= WEB=""
.else
CONFIGURE_ARGS+=--without-libsoup
PLIST_SUB+= WEB="@comment "
.endif
.if ${PORT_OPTIONS:MKEYRING}
CONFIGURE_ARGS+=--with-gnome-keyring
LIB_DEPENDS+= libgnome-keyring.so:${PORTSDIR}/security/libgnome-keyring
.else
CONFIGURE_ARGS+=--without-gnome-keyring
.endif
MAN1= gda-sql.1 gda-sql-4.0.1
.else
USE_GNOME+= libgda4
.endif
.if ${LIBGDA4_SLAVE}=="bdb"
USE_BDB= yes
CONFIGURE_ARGS+= --with-bdb=${LOCALBASE}
.else
CONFIGURE_ARGS+= --without-bdb
.endif
.if ${LIBGDA4_SLAVE}=="ldap"
USE_OPENLDAP= yes
CONFIGURE_ARGS+= --with-ldap=${LOCALBASE}
.else
CONFIGURE_ARGS+= --without-ldap
.endif
.if ${LIBGDA4_SLAVE}=="mysql"
USE_MYSQL= yes
CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
.else
CONFIGURE_ARGS+= --without-mysql
.endif
.if ${LIBGDA4_SLAVE}=="postgresql"
USES+= pgsql
CONFIGURE_ARGS+= --with-postgres=${LOCALBASE}
.else
CONFIGURE_ARGS+= --without-postgres
.endif
# MDB (MS Access)
.if ${LIBGDA4_SLAVE}=="mdb"
LIB_DEPENDS+= libmdbsql.so:${PORTSDIR}/databases/mdbtools
CONFIGURE_ARGS+= --with-mdb=${LOCALBASE}
.else
CONFIGURE_ARGS+= --without-mdb
.endif
.if ${LIBGDA4_SLAVE}=="jdbc"
USE_JAVA= yes
JAVA_VERSION= 1.6
JAVA_VENDOR= openjdk
.else
CONFIGURE_ARGS+= --without-java
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-ldl||g' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|"db.h|"db${BDB_VER}/db.h|g' \
-e 's|ldb47|l${BDB_LIB_NAME}|g' \
-e 's|ldb|l${BDB_LIB_NAME}|g' \
-e 's|libdb|lib${BDB_LIB_NAME}|g' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|<db\.h>|<db${BDB_VER}/db.h>|' \
${WRKSRC}/providers/bdb/gda-bdb-provider.c \
${WRKSRC}/providers/bdb/gda-bdb-test.c
.if ${LIBGDA4_SLAVE}!="no"
#. for d in msql firebird odbc freetds mdb ldap mysql sqlite postgres
. for d in bdb jdbc mdb mysql postgres reuseable/postgres reuseable/mysql ldap
@${REINPLACE_CMD} -e 's|$$(top_builddir)/libgda/libgda-4.0.la|-lgda-4.0|g' \
${WRKSRC}/providers/${d}/Makefile.in
. endfor
.endif
pre-build:
.if ${LIBGDA4_SLAVE}=="postgresql"
cd ${WRKSRC}/providers/reuseable/postgres && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} libgda-postgres.la
.endif
.if ${LIBGDA4_SLAVE}=="mysql"
cd ${WRKSRC}/providers/reuseable/mysql && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} libgda-mysql.la
.endif
.if ${LIBGDA4_SLAVE}=="no"
post-install:
${MV} ${STAGEDIR}${PREFIX}/etc/libgda-${VERSION}/config \
${STAGEDIR}${PREFIX}/etc/libgda-${VERSION}/config.sample
.endif
.include <bsd.port.mk>
.endif