annotate dev-db/libpq/libpq-8.3.1.ebuild @ 3:e15b399580ab

mercurial 1.0 is in portage
author holger@hoho.dyndns.org
date Tue, 25 Mar 2008 20:51:38 +0100
parents 7985ba427c7d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
1 # Copyright 1999-2008 Gentoo Foundation
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
3 # $Header: /var/cvsroot/gentoo-x86/dev-db/libpq/libpq-8.2.6.ebuild,v 1.1 2008/01/13 01:38:02 mjolnir Exp $
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
4
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
5 inherit eutils flag-o-matic toolchain-funcs
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
6
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
7 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
8
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
9 MY_PV="${PV/_rc/RC}"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
10 DESCRIPTION="PostgreSQL libraries."
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
11 HOMEPAGE="http://www.postgresql.org/"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
12 SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
13 LICENSE="POSTGRESQL"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
14 SLOT="4"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
15 IUSE="kerberos nls pam pg-intdatetime readline ssl threads zlib"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
16 RESTRICT="nomirror"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
17
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
18 RDEPEND="!<=dev-db/postgresql-8.1.4
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
19 kerberos? ( virtual/krb5 )
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
20 pam? ( virtual/pam )
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
21 readline? ( >=sys-libs/readline-4.1 )
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
22 ssl? ( >=dev-libs/openssl-0.9.6-r1 )
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
23 zlib? ( >=sys-libs/zlib-1.1.3 )"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
24 DEPEND="${RDEPEND}
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
25 sys-devel/autoconf
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
26 >=sys-devel/bison-1.875
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
27 nls? ( sys-devel/gettext )"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
28
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
29 S="${WORKDIR}/postgresql-${MY_PV}"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
30
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
31 pkg_preinst() {
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
32 # Removing wrong symlink created by previous ebuild
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
33 if [[ -L "${ROOT}/usr/include/libpq" ]] ; then
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
34 rm -f "${ROOT}/usr/include/libpq"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
35 fi
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
36 }
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
37
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
38 src_unpack() {
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
39 unpack ${A}
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
40 cd "${S}"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
41
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
42 epatch "${FILESDIR}/${PN}-${PV}-gentoo.patch"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
43 }
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
44
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
45 src_compile() {
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
46 filter-flags -ffast-math -feliminate-dwarf2-dups
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
47
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
48 econf --prefix=/usr \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
49 --includedir=/usr/include/postgresql/libpq-${SLOT} \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
50 --sysconfdir=/etc/postgresql \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
51 --mandir=/usr/share/man \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
52 --host=${CHOST} \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
53 --with-docdir=/usr/share/doc/${PF} \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
54 --libdir=/usr/$(get_libdir) \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
55 --enable-depend \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
56 $(use_with kerberos krb5) \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
57 $(use_enable nls ) \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
58 $(use_with pam) \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
59 --without-perl \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
60 $(use_enable pg-intdatetime integer-datetimes ) \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
61 --without-python \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
62 $(use_with readline) \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
63 $(use_with ssl openssl) \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
64 --without-tcl \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
65 $(use_enable threads thread-safety ) \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
66 $(use_with zlib) \
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
67 || die "configure failed"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
68
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
69 cd "${S}/src/interfaces/libpq"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
70 emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake libpq failed"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
71
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
72 cd "${S}/src/bin/pg_config"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
73 emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake pg_config failed"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
74 }
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
75
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
76 src_install() {
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
77 cd "${S}/src/interfaces/libpq"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
78 emake DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" install || die "emake install libpq failed"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
79
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
80 cd "${S}/src/include"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
81 emake DESTDIR="${D}" install || die "emake install headers failed"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
82
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
83 cd "${S}/src/bin/pg_config"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
84 emake DESTDIR="${D}" install || die "emake install pg_config failed"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
85
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
86 cd "${S}"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
87 dodoc README HISTORY
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
88
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
89 dosym libpq-${SLOT}.a /usr/$(get_libdir)/libpq.a
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
90
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
91 for f in $(ls -1 "${D}"/usr/include/postgresql/libpq-${SLOT}/*.h) ; do
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
92 dosym postgresql/libpq-${SLOT}/$(basename ${f}) /usr/include/
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
93 done
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
94
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
95 dodir /usr/include/libpq
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
96 for f in $(ls -1 "${D}"/usr/include/postgresql/libpq-${SLOT}/libpq/*.h) ; do
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
97 dosym ../postgresql/libpq-${SLOT}/libpq/$(basename ${f}) /usr/include/libpq/
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
98 done
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
99
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
100 cd "${D}/usr/include/postgresql/libpq-${SLOT}"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
101 for f in $(find * -name '*.h' -print) ; do
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
102 destdir=$(dirname ${f})
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
103 if [[ ! -d "${D}/usr/include/postgresql/${destdir}" ]] ; then
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
104 dodir "/usr/include/postgresql/${destdir}"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
105 fi
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
106 dosym /usr/include/postgresql/libpq-${SLOT}/${f} "/usr/include/postgresql/${destdir}/"
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
107 done
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
108 }
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
109
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
110 src_test() {
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
111 einfo "No tests available for libpq."
7985ba427c7d initial import from svn
holger@wizards.de
parents:
diff changeset
112 }