Browse Source

modified files for firefox

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11974 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 5 years ago
parent
commit
27185cd4ea
2 changed files with 48 additions and 66 deletions
  1. 30 31
      f/firefox/firefox.vine.sh.in
  2. 18 35
      f/firefox/mozconfig-firefox-vine7

+ 30 - 31
f/firefox/firefox.vine.sh.in

@@ -61,12 +61,11 @@ if [ ! -r $MOZ_LIB_DIR/firefox/$MOZ_FIREFOX_FILE ]; then
     MOZ_LIB_DIR="$SECONDARY_LIB_DIR"
 fi
 MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox"
-MOZ_XUL_DIR="$MOZ_LIB_DIR/firefox"
 MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks"
 MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
 MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE"
 MOZ_LAUNCHER="$MOZ_DIST_BIN/run-mozilla.sh"
- 
+
 ##
 ## Set MOZ_GRE_CONF
 ##
@@ -83,20 +82,11 @@ MOZILLA_FIVE_HOME="$MOZ_DIST_BIN"
 
 export MOZILLA_FIVE_HOME
 
-##
-## Select the propper plugin dir
-## Wrapped plug-ins are located in /lib/mozilla/plugins-wrapped
-##
-if [ -x "/usr/bin/mozilla-plugin-config" ]
-then
-  MOZ_PLUGIN_DIR="plugins-wrapped"
-else
-  MOZ_PLUGIN_DIR="plugins"
-fi
-
 ##
 ## Make sure that we set the plugin path
 ##
+MOZ_PLUGIN_DIR="plugins"
+
 if [ "$MOZ_PLUGIN_PATH" ]
 then
   MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:$MOZ_LIB_DIR/mozilla/$MOZ_PLUGIN_DIR:$MOZ_DIST_BIN/$MOZ_PLUGIN_DIR
@@ -110,14 +100,6 @@ export MOZ_PLUGIN_PATH
 ##
 export MOZ_APP_LAUNCHER="/usr/bin/firefox"
 
-##
-## If plugins are wrapped, check them
-##
-if [ -x "/usr/bin/mozilla-plugin-config" ]
-then
-  /usr/bin/mozilla-plugin-config
-fi
-
 ##
 ## Set FONTCONFIG_PATH for Xft/fontconfig
 ##
@@ -175,12 +157,22 @@ export GNOME_DISABLE_CRASH_DIALOG
 ##
 VINE_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.vine-langpack-install"
 
+# Since Firefox 60 the installation of individual langpack cannot be done by
+# copying xpi file to the home directory, because the langpack is loaded
+# as to the available languages after the language has been decided and
+# for the first run it won't be in language according to the locale.
+#
+# The current workaround is to put all langpacks to the location
+# for system wide extensions. So we set MOZ_DISABLE_LANGPACKS=1 for this moment
+export MOZ_DISABLE_LANGPACKS=1
 # MOZ_DISABLE_LANGPACKS disables language packs completely
 MOZILLA_DOWN=0
 if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then
-    # Is firefox running?
-    exec ps ax | grep $MOZ_PROGRAM | grep -v grep > /dev/null 2>&1
-    MOZILLA_DOWN=$?
+    if [ -x $MOZ_DIST_BIN/$MOZ_FIREFOX_FILE ]; then
+        # Is firefox running?
+        /usr/bin/pidof firefox > /dev/null 2>&1
+        MOZILLA_DOWN=$?
+    fi
 fi
 
 # Modify language pack configuration only when firefox is not running 
@@ -192,37 +184,44 @@ if [ $MOZILLA_DOWN -ne 0 ]; then
     if [ -f $VINE_LANGPACK_CONFIG ]; then
         rm `cat $VINE_LANGPACK_CONFIG` > /dev/null 2>&1
         rm $VINE_LANGPACK_CONFIG > /dev/null 2>&1
+        # remove all empty langpacks dirs while they block installation of langpacks
+        rmdir $MOZ_EXTENSIONS_PROFILE_DIR/langpack* > /dev/null 2>&1
     fi
 
     # Get locale from system
     CURRENT_LOCALE=$LC_ALL
     CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES}
     CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG}
-    
-    # Try without a local variant first, then with a local variant
-    # So that pt-BR doesn't try to use pt for example
+
+    # Try with a local variant first, then without a local variant
     SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"`
     MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"`
 
