Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6565114
Votes 0
Synopsis Allow using system copies of libjpeg, libpng and giflib for splashscreen
Category java:classes_awt
Reported Against
Release Fixed
State 4-Defer, No Resource Available, bug
Priority: 4-Low
Related Bugs 6565121
Submit Date 04-JUN-2007
Description
Contributor notes (http://mail.openjdk.java.net/pipermail/awt-dev/2007-May/000000.html):

***********************************
Trying to make OpenJDK more friendly for those distributions (like Gentoo and Debian iirc) having in their policy the use, whenever possible, of the system's libraries rather than internal copies of them, I've prepared three patches to AWT's libsplashscreen that allows to use the external/system copy of the three libraries in the subject.

The default behaviour is unchanged, you need to pass EXTERNAL_JPEG
EXTERNAL_LIBPNG and EXTERNAL_GIFLIB with the value "true" to get them
used.
***********************************

See the patches in the Evaluation field.
Posted Date : 2007-06-04 12:01:51.0
Work Around
N/A
Evaluation
Index: openjdk/j2se/make/sun/splashscreen/FILES_c.gmk
===================================================================
--- openjdk.orig/j2se/make/sun/splashscreen/FILES_c.gmk
+++ openjdk/j2se/make/sun/splashscreen/FILES_c.gmk
@@ -48,10 +48,13 @@ FILES_c = \
 	$(CTARGDIR)pngwio.c \
 	$(CTARGDIR)pngwrite.c \
 	$(CTARGDIR)pngwtran.c \
-	$(CTARGDIR)pngwutil.c \
-	$(CTARGDIR)dgif_lib.c \
+	$(CTARGDIR)pngwutil.c
+
+ifneq ($(EXTERNAL_GIFLIB), true)
+FILES_c += $(CTARGDIR)dgif_lib.c \
 	$(CTARGDIR)gif_err.c \
 	$(CTARGDIR)gifalloc.c
+endif
 
 ifneq ($(EXTERNAL_JPEG), true)
 FILES_c += $(CTARGDIR)jcomapi.c \
Index: openjdk/j2se/make/sun/splashscreen/Makefile
===================================================================
--- openjdk.orig/j2se/make/sun/splashscreen/Makefile
+++ openjdk/j2se/make/sun/splashscreen/Makefile
@@ -89,6 +89,12 @@ CPPFLAGS += -I$(PLATFORM_SRC)/native/$(P
 #
 JAVAHFLAGS += -jni
 
+ifeq ($(EXTERNAL_GIFLIB), true)
+  OTHER_LDLIBS += -lgif
+else
+  CPPFLAGS += -I$(SHARE_SRC)/native/sun/awt/giflib
+endif
+
 ifeq ($(EXTERNAL_JPEG), true)
   OTHER_LDLIBS += -ljpeg
 else
Index: openjdk/j2se/src/share/native/sun/awt/splashscreen/splashscreen_gif.c
===================================================================
--- openjdk.orig/j2se/src/share/native/sun/awt/splashscreen/splashscreen_gif.c
+++ openjdk/j2se/src/share/native/sun/awt/splashscreen/splashscreen_gif.c
@@ -26,7 +26,7 @@
 #include "splashscreen_impl.h"
 #include "splashscreen_gfx.h"
 
-#include "../giflib/gif_lib.h"
+#include "gif_lib.h"
 
 #define GIF_TRANSPARENT     0x01
 #define GIF_USER_INPUT      0x02







Index: openjdk-b13/j2se/make/sun/splashscreen/FILES_c.gmk
===================================================================
--- openjdk-b13.orig/j2se/make/sun/splashscreen/FILES_c.gmk
+++ openjdk-b13/j2se/make/sun/splashscreen/FILES_c.gmk
@@ -51,8 +51,10 @@ FILES_c = \
 	$(CTARGDIR)pngwutil.c \
 	$(CTARGDIR)dgif_lib.c \
 	$(CTARGDIR)gif_err.c \
-	$(CTARGDIR)gifalloc.c \
-	$(CTARGDIR)jcomapi.c \
+	$(CTARGDIR)gifalloc.c
+
+ifneq ($(EXTERNAL_JPEG), true)
+FILES_c += $(CTARGDIR)jcomapi.c \
 	$(CTARGDIR)jdapimin.c \
 	$(CTARGDIR)jdapistd.c \
 	$(CTARGDIR)jdcoefct.c \
@@ -96,6 +98,7 @@ FILES_c = \
 	$(CTARGDIR)jfdctflt.c \
 	$(CTARGDIR)jfdctfst.c \
 	$(CTARGDIR)jfdctint.c
+endif
 
 ifneq ($(EXTERNAL_ZLIB),true)
 FILES_c += $(CTARGDIR)compress.c \
Index: openjdk-b13/j2se/make/sun/splashscreen/Makefile
===================================================================
--- openjdk-b13.orig/j2se/make/sun/splashscreen/Makefile
+++ openjdk-b13/j2se/make/sun/splashscreen/Makefile
@@ -83,13 +83,18 @@ vpath %.c   $(SHARE_SRC)/native/$(PKGDIR
 vpath %.c   $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen
 
 CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
-CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
 
 #
 # Has been converted to the JNI: generate JNI-style header files
 #
 JAVAHFLAGS += -jni
 
+ifeq ($(EXTERNAL_JPEG), true)
+  OTHER_LDLIBS += -ljpeg
+else
+  CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
+endif
+
 ifeq ($(EXTERNAL_ZLIB), true)
   OTHER_LDLIBS += -lz
 else
Index: openjdk-b13/j2se/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c
===================================================================
--- openjdk-b13.orig/j2se/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c
+++ openjdk-b13/j2se/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c
@@ -25,7 +25,6 @@
 
 #include "splashscreen_impl.h"
 
-#include "jinclude.h"
 #include "jpeglib.h"
 #include "jerror.h"
 
@@ -107,11 +106,11 @@ set_stream_src(j_decompress_ptr cinfo, S
     if (cinfo->src == NULL) {   /* first time for this JPEG object? */
         cinfo->src = (struct jpeg_source_mgr *)
             (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, 
-            JPOOL_PERMANENT, SIZEOF(stream_source_mgr));
+            JPOOL_PERMANENT, sizeof(stream_source_mgr));
         src = (stream_src_ptr) cinfo->src;
         src->buffer = (JOCTET *)
             (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, 
-            JPOOL_PERMANENT, INPUT_BUF_SIZE * SIZEOF(JOCTET));
+            JPOOL_PERMANENT, INPUT_BUF_SIZE * sizeof(JOCTET));
     }
 
     src = (stream_src_ptr) cinfo->src;











Index: openjdk/j2se/make/sun/splashscreen/FILES_c.gmk
===================================================================
--- openjdk.orig/j2se/make/sun/splashscreen/FILES_c.gmk
+++ openjdk/j2se/make/sun/splashscreen/FILES_c.gmk
@@ -33,8 +33,10 @@ FILES_c = \
 	$(CTARGDIR)splashscreen_impl.c \
 	$(CTARGDIR)splashscreen_jpeg.c \
 	$(CTARGDIR)splashscreen_png.c \
-	$(CTARGDIR)splashscreen_sys.c \
-	$(CTARGDIR)png.c \
+	$(CTARGDIR)splashscreen_sys.c
+
+ifneq ($(EXTERNAL_LIBPNG), true)
+FILES_c += $(CTARGDIR)png.c \
 	$(CTARGDIR)pngerror.c \
 	$(CTARGDIR)pngget.c \
 	$(CTARGDIR)pngmem.c  \
@@ -49,6 +51,7 @@ FILES_c = \
 	$(CTARGDIR)pngwrite.c \
 	$(CTARGDIR)pngwtran.c \
 	$(CTARGDIR)pngwutil.c
+endif
 
 ifneq ($(EXTERNAL_GIFLIB), true)
 FILES_c += $(CTARGDIR)dgif_lib.c \
Index: openjdk/j2se/make/sun/splashscreen/Makefile
===================================================================
--- openjdk.orig/j2se/make/sun/splashscreen/Makefile
+++ openjdk/j2se/make/sun/splashscreen/Makefile
@@ -89,6 +89,12 @@ CPPFLAGS += -I$(PLATFORM_SRC)/native/$(P
 #
 JAVAHFLAGS += -jni
 
+ifeq ($(EXTERNAL_LIBPNG), true)
+  OTHER_LDLIBS += -lpng
+else
+  CPPFLAGS += -I$(SHARE_SRC)/native/sun/awt/libpng
+endif
+
 ifeq ($(EXTERNAL_GIFLIB), true)
   OTHER_LDLIBS += -lgif
 endif
Index: openjdk/j2se/src/share/native/sun/awt/splashscreen/splashscreen_png.c
===================================================================
--- openjdk.orig/j2se/src/share/native/sun/awt/splashscreen/splashscreen_png.c
+++ openjdk/j2se/src/share/native/sun/awt/splashscreen/splashscreen_png.c
@@ -25,7 +25,7 @@
 
 #include "splashscreen_impl.h"
 
-#include "../libpng/png.h"
+#include "png.h"
 
 #include <setjmp.h>
Posted Date : 2007-06-04 11:51:39.0

The submitter of the patch is currently unavailable. The fix is deferred for the time being.
Posted Date : 2009-10-20 11:05:20.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang