Line # Revision Author
1 3 ahitrov@rambler.ru ##############################################################################
2 # $HeadURL: http://svn.dev.rambler.ru/Contenido/trunk/ports/all/DBD-Pg/GNUmakefile $
3 # $Id: GNUmakefile 1317 2009-01-30 10:24:05Z lonerr $
4 ###############################################################################
5
6
7 include ../../etc/perl.mk
8
9
10 ifeq (${shell perl -e 'print 1 if ${PERL_LEVEL}<500600'},1)
11 PORTVERSION = 1.32
12 else
13 PORTVERSION = 2.11.8
14 endif
15
16 PERL_MAKEMAKER = yes
17 MASTER_CPAN_SUBDIR = DBD
18 PORT_DEPENDS = DBI version
19 CONFIGURE_PRECMD = ${MAKE_RECURSIVE} pre-configure
20 CONFIGURE_POSTENV = POSTGRES_HOME=${WRKSRC}/pgsql
21
22 pre-configure:
23
24 @rm -Rf ${WRKSRC}/pgsql \
25 && mkdir ${WRKSRC}/pgsql \
26 && mkdir ${WRKSRC}/pgsql/bin \
27 && mkdir ${WRKSRC}/pgsql/include \
28 && mkdir ${WRKSRC}/pgsql/lib
29
30 @cd ../postgresql/ \
31 && ${MAKE_RECURSIVE} build
32
33 PG=`cd ../postgresql/ && ${MAKE_RECURSIVE} get-WRKSRC` \
34 && cp $${PG}/src/bin/pg_config/pg_config ${WRKSRC}/pgsql/bin \
35 && cp $${PG}/src/interfaces/libpq/*.h ${WRKSRC}/pgsql/include \
36 && cp $${PG}/src/include/postgres_ext.h ${WRKSRC}/pgsql/include \
37 && cp $${PG}/src/interfaces/libpq/libpq.a ${WRKSRC}/pgsql/lib
38
39
40 include ../../etc/ports.mk