aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/postgresql-tcltk/Makefile
blob: a2f581e822bd065ac93eb3ebd91ca995fa0051c9 (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
# New ports collection makefile for:    PostgreSQL tcltk
# Date created:     7 Jun 2000
# Whom:         Tomokatsu Saito <saito@a2z.co.jp>
#
# $FreeBSD$
#

PORTNAME=   postgresql-tcltk
CATEGORIES= japanese databases

MAINTAINER= saito@a2z.co.jp
COMMENT=    An TCL interface to the database PostgreSQL, including a tk GUI

POSTGRESQL_PORT?=   databases/postgresql7
POSTGRESQL_SUBPORT=YES
.include <${.CURDIR}/../../databases/postgresql7/Makefile>

LIB_DEPENDS=    tcl80jp.1:${PORTSDIR}/japanese/tcl80 \
        pq:${PORTSDIR}/databases/postgresql7 \
        tcl80jp.1:${PORTSDIR}/japanese/tcl80 \
        tk80jp.1:${PORTSDIR}/japanese/tk80

TCLVERSION?=    8.0jp
PLIST_SUB+= TCLVERSION=${TCLVERSION}
CONFIGURE_ARGS= --with-tcl \
        --with-tclconfig=${TCLCONFIG} \
        --with-includes=${INCDIRS}

TCL_INCDIR= ${LOCALBASE}/include/tcl${TCLVERSION}
TCLCONFIG=  ${LOCALBASE}/lib/tcl${TCLVERSION}
MAKE_ENV+=  TCL_INCDIR=${TCL_INCDIR}
CONFIGURE_ENV+= LIBS="-lm -L${LOCALBASE}/lib -ltcl${TCLVERSION:S/.//}" \
                   CFLAGS=-DPGTCL_USE_TCLOBJ
CONFIGURE_ARGS+= --with-tkconfig="${TKCONFIG}"
TK_INCDIR=  ${LOCALBASE}/include/tk${TCLVERSION}
TKCONFIG=   ${LOCALBASE}/lib/tk${TCLVERSION}
INCDIRS=    ${TCL_INCDIR}:${TK_INCDIR}
PLIST_SUB+= TK=""

pre-build:
    cd ${WRKSRC}/src/port; ${GMAKE}

do-build:
    @ cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${GMAKE} -C src/bin/pgtclsh
    @ cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${GMAKE} -C src/interfaces/libpgtcl

do-install:
    @ cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${GMAKE} -C src/bin/pgtclsh install
    @ cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${GMAKE} -C src/interfaces/libpgtcl install
# Preparing a loadable TCL-package (pkgIndex.tcl)
    @${MKDIR} ${PREFIX}/lib/tcl${TCLVERSION}/Pgtcl1.3
    @${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/pkgIndex.tcl.in \
        > ${PREFIX}/lib/tcl${TCLVERSION}/Pgtcl1.3/pkgIndex.tcl

.include <bsd.port.mk>