sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1801493 - in /sis/branches/JDK8/storage/sis-gdal/src: main/Makefile main/c/Makefile main/c/org_apache_sis_storage_gdal_PJ.c test/java/org/apache/sis/storage/gdal/PJTest.java
Date Mon, 10 Jul 2017 16:56:52 GMT
Author: desruisseaux
Date: Mon Jul 10 16:56:52 2017
New Revision: 1801493

URL: http://svn.apache.org/viewvc?rev=1801493&view=rev
Log:
Identifies some platform-specific issues in the Makefile.

Added:
    sis/branches/JDK8/storage/sis-gdal/src/main/c/Makefile
      - copied, changed from r1801492, sis/branches/JDK8/storage/sis-gdal/src/main/Makefile
Removed:
    sis/branches/JDK8/storage/sis-gdal/src/main/Makefile
Modified:
    sis/branches/JDK8/storage/sis-gdal/src/main/c/org_apache_sis_storage_gdal_PJ.c
    sis/branches/JDK8/storage/sis-gdal/src/test/java/org/apache/sis/storage/gdal/PJTest.java

Copied: sis/branches/JDK8/storage/sis-gdal/src/main/c/Makefile (from r1801492, sis/branches/JDK8/storage/sis-gdal/src/main/Makefile)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-gdal/src/main/c/Makefile?p2=sis/branches/JDK8/storage/sis-gdal/src/main/c/Makefile&p1=sis/branches/JDK8/storage/sis-gdal/src/main/Makefile&r1=1801492&r2=1801493&rev=1801493&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-gdal/src/main/Makefile (original)
+++ sis/branches/JDK8/storage/sis-gdal/src/main/c/Makefile Mon Jul 10 16:56:52 2017
@@ -1,10 +1,43 @@
-FLAG=-shared -fPIC
-INCLUDE_DIR=-I$(JAVA_HOME)include -I$(JAVA_HOME)include/linux -I/home/amiotj/Documents/geomatys/proj.4/src
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# Compile the native part of the bindings to Proj.4.  This build process requires the Proj.4
library to be installed
+# on the current platform, preferably by the platform packaging mechanism (e.g. synaptic
packages on Ubuntu, macport
+# on MacOS, etc). The Proj.4 header files are expected to be found either in the "/usr/local/include"
directory (for
+# example on Linux distributions), or "/opt/local/include" on some other platforms.
+#
+# Options reminder:
+#    -shared		Produce a shared object which can then be linked with other objects to form
an executable.
+#    -shared-libgcc	Use the shared version of libgcc.
+#    -fpic		Generate position-independent code suitable for use in a shared library.
+#    -O2		Performs nearly all supported optimizations that do not involve a space-speed tradeoff.
+#
+FLAG=-shared -shared-libgcc -fpic -O2
+
+# TODO: include either "linux" or "darwnin" but not both.
+INCLUDE_DIR=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(JAVA_HOME)/include/darwin
-I/usr/local/include -I/opt/local/include
+
+#TODO: MacOS needs -L/opt/local/lib
 LIB=-lm -ldl -lproj
-SRC=c/org_apache_sis_storage_gdal_PJ.c
+SRC=org_apache_sis_storage_gdal_PJ.c
 OUT=libproj-binding.so
 
 
 all:
-	gcc $(FLAG) -o $(OUT) $(SRC) $(INCLUDE_DIR) $(LIB)
-	mv $(OUT) resources/
+	gcc $(FLAG) $(INCLUDE_DIR) $(LIB) -o $(OUT) $(SRC)
+	mv $(OUT) ../resources/

Modified: sis/branches/JDK8/storage/sis-gdal/src/main/c/org_apache_sis_storage_gdal_PJ.c
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-gdal/src/main/c/org_apache_sis_storage_gdal_PJ.c?rev=1801493&r1=1801492&r2=1801493&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-gdal/src/main/c/org_apache_sis_storage_gdal_PJ.c [UTF-8]
(original)
+++ sis/branches/JDK8/storage/sis-gdal/src/main/c/org_apache_sis_storage_gdal_PJ.c [UTF-8]
Mon Jul 10 16:56:52 2017
@@ -14,11 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <proj_config.h>
 #include <math.h>
 #include <string.h>
 #include <projects.h>
-#include <stdbool.h>
 #include <jni.h>
 #include "org_apache_sis_storage_gdal_PJ.h"
 
@@ -27,7 +25,6 @@
 #define PJ_FIELD_TYPE "J"
 
 
-
 /*!
  * \brief
  * Internal method returning the address of the PJ structure wrapped by the given Java object.

Modified: sis/branches/JDK8/storage/sis-gdal/src/test/java/org/apache/sis/storage/gdal/PJTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-gdal/src/test/java/org/apache/sis/storage/gdal/PJTest.java?rev=1801493&r1=1801492&r2=1801493&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-gdal/src/test/java/org/apache/sis/storage/gdal/PJTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-gdal/src/test/java/org/apache/sis/storage/gdal/PJTest.java
[UTF-8] Mon Jul 10 16:56:52 2017
@@ -72,7 +72,7 @@ public class PJTest {
      *
      * @throws TransformException should never happen.
      */
-//    @Test(expected = NullPointerException.class)
+    @Test(expected = NullPointerException.class)
     public void testNullPointerException() throws TransformException {
         final PJ pj = new PJ("+proj=latlong +datum=WGS84");
         pj.transform(null, 2, null, 0, 1);



Mime
View raw message