summaryrefslogtreecommitdiffstats
path: root/databases/libgda2/Makefile
blob: 58b5add3db62e4a9b68230b8d5d51d0dcc97f9da (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# New ports collection makefile for:    libgda2
# Date created:             02 June 2002
# Whom:                 Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD: ports/databases/libgda2/Makefile,v 1.32 2003/01/19 19:54:19 marcus Exp $
#

PORTNAME=   libgda2
PORTVERSION=    0.10.0
CATEGORIES= databases gnome
MASTER_SITES=   ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/0.10
DISTNAME=   libgda-${PORTVERSION}
DIST_SUBDIR=    gnome2

MAINTAINER= gnome@FreeBSD.org

BUILD_DEPENDS=  scrollkeeper-config:${PORTSDIR}/textproc/scrollkeeper
LIB_DEPENDS=    gdbm.3:${PORTSDIR}/databases/gdbm \
        glib-2.0.200:${PORTSDIR}/devel/glib20 \
        xslt.1:${PORTSDIR}/textproc/libxslt \
        popt.0:${PORTSDIR}/devel/popt
RUN_DEPENDS=    scrollkeeper-config:${PORTSDIR}/textproc/scrollkeeper

USE_BZIP2=  yes
USE_X_PREFIX=   yes
USE_GMAKE=  yes
USE_REINPLACE=  yes
USE_GNOMENG=    yes
USE_GNOME=  gnomeprefix gnomehack gnomehier
INSTALLS_SHLIB= yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LIBS="-L${LOCALBASE}/lib -lintl -lgdbm"
CONFIGURE_TARGET=   --target=${MACHINE_ARCH}-unknown-freebsd${OSREL}

MAN1=       gda-config-tool.1
MAN5=       gda-config.5

.if defined(WITH_MYSQL)
LIB_DEPENDS+=   mysqlclient.10:${PORTSDIR}/databases/mysql323-client
CONFIGURE_ARGS+=    --with-mysql=${LOCALBASE}
PLIST_SUB=  MYSQL=""
.else
CONFIGURE_ARGS+=    --without-mysql
PLIST_SUB=  MYSQL="@comment "
.endif

.if defined(WITH_POSTGRES)
POSTGRESQL_PORT?=   databases/postgresql7
LIB_DEPENDS+=   pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
CONFIGURE_ARGS+=    --with-postgres=${LOCALBASE}
PLIST_SUB+= POSTGRES=""
.else
CONFIGURE_ARGS+=    --without-postgres
PLIST_SUB+= POSTGRES="@comment "
.endif

.if defined(WITH_LDAP)
LIB_DEPENDS+=   ldap.2:${PORTSDIR}/net/openldap2
CONFIGURE_ARGS+=    --with-ldap=${LOCALBASE}
PLIST_SUB+= LDAP=""
.else
CONFIGURE_ARGS+=    --without-ldap
PLIST_SUB+= LDAP="@comment "
.endif

pre-extract:
.if !defined(WITH_MYSQL)
    @${ECHO_MSG} "You can enable support for MySQL databases by defining WITH_MYSQL."
.endif
.if !defined(WITH_POSTGRES)
    @${ECHO_MSG} "You can enable support for Postgres databases by defining WITH_POSTGRES."
.endif
.if !defined(WITH_LDAP)
    @${ECHO_MSG} "You can enable support for LDAP databases by defining WITH_LDAP."
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
         s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure

.include <bsd.port.mk>