summaryrefslogtreecommitdiff
path: root/databases/postgresql/Makefile.common
blob: 1d9bef42b98d41792d41861adeadfef603cbe121 (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
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
84
85
86
# $NetBSD: Makefile.common,v 1.25 2002/03/12 22:09:35 tv Exp $
#
# This Makefile fragment is included by all PostgreSQL packages built from
# the main sources of the PostgreSQL distribution.
#
# The PostgreSQL package naming scheme, aside from the obvious piecewise
# packages, is as follows:
#
#	<lang>-postgresql	client-side interface to PostgreSQL
#	postgresql-<lang>	server-side module for PostgreSQL backend

DISTNAME=		postgresql-${PG_DIST_VERS}
CATEGORIES+=		databases
MASTER_SITES=		http://www.postgresql.org/ftpsite/source/v${PG_DIST_VERS}/ \
			ftp://ftp.PostgreSQL.org/pub/source/v${PG_DIST_VERS}/ \
			ftp://ftp.de.postgresql.org/pub/source/v${PG_DIST_VERS}/ \
			ftp://ch.postgresql.org/mirror/postgresql/source/v${PG_DIST_VERS}/ \
			ftp://gd.tuwien.ac.at/db/www.postgresql.org/pub/source/v${PG_DIST_VERS}/ \
			ftp://looking-glass.usask.ca/pub/postgresql/source/v${PG_DIST_VERS}/ \
			ftp://ftp.sunsite.auc.dk/mirrors/postgresql/source/v${PG_DIST_VERS}/ \
			ftp://ftp.jaist.ac.jp/pub/dbms/postgres95/source/v${PG_DIST_VERS}/

MAINTAINER=		jlam@netbsd.org
HOMEPAGE=		http://www.postgresql.org/

CONFLICTS+=		postgresql-[0-6]* postgresql-7.0*

DISTINFO_FILE=		${.CURDIR}/../../databases/postgresql/distinfo
COMMON_FILESDIR=	${.CURDIR}/../../databases/postgresql/files
PATCHDIR=		${.CURDIR}/../../databases/postgresql/patches

# Version numbering scheme:
#
# PG_DIST_VERS		version number on the postgresql distfile
# PG_BASE_VERS		pkgsrc-mangled version number (convert pl -> .)
#
PG_DIST_VERS=		7.1.3
PG_BASE_VERS=		${PG_DIST_VERS}

USE_GMAKE=		# defined
GNU_CONFIGURE=		# defined

.include "../../mk/bsd.prefs.mk"

# PG_MB_ENCODING may be set to any of:
#
# SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, UNICODE, MULE_INTERNAL,
# LATIN1, LATIN2, LATIN3, LATIN4, LATIN5, KOI8, WIN, ALT
#
# This variable controls the language encoding on the backend process.

.if defined(PG_MB_ENCODING)
CONFIGURE_ARGS+=	--enable-multibyte=${PG_MB_ENCODING}
.else
CONFIGURE_ARGS+=	--enable-multibyte	# accept default
.endif

CONFIGURE_ARGS+=	--disable-odbc
CONFIGURE_ARGS+=	--without-java
CONFIGURE_ARGS+=	--without-perl
CONFIGURE_ARGS+=	--without-python
CONFIGURE_ARGS+=	--without-tcl
CONFIGURE_ARGS+=	--without-tk

CONFIGURE_ARGS+=	--includedir=${PREFIX}/include/pgsql
CONFIGURE_ARGS+=	--docdir=${PREFIX}/share/doc/html/postgresql

CONFIGURE_ARGS+=	--disable-readline
CONFIGURE_ARGS+=	--enable-locale
CONFIGURE_ARGS+=	--enable-syslog
CONFIGURE_ARGS+=	--with-CXX
CONFIGURE_ARGS+=	--with-template="${LOWER_OPSYS}"

MAKE_ENV+=		CUSTOM_COPT="${CFLAGS}"

post-extract:
	if [ -d ${WRKSRC}/src ]; then					\
		${RM} -f ${WRKSRC}/src/Makefile.custom;			\
		${CP} -f ${COMMON_FILESDIR}/Makefile.custom		\
			${WRKSRC}/src/Makefile.custom;			\
	fi
	if [ -d ${WRKSRC}/src/interfaces/libpq ]; then			\
		${RM} -f ${WRKSRC}/src/interfaces/libpq/GNUmakefile;	\
		${CP} -f ${COMMON_FILESDIR}/GNUmakefile.libpq		\
			${WRKSRC}/src/interfaces/libpq/GNUmakefile;	\
	fi