- New branch upstream
- Fix gcc43 build
- Avoid r-path hardcoding
- Enable and include python module
- Enable and include ruby module
- Enable and run testsuite during build
----------------------------------------------------------------------
Modified Files: devel/.cvsignore devel/geos.spec devel/sources Added
Files: devel/geos-gcc43.patch Removed Files:
devel/geos-2.2.1-gcc4.patch devel/geos-config.in.patch
----------------------------------------------------------------------
This commit is contained in:
parent
8179a77f76
commit
170900e779
@ -1 +1 @@
|
||||
geos-2.2.3.tar.bz2
|
||||
geos-3.0.0.tar.bz2
|
||||
|
||||
@ -1,109 +0,0 @@
|
||||
--- geos-2.2.1.orig/source/headers/geos/geom.h 2006-01-14 14:40:33.000000000 -0800
|
||||
+++ geos-2.2.1/source/headers/geos/geom.h 2006-01-14 14:41:12.000000000 -0800
|
||||
@@ -358,52 +358,52 @@
|
||||
//double distance(Coordinate& p);
|
||||
static Coordinate nullCoord;
|
||||
|
||||
- void Coordinate::setNull() {
|
||||
+ void setNull() {
|
||||
x=DoubleNotANumber;
|
||||
y=DoubleNotANumber;
|
||||
z=DoubleNotANumber;
|
||||
}
|
||||
|
||||
- static Coordinate& Coordinate::getNull() {
|
||||
+ static Coordinate& getNull() {
|
||||
return nullCoord;
|
||||
}
|
||||
|
||||
- Coordinate::Coordinate() {
|
||||
+ Coordinate() {
|
||||
x=0.0;
|
||||
y=0.0;
|
||||
z=DoubleNotANumber;
|
||||
}
|
||||
|
||||
- Coordinate::Coordinate(double xNew, double yNew, double zNew) {
|
||||
+ Coordinate(double xNew, double yNew, double zNew) {
|
||||
x=xNew;
|
||||
y=yNew;
|
||||
z=zNew;
|
||||
}
|
||||
|
||||
#ifndef PROFILE_COORDINATE_COPIES
|
||||
- Coordinate::Coordinate(const Coordinate& c){
|
||||
+ Coordinate(const Coordinate& c){
|
||||
x=c.x;
|
||||
y=c.y;
|
||||
z=c.z;
|
||||
}
|
||||
#else
|
||||
- Coordinate::Coordinate(const Coordinate& c);
|
||||
+ Coordinate(const Coordinate& c);
|
||||
Coordinate &operator=(const Coordinate &c);
|
||||
#endif
|
||||
|
||||
- Coordinate::Coordinate(double xNew, double yNew){
|
||||
+ Coordinate(double xNew, double yNew){
|
||||
x=xNew;
|
||||
y=yNew;
|
||||
z=DoubleNotANumber;
|
||||
}
|
||||
|
||||
- void Coordinate::setCoordinate(const Coordinate& other) {
|
||||
+ void setCoordinate(const Coordinate& other) {
|
||||
x = other.x;
|
||||
y = other.y;
|
||||
z = other.z;
|
||||
}
|
||||
|
||||
- bool Coordinate::equals2D(const Coordinate& other) const {
|
||||
+ bool equals2D(const Coordinate& other) const {
|
||||
if (x != other.x) {
|
||||
return false;
|
||||
}
|
||||
@@ -413,7 +413,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
- int Coordinate::compareTo(const Coordinate& other) const {
|
||||
+ int compareTo(const Coordinate& other) const {
|
||||
if (x < other.x) {
|
||||
return -1;
|
||||
}
|
||||
@@ -429,22 +429,22 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
- bool Coordinate::equals3D(const Coordinate& other) const {
|
||||
+ bool equals3D(const Coordinate& other) const {
|
||||
return (x == other.x) && ( y == other.y) && ((z == other.z)||(ISNAN(z) && ISNAN(other.z)));
|
||||
}
|
||||
|
||||
- void Coordinate::makePrecise(const PrecisionModel *precisionModel) {
|
||||
+ void makePrecise(const PrecisionModel *precisionModel) {
|
||||
x = precisionModel->makePrecise(x);
|
||||
y = precisionModel->makePrecise(y);
|
||||
}
|
||||
|
||||
- double Coordinate::distance(const Coordinate& p) const {
|
||||
+ double distance(const Coordinate& p) const {
|
||||
double dx = x - p.x;
|
||||
double dy = y - p.y;
|
||||
return sqrt(dx * dx + dy * dy);
|
||||
}
|
||||
|
||||
- int Coordinate::hashCode() {
|
||||
+ int hashCode() {
|
||||
//Algorithm from Effective Java by Joshua Bloch [Jon Aquino]
|
||||
int result = 17;
|
||||
result = 37 * result + hashCode(x);
|
||||
@@ -456,7 +456,7 @@
|
||||
* Returns a hash code for a double value, using the algorithm from
|
||||
* Joshua Bloch's book <i>Effective Java</i>
|
||||
*/
|
||||
- static int Coordinate::hashCode(double x) {
|
||||
+ static int hashCode(double x) {
|
||||
int64 f = (int64)(x);
|
||||
return (int)(f^(f>>32));
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
--- tools/geos-config.in~ 2006-01-05 16:55:49.000000000 -0800
|
||||
+++ tools/geos-config.in 2006-01-05 16:56:33.000000000 -0800
|
||||
@@ -32,13 +32,13 @@
|
||||
echo @VERSION@
|
||||
;;
|
||||
--cflags)
|
||||
- echo -I@prefix@/include
|
||||
+ echo
|
||||
;;
|
||||
--libs)
|
||||
- echo -L@prefix@/lib -lgeos
|
||||
+ echo -lgeos
|
||||
;;
|
||||
--ldflags)
|
||||
- echo -L@prefix@/lib
|
||||
+ echo
|
||||
;;
|
||||
--includes)
|
||||
echo @prefix@/include
|
||||
177
geos-gcc43.patch
Normal file
177
geos-gcc43.patch
Normal file
@ -0,0 +1,177 @@
|
||||
--- source/index/quadtree/DoubleBits.cpp.orig 2008-04-20 14:38:13.000000000 +0300
|
||||
+++ source/index/quadtree/DoubleBits.cpp 2008-04-20 14:39:29.000000000 +0300
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <geos/index/quadtree/DoubleBits.h>
|
||||
#include <geos/util/IllegalArgumentException.h>
|
||||
|
||||
-#include <string>
|
||||
+#include <cstring>
|
||||
|
||||
#if __STDC_IEC_559__
|
||||
#define ASSUME_IEEE_DOUBLE 1
|
||||
--- source/io/StringTokenizer.cpp.orig 2008-04-20 14:40:50.000000000 +0300
|
||||
+++ source/io/StringTokenizer.cpp 2008-04-20 14:41:56.000000000 +0300
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <geos/io/StringTokenizer.h>
|
||||
|
||||
+#include <cstdlib>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
--- source/io/ByteOrderValues.cpp.orig 2008-04-20 14:43:01.000000000 +0300
|
||||
+++ source/io/ByteOrderValues.cpp 2008-04-20 14:43:25.000000000 +0300
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <geos/util.h>
|
||||
|
||||
#include <cassert>
|
||||
+#include <cstring>
|
||||
|
||||
namespace geos {
|
||||
namespace io { // geos.io
|
||||
--- source/noding/FastNodingValidator.cpp.orig 2008-04-20 14:45:05.000000000 +0300
|
||||
+++ source/noding/FastNodingValidator.cpp 2008-04-20 14:47:11.000000000 +0300
|
||||
@@ -17,12 +17,13 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
-#include <geos/noding/FastNodingValidator.h>
|
||||
+
|
||||
#include <geos/noding/MCIndexNoder.h> // for checkInteriorIntersections()
|
||||
#include <geos/noding/SingleInteriorIntersectionFinder.h>
|
||||
#include <geos/util/TopologyException.h> // for checkValid()
|
||||
#include <geos/geom/Coordinate.h>
|
||||
#include <geos/io/WKTWriter.h> // for getErrorMessage()
|
||||
+#include <geos/noding/FastNodingValidator.h>
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
--- source/headers/geos/noding/IntersectionAdder.h.orig 2008-04-20 14:51:53.000000000 +0300
|
||||
+++ source/headers/geos/noding/IntersectionAdder.h 2008-04-20 14:55:11.000000000 +0300
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <cmath> // for abs()
|
||||
+#include <cstdlib>
|
||||
|
||||
#include <geos/inline.h>
|
||||
|
||||
--- source/operation/buffer/OffsetCurveSetBuilder.cpp.orig 2008-04-20 14:59:03.000000000 +0300
|
||||
+++ source/operation/buffer/OffsetCurveSetBuilder.cpp 2008-04-20 14:59:25.000000000 +0300
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <geos/geomgraph/Label.h>
|
||||
#include <geos/noding/SegmentString.h>
|
||||
|
||||
+#include <typeinfo>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
--- source/operation/distance/ConnectedElementPointFilter.cpp.orig 2008-04-20 15:00:20.000000000 +0300
|
||||
+++ source/operation/distance/ConnectedElementPointFilter.cpp 2008-04-20 15:00:34.000000000 +0300
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <geos/geom/LineString.h>
|
||||
#include <geos/geom/Polygon.h>
|
||||
|
||||
+#include <typeinfo>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
--- source/planargraph/DirectedEdge.cpp.orig 2008-04-20 15:02:04.000000000 +0300
|
||||
+++ source/planargraph/DirectedEdge.cpp 2008-04-20 15:02:19.000000000 +0300
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <geos/geomgraph/Quadrant.h>
|
||||
#include <geos/algorithm/CGAlgorithms.h>
|
||||
|
||||
+#include <typeinfo>
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
--- source/geomgraph/EdgeNodingValidator.cpp.orig 2008-04-20 15:03:37.000000000 +0300
|
||||
+++ source/geomgraph/EdgeNodingValidator.cpp 2008-04-20 15:03:44.000000000 +0300
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
+#include <geos/geom/CoordinateSequence.h>
|
||||
#include <geos/geomgraph/EdgeNodingValidator.h>
|
||||
#include <geos/geomgraph/Edge.h>
|
||||
#include <geos/noding/SegmentString.h>
|
||||
-#include <geos/geom/CoordinateSequence.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace geos::noding;
|
||||
--- source/geomgraph/GeometryGraph.cpp.orig 2008-04-20 15:04:36.000000000 +0300
|
||||
+++ source/geomgraph/GeometryGraph.cpp 2008-04-20 15:04:50.000000000 +0300
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
#include <geos/inline.h>
|
||||
|
||||
+#include <typeinfo>
|
||||
#include <vector>
|
||||
#include <memory> // auto_ptr
|
||||
#include <cassert>
|
||||
--- source/precision/SimpleGeometryPrecisionReducer.cpp.orig 2008-04-20 15:05:36.000000000 +0300
|
||||
+++ source/precision/SimpleGeometryPrecisionReducer.cpp 2008-04-20 15:05:47.000000000 +0300
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <geos/geom/LineString.h>
|
||||
#include <geos/geom/LinearRing.h>
|
||||
|
||||
+#include <typeinfo>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
--- doc/example.cpp.orig 2008-04-20 15:06:43.000000000 +0300
|
||||
+++ doc/example.cpp 2008-04-20 15:07:38.000000000 +0300
|
||||
@@ -28,6 +28,7 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
+#include <cstdlib>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
--- tests/bigtest/TestSweepLineSpeed.cpp.orig 2008-04-20 15:09:01.000000000 +0300
|
||||
+++ tests/bigtest/TestSweepLineSpeed.cpp 2008-04-20 15:09:26.000000000 +0300
|
||||
@@ -88,7 +88,7 @@
|
||||
// cout << "n Pts: " << nPts << " Executed in " << totalTime << endl;
|
||||
}
|
||||
|
||||
-int main(int /* argC */, char* /* argV[] */) {
|
||||
+int main(int /* argC */, char** /* argV[] */) {
|
||||
|
||||
GeometryFactory *fact=new GeometryFactory();
|
||||
|
||||
--- tests/xmltester/XMLTester.cpp.orig 2008-04-20 15:10:47.000000000 +0300
|
||||
+++ tests/xmltester/XMLTester.cpp 2008-04-20 15:16:59.000000000 +0300
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
//#define _CRTDBG_MAP_ALLOC
|
||||
//#include <stdlib.h>
|
||||
+#include <cstring>
|
||||
#ifdef _MSC_VER
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
--- tests/xmltester/markup/MarkupSTL.cpp.orig 2008-04-20 15:17:52.000000000 +0300
|
||||
+++ tests/xmltester/markup/MarkupSTL.cpp 2008-04-20 15:19:43.000000000 +0300
|
||||
@@ -8,8 +8,9 @@
|
||||
// Use in commercial applications requires written permission
|
||||
// This software is provided "as is", with no warranty.
|
||||
|
||||
-#include "MarkupSTL.h"
|
||||
+#include <string.h>
|
||||
#include <stdio.h>
|
||||
+#include "MarkupSTL.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
--- tests/unit/geos_unit.cpp.orig 2008-04-20 16:51:51.000000000 +0300
|
||||
+++ tests/unit/geos_unit.cpp 2008-04-20 16:52:14.000000000 +0300
|
||||
@@ -4,6 +4,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#include <cstdlib>
|
||||
+
|
||||
// TUT
|
||||
#include <tut.h>
|
||||
#include <tut_reporter.h>
|
||||
87
geos.spec
87
geos.spec
@ -1,14 +1,19 @@
|
||||
Name: geos
|
||||
Version: 2.2.3
|
||||
Release: 2%{?dist}
|
||||
Version: 3.0.0
|
||||
Release: 1%{?dist}
|
||||
Summary: GEOS is a C++ port of the Java Topology Suite
|
||||
|
||||
Group: Applications/Engineering
|
||||
License: LGPL
|
||||
License: LGPLv2
|
||||
URL: http://geos.refractions.net
|
||||
Source0: http://geos.refractions.net/%{name}-%{version}.tar.bz2
|
||||
Patch0: geos-gcc43.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: doxygen swig libtool
|
||||
BuildRequires: python-devel ruby-devel
|
||||
|
||||
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
%{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')}
|
||||
|
||||
%description
|
||||
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology
|
||||
@ -32,11 +37,44 @@ functions such as IsValid()
|
||||
This package contains the development files to build applications that
|
||||
use GEOS
|
||||
|
||||
%package python
|
||||
Summary: Python modules for GEOS
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")
|
||||
|
||||
%description python
|
||||
Python module to build applications using GEOS and python
|
||||
|
||||
%package ruby
|
||||
Summary: Ruby modules for GEOS
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: ruby(abi) = 1.8
|
||||
|
||||
%description ruby
|
||||
Ruby module to build applications using GEOS and ruby
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .gcc43
|
||||
|
||||
%build
|
||||
%configure --disable-static --disable-dependency-tracking
|
||||
|
||||
# fix python path on 64bit
|
||||
sed -i -e 's|\/lib\/python|$libdir\/python|g' configure
|
||||
sed -i -e 's|.get_python_lib(0|.get_python_lib(1|g' configure
|
||||
|
||||
# disable internal libtool to avoid hardcoded r-path
|
||||
for makefile in `find . -type f -name 'Makefile.in'`; do
|
||||
sed -i 's|@LIBTOOL@|%{_bindir}/libtool|g' $makefile
|
||||
done
|
||||
|
||||
%configure --disable-static --disable-dependency-tracking \
|
||||
--enable-python \
|
||||
--enable-ruby
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
# Make doxygen documentation files
|
||||
@ -45,7 +83,12 @@ make doxygen-html
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%makeinstall
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
%check
|
||||
|
||||
# test module
|
||||
make %{?_smp_mflags} check || exit 0
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -57,18 +100,46 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING NEWS README TODO
|
||||
%{_libdir}/libgeos*.so.*
|
||||
%{_libdir}/libgeos-%{version}.so
|
||||
%{_libdir}/libgeos_c.so.*
|
||||
%exclude %{_libdir}/*.a
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc doc/doxygen_docs
|
||||
%{_bindir}/geos-config
|
||||
%{_includedir}/*
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/libgeos.so
|
||||
%{_libdir}/libgeos_c.so
|
||||
%exclude %{_bindir}/XMLTester
|
||||
%exclude %{_libdir}/*.la
|
||||
%exclude %{_libdir}/*.a
|
||||
|
||||
%files python
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{python_sitearch}/%{name}
|
||||
%exclude %{python_sitearch}/%{name}/_%{name}.a
|
||||
%exclude %{python_sitearch}/%{name}/_%{name}.la
|
||||
%{python_sitearch}/%{name}.pth
|
||||
%{python_sitearch}/%{name}/*.py
|
||||
%{python_sitearch}/%{name}/*.py?
|
||||
%{python_sitearch}/%{name}/_%{name}.so
|
||||
|
||||
%files ruby
|
||||
%defattr(-,root,root,-)
|
||||
%exclude %{ruby_sitearch}/%{name}.a
|
||||
%exclude %{ruby_sitearch}/%{name}.la
|
||||
%{ruby_sitearch}/%{name}.so
|
||||
|
||||
%changelog
|
||||
* Sun Apr 20 2008 Balint Cristian <rezso@rdsor.ro> - 3.0.0-1
|
||||
- New branch upstream
|
||||
- Fix gcc43 build
|
||||
- Avoid r-path hardcoding
|
||||
- Enable and include python module
|
||||
- Enable and include ruby module
|
||||
- Enable and run testsuite during build
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2.3-2
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user