Matthias Brantner has proposed merging lp:~zorba-coders/zorba/dataf-module-fix 
into lp:zorba/data-formatting-module.

Requested reviews:
  Chris Hillery (ceejatec)
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/dataf-module-fix/+merge/105131

Fix cmake script for finding fop.jar and it's dependencies on non win boxes. 
Also, modified the test to be less strict such that it also succeeds on Mac.
-- 
https://code.launchpad.net/~zorba-coders/zorba/dataf-module-fix/+merge/105131
Your team Zorba Coders is subscribed to branch lp:zorba/data-formatting-module.
=== modified file 'src/com/zorba-xquery/www/modules/CMakeLists.txt'
--- src/com/zorba-xquery/www/modules/CMakeLists.txt	2012-04-11 16:06:04 +0000
+++ src/com/zorba-xquery/www/modules/CMakeLists.txt	2012-05-08 21:12:20 +0000
@@ -24,32 +24,33 @@
   IF (NOT DEFINED XSL_FOP_HOME)
     IF (WIN32)
       MESSAGE (STATUS "Environment variable XSL_FOP_HOME not defined, trying default: C:\\dev\\libraries\\fop-1.0")
-      SET (XSL_FOP_HOME "C:\\dev\\libraries\\fop-1.0")
+      SET (XSL_FOP_HOME "C:\\dev\\libraries\\fop-1.0 C:\\dev\\libraries\\fop-1.0\\lib")
     ELSE (WIN32)
-      MESSAGE (STATUS "Environment variable XSL_FOP_HOME not defined, trying defaults: " ${Java_LIBRARIES} " /usr/share/java/ /usr/share/java/fop/")
-      SET (XSL_FOP_HOME "/usr/share/java/ /usr/share/java/fop/ ${Java_LIBRARIES}")
+      SET (UNIX_FOP_DEFAULTS /usr/share/java/ /usr/share/java/fop/ /opt/local/share/java/fop/1.0/lib /opt/local/share/java/fop/1.0/build/ ${Java_LIBRARIES})
+      MESSAGE (STATUS "Environment variable XSL_FOP_HOME not defined, trying defaults: " ${UNIX_FOP_DEFAULTS})
+      SET (XSL_FOP_HOME ${UNIX_FOP_DEFAULTS})
     ENDIF (WIN32)
   ENDIF (NOT DEFINED XSL_FOP_HOME)
   
   STRING(REGEX REPLACE "\\\\" "/" XSL_FOP_HOME "${XSL_FOP_HOME}")
   
   MESSAGE (STATUS "XSL-FOP HOME: " ${XSL_FOP_HOME} )
