summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2008-01-24 15:00:32 +0000
committerTiziano Müller <dev-zero@gentoo.org>2008-01-24 15:00:32 +0000
commit6a359ffafb88d383b53857eabde57cbd101fa3fd (patch)
tree8bff93842cc591d8df844547ab4f43d4a1122644
parentdev-db/postgresql*: bump 8.3* to 8.3_rc1 (diff)
downloadexperimental-6a359ffafb88d383b53857eabde57cbd101fa3fd.tar.gz
experimental-6a359ffafb88d383b53857eabde57cbd101fa3fd.tar.bz2
experimental-6a359ffafb88d383b53857eabde57cbd101fa3fd.zip
dev-db/postgresql-base: Initial commit.
svn path=/experimental/; revision=307
-rw-r--r--dev-db/postgresql-base/ChangeLog9
-rw-r--r--dev-db/postgresql-base/Manifest20
-rw-r--r--dev-db/postgresql-base/files/digest-postgresql-base-8.2.63
-rw-r--r--dev-db/postgresql-base/files/postgresql-8.2-base.patch120
-rw-r--r--dev-db/postgresql-base/files/postgresql-8.2-common.patch88
-rw-r--r--dev-db/postgresql-base/postgresql-base-8.2.6.ebuild155
6 files changed, 395 insertions, 0 deletions
diff --git a/dev-db/postgresql-base/ChangeLog b/dev-db/postgresql-base/ChangeLog
new file mode 100644
index 0000000..a94f424
--- /dev/null
+++ b/dev-db/postgresql-base/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for dev-db/postgresql-base
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 24 Jan 2008; Tiziano Müller <dev-zero@gentoo.org>
+ +files/postgresql-8.2-base.patch, +files/postgresql-8.2-common.patch,
+ +postgresql-base-8.2.6.ebuild:
+ Initial commit.
+
diff --git a/dev-db/postgresql-base/Manifest b/dev-db/postgresql-base/Manifest
new file mode 100644
index 0000000..475d0e6
--- /dev/null
+++ b/dev-db/postgresql-base/Manifest
@@ -0,0 +1,20 @@
+AUX postgresql-8.2-base.patch 3893 RMD160 b346653da1f4651a4874ff6df3259673cc7e692f SHA1 2ba6865196a37f4636ba7174d479716cefaf389c SHA256 798ac102dd454d4aca36eb66a1286ee849d032566a7a383da7cbc3fb65d03118
+MD5 c5f70d0a0a536a2e38ea3cf3de9e68e1 files/postgresql-8.2-base.patch 3893
+RMD160 b346653da1f4651a4874ff6df3259673cc7e692f files/postgresql-8.2-base.patch 3893
+SHA256 798ac102dd454d4aca36eb66a1286ee849d032566a7a383da7cbc3fb65d03118 files/postgresql-8.2-base.patch 3893
+AUX postgresql-8.2-common.patch 2640 RMD160 b25ba915d5d6ad9c12c1d51426363c196b830923 SHA1 7b946d57bfed34e2e7e1338c3ab3004341d7ab12 SHA256 36ca9cb4f26424c302fdd704b7c1a268e87612afa3006bf008d4594dabe080f8
+MD5 510f7cca742d90f09d5fd32d05ddaa08 files/postgresql-8.2-common.patch 2640
+RMD160 b25ba915d5d6ad9c12c1d51426363c196b830923 files/postgresql-8.2-common.patch 2640
+SHA256 36ca9cb4f26424c302fdd704b7c1a268e87612afa3006bf008d4594dabe080f8 files/postgresql-8.2-common.patch 2640
+DIST postgresql-8.2.6.tar.bz2 12559117 RMD160 fa12ce310919cb52be3558d38a7e329bc73bbe33 SHA1 8934dfbd4c1d8c4f2945cb80f02072611681f967 SHA256 ee41327e821f933de2894d6e0c319edc4b63e80cb902e673b490b7eaf4ead114
+EBUILD postgresql-base-8.2.6.ebuild 4648 RMD160 9f79b56837968a9a6e5c6a8319db2ac5f54f06b6 SHA1 8aa6251b465baceaa9bf0c0e3066b2446708db29 SHA256 1bb6aef48091b442d2612f243a1a8441fd68bba580323f93b3e4bccc4d27ea45
+MD5 006478b821c3e1827f5ac29446105e2b postgresql-base-8.2.6.ebuild 4648
+RMD160 9f79b56837968a9a6e5c6a8319db2ac5f54f06b6 postgresql-base-8.2.6.ebuild 4648
+SHA256 1bb6aef48091b442d2612f243a1a8441fd68bba580323f93b3e4bccc4d27ea45 postgresql-base-8.2.6.ebuild 4648
+MISC ChangeLog 300 RMD160 8d3f0f8b9ad5af534b11bbfd5e85273cb470900f SHA1 e8e5491d6e5c01b7aa197bf57a87df44cd894a90 SHA256 75f019a7fb95d99375a913edb4dcefff4bfeec3b48d0747ab690b2a934deee8f
+MD5 ce0de9bf29ab6c82ad575d5f681390d4 ChangeLog 300
+RMD160 8d3f0f8b9ad5af534b11bbfd5e85273cb470900f ChangeLog 300
+SHA256 75f019a7fb95d99375a913edb4dcefff4bfeec3b48d0747ab690b2a934deee8f ChangeLog 300
+MD5 82e0a8c26d6b4ca23a88e14f9c1364dd files/digest-postgresql-base-8.2.6 259
+RMD160 eaeca374a581f849a0d441e81a9a195696422978 files/digest-postgresql-base-8.2.6 259
+SHA256 dd2fd7fd45f83726f1cdcdd60e97ae51bb222030679916ff44a3f623a41930e9 files/digest-postgresql-base-8.2.6 259
diff --git a/dev-db/postgresql-base/files/digest-postgresql-base-8.2.6 b/dev-db/postgresql-base/files/digest-postgresql-base-8.2.6
new file mode 100644
index 0000000..eb9626c
--- /dev/null
+++ b/dev-db/postgresql-base/files/digest-postgresql-base-8.2.6
@@ -0,0 +1,3 @@
+MD5 17b9049b4fcad42ee95410833c1db228 postgresql-8.2.6.tar.bz2 12559117
+RMD160 fa12ce310919cb52be3558d38a7e329bc73bbe33 postgresql-8.2.6.tar.bz2 12559117
+SHA256 ee41327e821f933de2894d6e0c319edc4b63e80cb902e673b490b7eaf4ead114 postgresql-8.2.6.tar.bz2 12559117
diff --git a/dev-db/postgresql-base/files/postgresql-8.2-base.patch b/dev-db/postgresql-base/files/postgresql-8.2-base.patch
new file mode 100644
index 0000000..4da2190
--- /dev/null
+++ b/dev-db/postgresql-base/files/postgresql-8.2-base.patch
@@ -0,0 +1,120 @@
+diff -Naur postgresql-8.2.6.orig/contrib/Makefile postgresql-8.2.6/contrib/Makefile
+--- postgresql-8.2.6.orig/contrib/Makefile 2008-01-12 13:47:29.000000000 +0100
++++ postgresql-8.2.6/contrib/Makefile 2008-01-12 13:49:39.000000000 +0100
+@@ -5,37 +5,10 @@
+ include $(top_builddir)/src/Makefile.global
+
+ WANTED_DIRS = \
+- adminpack \
+- btree_gist \
+- chkpass \
+- cube \
+- dblink \
+- earthdistance \
+- fuzzystrmatch \
+- hstore \
+- intagg \
+- intarray \
+- isn \
+- lo \
+- ltree \
+ oid2name \
+- pg_buffercache \
+- pg_freespacemap \
+- pg_trgm \
+ pgbench \
+- pgcrypto \
+- pgrowlocks \
+- pgstattuple \
+- seg \
+- spi \
+- tablefunc \
+- tsearch2 \
+ vacuumlo
+
+-ifeq ($(with_openssl),yes)
+-WANTED_DIRS += sslinfo
+-endif
+-
+ # Missing:
+ # start-scripts \ (does not have a makefile)
+ # xml2 \ (requires libxml installed)
+diff -Naur postgresql-8.2.6.orig/src/backend/Makefile postgresql-8.2.6/src/backend/Makefile
+--- postgresql-8.2.6.orig/src/backend/Makefile 2008-01-12 13:47:29.000000000 +0100
++++ postgresql-8.2.6/src/backend/Makefile 2008-01-18 17:48:44.000000000 +0100
+@@ -33,7 +33,7 @@
+
+ ##########################################################################
+
+-all: submake-libpgport postgres $(POSTGRES_IMP)
++all: someheaders
+
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -105,8 +105,7 @@
+
+ .PHONY: $(DIRS:%=%-recursive)
+ # Update the commonly used headers before building the subdirectories
+-$(DIRS:%=%-recursive): $(top_builddir)/src/include/parser/parse.h $(top_builddir)/src/include/utils/fmgroids.h
+- $(MAKE) -C $(subst -recursive,,$@) all
++someheaders $(DIRS:%=%-recursive): $(top_builddir)/src/include/parser/parse.h $(top_builddir)/src/include/utils/fmgroids.h
+
+
+ # The postgres.o target is needed by the rule in Makefile.global that
+@@ -153,22 +152,7 @@
+
+ ##########################################################################
+
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+- $(MAKE) -C catalog install-data
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
++install:
+
+ install-bin: postgres $(POSTGRES_IMP) installdirs
+ $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
+diff -Naur postgresql-8.2.6.orig/src/bin/Makefile postgresql-8.2.6/src/bin/Makefile
+--- postgresql-8.2.6.orig/src/bin/Makefile 2008-01-12 13:47:29.000000000 +0100
++++ postgresql-8.2.6/src/bin/Makefile 2008-01-12 13:52:07.000000000 +0100
+@@ -13,8 +13,8 @@
+ top_builddir = ../..
+ include $(top_builddir)/src/Makefile.global
+
+-DIRS := initdb ipcclean pg_ctl pg_dump \
+- psql scripts pg_config pg_controldata pg_resetxlog
++DIRS := pg_dump \
++ psql scripts pg_config
+ ifeq ($(PORTNAME), win32)
+ DIRS+=pgevent
+ endif
+diff -Naur postgresql-8.2.6.orig/src/Makefile postgresql-8.2.6/src/Makefile
+--- postgresql-8.2.6.orig/src/Makefile 2008-01-12 13:47:29.000000000 +0100
++++ postgresql-8.2.6/src/Makefile 2008-01-12 14:15:44.000000000 +0100
+@@ -15,15 +15,11 @@
+
+ all install installdirs uninstall dep depend distprep:
+ $(MAKE) -C port $@
+- $(MAKE) -C timezone $@
+ $(MAKE) -C backend $@
+- $(MAKE) -C backend/utils/mb/conversion_procs $@
+ $(MAKE) -C include $@
+ $(MAKE) -C interfaces $@
+ $(MAKE) -C bin $@
+- $(MAKE) -C pl $@
+ $(MAKE) -C makefiles $@
+- $(MAKE) -C test/regress $@
+
+ install: install-local
+
diff --git a/dev-db/postgresql-base/files/postgresql-8.2-common.patch b/dev-db/postgresql-base/files/postgresql-8.2-common.patch
new file mode 100644
index 0000000..e6e8e46
--- /dev/null
+++ b/dev-db/postgresql-base/files/postgresql-8.2-common.patch
@@ -0,0 +1,88 @@
+diff --git a/config/programs.m4 b/config/programs.m4
+index fb9793f..3510942 100644
+--- a/config/programs.m4
++++ b/config/programs.m4
+@@ -162,8 +162,12 @@ AC_DEFUN([PGAC_CHECK_GETTEXT],
+ dnl FIXME: We should probably check for version >=0.10.36.
+ AC_CHECK_PROGS(XGETTEXT, xgettext)
+
+- # Note: share/locale is always the default, independent of $datadir
+- localedir='${prefix}/share/locale'
++ # Note: share/locale *WAS* always the default, independent of $datadir
++ AC_ARG_WITH([locale-dir],
++ AC_HELP_STRING([--with-locale-dir],[Set path to locale files]),
++ [ localedir="${withval}" ],
++ [ localedir='${prefix}/share/locale' ]
++ )
+ AC_SUBST(localedir)
+ ])# PGAC_CHECK_GETTEXT
+
+diff --git a/configure.in b/configure.in
+index 908a1ae..30dd3bb 100644
+--- a/configure.in
++++ b/configure.in
+@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
+
+ AC_INIT([PostgreSQL], [8.2.6], [pgsql-bugs@postgresql.org])
+
+-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.59], [], [m4_fatal([Autoconf version 2.59 is required.
+-Untested combinations of 'autoconf' and PostgreSQL versions are not
+-recommended. You can remove the check from 'configure.in' but it is then
+-your responsibility whether the result works or not.])])
+ AC_COPYRIGHT([Copyright (c) 1996-2006, PostgreSQL Global Development Group])
+ AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
+ AC_CONFIG_AUX_DIR(config)
+diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
+index 23f4cc9..707c303 100644
+--- a/src/include/storage/s_lock.h
++++ b/src/include/storage/s_lock.h
+@@ -298,6 +298,29 @@ tas(volatile slock_t *lock)
+
+ #endif /* __s390__ || __s390x__ */
+
++#if defined(__sh__)
++#define HAS_TEST_AND_SET
++
++typedef unsigned char slock_t;
++
++#define TAS(lock) tas(lock)
++
++static __inline__ int
++tas(volatile slock_t *lock)
++{
++ register int _res = 1;
++
++ __asm__ __volatile__(
++ "tas.b @%1\n\t"
++ "movt %0\n\t"
++ "xor #1,%0"
++: "=z"(_res)
++: "r"(lock)
++: "t","memory");
++ return _res;
++}
++
++#endif /* __sh__ */
+
+ #if defined(__sparc__) /* Sparc */
+ #define HAS_TEST_AND_SET
+diff --git a/src/makefiles/Makefile.darwin b/src/makefiles/Makefile.darwin
+index 9f761d4..83b2974 100644
+--- a/src/makefiles/Makefile.darwin
++++ b/src/makefiles/Makefile.darwin
+@@ -5,7 +5,15 @@ DLSUFFIX = .so
+ CFLAGS_SL =
+
+ ifdef PGXS
++ifdef PGXS_IN_SERVER
++ifndef PGXS_WITH_SERVER
++BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres
++else
++BE_DLLLIBS= -bundle_loader ${PGXS_WITH_SERVER}
++endif
++else
+ BE_DLLLIBS= -bundle_loader $(bindir)/postgres
++endif
+ else
+ BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres
+ endif
diff --git a/dev-db/postgresql-base/postgresql-base-8.2.6.ebuild b/dev-db/postgresql-base/postgresql-base-8.2.6.ebuild
new file mode 100644
index 0000000..0905d04
--- /dev/null
+++ b/dev-db/postgresql-base/postgresql-base-8.2.6.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+WANT_AUTOCONF="latest"
+WANT_AUTOMAKE="none"
+
+inherit eutils multilib toolchain-funcs versionator autotools
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+
+DESCRIPTION="PostgreSQL libraries"
+HOMEPAGE="http://www.postgresql.org/"
+SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
+LICENSE="POSTGRESQL"
+SLOT="$(get_version_component_range 1-2)"
+# find . -name \*.po | xargs -n 1 basename | cut -d. -f1|sort|uniq|sed 's/^/linguas_/'
+IUSE_LINGUAS="
+ linguas_af linguas_cs linguas_de linguas_es linguas_fa linguas_fr
+ linguas_hr linguas_hu linguas_it linguas_ko linguas_nb linguas_pl
+ linguas_pt_BR linguas_ro linguas_ru linguas_sk linguas_sl linguas_sv
+ linguas_tr linguas_zh_CN linguas_zh_TW"
+IUSE="doc kerberos nls pam pg-intdatetime readline ssl threads zlib ldap ${IUSE_LINGUAS}"
+RESTRICT="test"
+
+wanted_languages() {
+ for u in ${IUSE_LINGUAS} ; do
+ use $u && echo ${u#linguas_}
+ done
+}
+
+RDEPEND="kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )
+ readline? ( >=sys-libs/readline-4.1 )
+ ssl? ( >=dev-libs/openssl-0.9.6-r1 )
+ zlib? ( >=sys-libs/zlib-1.1.3 )
+ >=app-admin/eselect-postgresql-0.2
+ ldap? ( net-nds/openldap )"
+DEPEND="${RDEPEND}
+ >=sys-devel/bison-1.875
+ nls? ( sys-devel/gettext )"
+
+S="${WORKDIR}/postgresql-${PV}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/postgresql-${SLOT}-common.patch"
+ epatch "${FILESDIR}/postgresql-${SLOT}-base.patch"
+
+ # to avoid collision - it only should be installed by server
+ rm "${S}/src/backend/nls.mk"
+
+ # because psql/help.c includes the file
+ ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/"
+
+ eautoconf
+}
+
+src_compile() {
+ econf --prefix=/usr/$(get_libdir)/postgresql-${SLOT} \
+ --datadir=/usr/share/postgresql-${SLOT} \
+ --sysconfdir=/etc/postgresql-${SLOT} \
+ --includedir=/usr/include/postgresql-${SLOT} \
+ --with-locale-dir=/usr/share/postgresql-${SLOT}/locale \
+ --mandir=/usr/share/postgresql-${SLOT}/man \
+ --with-docdir=/usr/share/doc/${PF} \
+ --enable-depend \
+ --without-tcl \
+ --without-perl \
+ --without-python \
+ $(use_with kerberos krb5) \
+ "$(use_enable nls nls "$(wanted_languages)")" \
+ $(use_with pam) \
+ $(use_enable pg-intdatetime integer-datetimes ) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(use_enable threads thread-safety ) \
+ $(use_with zlib) \
+ $(use_with ldap) \
+ || die "configure failed"
+
+ emake LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake failed"
+
+ cd "${S}/contrib"
+ emake LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ insinto /usr/include/postgresql-${SLOT}/postmaster
+ doins "${S}"/src/include/postmaster/*.h
+ dodir /usr/share/postgresql-${SLOT}/man/man1
+ tar -zxf "${S}/doc/man.tar.gz" -C "${D}"/usr/share/postgresql-${SLOT}/man man1/{ecpg,pg_config}.1
+
+ rm "${D}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,ipcclean,pg_controldata,pg_ctl,pg_resetxlog,pg_restore,postgres,postmaster}.1
+ dodoc README HISTORY doc/{README.*,TODO,bug.template}
+
+ cd "${S}/contrib"
+ emake DESTDIR="${D}" install || die "emake install failed"
+ cd "${S}"
+
+ dodir /usr/lib/eselect-postgresql/slots/${SLOT}
+
+ IDIR="/usr/include/postgresql-${SLOT}"
+ cat > "${D}/usr/lib/eselect-postgresql/slots/${SLOT}/base" <<-__EOF__
+postgres_ebuilds="\${postgres_ebuilds} ${PF}"
+postgres_prefix=/usr/$(get_libdir)/postgresql-${SLOT}
+postgres_datadir=/usr/share/postgresql-${SLOT}
+postgres_bindir=/usr/$(get_libdir)/postgresql-${SLOT}/bin
+postgres_symlinks=(
+ ${IDIR} /usr/include/postgresql
+ ${IDIR}/libpq-fe.h /usr/include/libpq-fe.h
+ ${IDIR}/libpq /usr/include/libpq
+ ${IDIR}/postgres_ext.h /usr/include/postgres_ext.h
+)
+__EOF__
+
+ cat >"${T}/50postgresql-95-${SLOT}" <<-__EOF__
+ LDPATH=/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)
+ MANPATH=/usr/share/postgresql-${SLOT}/man
+ __EOF__
+ doenvd "${T}/50postgresql-95-${SLOT}"
+
+
+ if use doc ; then
+ dodir /usr/share/doc/${PF}/html
+ tar -zxf "${S}/doc/postgres.tar.gz" -C "${D}/usr/share/doc/${PF}/html"
+
+ 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
+}
+
+pkg_postinst() {
+ eselect postgresql update
+ [[ "$(eselect postgresql show)" = "(none)" ]] && eselect postgresql set ${SLOT}
+ elog "If you need a global psqlrc-file, you can place it in '${ROOT}/etc/postgresql-${SLOT}/'."
+}
+
+pkg_postrm() {
+ eselect postgresql update
+}