From owner-freebsd-gnome@FreeBSD.ORG Thu Jan 26 00:27:04 2006 Return-Path: X-Original-To: gnome@freebsd.org Delivered-To: freebsd-gnome@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0227F16A420 for ; Thu, 26 Jan 2006 00:27:04 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 417BF43D55 for ; Thu, 26 Jan 2006 00:27:03 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from corbulon.video-collage.com ([151.204.231.237]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0ITO00IXYBX1YAY3@vms046.mailsrvcs.net> for gnome@freebsd.org; Wed, 25 Jan 2006 18:27:02 -0600 (CST) Received: from mteterin.us.murex.com (195-11.customer.cloud9.net [168.100.195.11]) by corbulon.video-collage.com (8.13.4/8.13.1) with ESMTP id k0Q0Quwp046486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 25 Jan 2006 19:27:00 -0500 Received: from mteterin.us.murex.com (mteterin@localhost [127.0.0.1]) by mteterin.us.murex.com (8.13.4/8.13.4) with ESMTP id k0Q0QfqG053144 for ; Wed, 25 Jan 2006 19:26:41 -0500 Received: from localhost (localhost [[UNIX: localhost]]) by mteterin.us.murex.com (8.13.4/8.13.4/Submit) id k0Q0Qdf5053143 for gnome@freebsd.org; Wed, 25 Jan 2006 19:26:39 -0500 Date: Wed, 25 Jan 2006 19:26:39 -0500 From: Mikhail Teterin To: gnome@freebsd.org Message-id: <200601251926.39246.mi+mx@aldan.algebra.com> Organization: Virtual Estates, Inc. MIME-version: 1.0 Content-type: Multipart/Mixed; boundary="Boundary-00=_/cB2DIq633gNON9" X-Virus-Scanned: ClamAV devel-20050525/1249/Wed Jan 25 12:04:36 2006 on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 X-Authentication-warning: mteterin.us.murex.com: mteterin set sender to mi+mx@aldan.algebra.com using -f User-Agent: KMail/1.8.3 Cc: Subject: minor improvements for Firefox, etc. X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2006 00:27:04 -0000 --Boundary-00=_/cB2DIq633gNON9 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello! The attached patch improves Firefox as follows: 1. Use -fpic instead of -fPIC an all platforms except sparc64 and always define PIC (-DPIC) -- this is how bsd.lib.mk compiles shared objects. 2. Use the system's libz instead of compiling Mozilla's own libmozz. 3. Use system's libbz2 instead of compiling Mozilla's own. Yes, the 2. should be the case automatically, but is not, because Mozilla's configure insists on libz-1.2.3 and we still use 1.2.2. The reason for Mozilla's insistance, however, is in the security promblems found in 1.2.2. FreeBSD's standard libz, however, has this problems patched long ago (without bumping the version). The goal of 1. is achieved in Firefox' own post-configure target -- it should, probably, migrate into mozilla/Makefile.common. With 2. and 3. taken care of, mozilla/Makefile.common should be ammended as per the second attachement to avoid any API-ABI (header-library) conflicts. Yours, -mi --Boundary-00=_/cB2DIq633gNON9 Content-Type: text/x-diff; charset="us-ascii"; name="firefox.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="firefox.diff" Index: Makefile =================================================================== RCS file: /meow/ncvs/ports/www/firefox/Makefile,v retrieving revision 1.145 diff -U2 -r1.145 Makefile --- Makefile 15 Dec 2005 17:11:32 -0000 1.145 +++ Makefile 26 Jan 2006 00:14:25 -0000 @@ -9,5 +9,5 @@ PORTNAME= firefox DISTVERSION= 1.5 -PORTREVISION= 5 +PORTREVISION= 6 PORTEPOCH= 1 CATEGORIES= www @@ -59,4 +59,12 @@ .endif +post-configure: + # Be sure to always define PIC, when compiling a shared object. + # For slightly better efficiency, be sure to also use -fpic + # instead of -fPIC on all arches except sparc64: + ${REINPLACE_CMD} \ + -e 's,-fPIC,-DPIC ${ARCH:S/sparc64/-fPIC/:C/^[^-].*/-fpic/},' \ + ${WRKSRC}/config/autoconf.mk + post-extract:: @${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON}|' \ Index: files/patch-configure =================================================================== RCS file: /meow/ncvs/ports/www/firefox/files/patch-configure,v retrieving revision 1.2 diff -U2 -r1.2 patch-configure --- files/patch-configure 29 Nov 2005 21:12:28 -0000 1.2 +++ files/patch-configure 25 Jan 2006 22:19:25 -0000 @@ -1,4 +1,11 @@ --- configure.orig Tue Oct 4 02:01:48 2005 +++ configure Wed Nov 23 11:07:17 2005 +@@ -1019,5 +1019,5 @@ + MOZJPEG=62 + MOZPNG=10207 +-MOZZLIB=1.2.3 ++MOZZLIB=1.2.2 + NSPR_VERSION=4 + @@ -10016,7 +10016,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 Index: files/patch-directory-c-sdk-config-FreeBSD.mk =================================================================== RCS file: files/patch-directory-c-sdk-config-FreeBSD.mk diff -N files/patch-directory-c-sdk-config-FreeBSD.mk --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-directory-c-sdk-config-FreeBSD.mk 25 Jan 2006 20:01:18 -0000 @@ -0,0 +1,12 @@ +--- directory/c-sdk/config/FreeBSD.mk Tue Mar 26 16:51:46 2002 ++++ directory/c-sdk/config/FreeBSD.mk Wed Jan 25 14:39:23 2006 +@@ -75,5 +75,9 @@ + endif + ++ifeq ($(OS_TEST),sparc64) + DSO_CFLAGS = -fPIC ++else ++DSO_CFLAGS = -fpic ++endif + DSO_LDOPTS = -Bshareable + Index: files/patch-security-coreconf-FreeBSD.mk =================================================================== RCS file: /meow/ncvs/ports/www/firefox/files/patch-security-coreconf-FreeBSD.mk,v retrieving revision 1.3 diff -U2 -r1.3 patch-security-coreconf-FreeBSD.mk --- files/patch-security-coreconf-FreeBSD.mk 22 Nov 2004 04:04:52 -0000 1.3 +++ files/patch-security-coreconf-FreeBSD.mk 25 Jan 2006 19:56:25 -0000 @@ -1,6 +1,5 @@ ---- security/coreconf/FreeBSD.mk.orig Wed Mar 26 20:17:25 2003 -+++ security/coreconf/FreeBSD.mk Sun Nov 21 22:59:49 2004 -@@ -43,8 +43,12 @@ - ifeq ($(OS_TEST),alpha) +--- security/coreconf/FreeBSD.mk Sun Apr 25 11:02:17 2004 ++++ security/coreconf/FreeBSD.mk Wed Jan 25 14:49:09 2006 +@@ -46,10 +46,18 @@ CPU_ARCH = alpha else @@ -14,6 +13,12 @@ OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK -@@ -71,7 +75,11 @@ - DLL_SUFFIX = so.1.0 ++ifeq ($(OS_TEST),sparc64) + DSO_CFLAGS = -fPIC ++else ++DSO_CFLAGS = -fpic ++endif + DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@) + +@@ -74,5 +82,9 @@ endif @@ -26,3 +31,2 @@ ifdef MAPFILE # Add LD options to restrict exported symbols to those in the map file - endif Index: files/patch-sysbz2 =================================================================== RCS file: files/patch-sysbz2 diff -N files/patch-sysbz2 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-sysbz2 26 Jan 2006 00:00:18 -0000 @@ -0,0 +1,14 @@ +--- toolkit/mozapps/update/src/updater/Makefile.in Wed Sep 14 10:09:18 2005 ++++ toolkit/mozapps/update/src/updater/Makefile.in Wed Jan 25 19:00:11 2006 +@@ -53,9 +53,9 @@ + PROGRAM = updater$(BIN_SUFFIX) + +-REQUIRES = libmar libbz2 ++REQUIRES = libmar + + LIBS += \ + $(DIST)/lib/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \ +- $(DIST)/lib/$(LIB_PREFIX)bz2.$(LIB_SUFFIX) \ ++ -lbz2 \ + $(NULL) + Index: files/patch-sysnss =================================================================== RCS file: /meow/ncvs/ports/www/firefox/files/patch-sysnss,v retrieving revision 1.1 diff -U2 -r1.1 patch-sysnss --- files/patch-sysnss 28 Aug 2005 07:59:05 -0000 1.1 +++ files/patch-sysnss 25 Jan 2006 22:25:53 -0000 @@ -8,4 +8,10 @@ ifndef MOZ_NATIVE_JPEG tier_1_dirs += jpeg +@@ -127,5 +125,4 @@ + + ifdef MOZ_UPDATER +-tier_1_dirs += modules/libbz2 + tier_1_dirs += modules/libmar + endif --- security/manager/Makefile.in Mon Mar 28 19:56:36 2005 +++ security/manager/Makefile.in Tue Aug 2 09:02:50 2005 --Boundary-00=_/cB2DIq633gNON9 Content-Type: text/x-diff; charset="us-ascii"; name="mozilla.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mozilla.diff" Index: Makefile.common =================================================================== RCS file: /meow/ncvs/ports/www/mozilla/Makefile.common,v retrieving revision 1.5 diff -U2 -r1.5 Makefile.common --- Makefile.common 24 Jan 2006 18:39:12 -0000 1.5 +++ Makefile.common 25 Jan 2006 21:52:59 -0000 @@ -102,4 +102,6 @@ --exclude */nsprpub/* \ --exclude mozilla/modules/libimg/png \ + --exclude mozilla/modules/libbz2 \ + --exclude mozilla/modules/zlib \ --exclude mozilla/jpeg \ --exclude mozilla/dbm \ --Boundary-00=_/cB2DIq633gNON9--