-  FIND_FILE( FOP_JAR NAMES fop.jar 
-    PATHS ${XSL_FOP_HOME} ${XSL_FOP_HOME}/build )
-  FIND_FILE( FOP_D1_JAR NAMES avalon-framework.jar
-    PATHS ${XSL_FOP_HOME} ${XSL_FOP_HOME}/lib )
-  FIND_FILE( FOP_D2_JAR NAMES batik-all.jar
-    PATHS ${XSL_FOP_HOME} ${XSL_FOP_HOME}/lib )
-  FIND_FILE( FOP_D3_JAR NAMES commons-io.jar
-    PATHS ${XSL_FOP_HOME} ${XSL_FOP_HOME}/lib )
-  FIND_FILE( FOP_D4_JAR NAMES commons-logging.jar
-    PATHS ${XSL_FOP_HOME} ${XSL_FOP_HOME}/lib )
-  FIND_FILE( FOP_D5_JAR NAMES serializer.jar
-    PATHS ${XSL_FOP_HOME} ${XSL_FOP_HOME}/lib )
-  FIND_FILE( FOP_D6_JAR NAMES xalan.jar xalan2.jar
-    PATHS ${XSL_FOP_HOME} ${XSL_FOP_HOME}/lib )
-  FIND_FILE( FOP_D7_JAR NAMES xmlgraphics-commons.jar
-    PATHS ${XSL_FOP_HOME} ${XSL_FOP_HOME}/lib )
+  FIND_FILE( FOP_JAR    NAMES fop.jar
+    PATHS ${XSL_FOP_HOME} )
+  FIND_FILE( FOP_D1_JAR NAMES avalon-framework.jar avalon-framework-4.2.0.jar
+    PATHS ${XSL_FOP_HOME} )
+  FIND_FILE( FOP_D2_JAR NAMES batik-all.jar batik-all-1.7.jar
+    PATHS ${XSL_FOP_HOME} )
+  FIND_FILE( FOP_D3_JAR NAMES commons-io.jar commons-io-1.3.1.jar
+    PATHS ${XSL_FOP_HOME} )
+  FIND_FILE( FOP_D4_JAR NAMES commons-logging.jar commons-logging-1.0.4.jar
+    PATHS ${XSL_FOP_HOME} )
+  FIND_FILE( FOP_D5_JAR NAMES serializer.jar serializer-2.7.0.jar
+    PATHS ${XSL_FOP_HOME} )
+  FIND_FILE( FOP_D6_JAR NAMES xalan.jar xalan2.jar xalan-2.7.0.jar
+    PATHS ${XSL_FOP_HOME} )
+  FIND_FILE( FOP_D7_JAR NAMES xmlgraphics-commons.jar xmlgraphics-commons-1.4.jar
+    PATHS ${XSL_FOP_HOME} )
 
   #MULTIPLE EXISTS CAN'T BE USED IN AN *IF* COMMAND, LOOKS LIKE A BUG ON CMAKE
   SET(ALL_FOP FALSE)
@@ -70,8 +71,7 @@
       ENDIF ( EXISTS ${FOP_D2_JAR} )
     ENDIF ( EXISTS ${FOP_D1_JAR} )
   ENDIF ( EXISTS ${FOP_JAR} )
-  MESSAGE(STATUS "ALL_FOP:" ${ALL_FOP})
-
+  			
   IF ( ALL_FOP )
     MESSAGE(STATUS "FOP Libraries Found.")
     INCLUDE (CMakeJavaInformation )
@@ -101,5 +101,9 @@
 
   ELSE ( ALL_FOP )
     MESSAGE (STATUS "fop.jar and/or all its dependecies (avalon-framework.jar, batik-all.jar, commons-io.jar, commons-logging.jar, serializer.jar, xalan2.jar, xmlgraphics-commons.jar) not found skiping data-formating module")
+    MESSAGE ( STATUS " fop: " ${FOP_JAR} "\n    avalon: " ${FOP_D1_JAR}
+  			"\n    batik: " ${FOP_D2_JAR} "\n    io: " ${FOP_D3_JAR} 
+  			"\n    logging: " ${FOP_D4_JAR} "\n    serializer: " ${FOP_D5_JAR} "  " 
+  			"\n    xalan: " ${FOP_D6_JAR} "\n    xmlgraphics: " ${FOP_D7_JAR} )
   ENDIF ( ALL_FOP )
 

=== modified file 'test/ExpQueryResults/data-formatting/xslfo.xml.res'
--- test/ExpQueryResults/data-formatting/xslfo.xml.res	2012-03-12 22:08:04 +0000
+++ test/ExpQueryResults/data-formatting/xslfo.xml.res	2012-05-08 21:12:20 +0000
@@ -1,1 +1,1 @@
-<pdf><len>6484</len><start>JVBERi0xLj</start><end>AolJUVPRgo=</end></pdf>
+<pdf><len>true</len><start>JVBERi0xLj</start></pdf>

=== modified file 'test/Queries/data-formatting/xslfo.xq'
--- test/Queries/data-formatting/xslfo.xq	2012-03-12 22:08:04 +0000
+++ test/Queries/data-formatting/xslfo.xq	2012-05-08 21:12:20 +0000
@@ -21,7 +21,6 @@
 let $len := fn:string-length($pdf)
 return 
   <pdf>
-    <len>  { $len }</len>
+    <len>  { $len gt 6000 }</len>
     <start>{ fn:substring($pdf, 1, 10)}</start>
-    <end>  { fn:substring($pdf, $len -10, $len)}</end>
   </pdf>

-- 
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