Juan Zacarias has proposed merging 
lp:~zorba-coders/zorba/read-pdf-installer-changes into lp:zorba/read-pdf-module.

Commit message:
Fixes to allows the module to be compiled as a stand alone module

Requested reviews:
  Cezar Andrei (cezar-andrei)
  Chris Hillery (ceejatec)
Related bugs:
  Bug #1102881 in Zorba: "Java modules b0rked when installed from Ubuntu PPA"
  https://bugs.launchpad.net/zorba/+bug/1102881

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/read-pdf-installer-changes/+merge/149359

Allows the module to be compiled as a stand alone module
-- 
https://code.launchpad.net/~zorba-coders/zorba/read-pdf-installer-changes/+merge/149359
Your team Zorba Coders is subscribed to branch lp:zorba/read-pdf-module.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2012-09-28 19:38:29 +0000
+++ CMakeLists.txt	2013-02-19 18:22:27 +0000
@@ -23,25 +23,58 @@
 FIND_PACKAGE (zorba_util-jvm_module QUIET)
 
 IF (zorba_util-jvm_module_FOUND)
+  FIND_PACKAGE (Zorba REQUIRED HINTS "${ZORBA_BUILD_DIR}")
+  INCLUDE ("${Zorba_USE_FILE}")
+
+  SET_CMAKE_MODULE_PATH ()
+  FIND_PACKAGE(JNI)
+  FIND_PACKAGE(Java)
+
+
   IF (JNI_FOUND)
     INCLUDE_DIRECTORIES (${zorba_util-jvm_module_INCLUDE_DIRS})
 
