Lines 7-24
Link Here
|
7 |
DESCRIPTION="sophisticated Object-Relational DBMS." |
7 |
DESCRIPTION="sophisticated Object-Relational DBMS." |
8 |
HOMEPAGE="http://www.postgresql.org/" |
8 |
HOMEPAGE="http://www.postgresql.org/" |
9 |
P_HIERPG="hier-Pg7.4-0.5.3" |
9 |
P_HIERPG="hier-Pg7.4-0.5.3" |
|
|
10 |
POSTGIS="postgis-0.9.1" |
10 |
SRC_URI="mirror://postgresql/source/v${PV}/${PN}-base-${PV}.tar.bz2 |
11 |
SRC_URI="mirror://postgresql/source/v${PV}/${PN}-base-${PV}.tar.bz2 |
11 |
mirror://postgresql/source/v${PV}/${PN}-opt-${PV}.tar.bz2 |
12 |
mirror://postgresql/source/v${PV}/${PN}-opt-${PV}.tar.bz2 |
12 |
doc? ( mirror://postgresql/source/v${PV}/${PN}-docs-${PV}.tar.bz2 ) |
13 |
doc? ( mirror://postgresql/source/v${PV}/${PN}-docs-${PV}.tar.bz2 ) |
13 |
pg-hier? ( ftp://gborg.postgresql.org/pub/hierpg/stable/${P_HIERPG}.tar.gz )" |
14 |
pg-hier? ( ftp://gborg.postgresql.org/pub/hierpg/stable/${P_HIERPG}.tar.gz ) |
|
|
15 |
postgis? ( http://postgis.refractions.net/${POSTGIS}.tar.gz )" |
14 |
|
16 |
|
15 |
LICENSE="POSTGRESQL" |
17 |
LICENSE="POSTGRESQL" |
16 |
SLOT="0" |
18 |
SLOT="0" |
17 |
KEYWORDS="x86 ~ppc sparc ~mips alpha ~arm hppa amd64 ~ia64 ~s390 ~ppc64" |
19 |
KEYWORDS="x86 ~ppc sparc ~mips alpha ~arm hppa amd64 ~ia64 ~s390 ~ppc64" |
18 |
IUSE="ssl nls java python tcltk perl libg++ pam readline zlib doc pg-hier pg-vacuumdelay pg-intdatetime threads" |
20 |
IUSE="ssl nls java python tcltk perl libg++ pam readline zlib doc pg-hier pg-vacuumdelay pg-intdatetime threads postgis" |
19 |
|
21 |
|
20 |
DEPEND="virtual/libc |
22 |
DEPEND="virtual/libc |
21 |
sys-devel/autoconf |
23 |
sys-devel/autoconf |
|
|
24 |
app-admin/sudo |
22 |
>=sys-libs/ncurses-5.2 |
25 |
>=sys-libs/ncurses-5.2 |
23 |
>=sys-devel/bison-1.875 |
26 |
>=sys-devel/bison-1.875 |
24 |
zlib? ( >=sys-libs/zlib-1.1.3 ) |
27 |
zlib? ( >=sys-libs/zlib-1.1.3 ) |
Lines 29-35
Link Here
|
29 |
java? ( >=virtual/jdk-1.3* >=dev-java/ant-1.3 |
32 |
java? ( >=virtual/jdk-1.3* >=dev-java/ant-1.3 |
30 |
dev-java/java-config ) |
33 |
dev-java/java-config ) |
31 |
ssl? ( >=dev-libs/openssl-0.9.6-r1 ) |
34 |
ssl? ( >=dev-libs/openssl-0.9.6-r1 ) |
32 |
nls? ( sys-devel/gettext )" |
35 |
nls? ( sys-devel/gettext ) |
|
|
36 |
postgis? ( >=sci-libs/proj-4.4.7 ) |
37 |
postgis? ( >=sci-libs/geos-2.0.0 )" |
38 |
|
33 |
# java dep workaround for portage bug |
39 |
# java dep workaround for portage bug |
34 |
# x86? ( java? ( =dev-java/sun-jdk-1.3* >=dev-java/ant-1.3 ) ) |
40 |
# x86? ( java? ( =dev-java/sun-jdk-1.3* >=dev-java/ant-1.3 ) ) |
35 |
RDEPEND="virtual/libc |
41 |
RDEPEND="virtual/libc |
Lines 37-43
Link Here
|
37 |
tcltk? ( >=dev-lang/tcl-8 ) |
43 |
tcltk? ( >=dev-lang/tcl-8 ) |
38 |
perl? ( >=dev-lang/perl-5.6.1-r2 ) |
44 |
perl? ( >=dev-lang/perl-5.6.1-r2 ) |
39 |
python? ( >=dev-lang/python-2.2 ) |
45 |
python? ( >=dev-lang/python-2.2 ) |
40 |
java? ( >=virtual/jdk-1.3* ) |
46 |
java? ( !amd64? ( >=virtual/jdk-1.3* ) ) |
41 |
ssl? ( >=dev-libs/openssl-0.9.6-r1 )" |
47 |
ssl? ( >=dev-libs/openssl-0.9.6-r1 )" |
42 |
|
48 |
|
43 |
PG_DIR="/var/lib/postgresql" |
49 |
PG_DIR="/var/lib/postgresql" |
Lines 72-77
Link Here
|
72 |
epatch ${FILESDIR}/${P}-gentoo.patch |
78 |
epatch ${FILESDIR}/${P}-gentoo.patch |
73 |
|
79 |
|
74 |
if use pg-hier; then |
80 |
if use pg-hier; then |
|
|
81 |
cd ${WORKDIR} || die |
82 |
mv readme.html README-${P_HIERPG}.html || die |
75 |
cd ${S} || die |
83 |
cd ${S} || die |
76 |
epatch ${WORKDIR}/${P_HIERPG}.diff |
84 |
epatch ${WORKDIR}/${P_HIERPG}.diff |
77 |
fi |
85 |
fi |
Lines 86-91
Link Here
|
86 |
cd ${S} |
94 |
cd ${S} |
87 |
epatch ${FILESDIR}/${P}-hppa-testandset.patch |
95 |
epatch ${FILESDIR}/${P}-hppa-testandset.patch |
88 |
fi |
96 |
fi |
|
|
97 |
|
98 |
if use postgis; then |
99 |
cd ${S} |
100 |
mv ../${POSTGIS} contrib/postgis |
101 |
cd contrib/postgis |
102 |
sed -i -e "s:PROJ_DIR=/usr/local:PROJ_DIR=/usr:g" \ |
103 |
-e "s:GEOS_DIR=/usr/local:GEOS_DIR=/usr:g" \ |
104 |
Makefile |
105 |
fi |
89 |
} |
106 |
} |
90 |
|
107 |
|
91 |
src_compile() { |
108 |
src_compile() { |
Lines 107-113
Link Here
|
107 |
use readline || myconf="$myconf --without-readline" |
124 |
use readline || myconf="$myconf --without-readline" |
108 |
use zlib || myconf="$myconf --without-zlib" |
125 |
use zlib || myconf="$myconf --without-zlib" |
109 |
use pg-intdatetime && myconf="$myconf --enable-integer-datetimes" |
126 |
use pg-intdatetime && myconf="$myconf --enable-integer-datetimes" |
110 |
use threads && myconf="$myconf --enable-thread-safety" |
|
|
111 |
|
127 |
|
112 |
# these are the only working CFLAGS I could get on ppc, so locking them |
128 |
# these are the only working CFLAGS I could get on ppc, so locking them |
113 |
# down, anything more aggressive fails (i.e. -mcpu or -Ox) |
129 |
# down, anything more aggressive fails (i.e. -mcpu or -Ox) |
Lines 117-123
Link Here
|
117 |
# Detect mips systems properly |
133 |
# Detect mips systems properly |
118 |
gnuconfig_update |
134 |
gnuconfig_update |
119 |
|
135 |
|
120 |
./configure --prefix=/usr \ |
136 |
LDFLAGS=-lstdc++ ./configure --prefix=/usr \ |
121 |
--mandir=/usr/share/man \ |
137 |
--mandir=/usr/share/man \ |
122 |
--host=${CHOST} \ |
138 |
--host=${CHOST} \ |
123 |
--docdir=/usr/share/doc/${PF} \ |
139 |
--docdir=/usr/share/doc/${PF} \ |
Lines 131-136
Link Here
|
131 |
make || die |
147 |
make || die |
132 |
cd contrib |
148 |
cd contrib |
133 |
make || die |
149 |
make || die |
|
|
150 |
if use postgis; then |
151 |
cd postgis |
152 |
make || die |
153 |
fi |
134 |
} |
154 |
} |
135 |
|
155 |
|
136 |
src_install() { |
156 |
src_install() { |
Lines 194-199
Link Here
|
194 |
insinto /etc/conf.d/ |
214 |
insinto /etc/conf.d/ |
195 |
newins ${FILESDIR}/postgresql.conf-${PV} postgresql || die |
215 |
newins ${FILESDIR}/postgresql.conf-${PV} postgresql || die |
196 |
newins ${FILESDIR}/pg_autovacuum.conf-${PV} pg_autovacuum || die |
216 |
newins ${FILESDIR}/pg_autovacuum.conf-${PV} pg_autovacuum || die |
|
|
217 |
|
218 |
if use postgis; then |
219 |
cd ${S}/contrib/postgis |
220 |
make \ |
221 |
prefix=${D}/usr \ |
222 |
mandir=${D}/usr/share/man \ |
223 |
infodir=${D}/usr/share/info \ |
224 |
libdir=${D}/usr/lib/postgresql \ |
225 |
docdir=${D}/usr/share/doc/${PN}-${PV} \ |
226 |
install || die |
227 |
cp *.sql ${D}/usr/share/${PN}/contrib |
228 |
fi |
197 |
} |
229 |
} |
198 |
|
230 |
|
199 |
pkg_postinst() { |
231 |
pkg_postinst() { |