[DebianGIS-dev] r2495 - in packages/jts/trunk/debian: . patches
frankie at alioth.debian.org
frankie at alioth.debian.org
Thu Sep 24 10:17:31 UTC 2009
Author: frankie
Date: 2009-09-24 10:17:31 +0000 (Thu, 24 Sep 2009)
New Revision: 2495
Added:
packages/jts/trunk/debian/patches/
packages/jts/trunk/debian/patches/0_IndexedPointInAreaLocator.diff
Modified:
packages/jts/trunk/debian/README.source
packages/jts/trunk/debian/changelog
packages/jts/trunk/debian/control
packages/jts/trunk/debian/rules
Log:
Supporting 1.10
Modified: packages/jts/trunk/debian/README.source
===================================================================
--- packages/jts/trunk/debian/README.source 2009-09-23 19:32:52 UTC (rev 2494)
+++ packages/jts/trunk/debian/README.source 2009-09-24 10:17:31 UTC (rev 2495)
@@ -1,16 +1,17 @@
jts for Debian
--------------
-As upstream only distributes as binary/source combination zip file
-I do repackaging to remove the binary parts:
+The dfsg source can be downloaded and built by running:
-- unzip jts-<version>.zip into a jts-<version> directory
-- rm -Rf lib - to remove the prebuild and dependency runtime libraries
-- rm -Rf doc/javadoc - to remove the javadoc
-- build the jts_<version>.orig.tar.gz
+debian/rules create-orig-tar
- -- Wolfgang Baer <WBaer at gmx.de>, Thu, 27 Jan 2005 10:38:29 +0100
+This rule creates the final original tarball, with various cleanups
+and move it under ../tarballs. Note that it does not include an ANT
+build.xml, it needs to be taken from the project CVS and adapted.
+Also note that the original upstream stuff provides pre-built .jar
+files for JTS and its pre-dependencies, and Javadoc compiled doc.
+At every new release I found one or more issues in rebuilding
+from scratch the whole stuff, so be warned and consult the
+development mailing list.
-Removed PDF documentation and oracle stuff starting from 1.7
-
- -- Francesco Paolo Lovergine <frankie at debian.org>, Sat, 16 Jun 2007 00:31:55 +0100
+ -- Francesco Paolo Lovergine <frankie at debian.org>, Thu Sep 24 12:04:25 CEST 2009
Modified: packages/jts/trunk/debian/changelog
===================================================================
--- packages/jts/trunk/debian/changelog 2009-09-23 19:32:52 UTC (rev 2494)
+++ packages/jts/trunk/debian/changelog 2009-09-24 10:17:31 UTC (rev 2495)
@@ -1,8 +1,14 @@
-jts (1.8.0-1) UNRELEASED; urgency=low
+jts (1.10-1) unstable; urgency=low
- * New upstream release
+ * New upstream release.
+ * Updated Homepage field.
+ * Introduced a proper debian/README.source file.
+ * Added some custom rules to facilitate tarball creation.
+ * Added simple-patchsys support for cdbs.
+ * Added a simple patch to remove a duplicated source file in 1.10.
+ * Added dependencies on xerces-java and jdom, which are required at run-time.
- -- Francesco Paolo Lovergine <frankie at debian.org> Tue, 22 Sep 2009 14:40:45 +0200
+ -- Francesco Paolo Lovergine <frankie at debian.org> Tue, 22 Sep 2009 21:31:35 +0200
jts (1.7-2) unstable; urgency=low
Modified: packages/jts/trunk/debian/control
===================================================================
--- packages/jts/trunk/debian/control 2009-09-23 19:32:52 UTC (rev 2494)
+++ packages/jts/trunk/debian/control 2009-09-24 10:17:31 UTC (rev 2495)
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
Uploaders: Francesco Paolo Lovergine <frankie at debian.org>
-Build-Depends: debhelper (>= 7), cdbs, ant, default-jdk
+Build-Depends: debhelper (>= 7), cdbs, ant, default-jdk, patchutils
Standards-Version: 3.8.3
Homepage: http://tsusiatsoftware.net/jts/main.html
Vcs-Browser: http://svn.debian.org/wsvn/pkg-grass/packages/jts/
@@ -12,9 +12,9 @@
Package: libjts-java
Architecture: all
Section: java
-Depends: default-jre-headless | default-jre, ${misc:Depends}
+Depends: default-jre-headless | default-jre, ${misc:Depends}, libjdom1-java, libxerces2-java
Suggests: libjts-java-doc
-Description: Java Topology Suite
+Description: JTS Topology Suite
JTS is a java library which provides:
* an implementation of the spatial data model defined
in the OGC Simple Features Specification for SQL (SFS)
@@ -29,8 +29,8 @@
Section: doc
Depends: ${misc:Depends}
Suggests: libjts-java
-Description: Documentation for the Java Topology Suite JTS
- Documentation for programmers:
+Description: Documentation for the JTS Topology Suite
+ This package includes documentation for programmers:
* javadoc for libjts-java
- * developer guide
- * technical Specifications etc
+ * developer's guide
+ * technical specifications
Added: packages/jts/trunk/debian/patches/0_IndexedPointInAreaLocator.diff
===================================================================
--- packages/jts/trunk/debian/patches/0_IndexedPointInAreaLocator.diff (rev 0)
+++ packages/jts/trunk/debian/patches/0_IndexedPointInAreaLocator.diff 2009-09-24 10:17:31 UTC (rev 2495)
@@ -0,0 +1,176 @@
+diff -Nur -x '*.orig' -x '*~' jts-1.10/src/com/vividsolutions/jts/algorithm/IndexedPointInAreaLocator.java jts-1.10.new/src/com/vividsolutions/jts/algorithm/IndexedPointInAreaLocator.java
+--- jts-1.10/src/com/vividsolutions/jts/algorithm/IndexedPointInAreaLocator.java 2007-07-24 15:52:54.000000000 +0200
++++ jts-1.10.new/src/com/vividsolutions/jts/algorithm/IndexedPointInAreaLocator.java 1970-01-01 01:00:00.000000000 +0100
+@@ -1,172 +0,0 @@
+-/*
+- * The JTS Topology Suite is a collection of Java classes that
+- * implement the fundamental operations required to validate a given
+- * geo-spatial data set to a known topological specification.
+- *
+- * Copyright (C) 2001 Vivid Solutions
+- *
+- * This library is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public
+- * License as published by the Free Software Foundation; either
+- * version 2.1 of the License, or (at your option) any later version.
+- *
+- * This library is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with this library; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+- *
+- * For more information, contact:
+- *
+- * Vivid Solutions
+- * Suite #1A
+- * 2328 Government Street
+- * Victoria BC V8T 5G5
+- * Canada
+- *
+- * (250)385-6040
+- * www.vividsolutions.com
+- */
+-package com.vividsolutions.jts.algorithm;
+-
+-import java.util.*;
+-
+-import com.vividsolutions.jts.geom.*;
+-import com.vividsolutions.jts.geom.util.*;
+-import com.vividsolutions.jts.index.*;
+-import com.vividsolutions.jts.index.intervalrtree.*;
+-
+-/**
+- * Determines the location of {@link Coordinate}s relative to
+- * a {@link Polygonal} geometry, using indexing for efficiency.
+- * This algorithm is suitable for use in cases where
+- * many points will be tested against a given area.
+- *
+- * @author Martin Davis
+- *
+- */
+-public class IndexedPointInAreaLocator
+- implements PointInAreaLocator
+-{
+- private Geometry areaGeom;
+- private IntervalIndexedGeometry index;
+-
+- /**
+- * Creates a new locator for a given {@link Geometry}
+- * @param g the Geometry to locate in
+- */
+- public IndexedPointInAreaLocator(Geometry g)
+- {
+- areaGeom = g;
+- if (! (g instanceof Polygonal))
+- throw new IllegalArgumentException("Argument must be Polygonal");
+- buildIndex(g);
+- }
+-
+- private void buildIndex(Geometry g)
+- {
+- index = new IntervalIndexedGeometry(g);
+- }
+-
+- /**
+- * Determines the {@link Location} of a point in an areal {@link Geometry}.
+- *
+- * @param p the point to test
+- * @return the location of the point in the geometry
+- */
+- public int locate(Coordinate p)
+- {
+- RayCrossingCounter rcc = new RayCrossingCounter(p);
+-
+-
+- SegmentVisitor visitor = new SegmentVisitor(rcc);
+- index.query(p.y, p.y, visitor);
+-
+- /*
+- // MD - slightly slower alternative
+- List segs = index.query(p.y, p.y);
+- countSegs(rcc, segs);
+- */
+-
+- return rcc.getLocation();
+- }
+-
+- /*
+- private void countSegs(RayCrossingCounter rcc, List segs)
+- {
+- for (Iterator i = segs.iterator(); i.hasNext(); ) {
+- LineSegment seg = (LineSegment) i.next();
+- rcc.countSegment(seg.getCoordinate(0), seg.getCoordinate(1));
+-
+- // short-circuit if possible
+- if (rcc.isOnSegment()) return;
+- }
+- }
+- */
+-
+- private static class SegmentVisitor
+- implements ItemVisitor
+- {
+- private RayCrossingCounter counter;
+-
+- public SegmentVisitor(RayCrossingCounter counter)
+- {
+- this.counter = counter;
+- }
+-
+- public void visitItem(Object item)
+- {
+- LineSegment seg = (LineSegment) item;
+- counter.countSegment(seg.getCoordinate(0), seg.getCoordinate(1));
+- }
+- }
+-
+- private static class IntervalIndexedGeometry
+- {
+- private SortedPackedIntervalRTree index= new SortedPackedIntervalRTree();
+-
+- public IntervalIndexedGeometry(Geometry geom)
+- {
+- init(geom);
+- }
+-
+- private void init(Geometry geom)
+- {
+- List lines = LinearComponentExtracter.getLines(geom);
+- for (Iterator i = lines.iterator(); i.hasNext(); ) {
+- LineString line = (LineString) i.next();
+- Coordinate[] pts = line.getCoordinates();
+- addLine(pts);
+- }
+- }
+-
+- private void addLine(Coordinate[] pts)
+- {
+- for (int i = 1; i < pts.length; i++) {
+- LineSegment seg = new LineSegment(pts[i-1], pts[i]);
+- double min = Math.min(seg.p0.y, seg.p1.y);
+- double max = Math.max(seg.p0.y, seg.p1.y);
+- index.insert(min, max, seg);
+- }
+- }
+-
+- public List query(double min, double max)
+- {
+- ArrayListVisitor visitor = new ArrayListVisitor();
+- index.query(min, max, visitor);
+- return visitor.getItems();
+- }
+-
+- public void query(double min, double max, ItemVisitor visitor)
+- {
+- index.query(min, max, visitor);
+- }
+- }
+-
+-}
+-
+-
+-
Modified: packages/jts/trunk/debian/rules
===================================================================
--- packages/jts/trunk/debian/rules 2009-09-23 19:32:52 UTC (rev 2494)
+++ packages/jts/trunk/debian/rules 2009-09-24 10:17:31 UTC (rev 2495)
@@ -3,6 +3,7 @@
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
export UPSTREAM_VERSION = $(shell head -1 debian/changelog | cut -f2 -d\( | cut -f1 -d\) | cut -f1 -d\-)
@@ -13,7 +14,30 @@
DEB_JARS := $(ANT_HOME)/lib/ant-launcher.jar
DEB_ANT_BUILDFILE := debian/build.xml
DEB_ANT_BUILD_TARGET := all
+DEB_PATCHDIRS = debian/patches
+DEB_PATCH_SUFFIX = .diff
install/libjts-java::
install -m 644 target/jts.jar debian/libjts-java/usr/share/java/jts-$(UPSTREAM_VERSION).jar
ln -s jts-$(UPSTREAM_VERSION).jar debian/libjts-java/usr/share/java/jts.jar
+
+#
+# Custom rule to create a clean tarball
+#
+
+download-upstream:
+ -mkdir $(CURDIR)/upstream
+ wget -O $(CURDIR)/upstream/jts-$(UPSTREAM_VERSION).zip \
+ http://downloads.sourceforge.net/project/jts-topo-suite/jts/$(UPSTREAM_VERSION)/jts-$(UPSTREAM_VERSION).zip?use_mirror=garr
+
+create-orig-tar: download-upstream
+ cd $(CURDIR)/upstream && unzip -u -d jts-$(UPSTREAM_VERSION) jts-$(UPSTREAM_VERSION).zip && \
+ rm -rf jts-$(UPSTREAM_VERSION)/lib && rm -rf jts-$(UPSTREAM_VERSION)/doc/javadoc && \
+ find jts-$(UPSTREAM_VERSION)/doc -name "*.pdf" -delete && \
+ tar czvf jts_$(UPSTREAM_VERSION).orig.tar.gz jts-$(UPSTREAM_VERSION) && \
+ rm -rf jts-$(UPSTREAM_VERSION) jts-$(UPSTREAM_VERSION).zip
+ -mkdir $(CURDIR)/../tarballs
+ mv $(CURDIR)/upstream/jts_$(UPSTREAM_VERSION).orig.tar.gz $(CURDIR)/../tarballs/.
+ rmdir $(CURDIR)/upstream
+
+.PHONY: download-upstream create-orig-tar
More information about the Pkg-grass-devel
mailing list