Gentoo Archives: gentoo-commits

From: "Aaron Swenson (titanofold)" <titanofold@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-db/postgresql-base: postgresql-base-8.4.11.ebuild postgresql-base-9.0.7.ebuild ChangeLog postgresql-base-8.3.18.ebuild postgresql-base-9.1.3.ebuild
Date: Tue, 28 Feb 2012 01:56:08
Message-Id: 20120228015555.BD5DF2004B@flycatcher.gentoo.org
1 titanofold 12/02/28 01:55:55
2
3 Modified: ChangeLog
4 Added: postgresql-base-8.4.11.ebuild
5 postgresql-base-9.0.7.ebuild
6 postgresql-base-8.3.18.ebuild
7 postgresql-base-9.1.3.ebuild
8 Log:
9 Security bump. (Bug 406037)
10
11 (Portage version: 2.1.10.44/cvs/Linux i686)
12
13 Revision Changes Path
14 1.164 dev-db/postgresql-base/ChangeLog
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/ChangeLog?rev=1.164&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/ChangeLog?rev=1.164&content-type=text/plain
18 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/ChangeLog?r1=1.163&r2=1.164
19
20 Index: ChangeLog
21 ===================================================================
22 RCS file: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/ChangeLog,v
23 retrieving revision 1.163
24 retrieving revision 1.164
25 diff -u -r1.163 -r1.164
26 --- ChangeLog 19 Feb 2012 13:24:51 -0000 1.163
27 +++ ChangeLog 28 Feb 2012 01:55:55 -0000 1.164
28 @@ -1,6 +1,16 @@
29 # ChangeLog for dev-db/postgresql-base
30 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
31 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/ChangeLog,v 1.163 2012/02/19 13:24:51 klausman Exp $
32 +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/ChangeLog,v 1.164 2012/02/28 01:55:55 titanofold Exp $
33 +
34 +*postgresql-base-9.1.3 (28 Feb 2012)
35 +*postgresql-base-9.0.7 (28 Feb 2012)
36 +*postgresql-base-8.4.11 (28 Feb 2012)
37 +*postgresql-base-8.3.18 (28 Feb 2012)
38 +
39 + 28 Feb 2012; Aaron W. Swenson <titanofold@g.o>
40 + +postgresql-base-8.3.18.ebuild, +postgresql-base-8.4.11.ebuild,
41 + +postgresql-base-9.0.7.ebuild, +postgresql-base-9.1.3.ebuild:
42 + Security bump. (Bug 406037)
43
44 19 Feb 2012; Tobias Klausmann <klausman@g.o>
45 postgresql-base-9.1.2.ebuild:
46
47
48
49 1.1 dev-db/postgresql-base/postgresql-base-8.4.11.ebuild
50
51 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.4.11.ebuild?rev=1.1&view=markup
52 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.4.11.ebuild?rev=1.1&content-type=text/plain
53
54 Index: postgresql-base-8.4.11.ebuild
55 ===================================================================
56 # Copyright 1999-2012 Gentoo Foundation
57 # Distributed under the terms of the GNU General Public License v2
58 # $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.4.11.ebuild,v 1.1 2012/02/28 01:55:55 titanofold Exp $
59
60 EAPI="4"
61
62 WANT_AUTOMAKE="none"
63
64 inherit autotools eutils multilib prefix versionator
65
66 SLOT="$(get_version_component_range 1-2)"
67
68 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
69
70 DESCRIPTION="PostgreSQL libraries and clients"
71 HOMEPAGE="http://www.postgresql.org/"
72 SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
73 http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2"
74 LICENSE="POSTGRESQL"
75
76 S="${WORKDIR}/postgresql-${PV}"
77
78 # No tests to be done for clients and libraries
79 RESTRICT="test"
80
81 LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
82 IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
83
84 for lingua in ${LINGUAS} ; do
85 IUSE+=" linguas_${lingua}"
86 done
87
88 wanted_languages() {
89 local enable_langs
90
91 for lingua in ${LINGUAS} ; do
92 use linguas_${lingua} && enable_langs+="${lingua} "
93 done
94
95 echo -n ${enable_langs}
96 }
97
98 RDEPEND=">=app-admin/eselect-postgresql-1.0.7
99 virtual/libintl
100 !!dev-db/libpq
101 !!dev-db/postgresql
102 !!dev-db/postgresql-client
103 !!dev-db/postgresql-libs
104 kerberos? ( virtual/krb5 )
105 ldap? ( net-nds/openldap )
106 pam? ( virtual/pam )
107 readline? ( >=sys-libs/readline-4.1 )
108 ssl? ( >=dev-libs/openssl-0.9.6-r1 )
109 zlib? ( >=sys-libs/zlib-1.1.3 )"
110
111 DEPEND="${RDEPEND}
112 !!<sys-apps/sandbox-2.0
113 >=sys-devel/bison-1.875
114 sys-devel/flex
115 nls? ( sys-devel/gettext )"
116
117 PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
118
119 # Support /var/run or /run for the socket directory
120 [[ ! -d /run ]] && RUNDIR=/var
121
122 src_prepare() {
123 epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
124 "${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
125 "${WORKDIR}/SuperH.patch"
126
127 eprefixify src/include/pg_config_manual.h
128
129 # to avoid collision - it only should be installed by server
130 rm "${S}/src/backend/nls.mk"
131
132 # because psql/help.c includes the file
133 ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
134
135 sed -e "s|@RUNDIR@|${RUNDIR}|g" \
136 -i src/include/pg_config_manual.h || \
137 die "RUNDIR sed failed"
138
139 eautoconf
140 }
141
142 src_configure() {
143 export LDFLAGS_SL="${LDFLAGS}"
144 local PO="${EPREFIX%/}"
145 econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
146 --datadir="${PO}/usr/share/postgresql-${SLOT}" \
147 --docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
148 --includedir="${PO}/usr/include/postgresql-${SLOT}" \
149 --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
150 --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
151 --without-tcl \
152 --without-perl \
153 --without-python \
154 $(use_with kerberos krb5) \
155 $(use_with kerberos gssapi) \
156 $(use_with ldap) \
157 "$(use_enable nls nls "$(wanted_languages)")" \
158 $(use_with pam) \
159 $(use_enable !pg_legacytimestamp integer-datetimes ) \
160 $(use_with readline) \
161 $(use_with ssl openssl) \
162 $(use_enable threads thread-safety) \
163 $(use_with zlib)
164 }
165
166 src_compile() {
167 emake
168
169 cd "${S}/contrib"
170 emake
171 }
172
173 src_install() {
174 emake DESTDIR="${D}" install
175 insinto /usr/include/postgresql-${SLOT}/postmaster
176 doins "${S}"/src/include/postmaster/*.h
177
178 rm -r "${ED}/usr/share/doc/postgresql-${SLOT}/html"
179 rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
180 docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
181
182 dodoc README HISTORY doc/{README.*,TODO,bug.template}
183
184 cd "${S}/contrib"
185 emake DESTDIR="${D}" install
186 cd "${S}"
187
188 dodir /etc/eselect/postgresql/slots/${SLOT}
189
190 echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
191 > "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
192
193 keepdir /etc/postgresql-${SLOT}
194 }
195
196 pkg_postinst() {
197 postgresql-config update
198
199 elog "If you need a global psqlrc-file, you can place it in:"
200 elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
201 }
202
203 pkg_postrm() {
204 postgresql-config update
205 }
206
207
208
209 1.1 dev-db/postgresql-base/postgresql-base-9.0.7.ebuild
210
211 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.0.7.ebuild?rev=1.1&view=markup
212 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.0.7.ebuild?rev=1.1&content-type=text/plain
213
214 Index: postgresql-base-9.0.7.ebuild
215 ===================================================================
216 # Copyright 1999-2012 Gentoo Foundation
217 # Distributed under the terms of the GNU General Public License v2
218 # $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.0.7.ebuild,v 1.1 2012/02/28 01:55:55 titanofold Exp $
219
220 EAPI="4"
221
222 WANT_AUTOMAKE="none"
223
224 inherit autotools eutils flag-o-matic multilib prefix versionator
225
226 SLOT="$(get_version_component_range 1-2)"
227
228 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
229
230 DESCRIPTION="PostgreSQL libraries and clients"
231 HOMEPAGE="http://www.postgresql.org/"
232 SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
233 http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2"
234 LICENSE="POSTGRESQL"
235
236 S="${WORKDIR}/postgresql-${PV}"
237
238 # No tests to be done for clients and libraries
239 RESTRICT="test"
240
241 LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
242 IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
243
244 for lingua in ${LINGUAS} ; do
245 IUSE+=" linguas_${lingua}"
246 done
247
248 wanted_languages() {
249 local enable_langs
250
251 for lingua in ${LINGUAS} ; do
252 use linguas_${lingua} && enable_langs+="${lingua} "
253 done
254
255 echo -n ${enable_langs}
256 }
257
258 RDEPEND=">=app-admin/eselect-postgresql-1.0.7
259 virtual/libintl
260 !!dev-db/libpq
261 !!dev-db/postgresql
262 !!dev-db/postgresql-client
263 !!dev-db/postgresql-libs
264 kerberos? ( virtual/krb5 )
265 ldap? ( net-nds/openldap )
266 pam? ( virtual/pam )
267 readline? ( sys-libs/readline )
268 ssl? ( >=dev-libs/openssl-0.9.6-r1 )
269 zlib? ( sys-libs/zlib )"
270
271 DEPEND="${RDEPEND}
272 sys-devel/bison
273 sys-devel/flex
274 !!<sys-apps/sandbox-2.0
275 nls? ( sys-devel/gettext )"
276
277 PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
278
279 # Support /var/run or /run for the socket directory
280 [[ ! -d /run ]] && RUNDIR=/var
281
282 src_prepare() {
283 epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
284 "${WORKDIR}/bool.patch"
285
286 eprefixify src/include/pg_config_manual.h
287
288 # to avoid collision - it only should be installed by server
289 rm "${S}/src/backend/nls.mk"
290
291 # because psql/help.c includes the file
292 ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
293
294 sed -e "s|@RUNDIR@|${RUNDIR}|g" \
295 -i src/include/pg_config_manual.h || \
296 die "RUNDIR sed failed"
297
298 eautoconf
299 }
300
301 src_configure() {
302 case ${CHOST} in
303 *-darwin*|*-solaris*)
304 use nls && append-libs intl
305 ;;
306 esac
307 export LDFLAGS_SL="${LDFLAGS}"
308 export LDFLAGS_EX="${LDFLAGS}"
309 local PO="${EPREFIX%/}"
310 econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
311 --datadir="${PO}/usr/share/postgresql-${SLOT}" \
312 --docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
313 --includedir="${PO}/usr/include/postgresql-${SLOT}" \
314 --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
315 --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
316 --without-tcl \
317 --without-perl \
318 --without-python \
319 $(use_with kerberos krb5) \
320 $(use_with kerberos gssapi) \
321 $(use_with ldap) \
322 "$(use_enable nls nls "$(wanted_languages)")" \
323 $(use_with pam) \
324 $(use_enable !pg_legacytimestamp integer-datetimes) \
325 $(use_with readline) \
326 $(use_with ssl openssl) \
327 $(use_enable threads thread-safety) \
328 $(use_with zlib)
329 }
330
331 src_compile() {
332 emake
333
334 cd "${S}/contrib"
335 emake
336 }
337
338 src_install() {
339 emake DESTDIR="${D}" install
340 insinto /usr/include/postgresql-${SLOT}/postmaster
341 doins "${S}"/src/include/postmaster/*.h
342
343 dodir /usr/share/postgresql-${SLOT}/man/
344 cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
345 rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_controldata,pg_ctl,pg_resetxlog,postgres,postmaster}.1
346 docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
347
348 dodoc README HISTORY doc/{README.*,TODO,bug.template}
349
350 cd "${S}/contrib"
351 emake DESTDIR="${D}" install
352 cd "${S}"
353
354 dodir /etc/eselect/postgresql/slots/${SLOT}
355
356 echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
357 > "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
358
359 keepdir /etc/postgresql-${SLOT}
360 }
361
362 pkg_postinst() {
363 postgresql-config update
364
365 elog "If you need a global psqlrc-file, you can place it in:"
366 elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
367 }
368
369 pkg_postrm() {
370 postgresql-config update
371 }
372
373
374
375 1.1 dev-db/postgresql-base/postgresql-base-8.3.18.ebuild
376
377 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.3.18.ebuild?rev=1.1&view=markup
378 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.3.18.ebuild?rev=1.1&content-type=text/plain
379
380 Index: postgresql-base-8.3.18.ebuild
381 ===================================================================
382 # Copyright 1999-2012 Gentoo Foundation
383 # Distributed under the terms of the GNU General Public License v2
384 # $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.3.18.ebuild,v 1.1 2012/02/28 01:55:55 titanofold Exp $
385
386 EAPI="4"
387
388 WANT_AUTOMAKE="none"
389
390 inherit autotools eutils multilib prefix versionator
391
392 SLOT="$(get_version_component_range 1-2)"
393
394 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
395
396 DESCRIPTION="PostgreSQL libraries and clients"
397 HOMEPAGE="http://www.postgresql.org/"
398 SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
399 http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2"
400 LICENSE="POSTGRESQL"
401
402 S="${WORKDIR}/postgresql-${PV}"
403
404 # No tests to be done for clients and libraries
405 RESTRICT="test"
406
407 LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
408 IUSE="doc kerberos ldap nls pam pg-intdatetime readline ssl threads zlib"
409
410 for lingua in ${LINGUAS} ; do
411 IUSE+=" linguas_${lingua}"
412 done
413
414 wanted_languages() {
415 local enable_langs
416
417 for lingua in ${LINGUAS} ; do
418 use linguas_${lingua} && enable_langs+="${lingua} "
419 done
420
421 echo -n ${enable_langs}
422 }
423
424 RDEPEND=">=app-admin/eselect-postgresql-1.0.10
425 virtual/libintl
426 !!dev-db/libpq
427 !!dev-db/postgresql
428 !!dev-db/postgresql-client
429 !!dev-db/postgresql-libs
430 kerberos? ( virtual/krb5 )
431 ldap? ( net-nds/openldap )
432 pam? ( virtual/pam )
433 readline? ( >=sys-libs/readline-4.1 )
434 ssl? ( >=dev-libs/openssl-0.9.6-r1 )
435 zlib? ( >=sys-libs/zlib-1.1.3 )"
436
437 DEPEND="${RDEPEND}
438 !!<sys-apps/sandbox-2.0
439 >=sys-devel/bison-1.875
440 sys-devel/flex
441 nls? ( sys-devel/gettext )"
442
443 PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
444
445 # Support /var/run or /run for the socket directory
446 [[ ! -d /run ]] && RUNDIR=/var
447
448 src_prepare() {
449 epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
450 "${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
451 "${WORKDIR}/relax_ssl_perms.patch" "${WORKDIR}/SuperH.patch" \
452
453 eprefixify src/include/pg_config_manual.h
454
455 # to avoid collision - it only should be installed by server
456 rm "${S}/src/backend/nls.mk"
457
458 # because psql/help.c includes the file
459 ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
460
461 sed -e "s|@RUNDIR@|${RUNDIR}|g" \
462 -i src/include/pg_config_manual.h || \
463 die "RUNDIR sed failed"
464
465 eautoconf
466 }
467
468 src_configure() {
469 export LDFLAGS_SL="${LDFLAGS}"
470 local PO="${EPREFIX%/}"
471 econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
472 --datadir="${PO}/usr/share/postgresql-${SLOT}" \
473 --includedir="${PO}/usr/include/postgresql-${SLOT}" \
474 --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
475 --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
476 --without-docdir \
477 --without-perl \
478 --without-python \
479 --without-tcl \
480 $(use_with kerberos krb5) \
481 $(use_with kerberos gssapi) \
482 $(use_with ldap) \
483 "$(use_enable nls nls "$(wanted_languages)")" \
484 $(use_with pam) \
485 $(use_enable pg-intdatetime integer-datetimes ) \
486 $(use_with readline) \
487 $(use_with ssl openssl) \
488 $(use_enable threads thread-safety) \
489 $(use_with zlib)
490 }
491
492 src_compile() {
493 emake
494
495 cd "${S}/contrib"
496 emake
497 }
498
499 src_install() {
500 emake DESTDIR="${D}" install
501 insinto /usr/include/postgresql-${SLOT}/postmaster
502 doins "${S}"/src/include/postmaster/*.h
503 dodir /usr/share/postgresql-${SLOT}/man/man1
504
505 rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,ipcclean,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
506 docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
507
508 dodoc README HISTORY doc/{README.*,TODO,bug.template}
509
510 cd "${S}/contrib"
511 emake DESTDIR="${D}" install
512 cd "${S}"
513
514 dodir /etc/eselect/postgresql/slots/${SLOT}
515
516 echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
517 > "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
518
519 keepdir /etc/postgresql-${SLOT}
520 }
521
522 pkg_postinst() {
523 postgresql-config update
524
525 elog "If you need a global psqlrc-file, you can place it in:"
526 elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
527 }
528
529 pkg_postrm() {
530 postgresql-config update
531 }
532
533
534
535 1.1 dev-db/postgresql-base/postgresql-base-9.1.3.ebuild
536
537 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.1.3.ebuild?rev=1.1&view=markup
538 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.1.3.ebuild?rev=1.1&content-type=text/plain
539
540 Index: postgresql-base-9.1.3.ebuild
541 ===================================================================
542 # Copyright 1999-2012 Gentoo Foundation
543 # Distributed under the terms of the GNU General Public License v2
544 # $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.1.3.ebuild,v 1.1 2012/02/28 01:55:55 titanofold Exp $
545
546 EAPI="4"
547
548 WANT_AUTOMAKE="none"
549
550 inherit autotools eutils flag-o-matic multilib prefix versionator
551
552 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
553
554 SLOT="$(get_version_component_range 1-2)"
555 S="${WORKDIR}/postgresql-${PV}"
556
557 DESCRIPTION="PostgreSQL libraries and clients"
558 HOMEPAGE="http://www.postgresql.org/"
559 SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
560 http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2"
561 LICENSE="POSTGRESQL"
562
563 # No tests to be done for clients and libraries
564 RESTRICT="test"
565
566 LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
567 IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
568
569 for lingua in ${LINGUAS} ; do
570 IUSE+=" linguas_${lingua}"
571 done
572
573 wanted_languages() {
574 local enable_langs
575
576 for lingua in ${LINGUAS} ; do
577 use linguas_${lingua} && enable_langs+="${lingua} "
578 done
579
580 echo -n ${enable_langs}
581 }
582
583 RDEPEND="!!dev-db/libpq
584 !!dev-db/postgresql
585 !!dev-db/postgresql-client
586 !!dev-db/postgresql-libs
587 >=app-admin/eselect-postgresql-1.0.10
588 virtual/libintl
589 kerberos? ( virtual/krb5 )
590 ldap? ( net-nds/openldap )
591 pam? ( virtual/pam )
592 readline? ( sys-libs/readline )
593 ssl? ( >=dev-libs/openssl-0.9.6-r1 )
594 zlib? ( sys-libs/zlib )
595 "
596
597 DEPEND="${RDEPEND}
598 !!<sys-apps/sandbox-2.0
599 sys-devel/bison
600 sys-devel/flex
601 nls? ( sys-devel/gettext )
602 "
603
604 PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
605
606 # Support /var/run or /run for the socket directory
607 [[ ! -d /run ]] && RUNDIR=/var
608
609 src_prepare() {
610 epatch "${WORKDIR}/autoconf.patch" \
611 "${WORKDIR}/base.patch" \
612 "${WORKDIR}/bool.patch"
613
614 eprefixify src/include/pg_config_manual.h
615
616 # to avoid collision - it only should be installed by server
617 rm "${S}/src/backend/nls.mk"
618
619 # because psql/help.c includes the file
620 ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
621
622 sed -e "s|@RUNDIR@|${RUNDIR}|g" \
623 -i src/include/pg_config_manual.h || \
624 die "RUNDIR sed failed"
625
626 eautoconf
627 }
628
629 src_configure() {
630 case ${CHOST} in
631 *-darwin*|*-solaris*)
632 use nls && append-libs intl
633 ;;
634 esac
635
636 export LDFLAGS_SL="${LDFLAGS}"
637 export LDFLAGS_EX="${LDFLAGS}"
638
639 local PO="${EPREFIX%/}"
640
641 econf \
642 --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
643 --datadir="${PO}/usr/share/postgresql-${SLOT}" \
644 --docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
645 --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
646 --includedir="${PO}/usr/include/postgresql-${SLOT}" \
647 --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
648 --without-tcl \
649 --without-perl \
650 --without-python \
651 $(use_with readline) \
652 $(use_with kerberos krb5) \
653 $(use_with kerberos gssapi) \
654 "$(use_enable nls nls "$(wanted_languages)")" \
655 $(use_with pam) \
656 $(use_enable !pg_legacytimestamp integer-datetimes) \
657 $(use_with ssl openssl) \
658 $(use_enable threads thread-safety) \
659 $(use_with zlib) \
660 $(use_with ldap)
661 }
662
663 src_compile() {
664 emake -j1
665
666 cd "${S}/contrib"
667 emake
668 }
669
670 src_install() {
671 emake DESTDIR="${D}" install
672 insinto /usr/include/postgresql-${SLOT}/postmaster
673 doins "${S}"/src/include/postmaster/*.h
674
675 dodir /usr/share/postgresql-${SLOT}/man/
676 cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
677 rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
678 docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
679 dodoc README HISTORY doc/{TODO,bug.template}
680
681 cd "${S}/contrib"
682 emake DESTDIR="${D}" install
683 cd "${S}"
684
685 dodir /etc/eselect/postgresql/slots/${SLOT}
686 echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
687 "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
688
689 keepdir /etc/postgresql-${SLOT}
690 }
691
692 pkg_postinst() {
693 postgresql-config update
694
695 elog "If you need a global psqlrc-file, you can place it in:"
696 elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
697 }
698
699 pkg_postrm() {
700 postgresql-config update
701 }