Date: Sun, 18 Jul 2010 11:45:31 GMT From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r353 - in branches/experimental/www/libxul-devel: . files Message-ID: <201007181145.o6IBjVAR091404@trillian.chruetertee.ch>
next in thread | raw e-mail | index | archive | help
Author: decke Date: Sun Jul 18 11:45:31 2010 New Revision: 353 Log: - Update to 1.9.2.6 - Added --disable-ipc like in Firefox 3.6 - Add mozilla_prefs_init patch otherwise kazehakase segfaults - Improve patch-security_coreconf_FreeBSD.mk because we have the default CPU_ARCH=$(OS_TEST) from upstream now. The reason why we use amd64 instead of x86_64 is because otherwise the xpi extensions would complain about an incompatible architecture. - Fix libxul.pc.in patch because it seems like it was a mispatch and caused the following pkg-config error: Variable 'includetype' not defined in '/usr/local/libdata/pkgconfig/libxul.pc' Added: branches/experimental/www/libxul-devel/files/patch-modules-libpref-src-prefapi.cpp Modified: branches/experimental/www/libxul-devel/Makefile branches/experimental/www/libxul-devel/distinfo branches/experimental/www/libxul-devel/files/patch-security_coreconf_FreeBSD.mk branches/experimental/www/libxul-devel/files/patch-xulrunner_installer_libxul.pc.in Modified: branches/experimental/www/libxul-devel/Makefile ============================================================================== --- branches/experimental/www/libxul-devel/Makefile Tue Jul 13 19:03:27 2010 (r352) +++ branches/experimental/www/libxul-devel/Makefile Sun Jul 18 11:45:31 2010 (r353) @@ -6,7 +6,7 @@ # PORTNAME= libxul-devel -DISTVERSION= 1.9.2 +DISTVERSION= 1.9.2.6 CATEGORIES?= www devel MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= xulrunner/releases/${DISTVERSION}/source @@ -15,7 +15,7 @@ MAINTAINER?= gecko@FreeBSD.org COMMENT?= Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps -WRKSRC= ${WRKDIR}/mozilla-${PORTVERSION} +WRKSRC= ${WRKDIR}/mozilla-1.9.2 LIB_DEPENDS?= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ notify.1:${PORTSDIR}/devel/libnotify @@ -24,8 +24,7 @@ USE_AUTOTOOLS= autoconf:213 CONFLICTS= mozilla-[0-9]* xulrunner-[0-9]* libxul-1.9.1.[0-9]* GECKO_PLIST_PRE_DIRS= lib/${MOZILLA}/bin lib/${MOZILLA}/idl \ - lib/${MOZILLA}/include lib/${MOZILLA}/lib \ - lib/${MOZILLA}/sdk/idl lib/${MOZILLA}/sdk/include + lib/${MOZILLA}/include lib/${MOZILLA}/lib WANT_GNOME= yes WANT_PERL= yes @@ -41,7 +40,7 @@ MOZ_OPTIONS?= --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \ --disable-javaxpcom --enable-canvas \ --enable-system-cairo --disable-updater \ - --disable-necko-wifi + --disable-necko-wifi --disable-ipc MOZ_EXTENSIONS= default,cookie,permissions OPTIONS= # Empty, used for generic gecko OPTIONS USE_GECKO_OPTIONS= java debug logging optimized_cflags Modified: branches/experimental/www/libxul-devel/distinfo ============================================================================== --- branches/experimental/www/libxul-devel/distinfo Tue Jul 13 19:03:27 2010 (r352) +++ branches/experimental/www/libxul-devel/distinfo Sun Jul 18 11:45:31 2010 (r353) @@ -1,3 +1,3 @@ -MD5 (xulrunner-1.9.2.source.tar.bz2) = 458051557ff49e6a352c1d56eee5782a -SHA256 (xulrunner-1.9.2.source.tar.bz2) = 8d4f12fff7bc361d83e6b486f9ec4264c60114ed86c805e1221b3d30efec0a4b -SIZE (xulrunner-1.9.2.source.tar.bz2) = 48206915 +MD5 (xulrunner-1.9.2.6.source.tar.bz2) = c2592b2235c18fe760e9ff444265951f +SHA256 (xulrunner-1.9.2.6.source.tar.bz2) = cd73d46d6193afd0e0e01d277903fa022319ba2ccce7a4f4df38cfdf819c955b +SIZE (xulrunner-1.9.2.6.source.tar.bz2) = 51078660 Added: branches/experimental/www/libxul-devel/files/patch-modules-libpref-src-prefapi.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/experimental/www/libxul-devel/files/patch-modules-libpref-src-prefapi.cpp Sun Jul 18 11:45:31 2010 (r353) @@ -0,0 +1,102 @@ + +This bug is due to the fact, applications are restarted before extension +defaults are loaded. + +To reproduce, choose any preference and set the values like: +system default: + pref("prefkey",systemvalue); +extension default: + pref("prefkey", extensiondefault); +user pref: + user_pref("prefkey", systemvalue); + +Next, trigger application behaviour similar to upgrade by removing compreg.dat +from profile and start the application. + +Result: +User sees extensiondefault after upgrade, because the user_pref has been +eliminated ... which is definitly not what the user expects because he explicitly +had *systemvalue* set before the upgrade. + +Evaluation: +The bug happens because restart is performed *before* extension defaults have been +loaded and the prefapi.cpp always eliminate user preference if the user preference +is equal to the actual default (which happens to be extensiondefault normally - so +no reset, but is systemvalue during restart). + +Fix: +1. savePrefs should not try to be smart ... this patch removes the heuristic that guesses +whether a setting can be eliminated or not; it should be sufficient to only eliminate +prefs in hashPrefs. + +2. This patch prevents hashPrefs from eliminating the user pref in case we are in +*startup* ... unfortunately no such state info exists, which lets us guess that +we are in startup for the previously not dealt case: !set_default && +!pref_ValueChanged(pref->defaultPref, value, type) && !PREF_HAS_USER_VALUE(pref). + +If is the case we explicitly remember that this setting is a user-pref ... +even though it might be temporarily equal to the default pref. + +--- + modules/libpref/src/prefapi.cpp | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +Index: modules/libpref/src/prefapi.cpp +=================================================================== +--- modules/libpref/src/prefapi.cpp ++++ modules/libpref/src/prefapi.cpp +@@ -324,23 +324,20 @@ + if (!pref) + return PL_DHASH_NEXT; + + nsCAutoString prefValue; + + // where we're getting our pref from + PrefValue* sourcePref; + +- if (PREF_HAS_USER_VALUE(pref) && +- pref_ValueChanged(pref->defaultPref, +- pref->userPref, +- (PrefType) PREF_TYPE(pref))) +- sourcePref = &pref->userPref; +- else if (PREF_IS_LOCKED(pref)) ++ if (PREF_IS_LOCKED(pref)) + sourcePref = &pref->defaultPref; ++ else if (PREF_HAS_USER_VALUE(pref)) ++ sourcePref = &pref->userPref; + else + // do not save default prefs that haven't changed + return PL_DHASH_NEXT; + + // strings are in quotes! + if (pref->flags & PREF_STRING) { + prefValue = '\"'; + str_escape(sourcePref->stringVal, prefValue); +@@ -742,16 +739,27 @@ + Otherwise, set the user value only if it has changed */ + if ( !pref_ValueChanged(pref->defaultPref, value, type) ) + { + if (PREF_HAS_USER_VALUE(pref)) + { + pref->flags &= ~PREF_USERSET; + if (!PREF_IS_LOCKED(pref)) + valueChanged = PR_TRUE; ++ } else { ++ // this is tricky: we have !set_default ... ++ // thus we are setting a user pref; however the user ++ // pref set is same as *current default*; this normally ++ // means to un-set ... however since we have ++ // !PREF_HAS_USER_VALUE(pref) this can only be during ++ // startup ++ pref_SetValue(&pref->userPref, value, type); ++ pref->flags |= PREF_USERSET; ++ if (!PREF_IS_LOCKED(pref)) ++ valueChanged = PR_TRUE; + } + } + else if ( !PREF_HAS_USER_VALUE(pref) || + pref_ValueChanged(pref->userPref, value, type) ) + { + pref_SetValue(&pref->userPref, value, type); + pref->flags |= PREF_USERSET; + if (!PREF_IS_LOCKED(pref)) Modified: branches/experimental/www/libxul-devel/files/patch-security_coreconf_FreeBSD.mk ============================================================================== --- branches/experimental/www/libxul-devel/files/patch-security_coreconf_FreeBSD.mk Tue Jul 13 19:03:27 2010 (r352) +++ branches/experimental/www/libxul-devel/files/patch-security_coreconf_FreeBSD.mk Sun Jul 18 11:45:31 2010 (r353) @@ -1,42 +1,18 @@ ---- security/coreconf/FreeBSD.mk.orig 2009-11-09 01:34:19.000000000 +0100 -+++ security/coreconf/FreeBSD.mk 2009-11-11 18:15:55.000000000 +0100 -@@ -45,8 +45,24 @@ - ifeq ($(OS_TEST),alpha) - CPU_ARCH = alpha - else -+ifeq ($(OS_TEST),amd64) -+CPU_ARCH = amd64 -+else -+ifeq ($(OS_TEST),ia64) -+CPU_ARCH = ia64 -+else -+ifeq ($(OS_TEST),powerpc) -+CPU_ARCH = powerpc -+else -+ifeq ($(OS_TEST),sparc64) -+CPU_ARCH = sparc64 -+else +--- security/coreconf/FreeBSD.mk.orig 2010-06-26 07:29:06.000000000 +0200 ++++ security/coreconf/FreeBSD.mk 2010-07-18 13:25:06.000000000 +0200 +@@ -49,9 +49,6 @@ + ifeq ($(CPU_ARCH),pc98) CPU_ARCH = x86 endif -+endif -+endif -+endif -+endif +-ifeq ($(CPU_ARCH),amd64) +-CPU_ARCH = x86_64 +-endif OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK -@@ -73,7 +89,7 @@ - DLL_SUFFIX = so.1.0 - endif - --MKSHLIB = $(CC) $(DSO_LDOPTS) -+MKSHLIB = $(CC) -Wl,-Bsymbolic -lc $(DSO_LDOPTS) -o $@ - ifdef MAPFILE - MKSHLIB += -Wl,--version-script,$(MAPFILE) - endif -@@ -82,4 +98,4 @@ +@@ -87,4 +84,4 @@ G++INCLUDES = -I/usr/include/g++ -INCLUDES += -I/usr/X11R6/include -+#INCLUDES += -I/usr/local/include ++#INCLUDES += -I/usr/X11R6/include Modified: branches/experimental/www/libxul-devel/files/patch-xulrunner_installer_libxul.pc.in ============================================================================== --- branches/experimental/www/libxul-devel/files/patch-xulrunner_installer_libxul.pc.in Tue Jul 13 19:03:27 2010 (r352) +++ branches/experimental/www/libxul-devel/files/patch-xulrunner_installer_libxul.pc.in Sun Jul 18 11:45:31 2010 (r353) @@ -1,11 +1,9 @@ ---- xulrunner/installer/libxul.pc.in.orig 2007-08-03 10:46:28.000000000 -0400 -+++ xulrunner/installer/libxul.pc.in 2009-03-29 15:17:17.000000000 -0400 -@@ -12,5 +12,5 @@ Name: libxul +--- xulrunner/installer/libxul.pc.in.orig 2010-01-21 04:31:27.000000000 +0100 ++++ xulrunner/installer/libxul.pc.in 2010-06-21 19:39:57.000000000 +0200 +@@ -7,5 +7,5 @@ Description: The Mozilla Runtime and Embedding Engine Version: %MOZILLA_VERSION% Requires: %NSPR_NAME% >= %NSPR_VERSION% -Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom --Cflags: -I${includedir}/${includetype} -fshort-wchar -\ No newline at end of file +Libs: -L${sdkdir}/lib -L%%MOZ_LIBDIR%% -lxpcomglue_s -lxul -lxpcom -+Cflags: -I${includedir}/${includetype} -fshort-wchar + Cflags: -I${includedir} %WCHAR_CFLAGS%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007181145.o6IBjVAR091404>