-    MOZARGS=""
-
     function create_langpack_link() {
         local language=$*
         local langpack=langpack-${language}@firefox.mozilla.org.xpi
         if [ -f $MOZ_LANGPACKS_DIR/$langpack ]; then
             rm -rf $MOZ_EXTENSIONS_PROFILE_DIR/$langpack
+            # If the target file is a symlink (the fallback langpack), 
+            # install the original file instead of the fallback one
+            if [ -h $MOZ_LANGPACKS_DIR/$langpack ]; then
+                langpack=`readlink $MOZ_LANGPACKS_DIR/$langpack`
+            fi
             ln -s $MOZ_LANGPACKS_DIR/$langpack \
                   $MOZ_EXTENSIONS_PROFILE_DIR/$langpack
             echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $VINE_LANGPACK_CONFIG
-            MOZARGS="-UILocale $MOZLOCALE"
             return 0
         fi
         return 1
     }
 
-    create_langpack_link $SHORTMOZLOCALE || create_langpack_link $MOZLOCALE || true
+    create_langpack_link $MOZLOCALE || create_langpack_link $SHORTMOZLOCALE || true
 fi
 
+# BEAST fix (rhbz#1005611)
+NSS_SSL_CBC_RANDOM_IV=${NSS_SSL_CBC_RANDOM_IV-1}
+export NSS_SSL_CBC_RANDOM_IV
+
 # Prepare command line arguments
 script_args=""
 pass_arg_count=0

+ 18 - 35
f/firefox/mozconfig-firefox-vine7

@@ -1,51 +1,34 @@
 . $topsrcdir/browser/config/mozconfig
 
+ac_add_options --enable-default-toolkit=cairo-gtk3
+
 ac_add_options --prefix="$PREFIX"
 ac_add_options --libdir="$LIBDIR"
 ac_add_options --with-system-jpeg
 ac_add_options --with-system-zlib
 ac_add_options --with-system-bz2
-ac_add_options --without-system-nspr
-ac_add_options --without-system-nss
-ac_add_options --without-system-libvpx
-ac_add_options --disable-system-cairo
-ac_add_options --disable-system-sqlite
-#ac_add_options --without-mng
 ac_add_options --with-pthreads
-ac_add_options --disable-tests
-#ac_add_options --disable-mochitest
-ac_add_options --disable-debug
-#ac_add_options --disable-installer
-#ac_add_options --enable-jsd
-ac_add_options --enable-optimize
-ac_add_options --enable-default-toolkit=cairo-gtk3
-#ac_add_options --enable-xft
-#ac_add_options --enable-pango
-#ac_add_options --enable-xinerama
-#ac_add_options --enable-crypto
-#ac_add_options --enable-svg
-#ac_add_options --enable-canvas
-#ac_add_options --disable-javaxpcom
-#ac_add_options --disable-xprint
 ac_add_options --disable-strip
-#ac_add_options --enable-single-profile
-#ac_add_options --disable-profilesharing
-ac_add_options --disable-crashreporter
-#ac_add_options --disable-dbus
-ac_add_options --enable-safe-browsing
-#ac_add_options --enable-libxul
-ac_add_options --enable-startup-notification
+ac_add_options --disable-tests
 #ac_add_options --enable-libnotify
 ac_add_options --disable-necko-wifi
-#ac_add_options --disable-cpp-exceptions
+ac_add_options --enable-startup-notification
 ac_add_options --disable-updater
-#ac_add_options --enable-shared-js
-ac_add_options --enable-url-classifier
-ac_add_options --enable-gio
+ac_add_options --enable-chrome-format=omni
 ac_add_options --enable-pulseaudio
-#ac_add_options --enable-gstreamer
-#ac_add_options --disable-gnomevfs
-ac_add_options --enable-chrome-format=jar
+#ac_add_options --with-system-icu
+#ac_add_options --with-mozilla-api-keyfile=../mozilla-api-key
+#ac_add_options --with-google-api-keyfile=../google-api-key
+ac_add_options --enable-release
+ac_add_options --enable-pie
+
+ac_add_options --without-system-nspr
+ac_add_options --without-system-nss
+ac_add_options --without-system-libvpx
+ac_add_options --disable-system-cairo
+ac_add_options --disable-system-sqlite
+
+ac_add_options --disable-crashreporter
 ac_add_options --disable-official-branding
 ac_add_options --with-branding=browser/branding/unofficial
 ac_add_options --with-distribution-id=org.vinelinux