diff options
author | Konstantin V. Arkhipov <voxus@gentoo.org> | 2006-07-12 18:03:40 +0000 |
---|---|---|
committer | Konstantin V. Arkhipov <voxus@gentoo.org> | 2006-07-12 18:03:40 +0000 |
commit | 135254d79b144e80b5365e5add08f553ffcbdfd5 (patch) | |
tree | bc04f78299a3f48e3ef9b1dc76c4fb2b3f9f0ca0 /dev-db | |
parent | Minor bump, and remove one obsoleted version. (diff) | |
download | historical-135254d79b144e80b5365e5add08f553ffcbdfd5.tar.gz historical-135254d79b144e80b5365e5add08f553ffcbdfd5.tar.bz2 historical-135254d79b144e80b5365e5add08f553ffcbdfd5.zip |
* closing bug #135187
Package-Manager: portage-2.1.1_pre2-r8
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/postgresql/ChangeLog | 9 | ||||
-rw-r--r-- | dev-db/postgresql/files/digest-postgresql-7.3.15-r1 | 9 | ||||
-rw-r--r-- | dev-db/postgresql/files/postgresql-7.3.15-cubeparse.patch | 36 | ||||
-rw-r--r-- | dev-db/postgresql/postgresql-7.3.15-r1.ebuild | 252 |
4 files changed, 305 insertions, 1 deletions
diff --git a/dev-db/postgresql/ChangeLog b/dev-db/postgresql/ChangeLog index 2e821bcde776..dac4ec4a5b10 100644 --- a/dev-db/postgresql/ChangeLog +++ b/dev-db/postgresql/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-db/postgresql # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.280 2006/07/05 07:45:33 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.281 2006/07/12 18:03:40 voxus Exp $ + +*postgresql-7.3.15-r1 (12 Jul 2006) + + 12 Jul 2006; Konstantin Arkhipov <voxus@gentoo.org> + +postgresql-7.3.15-r1.ebuild, +files/postgresql-7.3.15-cubeparse.patch, + -postgresql-7.3.15.ebuild: + Closing bug #135187 by patch from Giacomo Cariello <jwk@bug.it>. 05 Jul 2006; Michael Sterrett <mr_bones_@gentoo.org> postgresql-7.4.7-r1.ebuild, postgresql-7.4.7-r2.ebuild, diff --git a/dev-db/postgresql/files/digest-postgresql-7.3.15-r1 b/dev-db/postgresql/files/digest-postgresql-7.3.15-r1 new file mode 100644 index 000000000000..974d3ea5fcc8 --- /dev/null +++ b/dev-db/postgresql/files/digest-postgresql-7.3.15-r1 @@ -0,0 +1,9 @@ +MD5 dd23ef0e9cbd1a9bca19f8ee66a021db postgresql-base-7.3.15.tar.bz2 5695061 +RMD160 55cc363e1ce26ea0c7f79c5adfd90714988afb46 postgresql-base-7.3.15.tar.bz2 5695061 +SHA256 81da1ab6c3d9e19aef068cc1db81ca696771dfa5c8ff262bcb1bf977ac7429dc postgresql-base-7.3.15.tar.bz2 5695061 +MD5 9d18a5262a3a9b8a2b2c7962645572ab postgresql-docs-7.3.15.tar.bz2 2361345 +RMD160 7330f8f5e3d4061e28ec4fb28939011ae5038551 postgresql-docs-7.3.15.tar.bz2 2361345 +SHA256 832239ebdef5501a8b32f3d2b2f1684c2e9c18fa6cec0370e950b20a62f07cf9 postgresql-docs-7.3.15.tar.bz2 2361345 +MD5 f70a6f9163e204a116f44e752f4695ca postgresql-opt-7.3.15.tar.bz2 341753 +RMD160 8057276fff0ae87f49fb4853e6f3df681de405b9 postgresql-opt-7.3.15.tar.bz2 341753 +SHA256 9b513f3bdd2d63579698ecc9226866ca72fe2e13fd9f0367a07c5041dd8386f6 postgresql-opt-7.3.15.tar.bz2 341753 diff --git a/dev-db/postgresql/files/postgresql-7.3.15-cubeparse.patch b/dev-db/postgresql/files/postgresql-7.3.15-cubeparse.patch new file mode 100644 index 000000000000..705e073c8e45 --- /dev/null +++ b/dev-db/postgresql/files/postgresql-7.3.15-cubeparse.patch @@ -0,0 +1,36 @@ +--- contrib/cube/cubescan.l.orig 2006-07-05 06:56:04.000000000 +0000 ++++ contrib/cube/cubescan.l 2006-07-05 06:56:12.000000000 +0000 +@@ -9,6 +9,10 @@ + + + /* flex screws a couple symbols when used with the -P option; fix those */ ++#ifndef YY_PROTO ++#define YY_PROTO(proto) proto ++#endif ++ + #define YY_DECL int cube_yylex YY_PROTO(( void )); \ + int cube_yylex YY_PROTO(( void )) + #define yylval cube_yylval +--- contrib/seg/segscan.l.orig 2006-07-05 07:08:26.000000000 +0000 ++++ contrib/seg/segscan.l 2006-07-05 07:08:51.000000000 +0000 +@@ -9,6 +9,10 @@ + + + /* flex screws a couple symbols when used with the -P option; fix those */ ++#ifndef YY_PROTO ++#define YY_PROTO(proto) proto ++#endif ++ + #define YY_DECL int seg_yylex YY_PROTO(( void )); \ + int seg_yylex YY_PROTO(( void )) + #define yylval seg_yylval +--- contrib/tsearch/parser.l.orig 2006-07-05 07:22:36.000000000 +0000 ++++ contrib/tsearch/parser.l 2006-07-05 07:23:33.000000000 +0000 +@@ -18,6 +18,7 @@ + char *s = NULL; /* to return WHOLE hyphenated-word */ + + YY_BUFFER_STATE buf = NULL; /* buffer to parse; it need for parse from string */ ++static YY_BUFFER_STATE yy_current_buffer = 0; + + int lrlimit = -1; /* for limiting read from filehandle ( -1 - unlimited read ) */ + int bytestoread = 0; /* for limiting read from filehandle */ diff --git a/dev-db/postgresql/postgresql-7.3.15-r1.ebuild b/dev-db/postgresql/postgresql-7.3.15-r1.ebuild new file mode 100644 index 000000000000..847c5372c96a --- /dev/null +++ b/dev-db/postgresql/postgresql-7.3.15-r1.ebuild @@ -0,0 +1,252 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-7.3.15-r1.ebuild,v 1.1 2006/07/12 18:03:40 voxus Exp $ + +inherit eutils gnuconfig flag-o-matic java-pkg multilib + +DESCRIPTION="sophisticated Object-Relational DBMS" + +HOMEPAGE="http://www.postgresql.org/" +SRC_URI="mirror://postgresql/source/v${PV}/${PN}-base-${PV}.tar.bz2 + mirror://postgresql/source/v${PV}/${PN}-opt-${PV}.tar.bz2 + doc? ( mirror://postgresql/source/v${PV}/${PN}-docs-${PV}.tar.bz2 )" + +LICENSE="POSTGRESQL" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 mips ~ppc ~sparc ~x86" +IUSE="doc java libg++ nls pam perl python readline ssl tcltk zlib threads selinux" + +DEPEND="virtual/libc + =dev-db/libpq-7.3.15* + sys-devel/autoconf + >=sys-libs/ncurses-5.2 + zlib? ( >=sys-libs/zlib-1.1.3 ) + readline? ( >=sys-libs/readline-4.1 ) + tcltk? ( >=dev-lang/tcl-8 >=dev-lang/tk-8.3.3-r1 ) + perl? ( >=dev-lang/perl-5.6.1-r2 ) + python? ( >=dev-lang/python-2.2 dev-python/egenix-mx-base ) + java? ( >=virtual/jdk-1.3 >=dev-java/ant-1.3 + dev-java/java-config ) + ssl? ( >=dev-libs/openssl-0.9.6-r1 ) + nls? ( sys-devel/gettext )" +# java dep workaround for portage bug +# x86? ( java? ( =dev-java/sun-jdk-1.3* >=dev-java/ant-1.3 ) ) +RDEPEND="virtual/libc + =dev-db/libpq-7.3.15* + zlib? ( >=sys-libs/zlib-1.1.3 ) + tcltk? ( >=dev-lang/tcl-8 ) + perl? ( >=dev-lang/perl-5.6.1-r2 ) + python? ( >=dev-lang/python-2.2 ) + java? ( >=virtual/jdk-1.3 ) + selinux? ( sec-policy/selinux-postgresql ) + ssl? ( >=dev-libs/openssl-0.9.6-r1 )" + +PG_DIR="/var/lib/postgresql" + +# misc files +FILES_VER="7.3.14" + +pkg_setup() { + if [ -f ${PG_DIR}/data/PG_VERSION ] ; then + PG_MAJOR=`cat ${PG_DIR}/data/PG_VERSION | cut -f1 -d.` + PG_MINOR=`cat ${PG_DIR}/data/PG_VERSION | cut -f2 -d.` + if [ ${PG_MAJOR} -lt 7 ] || [ ${PG_MAJOR} -eq 7 -a ${PG_MINOR} -lt 3 ] ; then + eerror "Postgres ${PV} cannot upgrade your existing databases, you must" + eerror "use pg_dump to export your existing databases to a file, and then" + eerror "pg_restore to import them when you have upgraded completely." + eerror "You must remove your entire database directory to continue." + eerror "(database directory = ${PG_DIR})." + exit 1 + fi + fi + enewgroup postgres 70 \ + || die "problem adding group postgres" + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres \ + || die "problem adding user postgres" +} + +check_java_config() { + JDKHOME="`java-config --jdk-home`" + if [[ -z "${JDKHOME}" || ! -d "${JDKHOME}" ]]; then + NOJDKERROR="You need to use java-config to set your JVM to a JDK!" + eerror "${NOJDKERROR}" + die "${NOJDKERROR}" + fi +} + +src_unpack() { + unpack ${A} || die + cd ${S} || die + + epatch ${FILESDIR}/${PN}-${FILES_VER}-gentoo.patch + epatch ${FILESDIR}/${P}-cubeparse.patch +} + +src_compile() { + filter-flags -ffast-math + + if use java; then + check_java_config + fi + + local myconf + use tcltk && myconf="--with-tcl" + use python && myconf="$myconf --with-python" + use perl && myconf="$myconf --with-perl" + use java && myconf="$myconf --with-java" + use ssl && myconf="$myconf --with-openssl" + use nls && myconf="$myconf --enable-nls" + use libg++ && myconf="$myconf --with-CXX" + use pam && myconf="$myconf --with-pam" + use readline || myconf="$myconf --without-readline" + use zlib || myconf="$myconf --without-zlib" + use threads && myconf="$myconf --enable-thread-safety" + + # these are the only working CFLAGS I could get on ppc, so locking them + # down, anything more aggressive fails (i.e. -mcpu or -Ox) + # Gerk - Nov 26, 2002 + use ppc && CFLAGS="-pipe -fsigned-char" + + # Detect mips systems properly + gnuconfig_update + + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --host=${CHOST} \ + --docdir=/usr/share/doc/${PF} \ + --libdir=/usr/$(get_libdir) \ + --includedir=/usr/include/postgresql/pgsql \ + --enable-depend \ + --with-maxbackends=1024 \ + $myconf || die + + make || die + cd contrib + make || 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/$(get_libdir):" \ + ${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 + + make DESTDIR=${D} includedir_server=/usr/include/postgresql/server \ + includedir_internal=/usr/include/postgresql/internal \ + LIBDIR=${D}/usr/$(get_libdir) \ + python_moduleexecdir="${python_execprefix}/$(get_libdir)/python${python_version}/site-packages" \ + install || die + make DESTDIR=${D} includedir_server=/usr/include/postgresql/server includedir_internal=/usr/include/postgresql/internal install-all-headers || die + cd ${S}/contrib + make DESTDIR=${D} LIBDIR=${D}/usr/$(get_libdir) install || die + cd ${S} + dodoc COPYRIGHT HISTORY INSTALL README register.txt + dodoc contrib/adddepend/* + + if use java; then + # we need to remove jar file after dojar; otherwise two same jar + # file are installed. + java-pkg_dojar ${D}/usr/share/postgresql/java/postgresql.jar + rm ${D}/usr/share/postgresql/java/postgresql.jar + fi + + # backward compatibility + for i in ${D}/usr/include/postgresql/pgsql/* + do + ln -s ${i} ${D}/usr/include/ + done + + cd ${S}/doc + dodoc FAQ* README.* TODO bug.template + if use doc; then + cd ${S}/doc + docinto FAQ_html + dodoc src/FAQ/* + docinto sgml + dodoc src/sgml/*.{sgml,dsl} + docinto sgml/ref + dodoc src/sgml/ref/*.sgml + docinto TODO.detail + dodoc TODO.detail/* + fi + + cd ${S} + exeinto /etc/init.d/ + newexe ${FILESDIR}/postgresql.init-${FILES_VER} postgresql || die + + insinto /etc/conf.d/ + newins ${FILESDIR}/postgresql.conf postgresql || die + + keepdir /var/lib/postgresql +} + +pkg_postinst() { + einfo "Execute the following command" + einfo "emerge --config =${PF}" + einfo "to setup the initial database environment." + einfo "" + einfo "Make sure the postgres user in /etc/passwd has an account setup with /bin/bash as the shell" +} + +pkg_config() { + einfo "Creating the data directory ..." + mkdir -p ${PG_DIR}/data + chown -Rf postgres:postgres ${PG_DIR} + chmod 700 ${PG_DIR}/data + + einfo "Initializing the database ..." + if [ -f ${PG_DIR}/data/PG_VERSION ] ; then + PG_MAJOR=`cat ${PG_DIR}/data/PG_VERSION | cut -f1 -d.` + PG_MINOR=`cat ${PG_DIR}/data/PG_VERSION | cut -f2 -d.` + if [ ${PG_MAJOR} -lt 7 ] || [ ${PG_MAJOR} -eq 7 -a ${PG_MINOR} -lt 3 ] ; then + eerror "Postgres ${PV} cannot upgrade your existing databases." + eerror "You must remove your entire database directory to continue." + eerror "(database directory = ${PG_DIR})." + exit 1 + else + einfon "A postgres data directory already exists from version "; cat ${PG_DIR}/data/PG_VERSION + einfo "Read the documentation to check how to upgrade to version ${PV}." + fi + else + # On hppa, postgresql need way more than the default sem index and shmmax + if [ "${ARCH}" = "hppa" ]; then + SEM_IDX_MIN=1024 + SHMMAX_MIN=100000000 + SEM_IDX=`sysctl kernel.sem | awk '{ print $6 }'` + if [ $SEM_IDX -lt ${SEM_IDX_MIN} ]; then + eerror "The last value of /proc/sys/kernel/sem is too low for postgresql to run" + eerror "Temporary setting this value to ${SEM_IDX_MIN} while creating the initial database." + cat /proc/sys/kernel/sem | sed -e "s/\t${SEM_IDX}/\t${SEM_IDX_MIN}/" > /proc/sys/kernel/sem + fi + fi + su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" + + if [ "${ARCH}" = "hppa" ]; then + if [ ! `sysctl kernel.sem | awk '{ print $6 }'` -eq ${SEM_IDX} ] ; then + cat /proc/sys/kernel/sem | sed -e "s/\t${SEM_IDX_MIN}/\t${SEM_IDX}/" > /proc/sys/kernel/sem + ewarn "Restoring the sem idx value to the previous value" + ewarn "Please edit the last value of kernel.sem in /etc/sysctl.conf" + ewarn "and set it to at least ${SEM_IDX_MIN}" + fi + + if [ `sysctl kernel.shmmax | awk '{ print $3 }'` -lt ${SHMMAX_MIN} ]; then + eerror "The current value of /proc/sys/kernel/shmmax is too low" + eerror "for postgresql to run. Please edit /etc/sysctl.conf and set" + eerror "this value to at least ${SHMMAX_MIN}." + + fi + fi + + einfo "If you are upgrading from a pre-7.3 version of PostgreSQL, please read" + einfo "the README.adddepend file for information on how to properly migrate" + einfo "all serial columns, unique keys and foreign keys to this version." + + einfo "" + einfo "You can use /etc/init.d/postgresql script to run PostgreSQL instead of pg_ctl." + einfo "" + fi +} |