harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r672283 - in /harmony/enhanced/classlib/trunk: make/ modules/awt/src/main/native/gl/unix/ modules/awt/src/main/native/jpegdecoder/unix/ modules/awt/src/main/native/lcmm/unix/ modules/imageio/src/main/native/jpegencoder/unix/ modules/imageio...
Date Fri, 27 Jun 2008 14:36:18 GMT
Author: hindessm
Date: Fri Jun 27 07:36:18 2008
New Revision: 672283

URL: http://svn.apache.org/viewvc?rev=672283&view=rev
Log:
Use system libraries on unix for lcms, jpeg, and png.  See:
  http://mail-archives.apache.org/mod_mbox/harmony-dev/200806.mbox/%3c200806160710.m5G7AEvt003543@d06av03.portsmouth.uk.ibm.com%3e

Modified:
    harmony/enhanced/classlib/trunk/make/depends.xml
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/makefile
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/jpegdecoder/unix/makefile
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/unix/makefile
    harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/jpegencoder/unix/makefile
    harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/pngencoder/unix/makefile

Modified: harmony/enhanced/classlib/trunk/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/depends.xml?rev=672283&r1=672282&r2=672283&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/make/depends.xml (original)
+++ harmony/enhanced/classlib/trunk/make/depends.xml Fri Jun 27 07:36:18 2008
@@ -164,168 +164,29 @@
 	<touch file="${xerces.dir}/xercesImpl.jar" />
     </target>
 
-    <!-- 
-       *  FIXME : the following awful little hack is because we noticed that for whatever
-       *  reason, we can't link with libjpg.a et al on at least to kinds of 64-bit linux
-      -->
-
-    <target name="-check-unix-common" if="is.unix">
+    <target name="-check-unix" if="is.unix">
         
         <property name="lcms.msg"
                   value="liblcms development package not installed
-${line.separator}See depends/libs/build/README.txt for further details.
 ${line.separator}For Debian/Ubuntu try: apt-get install liblcms1-dev
 ${line.separator}For Fedora try: yum install lcms-devel" />
-        <mkdir dir="depends/libs/build/lcms" />
-        <check-one-link src="${lcms.home}/include/icc34.h"
-                        dest="depends/libs/build/lcms/icc34.h"
-                        message="${lcms.msg}" />
-        <check-one-link src="${lcms.home}/include/lcms.h"
-                        dest="depends/libs/build/lcms/lcms.h"
-                        message="${lcms.msg}" />
+        <check-os-file src="${lcms.home}/include/lcms.h"
+                       message="${lcms.msg}" />
 
         <property name="png.msg"
                   value="libpng development package not installed
-${line.separator}See depends/libs/build/README.txt for further details.
 ${line.separator}For Debian/Ubuntu try: apt-get install libpng12-dev
 ${line.separator}For Fedora try: yum install libpng-devel" />
-        <mkdir dir="depends/libs/build/png" />
-        <check-one-link src="${png.home}/include/pngconf.h"
-                        dest="depends/libs/build/png/pngconf.h"
-                        message="${png.msg}" />
-        <check-one-link src="${png.home}/include/png.h"
-                        dest="depends/libs/build/png/png.h"
-                        message="${png.msg}" />
+        <check-os-file src="${png.home}/include/png.h"
+                       message="${png.msg}" />
 
         <property name="jpeg.msg"
                   value="libjpeg development package not installed
