# ChangeLog for sci-libs/geos
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/geos/ChangeLog,v 1.21 2006/11/07 22:31:17 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/geos/ChangeLog,v 1.22 2006/12/14 20:51:32 dev-zero Exp $
+
+*geos-3.0.0_rc3 (14 Dec 2006)
+*geos-2.2.3 (14 Dec 2006)
+
+ 14 Dec 2006; Tiziano Müller <dev-zero@gentoo.org>
+ -files/geos-2.2.2-swig.patch, +files/geos-2.2.3-swig.patch,
+ -geos-2.1.4.ebuild, -geos-2.2.2.ebuild, -geos-2.2.2-r1.ebuild,
+ +geos-2.2.3.ebuild, -geos-3.0.0_rc1.ebuild, +geos-3.0.0_rc3.ebuild:
+ Version bumps. Dropped old versions. Cleanups.
07 Nov 2006; Gustavo Zacarias <gustavoz@gentoo.org> geos-2.2.1.ebuild:
Stable on sparc
--- /dev/null
+MD5 440be2b11fd3d711e950a47ea6f1b424 geos-2.2.3.tar.bz2 554802
+RMD160 968de157f96f41aa71d5ef7c28c7186e8db0939e geos-2.2.3.tar.bz2 554802
+SHA256 c781f0973dcfac7a4a3a4da1e7dbf49c5cd549f8841a3c4cd8f8feaa50b408a7 geos-2.2.3.tar.bz2 554802
--- /dev/null
+MD5 3e5a0a80568a433aec86b4929b9cab2c geos-3.0.0rc3.tar.bz2 1031379
+RMD160 36a41024be00613be4e7fe336f715bb25b638197 geos-3.0.0rc3.tar.bz2 1031379
+SHA256 8ec0a51c48d79dfe1a051bef80a6a8978205321906c5563a8dd85012f3044dd5 geos-3.0.0rc3.tar.bz2 1031379
--- /dev/null
+--- swig/geos.i.orig 2006-07-03 14:06:23.000000000 -0700
++++ swig/geos.i 2006-07-03 14:11:37.000000000 -0700
+@@ -163,7 +163,6 @@
+ %newobject GeometricShapeFactory::getEnvelope;
+
+ %newobject WKBReader::read;
+-%newobject WKBReader::readHEX;
+ %newobject WKTReader::read;
+ }
+
+@@ -183,12 +182,6 @@
+ geos::MultiPoint, geos::MultiLineString,
+ geos::MultiPolygon, geos::GeometryCollection);
+
+-%factory(geos::Geometry * geos::WKBReader::readHEX, geos::Point,
+- geos::LinearRing, geos::LineString,
+- geos::Polygon,
+- geos::MultiPoint, geos::MultiLineString,
+- geos::MultiPolygon, geos::GeometryCollection);
+-
+ %factory(geos::Geometry * geos::Geometry::downcast, geos::Point,
+ geos::LinearRing, geos::LineString,
+ geos::Polygon,
+@@ -294,32 +287,3 @@
+ objects. So create a global factory.*/
+
+ /* Add some helper methods to geometries */
+-%extend geos::Geometry {
+- static geos::GeometryFactory& factory()
+- {
+- static geos::GeometryFactory factory;
+- return factory;
+- }
+-
+- static geos::WKBReader& reader()
+- {
+- #if GEOS_VERSION_MAJOR == 2
+- static geos::WKBReader reader(geos_Geometry_factory());
+- #else
+- static geos::io::WKBReader reader(geos_Geometry_factory());
+- #endif
+- return reader;
+- }
+-
+- static Geometry* fromWKT(std::string wkt)
+- {
+- std::stringstream in(wkt);
+- return geos_Geometry_reader().read(in);
+- }
+-
+- static Geometry* fromHEX(std::string hex)
+- {
+- std::stringstream in(hex);
+- return geos_Geometry_reader().readHEX(in);
+- }
+-};
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/geos/geos-2.2.3.ebuild,v 1.1 2006/12/14 20:51:32 dev-zero Exp $
+
+USE_RUBY="ruby18"
+RUBY_OPTIONAL="yes"
+
+inherit eutils distutils ruby toolchain-funcs
+
+DESCRIPTION="Geometry Engine - Open Source"
+HOMEPAGE="http://geos.refractions.net"
+SRC_URI="http://geos.refractions.net/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc python ruby"
+
+RDEPEND="ruby? ( virtual/ruby )
+ python? ( virtual/python )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )\
+ ruby? ( >=dev-lang/swig-1.3.29 )
+ python? ( >=dev-lang/swig-1.3.29 )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-swig.patch"
+}
+
+src_compile() {
+ econf --with-pic --enable-static || die "econf failed"
+ emake || die "emake failed"
+
+ if use python; then
+ einfo "Compilling PyGEOS"
+ cd "${S}/swig/python"
+ cp "${FILESDIR}/python.i" "${S}/swig/python/"
+ rm -f geos_wrap.cxx
+ swig -c++ -python -modern -o geos_wrap.cxx ../geos.i
+ distutils_src_compile
+ fi
+ if use ruby; then
+ einfo "Compilling Ruby bindings"
+ cd "${S}/swig/ruby"
+ swig -c++ -ruby -autorename -o geos_wrap.cxx ../geos.i
+ local CXX=$(tc-getCXX)
+ local RUBY_ARCHDIR="$(ruby -r rbconfig -e 'print Config::CONFIG["archdir"]')"
+ ${CXX} ${CXXFLAGS} -I../../source/headers -I${RUBY_ARCHDIR} \
+ -fPIC -c geos_wrap.cxx
+ ${CXX} ${CXXFLAGS} -shared -L${S}/source/geom/.libs -lgeos \
+ -lruby geos_wrap.o -o geos.so
+ fi
+}
+
+src_test() {
+ cd "${S}"
+ emake check || die "Trying make check without success."
+ # I think this test must be made after the PyGEOS installation
+ #export PYTHONPATH=${S}/swig/python
+ if use python; then
+ cd ${S}/swig/python
+ python tests/runtests.py -v
+ fi
+}
+
+src_install(){
+ emake install DESTDIR="${D}" || die "emake install failed"
+
+ if use python; then
+ einfo "Installing PyGEOS"
+ cd ${S}/swig/python
+ distutils_src_install
+ insinto /usr/share/doc/${PF}/python
+ doins README.txt tests/*.py
+ insinto /usr/share/doc/${PF}/python/cases
+ doins tests/cases/*
+ fi
+ if use ruby; then
+ local RUBY_SITEARCHDIR="$(ruby -r rbconfig -e 'print Config::CONFIG["sitearchdir"]')"
+ einfo "Installing Ruby bindings in ${RUBY_SITEARCHDIR}/${PN}"
+ cd ${S}/swig/ruby
+ insinto ${RUBY_SITEARCHDIR}/${PN}
+ doins geos.so
+ insinto /usr/share/doc/${PF}/ruby
+ doins README.txt test/*.rb
+ if use doc; then
+ erubydoc
+ fi
+ fi
+ if use doc; then
+ cd ${S}/doc
+ make doxygen-html
+ dohtml -r doxygen_docs/html/*
+ fi
+ cd "${S}"
+ dodoc AUTHORS NEWS README TODO
+}
+
+pkg_postinst() {
+ if use python; then
+ python_version
+ python_mod_optimize ${ROOT}usr/bin
+ fi
+}
+
+pkg_postrm() {
+ if use python; then
+ python_version
+ python_mod_cleanup
+ fi
+}
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/geos/geos-3.0.0_rc3.ebuild,v 1.1 2006/12/14 20:51:32 dev-zero Exp $
+
+MY_P=${PN}-${PV/_/}
+
+DESCRIPTION="Geometry Engine - Open Source"
+HOMEPAGE="http://geos.refractions.net"
+SRC_URI="http://geos.refractions.net/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc ~sparc"
+IUSE="doc python ruby"
+
+RDEPEND="ruby? ( virtual/ruby )
+ python? ( virtual/python )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )\
+ ruby? ( >=dev-lang/swig-1.3.29 )
+ python? ( >=dev-lang/swig-1.3.29 )"
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ local myconf="--with-pic"
+
+ if ! use python && ! use ruby ; then
+ myconf="--disable-swig"
+ fi
+
+ econf ${myconf} \
+ $(use_enable python) \
+ $(use_enable ruby) \
+ || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ into /usr
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS NEWS README TODO
+ if use doc; then
+ cd "${S}/doc"
+ emake doxygen-html || die "doc generation failed"
+ dohtml -r doxygen_docs/html/*
+ fi
+}