--- /usr/portage/dev-db/postgresql/postgresql-8.0.0_rc3.ebuild 2005-01-04 08:22:07.000000000 -0500 +++ /usr/local/portage/dev-db/postgresql/postgresql-8.0.0_rc3.ebuild 2005-01-04 12:41:45.000000000 -0500 @@ -6,18 +6,20 @@ DESCRIPTION="sophisticated Object-Relational DBMS." HOMEPAGE="http://www.postgresql.org/" -#P_HIERPG="hier-Pg7.4-0.5.2" +#P_HIERPG="hier-Pg7.4-0.5.3" MY_PV=${PV/_/} MY_P=${PN}-${MY_PV} +POSTGIS="postgis-0.9.1" SRC_URI="mirror://postgresql/source/v8.0.0beta/${PN}-base-${MY_PV}.tar.bz2 mirror://postgresql/source/v8.0.0beta/${PN}-opt-${MY_PV}.tar.bz2 - doc? ( mirror://postgresql/source/v8.0.0beta/${PN}-docs-${MY_PV}.tar.bz2 )" -# pg-hier? ( http://gppl.terminal.ru/${P_HIERPG}.tar.gz )" + doc? ( mirror://postgresql/source/v8.0.0beta/${PN}-docs-${MY_PV}.tar.bz2 ) + postgis? ( http://postgis.refractions.net/${POSTGIS}.tar.gz )" +# pg-hier? ( http://gppl.terminal.ru/${P_HIERPG}.tar.gz ) LICENSE="POSTGRESQL" SLOT="0" KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~s390 ~ppc64" -IUSE="ssl nls python tcltk perl libg++ pam readline xml2 zlib doc" +IUSE="ssl nls python tcltk perl libg++ pam readline xml2 zlib doc postgis" S=${WORKDIR}/${MY_P} DEPEND="virtual/libc @@ -31,7 +33,10 @@ python? ( >=dev-lang/python-2.2 dev-python/egenix-mx-base ) ssl? ( >=dev-libs/openssl-0.9.6-r1 ) xml2? ( dev-libs/libxml2 dev-libs/libxslt ) - nls? ( sys-devel/gettext )" + nls? ( sys-devel/gettext ) + postgis? ( >=sci-libs/proj-4.4.7 ) + postgis? ( >=sci-libs/geos-2.0.0 )" + RDEPEND="virtual/libc app-admin/sudo zlib? ( >=sys-libs/zlib-1.1.3 ) @@ -61,6 +66,14 @@ src_unpack() { unpack ${A} || die epatch ${FILESDIR}/${P}-gentoo.patch + if use postgis; then + cd ${S} + mv ../${POSTGIS} contrib/postgis + cd contrib/postgis + sed -i -e "s:PROJ_DIR=/usr/local:PROJ_DIR=/usr:g" \ + -e "s:GEOS_DIR=/usr/local:GEOS_DIR=/usr:g" \ + Makefile + fi } src_compile() { @@ -86,7 +99,7 @@ # Detect mips systems properly gnuconfig_update - ./configure --prefix=/usr \ + LDFLAGS=-lstdc++ ./configure --prefix=/usr \ --mandir=/usr/share/man \ --host=${CHOST} \ --with-docdir=/usr/share/doc/${PF} \ @@ -103,6 +116,10 @@ cd xml2 make || die fi + if use postgis; then + cd postgis + make || die + fi } src_install() { @@ -127,6 +144,17 @@ if use pg-hier; then dodoc ${WORKDIR}/README-${P_HIERPG}.html || die fi + if use postgis; then + cd ${S}/contrib/postgis + make \ + prefix=${D}/usr \ + mandir=${D}/usr/share/man \ + infodir=${D}/usr/share/info \ + libdir=${D}/usr/lib/postgresql \ + docdir=${D}/usr/share/doc/${PN}-${PV} \ + install || die + cp *.sql ${D}/usr/share/${PN}/contrib + fi dodoc README HISTORY COPYRIGHT INSTALL dodoc contrib/adddepend/*