-${line.separator}See depends/libs/build/README.txt for further details.
-${line.separator}For Debian/Ubuntu try: apt-get install libjpeg62-dev
-${line.separator}For Fedora try: yum install libjpeg-devel" />
-        <mkdir dir="depends/libs/build/jpeg" />
-        <check-one-link src="${jpeg.home}/include/jconfig.h"
-                        dest="depends/libs/build/jpeg/jconfig.lnx"
-                        message="${jpeg.msg}" />
-        <check-one-link src="${jpeg.home}/include/jpeglib.h"
-                        dest="depends/libs/build/jpeg/jpeglib.h"
-                        message="${jpeg.msg}" />
-        <check-one-link src="${jpeg.home}/include/jmorecfg.h"
-                        dest="depends/libs/build/jpeg/jmorecfg.h"
-                        message="${jpeg.msg}" />
-        <check-one-link src="${jpeg.home}/include/jerror.h"
-                        dest="depends/libs/build/jpeg/jerror.h"
-                        message="${jpeg.msg}" />
-    </target>
-
-    <target name="-check-unix-x86" if="is.x86" unless="is.windows" depends="-check-unix-common">
-        <check-one-link src="${lcms.home}/lib/liblcms.a"
-                        dest="depends/libs/build/lcms/liblcms.${hy.platform}"
-                        message="${lcms.msg}" />
-
-        <check-one-link src="${png.home}/lib/libpng.a"
-                        dest="depends/libs/build/png/libpng.${hy.platform}"
-                        message="${png.msg}" />
-
-        <check-one-link src="${jpeg.home}/lib/libjpeg.a"
-                        dest="depends/libs/build/jpeg/libjpeg.${hy.platform}"
-                        message="${jpeg.msg}" />
-    </target>
-
-    <target name="-check-unix-x86_64" if="is.x86_64" unless="is.windows" depends="-check-unix-common">
-        <condition property="lcms.lib.home" value="${lcms.home}/lib64" else="${lcms.home}/lib">
-            <available file="${lcms.home}/lib64/liblcms.so"/>
-        </condition>
-        <check-one-link src="${lcms.lib.home}/liblcms.so"
-                        dest="depends/libs/build/lcms/liblcms.${hy.platform}"
-                        message="${lcms.msg}" />
-
-        <condition property="png.lib.home" value="${png.home}/lib64" else="${png.home}/lib">
-            <available file="${png.home}/lib64/libpng.so"/>
-        </condition>
-        <check-one-link src="${png.lib.home}/libpng.so"
-                        dest="depends/libs/build/png/libpng.${hy.platform}"
-                        message="${png.msg}" />
-
-        <condition property="jpeg.lib.home" value="${jpeg.home}/lib64" else="${jpeg.home}/lib">
-            <available file="${jpeg.home}/lib64/libjpeg.so"/>
-        </condition>
-        <check-one-link src="${jpeg.lib.home}/libjpeg.so"
-                        dest="depends/libs/build/jpeg/libjpeg.${hy.platform}"
-                        message="${jpeg.msg}" />
-    </target>
-
-    <target name="-check-unix-ia64" if="is.ia64" unless="is.windows" depends="-check-unix-common">
-        <check-one-link src="${lcms.home}/lib/liblcms.a"
-                        dest="depends/libs/build/lcms/liblcms.${hy.platform}"
-                        message="${lcms.msg}" />
-
-        <check-one-link src="${png.home}/lib/libpng.a"
-                        dest="depends/libs/build/png/libpng.${hy.platform}"
-                        message="${png.msg}" />
-
-        <check-one-link src="${jpeg.home}/lib/libjpeg.a"
-                        dest="depends/libs/build/jpeg/libjpeg.${hy.platform}"
-                        message="${jpeg.msg}" />
-    </target>
-
-    <target name="-check-unix" if="is.unix" depends="-check-unix-x86, -check-unix-x86_64,
-check-unix-ia64">
- 
-<!--        <property name="lcms.msg"
-                  value="liblcms development package not installed
-${line.separator}See depends/libs/build/README.txt for further details.
-${line.separator}For Debian/Ubuntu try: apt-get install liblcms1-dev
-${line.separator}For Fedora try: yum install lcms-devel" />
-        <mkdir dir="depends/libs/build/lcms" />
-        <check-one-link src="${lcms.home}/lib/liblcms.a"
-                        dest="depends/libs/build/lcms/liblcms.${hy.platform}"
-                        message="${lcms.msg}" />
-        <check-one-link src="${lcms.home}/include/icc34.h"
-                        dest="depends/libs/build/lcms/icc34.h"
-                        message="${lcms.msg}" />
-        <check-one-link src="${lcms.home}/include/lcms.h"
-                        dest="depends/libs/build/lcms/lcms.h"
-                        message="${lcms.msg}" />
-
-
-      <property name="png.msg"
-                  value="libpng development package not installed
-${line.separator}See depends/libs/build/README.txt for further details.
-${line.separator}For Debian/Ubuntu try: apt-get install libpng12-dev
-${line.separator}For Fedora try: yum install libpng-devel" />
-        <mkdir dir="depends/libs/build/png" />
-        <check-one-link src="${png.home}/lib/libpng.a"
-                        dest="depends/libs/build/png/libpng.${hy.platform}"
-                        message="${png.msg}" />
-        <check-one-link src="${png.home}/include/pngconf.h"
-                        dest="depends/libs/build/png/pngconf.h"
-                        message="${png.msg}" />
-        <check-one-link src="${png.home}/include/png.h"
-                        dest="depends/libs/build/png/png.h"
-                        message="${png.msg}" />
-
-
-       <property name="jpeg.msg"
-                  value="libjpeg development package not installed
-${line.separator}See depends/libs/build/README.txt for further details.
 ${line.separator}For Debian/Ubuntu try: apt-get install libjpeg62-dev
 ${line.separator}For Fedora try: yum install libjpeg-devel" />
         <mkdir dir="depends/libs/build/jpeg" />
