From 1ce50dc018c2ebf1d5cf69a401ff44f7765e7bef Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Thu, 31 Jan 2002 14:46:07 +0000 Subject: Added support for python 2.1 and cleaned up some spurious perl lib generated dirs. --- dev-db/postgresql/files/digest-postgresql-7.1.3-r2 | 1 - dev-db/postgresql/files/digest-postgresql-7.1.3-r3 | 1 + ...postgresql-7.1.3-python21-configure-gentoo.diff | 20 +++ ...postgresql-7.1.3-python21-makefiles-gentoo.diff | 44 ++++++ dev-db/postgresql/postgresql-7.1.3-r2.ebuild | 144 ------------------ dev-db/postgresql/postgresql-7.1.3-r3.ebuild | 168 +++++++++++++++++++++ 6 files changed, 233 insertions(+), 145 deletions(-) delete mode 100644 dev-db/postgresql/files/digest-postgresql-7.1.3-r2 create mode 100644 dev-db/postgresql/files/digest-postgresql-7.1.3-r3 create mode 100644 dev-db/postgresql/files/postgresql-7.1.3-python21-configure-gentoo.diff create mode 100644 dev-db/postgresql/files/postgresql-7.1.3-python21-makefiles-gentoo.diff delete mode 100644 dev-db/postgresql/postgresql-7.1.3-r2.ebuild create mode 100644 dev-db/postgresql/postgresql-7.1.3-r3.ebuild (limited to 'dev-db') diff --git a/dev-db/postgresql/files/digest-postgresql-7.1.3-r2 b/dev-db/postgresql/files/digest-postgresql-7.1.3-r2 deleted file mode 100644 index e8dbf2b65914..000000000000 --- a/dev-db/postgresql/files/digest-postgresql-7.1.3-r2 +++ /dev/null @@ -1 +0,0 @@ -MD5 a92c77092034fb35c7b3bb82beebd54b postgresql-7.1.3.tar.gz 8124455 diff --git a/dev-db/postgresql/files/digest-postgresql-7.1.3-r3 b/dev-db/postgresql/files/digest-postgresql-7.1.3-r3 new file mode 100644 index 000000000000..e8dbf2b65914 --- /dev/null +++ b/dev-db/postgresql/files/digest-postgresql-7.1.3-r3 @@ -0,0 +1 @@ +MD5 a92c77092034fb35c7b3bb82beebd54b postgresql-7.1.3.tar.gz 8124455 diff --git a/dev-db/postgresql/files/postgresql-7.1.3-python21-configure-gentoo.diff b/dev-db/postgresql/files/postgresql-7.1.3-python21-configure-gentoo.diff new file mode 100644 index 000000000000..f3376a4a1938 --- /dev/null +++ b/dev-db/postgresql/files/postgresql-7.1.3-python21-configure-gentoo.diff @@ -0,0 +1,20 @@ +--- postgresql-7.1.3/configure_orig 2002-01-31 13:51:50.000000000 +0100 ++++ postgresql-7.1.3/configure 2002-01-31 13:52:01.000000000 +0100 +@@ -1834,7 +1834,7 @@ + yes) + echo "$ac_t""yes" 1>&6 + # Extract the first word of "python", so it can be a program name with args. +-set dummy python; ac_word=$2 ++set dummy python2.1; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:1840: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_PYTHON'+set}'`\" = set"; then +@@ -1848,7 +1848,7 @@ + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then +- ac_cv_prog_PYTHON="python" ++ ac_cv_prog_PYTHON="python2.1" + break + fi + done diff --git a/dev-db/postgresql/files/postgresql-7.1.3-python21-makefiles-gentoo.diff b/dev-db/postgresql/files/postgresql-7.1.3-python21-makefiles-gentoo.diff new file mode 100644 index 000000000000..86bc53454003 --- /dev/null +++ b/dev-db/postgresql/files/postgresql-7.1.3-python21-makefiles-gentoo.diff @@ -0,0 +1,44 @@ +--- postgresql-7.1.3/src/interfaces/python/Makefile.pre.in_orig 2002-01-31 14:19:30.000000000 +0100 ++++ postgresql-7.1.3/src/interfaces/python/Makefile.pre.in 2002-01-31 14:19:55.000000000 +0100 +@@ -89,10 +89,10 @@ + # === Variables that you may want to customize (rarely) === + + # (Static) build target +-TARGET= python ++TARGET= python2.1 + + # Installed python binary (used only by boot target) +-PYTHON= python ++PYTHON= python2.1 + + # Add more -I and -D options here + CFLAGS= $(OPT) -I$(INCLUDEPY) -I$(EXECINCLUDEPY) $(DEFS) +--- postgresql-7.1.3/src/interfaces/python/mkdefines_orig 2000-10-02 05:27:27.000000000 +0200 ++++ postgresql-7.1.3/src/interfaces/python/mkdefines 2002-01-31 14:20:15.000000000 +0100 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/env python2.1 + + import string + +--- postgresql-7.1.3/src/interfaces/python/PyGreSQL.spec_orig 2002-01-31 14:20:36.000000000 +0100 ++++ postgresql-7.1.3/src/interfaces/python/PyGreSQL.spec 2002-01-31 14:21:26.000000000 +0100 +@@ -37,8 +37,8 @@ + mkdir -p $RPM_BUILD_ROOT/usr/lib/python%{pythonversion}/lib-dynload + cc -fpic -shared -o $RPM_BUILD_ROOT/usr/lib/python%{pythonversion}/lib-dynload/_pg.so -I/usr/include/pgsql/ -I/usr/include/python1.5 pgmodule.c -lpq + ## import fails, since _pg is not yet installed +-python -c 'import pg' || true +-python -c 'import pgdb' || true ++python2.1 -c 'import pg' || true ++python2.1 -c 'import pgdb' || true + + %install + cp *.py *.pyc $RPM_BUILD_ROOT/usr/lib/python%{pythonversion}/ +--- postgresql-7.1.3/src/interfaces/python/setup.py_orig 2002-01-31 14:20:41.000000000 +0100 ++++ postgresql-7.1.3/src/interfaces/python/setup.py 2002-01-31 14:21:01.000000000 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2.1 + + # Setup script for the PyGreSQL version 3 + # created 2000/04 Mark Alexander diff --git a/dev-db/postgresql/postgresql-7.1.3-r2.ebuild b/dev-db/postgresql/postgresql-7.1.3-r2.ebuild deleted file mode 100644 index d6ea614c5f04..000000000000 --- a/dev-db/postgresql/postgresql-7.1.3-r2.ebuild +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright 1999-2002 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# Author Geert Bevin -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-7.1.3-r2.ebuild,v 1.1 2002/01/31 02:14:33 gbevin Exp $ - -S=${WORKDIR}/${P} -DESCRIPTION="PostgreSQL is a sophisticated Object-Relational DBMS" -SRC_URI="ftp://ftp.easynet.be/postgresql/v${PV}/${P}.tar.gz" -HOMEPAGE="http://www.postgresql.org" - -DEPEND="virtual/glibc - sys-devel/autoconf - >=sys-libs/readline-4.1 - >=sys-libs/ncurses-5.2 - >=sys-libs/zlib-1.1.3 - tcltk? ( >=dev-lang/tcl-8 ) - perl? ( >=sys-devel/perl-5.6.1-r2 ) - java? ( >=virtual/jdk-1.3 >=dev-java/ant-1.3 ) - ssl? ( >=dev-libs/openssl-0.9.6-r1 ) - nls? ( sys-devel/gettext )" -# python? ( >=dev-lang/python-2.2-r4 ) - -RDEPEND="virtual/glibc - >=sys-libs/zlib-1.1.3 - tcltk? ( >=dev-lang/tcl-8 ) - perl? ( >=sys-devel/perl-5.6.1-r2 ) - java? ( >=virtual/jdk-1.3 ) - ssl? ( >=dev-libs/openssl-0.9.6-r1 )" -# python? ( >=dev-lang/python-2.2-r4 ) - -src_unpack() { - - unpack postgresql-${PV}.tar.gz - - cd ${S} - - # we know that a shared libperl is present, the default perl - # config is however set to the static libperl.a - # just remove the check - patch -p1 < ${FILESDIR}/${P}-dyn-libperl-gentoo.diff - - # This patch is based on Lamar Owens, Thomas Lockhards and - # Thron Eivind Glomsrod work. Thanks you all. - patch -p1 < ${FILESDIR}/${P}-perl5-GNUmakefile-gentoo.diff -} - -src_compile() { - - local myconf - if [ "`use tcltk`" ] - then - myconf="--with-tcl" - fi -# if [ "`use python`" ] -# then -# myconf="$myconf --with-python" -# fi - if [ "`use perl`" ] - then - myconf="$myconf --with-perl" - fi - if [ "`use java`" ] - then - myconf="$myconf --with-java" - fi - if [ "`use ssl`" ] - then - myconf="$myconf --with-openssl=/usr" - fi - if [ "`use nls`" ] - then - myconf="$myconf --enable-locale" - fi - if [ "`use libg++`" ] - then - myconf="$myconf --with-CXX" - fi - - ./configure --prefix=/usr \ - --mandir=/usr/share/man \ - --host=${CHOST} \ - --docdir=/usr/share/doc/${P} \ - --libdir=/usr/lib \ - --enable-syslog \ - $myconf || die - - emake || die - -} - -src_install () { - - if [ "`use perl`" ] - then - mv ${S}/src/pl/plperl/Makefile ${S}/src/pl/plperl/Makefile_orig - sed -e "s:(INST_DYNAMIC) /usr/lib:(INST_DYNAMIC) ${D}/usr/lib:" \ - ${S}/src/pl/plperl/Makefile_orig > ${S}/src/pl/plperl/Makefile - fi - - make DESTDIR=${D} install || die - make DESTDIR=${D} install-all-headers || die - dodoc COPYRIGHT HISTORY INSTALL README register.txt - cd ${S}/doc - dodoc FAQ* KNOWN_BUGS MISSING_FEATURES README* - dodoc TODO internals.ps bug.template - dodoc *.tar.gz - docinto sgml - dodoc src/sgml/*.{sgml,dsl} - docinto sgml/ref - dodoc src/sgml/ref/*.sgml - docinto sgml/graphics - dodoc src/graphics/* - mv ${D}/usr/doc/postgresql/html ${D}/usr/share/doc/${PF} - rm -rf ${D}/usr/doc ${D}/mnt - exeinto /usr/bin - - dojar ${D}/usr/share/postgresql/java/postgresql.jar - rm ${D}/usr/share/postgresql/java/postgresql.jar - - exeinto /etc/init.d/ - doexe ${FILESDIR}/${PV}/${PN} - - einfo ">>> Execute the following command" - einfo ">>> ebuild /var/db/pkg/dev-db/${P}/${P}.ebuild config" - einfo ">>> to setup the initial database environment." -} - - -pkg_config() { - - einfo ">>> Creating data directory ..." - mkdir -p /var/db/${PN}/data - chown -Rf postgres.postgres /var/db/${PN} - chmod 700 /var/db/${PN}/data - - einfo ">>> Initializing the database ..." - if [ -f /var/db/${PN}/data/PG_VERSION ] ; then - echo -n "A postgres data directory already exists from version "; cat /var/db/${PN}/data/PG_VERSION - echo "Read the documentation to check how to upgrade to version ${PV}." - else - su - postgres -c "/usr/bin/initdb --pgdata /var/db/${PN}/data" - fi - -} diff --git a/dev-db/postgresql/postgresql-7.1.3-r3.ebuild b/dev-db/postgresql/postgresql-7.1.3-r3.ebuild new file mode 100644 index 000000000000..732932a96429 --- /dev/null +++ b/dev-db/postgresql/postgresql-7.1.3-r3.ebuild @@ -0,0 +1,168 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Geert Bevin +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-7.1.3-r3.ebuild,v 1.1 2002/01/31 14:46:07 gbevin Exp $ + +S=${WORKDIR}/${P} +DESCRIPTION="PostgreSQL is a sophisticated Object-Relational DBMS" +SRC_URI="ftp://ftp.easynet.be/postgresql/v${PV}/${P}.tar.gz" +HOMEPAGE="http://www.postgresql.org" + +DEPEND="virtual/glibc + sys-devel/autoconf + >=sys-libs/readline-4.1 + >=sys-libs/ncurses-5.2 + >=sys-libs/zlib-1.1.3 + tcltk? ( >=dev-lang/tcl-8 ) + perl? ( >=sys-devel/perl-5.6.1-r2 ) + python? ( ~dev-lang/python-2.1.1 ) + java? ( >=virtual/jdk-1.3 >=dev-java/ant-1.3 ) + ssl? ( >=dev-libs/openssl-0.9.6-r1 ) + nls? ( sys-devel/gettext )" + +RDEPEND="virtual/glibc + >=sys-libs/zlib-1.1.3 + tcltk? ( >=dev-lang/tcl-8 ) + perl? ( >=sys-devel/perl-5.6.1-r2 ) + python? ( ~dev-lang/python-2.1.1 ) + java? ( >=virtual/jdk-1.3 ) + ssl? ( >=dev-libs/openssl-0.9.6-r1 )" + +src_unpack() { + + unpack postgresql-${PV}.tar.gz + + cd ${S} + + # we know that a shared libperl is present, the default perl + # config is however set to the static libperl.a + # just remove the check + patch -p1 < ${FILESDIR}/${P}-dyn-libperl-gentoo.diff || die + + # patch configure to use python 2.1 for sure + patch -p1 < ${FILESDIR}/${P}-python21-configure-gentoo.diff || die + + # This patch is based on Lamar Owens, Thomas Lockhards and + # Thron Eivind Glomsrod work. Thanks you all. + patch -p1 < ${FILESDIR}/${P}-perl5-GNUmakefile-gentoo.diff || die +} + +src_compile() { + + local myconf + if [ "`use tcltk`" ] + then + myconf="--with-tcl" + fi + if [ "`use python`" ] + then + myconf="$myconf --with-python" + fi + if [ "`use perl`" ] + then + myconf="$myconf --with-perl" + fi + if [ "`use java`" ] + then + myconf="$myconf --with-java" + fi + if [ "`use ssl`" ] + then + myconf="$myconf --with-openssl=/usr" + fi + if [ "`use nls`" ] + then + myconf="$myconf --enable-locale" + fi + if [ "`use libg++`" ] + then + myconf="$myconf --with-CXX" + fi + + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --host=${CHOST} \ + --docdir=/usr/share/doc/${P} \ + --libdir=/usr/lib \ + --enable-syslog \ + $myconf || die + + if [ "`use python`" ] + then + # generate python makefiles + cd ${S}/src/interfaces/python + make Makefile.pre.in + + cd ${S} + # patch makefiles to use python 2.1 for sure + patch -p1 < ${FILESDIR}/${P}-python21-makefiles-gentoo.diff || die + fi + + emake || die + +} + +src_install () { + + if [ "`use perl`" ] + then + mv ${S}/src/pl/plperl/Makefile ${S}/src/pl/plperl/Makefile_orig + sed -e "s:(INST_DYNAMIC) /usr/lib:(INST_DYNAMIC) ${D}/usr/lib:" \ + ${S}/src/pl/plperl/Makefile_orig > ${S}/src/pl/plperl/Makefile + mv ${S}/src/pl/plperl/GNUmakefile ${S}/src/pl/plperl/GNUmakefile_orig + sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ + ${S}/src/pl/plperl/GNUmakefile_orig > ${S}/src/pl/plperl/GNUmakefile + fi + + if [ "`use python`" ] + then + mkdir -p ${D}/usr/lib/python2.1/site-packages + mv ${S}/src/Makefile.global ${S}/src/Makefile.global_orig + sed -e "s:python_moduledir = /usr/lib/python2.1:python_moduledir = ${D}/usr/lib/python2.1:" \ + ${S}/src/Makefile.global_orig > ${S}/src/Makefile.global + fi + + make DESTDIR=${D} LIBDIR=${D}/usr/lib install || die + make DESTDIR=${D} install-all-headers || die + dodoc COPYRIGHT HISTORY INSTALL README register.txt + cd ${S}/doc + dodoc FAQ* KNOWN_BUGS MISSING_FEATURES README* + dodoc TODO internals.ps bug.template + dodoc *.tar.gz + docinto sgml + dodoc src/sgml/*.{sgml,dsl} + docinto sgml/ref + dodoc src/sgml/ref/*.sgml + docinto sgml/graphics + dodoc src/graphics/* + rm -rf ${D}/usr/doc ${D}/mnt + exeinto /usr/bin + + dojar ${D}/usr/share/postgresql/java/postgresql.jar + rm ${D}/usr/share/postgresql/java/postgresql.jar + + exeinto /etc/init.d/ + doexe ${FILESDIR}/${PV}/${PN} + + einfo ">>> Execute the following command" + einfo ">>> ebuild /var/db/pkg/dev-db/${P}/${P}.ebuild config" + einfo ">>> to setup the initial database environment." +} + + +pkg_config() { + + einfo ">>> Creating data directory ..." + mkdir -p /var/db/${PN}/data + chown -Rf postgres.postgres /var/db/${PN} + chmod 700 /var/db/${PN}/data + + einfo ">>> Initializing the database ..." + if [ -f /var/db/${PN}/data/PG_VERSION ] ; then + echo -n "A postgres data directory already exists from version "; cat /var/db/${PN}/data/PG_VERSION + echo "Read the documentation to check how to upgrade to version ${PV}." + else + su - postgres -c "/usr/bin/initdb --pgdata /var/db/${PN}/data" + fi + +} -- cgit v1.2.3-65-gdbad