From owner-freebsd-java@FreeBSD.ORG Sun Oct 16 15:07:12 2005 Return-Path: X-Original-To: java@FreeBSD.org Delivered-To: freebsd-java@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 448FC16A420; Sun, 16 Oct 2005 15:07:12 +0000 (GMT) (envelope-from mi@blue.virtual-estates.net) Received: from blue.virtual-estates.net (aldan.algebra.com [216.254.65.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8271A43D48; Sun, 16 Oct 2005 15:07:11 +0000 (GMT) (envelope-from mi@blue.virtual-estates.net) Received: from blue.virtual-estates.net (blue [127.0.0.1]) by blue.virtual-estates.net (8.13.4/8.13.4) with ESMTP id j9GF7Aqb003844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 16 Oct 2005 11:07:10 -0400 (EDT) (envelope-from mi@blue.virtual-estates.net) Received: (from mi@localhost) by blue.virtual-estates.net (8.13.4/8.13.4/Submit) id j9GF7ACB003843; Sun, 16 Oct 2005 11:07:10 -0400 (EDT) (envelope-from mi) From: "Mikhail T." Message-Id: <200510161507.j9GF7ACB003843@blue.virtual-estates.net> To: phantom@FreeBSD.org Date: Sun, 16 Oct 2005 11:07:10 -0400 (EDT) X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7w hJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2005 15:07:12 -0000 --ELM1129475230-3772-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Hello! The system's zlib is much newer and better tested on our various platforms. JDKs should use it instead of building their own. Attached is the patch for ready to be dropped into jdk15/files. Just to be sure, a wrong header file is not picked up somewhere else in the tree, the little diff below prevents the bundled zlib-1.1.3 from even being extracted: Index: Makefile =================================================================== RCS file: /home/pcvs/ports/java/jdk15/Makefile,v retrieving revision 1.94 diff -U2 -r1.94 Makefile --- Makefile 13 Oct 2005 15:19:18 -0000 1.94 +++ Makefile 16 Oct 2005 15:04:57 -0000 @@ -307,2 +307,4 @@ .include + +EXTRACT_AFTER_ARGS+= -x '*/zlib-*/*' Please, test... Something like this should also be done to use the already installed libjpeg. Yours, -mi --ELM1129475230-3772-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain Content-Disposition: attachment; filename=patch-syszlib Content-Description: --- ../../j2se/make/java/instrument/Makefile Sat Oct 15 12:08:55 2005 +++ ../../j2se/make/java/instrument/Makefile Sat Oct 15 12:37:43 2005 @@ -39,5 +39,4 @@ # into the instrument library. # -ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 IO_PLATFORM_SRC = $(PLATFORM_SRC)/native/java/io LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin @@ -45,12 +44,4 @@ FILES_c += \ - inflate.c \ - infblock.c \ - infcodes.c \ - inffast.c \ - inftrees.c \ - zadler32.c \ - infutil.c \ - zutil.c \ canonicalize_md.c \ parse_manifest.c @@ -61,5 +60,4 @@ OTHER_INCLUDES = -I$(SHARE_SRC)/instrument OTHER_INCLUDES += -I$(PLATFORM_SRC)/instrument -OTHER_INCLUDES += -I$(ZIP_SRC) OTHER_INCLUDES += -I$(IO_PLATFORM_SRC) OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC) -I$(LAUNCHER_PLATFORM_SRC) @@ -71,4 +61,5 @@ COMPILER_WARNING_LEVEL=0 else +OTHER_LDLIBS += -lz ifeq ($(PLATFORM), bsd) ifneq ($(TRUE_PLATFORM), NetBSD) @@ -123,5 +121,4 @@ # vpath %.c $(SHARE_SRC)/instrument $(PLATFORM_SRC)/instrument -vpath %.c $(ZIP_SRC) vpath %.c $(IO_PLATFORM_SRC) vpath %.c $(LAUNCHER_SHARE_SRC) $(LAUNCHER_PLATFORM_SRC) --- ../../j2se/make/common/Program.gmk Tue Oct 19 14:44:50 2004 +++ ../../j2se/make/common/Program.gmk Sat Oct 15 12:37:38 2005 @@ -17,5 +17,4 @@ LAUNCHER_SHARE_SRC = $(SHARE_SRC) endif -ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 .PHONY: all optimized debug classes clean clobber @@ -47,5 +46,6 @@ $(OBJDIR)/zutil.$(OBJECT_SUFFIX) -FILES_o = $(LAUNCHER_o) $(ZLIB_o) +FILES_o = $(LAUNCHER_o) +LDFLAGS += -lz ifeq ($(PLATFORM), windows) --- ../../j2se/make/java/zip/Makefile Tue Oct 19 14:44:55 2004 +++ ../../j2se/make/java/zip/Makefile Sat Oct 15 14:02:40 2005 @@ -59,11 +59,4 @@ endif -CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) - -# -# Add to ambient vpath so we pick up the library files -# -vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/zlib-$(ZLIB_VERSION) - # # Has been converted to the JNI: generate JNI-style header files @@ -74,3 +67,3 @@ # Link to JVM library for JVM_Zip* functions # -OTHER_LDLIBS = $(JVMLIB) +OTHER_LDLIBS = -lz --- ../../j2se/make/java/zip/FILES_c.gmk Tue Oct 19 14:44:55 2004 +++ ../../j2se/make/java/zip/FILES_c.gmk Sat Oct 15 14:51:44 2005 @@ -9,14 +9,3 @@ $(CTARGDIR)ZipFile.c \ $(CTARGDIR)ZipEntry.c \ - $(CTARGDIR)zadler32.c \ - $(CTARGDIR)zcrc32.c \ - $(CTARGDIR)deflate.c \ - $(CTARGDIR)trees.c \ - $(CTARGDIR)zutil.c \ - $(CTARGDIR)inflate.c \ - $(CTARGDIR)infblock.c \ - $(CTARGDIR)inftrees.c \ - $(CTARGDIR)infcodes.c \ - $(CTARGDIR)infutil.c \ - $(CTARGDIR)inffast.c \ $(CTARGDIR)zip_util.c --- ../../j2se/src/share/native/com/sun/java/util/jar/pack/defines.h Tue Oct 19 14:59:48 2004 +++ ../../j2se/src/share/native/com/sun/java/util/jar/pack/defines.h Sun Oct 16 09:06:04 2005 @@ -15,4 +15,8 @@ #endif +#ifndef NO_ZLIB +# include +#endif + #ifndef FULL #define FULL 1 /* Adds <500 bytes to the zipped final product. */ @@ -70,4 +74,5 @@ typedef unsigned int uint; +#ifdef NO_ZLIB #ifdef _LP64 typedef unsigned int uLong; // Historical zlib, should be 32-bit. @@ -75,4 +80,6 @@ typedef unsigned long uLong; #endif +#endif + #ifdef _MSC_VER typedef LONGLONG jlong; --- ../../j2se/make/com/sun/java/pack/Makefile Tue Oct 19 14:44:46 2004 +++ ../../j2se/make/com/sun/java/pack/Makefile Sun Oct 16 09:07:12 2005 @@ -36,24 +36,6 @@ - - ifeq ($(STANDALONE),true) - ZIPOBJDIR = $(OUTPUTDIR)/tmp/sun/java.util.zip/zip/$(OBJDIRNAME) - - ZIPOBJS = $(ZIPOBJDIR)/zcrc32.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/deflate.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/trees.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/zadler32.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/zutil.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/inflate.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/infblock.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/infcodes.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/inftrees.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/infutil.$(OBJECT_SUFFIX) \ - $(ZIPOBJDIR)/inffast.$(OBJECT_SUFFIX) - - ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 - OTHER_CXXFLAGS += $(ZINCLUDE) - LDDFLAGS += $(ZIPOBJS) + LDDFLAGS += -lz else OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI --ELM1129475230-3772-0_--