-        <check-one-link src="${jpeg.home}/lib/libjpeg.a"
-                        dest="depends/libs/build/jpeg/libjpeg.${hy.platform}"
-                        message="${jpeg.msg}" />
-        <check-one-link src="${jpeg.home}/include/jconfig.h"
-                        dest="depends/libs/build/jpeg/jconfig.lnx"
-                        message="${jpeg.msg}" />
-        <check-one-link src="${jpeg.home}/include/jpeglib.h"
-                        dest="depends/libs/build/jpeg/jpeglib.h"
-                        message="${jpeg.msg}" />
-        <check-one-link src="${jpeg.home}/include/jmorecfg.h"
-                        dest="depends/libs/build/jpeg/jmorecfg.h"
-                        message="${jpeg.msg}" />
-        <check-one-link src="${jpeg.home}/include/jerror.h"
-                        dest="depends/libs/build/jpeg/jerror.h"
-                        message="${jpeg.msg}" />
-    -->
+        <check-os-file src="${jpeg.home}/include/jconfig.h"
+                       message="${jpeg.msg}" />
 
     </target>
 
@@ -490,6 +351,32 @@
         </sequential>
     </macrodef>
 
+    <macrodef name="check-os-file">
+        <attribute name="src" />
+        <attribute name="message" />
+        <sequential>
+            <echo level="info">Checking for system file @{src}</echo>
+        <available file="@{src}" type="file"
+                       property="@{src}.exists" />
+        <fail>
+        <condition>
+            <not>
+            <isset property="@{src}.exists" />
+            </not>
+        </condition>
+...
+
+Missing dependency.  The system file:
+
+  @{src}
+
+is missing.
+
+@{message}
+            </fail>
+        </sequential>
+    </macrodef>
+
     <target name="-awt-tar-extract" unless="awtdeps.uptodate">
         <echo>Extracting awt dependencies</echo>
         <untar src="${awtdeps.tar}" dest="${awtdeps.extract.dir}"

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/makefile?rev=672283&r1=672282&r2=672283&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/makefile (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/unix/makefile Fri Jun 27
07:36:18 2008
@@ -15,9 +15,9 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
-PNG_DIR=$(HY_HDK)/../depends/libs/build/png
 
-INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)/include -I$(PNG_DIR) -I/usr/X11R6/include -I/usr/include
-Iinclude
+INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)/include \
+            -I/usr/X11R6/include -I/usr/include -Iinclude
 
 BUILDFILES = \
   $(SHAREDSUB)/blitter.o \
@@ -28,8 +28,9 @@
   gl.o \
   XBlitter.o \
   XGraphics2D.o \
-  LockingKeys.o \
-  libpng.a
+  LockingKeys.o
+
+OSLIBS += -lpng
 
 ifneq ($(HY_ZIP_API),true)
 MDLLIBFILES += $(LIBPATH)libhyzip.a
@@ -45,6 +46,3 @@
 EXPNAME=HYGL_0.1
 
 include $(HY_HDK)/build/make/rules.mk
-
-libpng.a: $(PNG_DIR)/libpng.$(HY_PLATFORM)
-	cp $< $@

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/jpegdecoder/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/jpegdecoder/unix/makefile?rev=672283&r1=672282&r2=672283&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/jpegdecoder/unix/makefile
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/jpegdecoder/unix/makefile
Fri Jun 27 07:36:18 2008
@@ -15,13 +15,11 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
-JPEG_DIR=$(HY_HDK)/../depends/libs/build/jpeg/
+INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)include
 
-INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)include -I$(JPEG_DIR)
+BUILDFILES = $(SHAREDSUB)JpegDecoder.o
 
-BUILDFILES = \
-  $(SHAREDSUB)JpegDecoder.o \
-  libjpeg.a
+OSLIBS += -ljpeg
 
 ifneq ($(HY_ZIP_API),true)
 MDLLIBFILES += $(LIBPATH)libhyzip.a $(MDLLIBZLIB)
@@ -33,14 +31,4 @@
 DLLNAME=../libjpegdecoder$(HY_SHLIB_SUFFIX)
 EXPNAME=HYJPEGDECODER_0.1
 
-CLEANFILES=jconfig.h
-
 include $(HY_HDK)/build/make/rules.mk
-
-$(SHAREDSUB)JpegDecoder.o: jconfig.h
-
-jconfig.h: $(JPEG_DIR)jconfig.lnx
-	cp $< $@
-
-libjpeg.a: $(JPEG_DIR)libjpeg.$(HY_PLATFORM)
-	cp $< $@

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/unix/makefile?rev=672283&r1=672282&r2=672283&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/unix/makefile (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/unix/makefile Fri Jun
27 07:36:18 2008
@@ -15,17 +15,16 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
-LCMS_DIR=$(HY_HDK)/../depends/libs/build/lcms
-
-INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)/include -I$(LCMS_DIR)
+INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)/include $(LCMS_INCLUDES)
 
 BUILDFILES = \
   $(SHAREDSUB)/cmmerror.o \
   $(SHAREDSUB)/cmmio.o \
   $(SHAREDSUB)/cmmxforms.o \
   $(SHAREDSUB)/NativeCMM.o \
-  $(SHAREDSUB)/NativeImageFormat.o \
-  liblcms.a
+  $(SHAREDSUB)/NativeImageFormat.o
+
+OSLIBS += -llcms
 
 ifneq ($(HY_ZIP_API),true)
 MDLLIBFILES += $(LIBPATH)libhyzip.a $(MDLLIBZLIB)
@@ -38,6 +37,3 @@
 EXPNAME=HYLCMM_0.1
 
 include $(HY_HDK)/build/make/rules.mk
-
-liblcms.a: $(LCMS_DIR)/liblcms.$(HY_PLATFORM)
-	cp $< $@

Modified: harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/jpegencoder/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/jpegencoder/unix/makefile?rev=672283&r1=672282&r2=672283&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/jpegencoder/unix/makefile
(original)
+++ harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/jpegencoder/unix/makefile
Fri Jun 27 07:36:18 2008
@@ -15,13 +15,11 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
-JPEG_DIR=$(HY_HDK)/../depends/libs/build/jpeg/
+INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)include
 
-INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)include -I$(JPEG_DIR)
+BUILDFILES = $(SHAREDSUB)JpegEncoder.o
 
-BUILDFILES = \
-  $(SHAREDSUB)JpegEncoder.o \
-  libjpeg.a
+OSLIBS += -ljpeg
 
 ifneq ($(HY_ZIP_API),true)
 MDLLIBFILES += $(LIBPATH)libhyzip.a $(MDLLIBZLIB)
@@ -33,15 +31,4 @@
 DLLNAME=../libjpegencoder$(HY_SHLIB_SUFFIX)
 EXPNAME=HYJPEGENCODER_0.1
 
-CLEANFILES=jconfig.h
-
 include $(HY_HDK)/build/make/rules.mk
-
-$(SHAREDSUB)JpegEncoder.o: jconfig.h
-
-jconfig.h: $(JPEG_DIR)jconfig.lnx
-	cp $< $@
-
-libjpeg.a: $(JPEG_DIR)libjpeg.$(HY_PLATFORM)
-	cp $< $@
-

Modified: harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/pngencoder/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/pngencoder/unix/makefile?rev=672283&r1=672282&r2=672283&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/pngencoder/unix/makefile
(original)
+++ harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/pngencoder/unix/makefile
Fri Jun 27 07:36:18 2008
@@ -15,13 +15,11 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
-PNG_DIR=$(HY_HDK)/../depends/libs/build/png/
+INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)include
 
-INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)include -I$(PNG_DIR)
+BUILDFILES = $(SHAREDSUB)pngencoder.o
 
-BUILDFILES = \
-  $(SHAREDSUB)pngencoder.o \
-  libpng.a
+OSLIBS += -lpng
 
 ifneq ($(HY_ZIP_API),true)
 MDLLIBFILES += $(LIBPATH)libhyzip.a $(MDLLIBZLIB)
@@ -40,6 +38,3 @@
 EXPNAME=HYPNGENCODER_0.1
 
 include $(HY_HDK)/build/make/rules.mk
-
-libpng.a: $(PNG_DIR)libpng.$(HY_PLATFORM)
-	cp $< $@



Mime
View raw message