-    IF (WIN32)
-      SET (PDFBOX_PATH "$ENV{PDFBOX_HOME} $ENV{PDFBOX_HOME}\\lib C:\\Libs\\pdfbox-1.7.1 C:\\dev\\libraries\\pdfbox C:\\dev\\libraries\\pdfbox\\lib C:\\dev\\libraries\\pdfbox\\build")
-      MESSAGE (STATUS "pdfbox fontbox jars searching path: " ${PDFBOX_PATH} )
-    ELSE (WIN32)
-      SET (PDFBOX_PATH /usr/share/java/
+    #IF (WIN32)
+    #  SET (PDFBOX_PATH "$ENV{PDFBOX_HOME} $ENV{PDFBOX_HOME}\\lib C:\\Libs\\pdfbox-1.7.1 C:\\dev\\libraries\\pdfbox C:\\dev\\libraries\\pdfbox\\lib C:\\dev\\libraries\\pdfbox\\build")
+    #  MESSAGE (STATUS "pdfbox fontbox jars searching path: " ${PDFBOX_PATH} )
+    #ELSE (WIN32)
+    #  SET (PDFBOX_PATH /usr/share/java/
+    #                   /usr/share/java/pdfbox/ /opt/local/share/java/pdfbox/
+    #                   /usr/share/java/fontbox/ /opt/local/share/java/fontbox/
+    #                   /usr/share/java/jempbox/ /opt/local/share/java/jempbox/
+    #                   /usr/share/java/commons/ /opt/local/share/java/commons/
+    #                   ${Java_LIBRARIES})
+    #ENDIF (WIN32)
+    
+    SET (PDFBOX_PATHS)
+    IF(NOT WIN32)
+      SET (PDFBOX_PATHS /usr/share/java/
                        /usr/share/java/pdfbox/ /opt/local/share/java/pdfbox/
                        /usr/share/java/fontbox/ /opt/local/share/java/fontbox/
                        /usr/share/java/jempbox/ /opt/local/share/java/jempbox/
                        /usr/share/java/commons/ /opt/local/share/java/commons/
                        ${Java_LIBRARIES})
-    ENDIF (WIN32)
-
-    ZORBA_FIND_JAR( PDFBOX_JAR NAMES pdfbox PATHS ${PDFBOX_PATH} )
-    ZORBA_FIND_JAR( FONTBOX_JAR NAMES fontbox PATHS ${PDFBOX_PATH} )
-    ZORBA_FIND_JAR( JEMPBOX_JAR NAMES jempbox PATHS ${PDFBOX_PATH} )
-    ZORBA_FIND_JAR( COMMLOG_JAR NAMES commons-logging PATHS ${PDFBOX_PATH} )
+    ENDIF (NOT WIN32)
+
+    FIND_FILE(PDFBOX_JAR NAMES  pdfbox.jar
+              PATH ${PDFBOX_PATHS})
+    FIND_FILE(FONTBOX_JAR NAMES  fontbox.jar
+              PATH ${PDFBOX_PATHS})
+    FIND_FILE(JEMPBOX_JAR NAMES  jempbox.jar
+              PATH ${PDFBOX_PATHS})
+    FIND_FILE(COMMLOG_JAR NAMES  commons-logging.jar
+              PATH ${PDFBOX_PATHS})
+
+    #MACRO doesn not exist for Linux Installers
+    #ZORBA_FIND_JAR( PDFBOX_JAR NAMES pdfbox PATHS ${PDFBOX_PATH} )
+    #ZORBA_FIND_JAR( FONTBOX_JAR NAMES fontbox PATHS ${PDFBOX_PATH} )
+    #ZORBA_FIND_JAR( JEMPBOX_JAR NAMES jempbox PATHS ${PDFBOX_PATH} )
+    #ZORBA_FIND_JAR( COMMLOG_JAR NAMES commons-logging PATHS ${PDFBOX_PATH} )
+
+    MESSAGE(STATUS "commons-logging.jar Found in: ${COMMLOG_JAR}")
+    MESSAGE(STATUS "jempbox.jar Found in: ${JEMPBOX_JAR}")
+    MESSAGE(STATUS "fontbox.jar Found in: ${FONTBOX_JAR}")
+    MESSAGE(STATUS "pdfbox.jar Found in: ${PDFBOX_JAR}")
 
     SET(ALL_PDFBOX_JARS FALSE)
     IF(EXISTS ${PDFBOX_JAR})
@@ -64,11 +97,6 @@
       ENABLE_TESTING ()
       INCLUDE (CTest)
 
-      SET_CMAKE_MODULE_PATH ()
-
-      FIND_PACKAGE (Zorba REQUIRED HINTS "${ZORBA_BUILD_DIR}")
-      INCLUDE ("${Zorba_USE_FILE}")
-
       ADD_SUBDIRECTORY ("src")
       ADD_SUBDIRECTORY ("srcJava")
       ADD_TEST_DIRECTORY("${PROJECT_SOURCE_DIR}/test")
@@ -86,4 +114,4 @@
   MESSAGE (STATUS "Zorba's util-jvm module not found; skipping read-pdf module.")
 ENDIF (zorba_util-jvm_module_FOUND)
 
-MESSAGE (STATUS " --- End module:   read-pdf    ---")
\ No newline at end of file
+MESSAGE (STATUS " --- End module:   read-pdf    ---")

=== modified file 'cmake_modules/FindJNI.cmake'
--- cmake_modules/FindJNI.cmake	2012-09-17 19:26:21 +0000
+++ cmake_modules/FindJNI.cmake	2013-02-19 18:22:27 +0000
@@ -101,6 +101,12 @@
   ${_JAVA_HOME}/jre/lib
   ${_JAVA_HOME}/lib
   ${_JAVA_HOME}
+  /usr/lib/jvm/java-6-openjdk/jre/lib
+  /usr/lib/jvm/java-6-openjdk-i386/jre/lib
+  /usr/lib/jvm/java-6-openjdk-amd64/jre/lib
+  /usr/lib/jvm/java-6-openjdk/jre/lib/{libarch}
+  /usr/lib/jvm/java-6-openjdk-i386/jre/lib/{libarch}
+  /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/{libarch}
   /usr/lib
   /usr/local/lib
   /usr/lib/jvm/java/lib
@@ -113,7 +119,6 @@
   /usr/lib/jvm/java-6-sun/jre/lib/{libarch}
   /usr/lib/jvm/java-1.5.0-sun/jre/lib/{libarch}
   /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/{libarch}       # can this one be removed according to #8821 ? Alex
-  /usr/lib/jvm/java-6-openjdk/jre/lib/{libarch}
   /usr/lib/jvm/java-openjdk/jre/lib/{libarch}
   # Debian specific paths for default JVM
   /usr/lib/jvm/default-java/jre/lib/{libarch}
@@ -137,6 +142,9 @@
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/include"
   ${_JAVA_HOME}/include
+  /usr/lib/jvm/java-6-openjdk/include
+  /usr/lib/jvm/java-6-openjdk-amd64/include
+  /usr/lib/jvm/java-6-openjdk-i386/include
   /usr/include 
   /usr/local/include
   /usr/lib/java/include
@@ -233,6 +241,7 @@
   ${JAVA_INCLUDE_PATH}
 )
 
+
 IF (APPLE)
   # On Mac, the java headers files are broken symlinks if the Apple Developer Tools for Java are not installed
   EXECUTE_PROCESS(COMMAND cat ${JAVA_INCLUDE_PATH}/jni.h
@@ -275,5 +284,3 @@
   SET(JNI_LIBRARIES "")
   SET(JNI_INCLUDE_DIRS "")
 ENDIF (JAVA_AWT_LIBRARY AND JAVA_JVM_LIBRARY AND JAVA_INCLUDE_PATH AND JAVA_INCLUDE_PATH2 AND JAVA_AWT_INCLUDE_PATH)
-
-

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to