summaryrefslogtreecommitdiffstats
path: root/databases/gtksql/Makefile
blob: c66cd2d1a8868ac3efabd9ef91adebda713f99fd (plain)
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
# New ports collection makefile for:	gtksql
# Version required:			0.3
# Date created:				19 November 1998
# Whom:					Andrey Zakhvatov
#
# $FreeBSD$
#

DISTNAME=	gtksql-0.3
CATEGORIES=	databases
MASTER_SITES=	http://www.multimania.com/bbrox/GtkSQL/

MAINTAINER=	domi@saargate.de

LIB_DEPENDS=	gtk12.2:${PORTSDIR}/x11-toolkits/gtk12

.if defined(PACKAGE_BUILDING) && !defined(USE_MYSQL) && !defined(USE_PGSQL)
USE_MYSQL=	yes
.endif

.if defined(USE_MYSQL)
LIB_DEPENDS +=	mysqlclient.6:${PORTSDIR}/databases/mysql322-client
.endif
.if defined(USE_PGSQL)
LIB_DEPENDS +=	pq.2:${PORTSDIR}/databases/postgresql
.endif

USE_X_PREFIX=	yes

pre-patch:
.if !defined(USE_MYSQL) && !defined(USE_PGSQL)
	@ ${ECHO} "You must specify which database to use, possible are:"
	@ ${ECHO}
	@ ${ECHO} "make USE_MYSQL=yes (for MySQL support)"
	@ ${ECHO} "make USE_PGSQL=yes (for PostgreSQL support)"
	@ ${ECHO} "make USE_MYSQL=yes USE_PGSQL=yes (for both MySQL and PostgreSQL support)"
	@ ${FALSE}
.endif

do-configure:
.if defined(USE_MYSQL)
	@ ${PERL} -i -pe "s/^#MYSQL/MYSQL/g" ${WRKDIR}/${DISTNAME}/Makefile
.endif
.if defined(USE_PGSQL)
	@ ${PERL} -i -pe "s/^#PGSQL/PGSQL/g" ${WRKDIR}/${DISTNAME}/Makefile
.endif

do-install:
	@ ${INSTALL_PROGRAM} ${WRKSRC}/gtksql ${PREFIX}/bin
.if !defined(NOPORTDOCS)
	@ ${MKDIR} ${PREFIX}/share/doc/gtksql
.for file in COPYING Changelog README
	@ ${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/gtksql
.endfor
.endif

.include <bsd.port.mk>
OpenPOWER on IntegriCloud