summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-04-03 09:29:55 +0000
committerjlam <jlam@pkgsrc.org>2002-04-03 09:29:55 +0000
commit60adf92dcfab8d675c1f75c208c7a8e985a1076b (patch)
treecc98cbd051d64d2e10c412bf8deb8c2852184e4c
parentc11115f2ab3fa807f22c9b614a497c8932a6ab55 (diff)
downloadpkgsrc-60adf92dcfab8d675c1f75c208c7a8e985a1076b.tar.gz
Make odbc-postgresql build stand-alone instead of requiring Makefile.common
from databases/postgresql. Also honor PKG_SYSCONFDIR.
-rw-r--r--databases/odbc-postgresql/Makefile66
-rw-r--r--databases/odbc-postgresql/patches/patch-aa13
-rw-r--r--databases/odbc-postgresql/patches/patch-ab50
-rw-r--r--databases/odbc-postgresql/patches/patch-ac150
-rw-r--r--databases/odbc-postgresql/patches/patch-ad12
-rw-r--r--databases/odbc-postgresql/patches/patch-ae15
6 files changed, 298 insertions, 8 deletions
diff --git a/databases/odbc-postgresql/Makefile b/databases/odbc-postgresql/Makefile
index 364281a0982..8f22bfb5208 100644
--- a/databases/odbc-postgresql/Makefile
+++ b/databases/odbc-postgresql/Makefile
@@ -1,18 +1,68 @@
-# $NetBSD: Makefile,v 1.6 2001/12/03 08:06:24 jlam Exp $
+# $NetBSD: Makefile,v 1.7 2002/04/03 09:29:55 jlam Exp $
-.include "../../databases/postgresql/Makefile.common"
-.include "../../databases/postgresql/Makefile.ssl"
-
-PKGNAME= odbc-postgresql-${PG_BASE_VERS}
-COMMENT= ODBC interface to PostgreSQL
+DISTNAME= postgresql-${DIST_VERS}
+PKGNAME= odbc-postgresql-${BASE_VERS}
+CATEGORIES= databases
+PGSQL_SITES= http://www.postgresql.org/ftpsite/ \
+ ftp://ftp.postgresql.org/pub/ \
+ ftp://ftp.de.postgresql.org/pub/ \
+ ftp://ch.postgresql.org/mirror/postgresql/ \
+ ftp://gd.tuwien.ac.at/db/www.postgresql.org/pub/ \
+ ftp://looking-glass.usask.ca/pub/postgresql/ \
+ ftp://ftp.sunsite.auc.dk/mirrors/postgresql/ \
+ ftp://ftp.jaist.ac.jp/pub/dbms/postgres95/
+MASTER_SITES?= ${PGSQL_SITES:=source/v${DIST_VERS}/}
MAINTAINER= jwise@netbsd.org
+COMMENT= ODBC interface to PostgreSQL
HOMEPAGE= http://odbc.postgresql.org/
-USE_BUILDLINK_ONLY= # defined
+CONFLICTS+= postgresql-[0-6]* postgresql-7.0*
+
+# Version numbering scheme:
+#
+# DIST_VERS version number on the postgresql distfile
+# BASE_VERS pkgsrc-mangled version number (convert pl -> .)
+#
+DIST_VERS?= 7.1.3
+BASE_VERS?= ${DIST_VERS}
+
+USE_BUILDLINK_ONLY= YES
+USE_GMAKE= YES
+GNU_CONFIGURE= YES
+
+.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+= --with-odbc
-CONFIGURE_ARGS+= --with-odbcinst=/etc
+CONFIGURE_ARGS+= --with-odbcinst=${PKG_SYSCONFDIR}
+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+= --with-htmldir=${PREFIX}/share/doc/html/postgresql
+CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_DIR}
+
+CONFIGURE_ARGS+= --disable-readline
+CONFIGURE_ARGS+= --enable-locale
+CONFIGURE_ARGS+= --enable-syslog
+CONFIGURE_ARGS+= --with-CXX
+CONFIGURE_ARGS+= --with-template="${LOWER_OPSYS}"
DIRS_TO_BUILD= src/interfaces/odbc
diff --git a/databases/odbc-postgresql/patches/patch-aa b/databases/odbc-postgresql/patches/patch-aa
new file mode 100644
index 00000000000..db9ea538360
--- /dev/null
+++ b/databases/odbc-postgresql/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1 2002/04/03 09:29:55 jlam Exp $
+
+--- config/programs.m4.orig Sat Feb 10 14:31:42 2001
++++ config/programs.m4
+@@ -85,7 +85,7 @@
+ for pgac_rllib in -lreadline -ledit ; do
+ pgac_save_LIBS=$LIBS
+ LIBS="${pgac_rllib}${pgac_lib} $LIBS"
+- AC_TRY_LINK_FUNC([readline], [pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"; break 2])
++ AC_TRY_LINK_FUNC([readline], AC_TRY_RUN([int main() { return 0; }], [pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"; break 2]))
+ LIBS=$pgac_save_LIBS
+ done
+ done
diff --git a/databases/odbc-postgresql/patches/patch-ab b/databases/odbc-postgresql/patches/patch-ab
new file mode 100644
index 00000000000..95ea1d2705d
--- /dev/null
+++ b/databases/odbc-postgresql/patches/patch-ab
@@ -0,0 +1,50 @@
+$NetBSD: patch-ab,v 1.1 2002/04/03 09:29:55 jlam Exp $
+
+--- configure.in.orig Thu Aug 16 11:36:31 2001
++++ configure.in
+@@ -150,6 +150,15 @@
+
+
+ #
++# Readline support
++#
++AC_MSG_CHECKING([whether to build with readline support])
++PGAC_ARG_BOOL(enable, readline, yes,
++ [ --disable-readline disable readline support])
++AC_MSG_RESULT([$enable_readline])
++
++
++#
+ # Locale (--enable-locale)
+ #
+ AC_MSG_CHECKING([whether to build with locale support])
+@@ -401,6 +410,18 @@
+ [AC_MSG_RESULT(no)])
+ AC_SUBST(with_python)
+
++# If python is enabled (above), then optionally byte-compile the modules.
++AC_MSG_CHECKING([whether to byte-compile Python modules])
++if test "$with_python" = yes; then
++ PGAC_ARG_BOOL(with, python_compile, no,
++ [ --with-python-compile byte-compile modules if Python is enabled])
++else
++ with_python_compile=no
++fi
++AC_MSG_RESULT([$with_python_compile])
++AC_SUBST([with_python_compile])
++
++
+ #
+ # Optionally build the Java/JDBC tools
+ #
+@@ -649,8 +670,10 @@
+ ## Libraries
+ ##
+
++if test "$enable_readline" = yes; then
+ PGAC_CHECK_READLINE
+ AC_SEARCH_LIBS(using_history, history, [AC_DEFINE(HAVE_HISTORY_FUNCTIONS)])
++fi
+
+ if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
+ then
diff --git a/databases/odbc-postgresql/patches/patch-ac b/databases/odbc-postgresql/patches/patch-ac
new file mode 100644
index 00000000000..8f12225ff0e
--- /dev/null
+++ b/databases/odbc-postgresql/patches/patch-ac
@@ -0,0 +1,150 @@
+$NetBSD: patch-ac,v 1.1 2002/04/03 09:29:55 jlam Exp $
+
+--- configure.orig Thu Aug 16 11:36:31 2001
++++ configure
+@@ -19,6 +19,8 @@
+ ac_help="$ac_help
+ --with-libs=DIRS alternative spelling of --with-libraries"
+ ac_help="$ac_help
++ --disable-readline disable readline support"
++ac_help="$ac_help
+ --enable-locale enable locale support"
+ ac_help="$ac_help
+ --enable-recode enable character set recode support"
+@@ -53,6 +55,8 @@
+ ac_help="$ac_help
+ --with-python build Python interface module"
+ ac_help="$ac_help
++ --with-python-compile byte-compile modules if Python is enabled"
++ac_help="$ac_help
+ --with-java build JDBC interface and Java tools"
+ ac_help="$ac_help
+ --with-krb4[=DIR] build with Kerberos 4 support [/usr/athena]"
+@@ -811,6 +815,32 @@
+
+
+ #
++# Readline support
++#
++echo $ac_n "checking whether to build with readline support""... $ac_c" 1>&6
++echo "configure:822: checking whether to build with readline support" >&5
++# Check whether --enable-readline was given
++if test x"${enable_readline+set}" = xset; then
++ case $enable_readline in
++ yes)
++ :
++ ;;
++ no)
++ :
++ ;;
++ *)
++ enableval=$enable_readline
++ { echo "configure: error: no argument expected for --enable-readline option" 1>&2; exit 1; }
++ ;;
++ esac # $enable_readline
++else
++ enable_readline=yes
++
++fi
++echo "$ac_t""$enable_readline" 1>&6
++
++
++#
+ # Locale (--enable-locale)
+ #
+ echo $ac_n "checking whether to build with locale support""... $ac_c" 1>&6
+@@ -1905,6 +1935,35 @@
+ fi
+
+
++# If python is enabled (above), then optionally byte-compile the modules.
++echo $ac_n "checking whether to byte-compile Python modules""... $ac_c" 1>&6
++echo "configure:1941: checking whether to byte-compile Python modules" >&5
++if test "$with_python" = yes; then
++ # Check whether --with-python_compile was given
++if test x"${with_python_compile+set}" = xset; then
++ case $with_python_compile in
++ yes)
++ :
++ ;;
++ no)
++ :
++ ;;
++ *)
++ withval=$with_python_compile
++ { echo "configure: error: no argument expected for --with-python_compile option" 1>&2; exit 1; }
++ ;;
++ esac # $with_python_compile
++else
++ with_python_compile=no
++
++fi
++else
++ with_python_compile=no
++fi
++echo "$ac_t""$with_python_compile" 1>&6
++
++
++
+ #
+ # Optionally build the Java/JDBC tools
+ #
+@@ -3095,8 +3154,9 @@
+ ## Libraries
+ ##
+
++if test "$enable_readline" = yes; then
+ echo $ac_n "checking for readline""... $ac_c" 1>&6
+-echo "configure:3100: checking for readline" >&5
++echo "configure:3160: checking for readline" >&5
+
+ if eval "test \"`echo '$''{'pgac_cv_check_readline'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3118,13 +3178,30 @@
+ readline()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
++ if test "$cross_compiling" = yes; then
++ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
++else
++ cat > conftest.$ac_ext <<EOF
++#line 3188 "configure"
++#include "confdefs.h"
++int main() { return 0; }
++EOF
++if { (eval echo configure:3192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++then
+ pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"; break 2
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
++rm -fr conftest*
++fi
++
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++fi
+ rm -f conftest*
+ LIBS=$pgac_save_LIBS
+ done
+@@ -3208,6 +3285,7 @@
+ else :
+
+ fi
++fi
+
+ if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
+ then
+@@ -8103,6 +8181,7 @@
+ s%@python_moduledir@%$python_moduledir%g
+ s%@python_extmakefile@%$python_extmakefile%g
+ s%@with_python@%$with_python%g
++s%@with_python_compile@%$with_python_compile%g
+ s%@ANT@%$ANT%g
+ s%@with_java@%$with_java%g
+ s%@with_krb4@%$with_krb4%g
diff --git a/databases/odbc-postgresql/patches/patch-ad b/databases/odbc-postgresql/patches/patch-ad
new file mode 100644
index 00000000000..85d79f69cac
--- /dev/null
+++ b/databases/odbc-postgresql/patches/patch-ad
@@ -0,0 +1,12 @@
+$NetBSD: patch-ad,v 1.1 2002/04/03 09:29:56 jlam Exp $
+
+--- src/interfaces/odbc/GNUmakefile.orig Mon Mar 26 01:34:17 2001
++++ src/interfaces/odbc/GNUmakefile
+@@ -44,7 +44,6 @@
+
+ install: all installdirs
+ for i in $(odbc_headers); do $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(odbc_includedir)/$$i || exit 1; done
+- $(INSTALL_DATA) $(srcdir)/odbcinst.ini $(DESTDIR)$(odbcinst_ini_dir)/odbcinst.ini
+ $(INSTALL_DATA) $(srcdir)/odbc.sql $(DESTDIR)$(datadir)/odbc.sql
+ $(MAKE) install-lib
+
diff --git a/databases/odbc-postgresql/patches/patch-ae b/databases/odbc-postgresql/patches/patch-ae
new file mode 100644
index 00000000000..678733f08e7
--- /dev/null
+++ b/databases/odbc-postgresql/patches/patch-ae
@@ -0,0 +1,15 @@
+$NetBSD: patch-ae,v 1.1 2002/04/03 09:29:56 jlam Exp $
+
+--- src/makefiles/Makefile.netbsd.orig Sat Dec 16 10:14:25 2000
++++ src/makefiles/Makefile.netbsd
+@@ -3,7 +3,9 @@
+ ifdef ELF_SYSTEM
+ export_dynamic = -Wl,-E
+ rpath = -Wl,-R$(libdir)
+-shlib_symbolic = -Wl,-Bsymbolic
++shlib_symbolic = -Wl,-Bsymbolic -lc
++else
++rpath = -R$(libdir)
+ endif
+
+ DLSUFFIX = .so