[proj] 17/21: Also build the Java Native Interface bindings.
Bas Couwenberg
sebastic at xs4all.nl
Sat Apr 12 21:29:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch master
in repository proj.
commit 971a45bb422aea40b0ce1d0218e1066e210143d7
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Apr 12 15:06:05 2014 +0200
Also build the Java Native Interface bindings.
---
debian/TODO | 3 ---
debian/changelog | 2 ++
debian/control | 25 ++++++++++++++++++++++++-
debian/libproj-dev.install | 2 ++
debian/libproj-java.doc-base | 8 ++++++++
debian/libproj-java.docs | 1 +
debian/libproj-java.install | 1 +
debian/rules | 15 +++++++++++++--
8 files changed, 51 insertions(+), 6 deletions(-)
diff --git a/debian/TODO b/debian/TODO
index 0f4c731..b8ce35a 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -1,9 +1,6 @@
Maintainers TODO list
---------------------
-The tarball contains a jniwrap section. It would be nice to enable that section after java-in-main.
-Please see Java Policy and find if it needs to depen on Sun Java or what else.
-
The proj-data package is non endianess-aware due to the simple binary format produced by nad2bin.
The lla -> bin conversion should be done in postinst and the proj-data converted in a
binary all package.
diff --git a/debian/changelog b/debian/changelog
index f11be05..28dd26d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ proj (4.8.0-3) UNRELEASED; urgency=low
* Strip debian revision from symbols version.
* Empty dependency_libs in .la files.
* Add patches to fix man pages issues.
+ * Also build the Java Native Interface bindings.
+ (closes: #293803)
-- Bas Couwenberg <sebastic at xs4all.nl> Sun, 06 Apr 2014 21:02:28 +0200
diff --git a/debian/control b/debian/control
index dbbf304..94febc9 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,11 @@ Section: science
Priority: optional
Build-Depends: debhelper (>= 9),
dh-autoreconf,
- sharutils
+ sharutils,
+ default-jdk,
+ ant,
+ doxygen,
+ graphviz
Standards-Version: 3.9.3
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-grass/proj.git
Vcs-Git: git://anonscm.debian.org/pkg-grass/proj.git
@@ -86,3 +90,22 @@ Description: Cartographic projection library (tools)
point latitudes and longitudes (inverse).
.
This package provides the PROJ4 binary tools.
+
+Package: libproj-java
+Architecture: any
+Section: java
+Depends: libproj0 (= ${binary:Version}),
+ ${misc:Depends}
+Description: Cartographic projection library (JNI bindings)
+ Proj and invproj perform respective forward and inverse transformation
+ of cartographic data to or from Cartesian data with a wide range of
+ selectable projection functions (over 100 projections).
+ .
+ Geod and invgeod perform geodesic (Great Circle) computations for
+ determining latitude, longitude and back azimuth of a terminus point given
+ a initial point latitude, longitude, azimuth and distance (direct) or the
+ forward and back azimuths and distance between an initial and terminus
+ point latitudes and longitudes (inverse).
+ .
+ This package provides the Java Native Interface bindings for PROJ4.
+
diff --git a/debian/libproj-dev.install b/debian/libproj-dev.install
index 322912b..8b8ba35 100644
--- a/debian/libproj-dev.install
+++ b/debian/libproj-dev.install
@@ -2,6 +2,8 @@ usr/lib/libproj.a
usr/lib/libproj.la
usr/lib/libproj.so
usr/include/org_proj4_Projections.h
+usr/include/org_proj4_PJ.h
+usr/include/org_proj4_PJ_Type.h
usr/include/proj_api.h
usr/include/projects.h
usr/include/geodesic.h
diff --git a/debian/libproj-java.doc-base b/debian/libproj-java.doc-base
new file mode 100644
index 0000000..9678208
--- /dev/null
+++ b/debian/libproj-java.doc-base
@@ -0,0 +1,8 @@
+Document: libproj-java
+Title: JPROJ4 API Reference
+Abstract: This manual describes the Java API for PROJ.4.
+Section: Programming/Java
+
+Format: HTML
+Index: /usr/share/doc/libproj-java/html/index.html
+Files: /usr/share/doc/libproj-java/html/*.html
diff --git a/debian/libproj-java.docs b/debian/libproj-java.docs
new file mode 100644
index 0000000..8f771fa
--- /dev/null
+++ b/debian/libproj-java.docs
@@ -0,0 +1 @@
+jniwrap/docs/html/
diff --git a/debian/libproj-java.install b/debian/libproj-java.install
new file mode 100644
index 0000000..6c13573
--- /dev/null
+++ b/debian/libproj-java.install
@@ -0,0 +1 @@
+jniwrap/libs/jproj.jar usr/share/java
diff --git a/debian/rules b/debian/rules
index 3ff6b3e..9fa7a9e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,8 @@ export DH_ALWAYS_EXCLUDE=CVS:.svn
PROJ_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')
+JAVA_HOME = /usr/lib/jvm/default-java
+
CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
@@ -18,6 +20,8 @@ CFLAGS += -g
endif
# `nostrip' handled by dh_strip...
+CFLAGS += -I$(JAVA_HOME)/include/linux
+
AUTORECONF_BACKUP += INSTALL Makefile.in aclocal.m4
AUTORECONF_BACKUP += config.guess config.sub configure
AUTORECONF_BACKUP += depcomp install-sh ltmain.sh
@@ -41,13 +45,16 @@ config.status:
mv $${FILE} $${FILE}.pre-autoreconf ; \
done
dh_autoreconf
- ./configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man
+ ./configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --with-jni=$(JAVA_HOME)/include
build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: config
dh_testdir
+ if [ ! -e "jniwrap/libs/jproj.jar" ]; then \
+ dh_auto_build -Sant -Djniwrap -- do_javah jar_it do_make_help ; \
+ fi
$(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)"
touch $@
@@ -62,6 +69,7 @@ clean:
rm -f datumgrids-stamp
[ ! -f Makefile ] || $(MAKE) distclean
rm -f $(CURDIR)/debian/*.log
+ dh_auto_clean -Sant -Djniwrap
dh_autoreconf_clean
for FILE in $(AUTORECONF_BACKUP); do \
if [ -e "$${FILE}.pre-autoreconf" ]; then \
@@ -71,7 +79,8 @@ clean:
dh_clean nad/FL nad/MD nad/TN nad/WI nad/WO \
nad/alaska nad/conus nad/hawaii \
nad/null nad/prvi \
- nad/stgeorge nad/stlrnc nad/stpaul
+ nad/stgeorge nad/stlrnc nad/stpaul \
+ src/org_proj4_PJ.h src/org_proj4_PJ_Type.h
install: install-arch install-indep
@@ -85,6 +94,8 @@ install-arch-stamp: build-arch
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
cp $(CURDIR)/src/projects.h $(CURDIR)/debian/tmp/usr/include/.
cp $(CURDIR)/src/geodesic.h $(CURDIR)/debian/tmp/usr/include/.
+ cp $(CURDIR)/src/org_proj4_PJ.h $(CURDIR)/debian/tmp/usr/include/.
+ cp $(CURDIR)/src/org_proj4_PJ_Type.h $(CURDIR)/debian/tmp/usr/include/.
# Fix manpages
for man in $(CURDIR)/debian/tmp/usr/share/man/man1/*.1 $(CURDIR)/debian/tmp/usr/share/man/man3/*.3; \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/proj.git
More information about the Pkg-grass-devel
mailing list