Browse Source

upgrading package: thunderbird 1.0.2 -> 1.0.5

Ralf S. Engelschall 20 years ago
parent
commit
5ff856f0ee
2 changed files with 37 additions and 20 deletions
  1. 19 14
      thunderbird/thunderbird.sh
  2. 18 6
      thunderbird/thunderbird.spec

+ 19 - 14
thunderbird/thunderbird.sh

@@ -25,8 +25,10 @@
 
 
 #   configuration
 #   configuration
 thunderbird_dir="@l_prefix@/lib/thunderbird"
 thunderbird_dir="@l_prefix@/lib/thunderbird"
-thunderbird_bin="@l_prefix@/lib/thunderbird/thunderbird"
+thunderbird_browser_bin="$thunderbird_dir/thunderbird"
+thunderbird_remote_bin="$thunderbird_dir/run-mozilla.sh $thunderbird_dir/mozilla-xremote-client"
 xsel_bin="@l_prefix@/bin/xsel"
 xsel_bin="@l_prefix@/bin/xsel"
+wmctrl_bin="@l_prefix@/bin/wmctrl"
 
 
 #   option parsing
 #   option parsing
 opt_v=no
 opt_v=no
@@ -61,12 +63,12 @@ export LANG
 
 
 #   special case of direct remote option
 #   special case of direct remote option
 if [ ".$opt_r" != . ]; then
 if [ ".$opt_r" != . ]; then
-    verbose "exec: $thunderbird_bin -remote \"$opt_r\""
-    exec $thunderbird_bin -remote "$opt_r"
+    verbose "exec: $thunderbird_remote_bin \"$opt_r\""
+    exec $thunderbird_remote_bin "$opt_r"
 fi
 fi
 
 
 #   determine Mozilla run-time status
 #   determine Mozilla run-time status
-$thunderbird_bin -remote "ping()" >/dev/null 2>&1
+$thunderbird_remote_bin "ping()" >/dev/null 2>&1
 if [ $? -eq 0 ]; then
 if [ $? -eq 0 ]; then
     verbose "process already running (available remotely)"
     verbose "process already running (available remotely)"
     restart=no
     restart=no
@@ -93,7 +95,7 @@ for url in "$@"; do
             auto:* )
             auto:* )
                 url=`echo "$url" | sed -e 's;^auto:;;'`
                 url=`echo "$url" | sed -e 's;^auto:;;'`
                 case "$url" in
                 case "$url" in
-                    http://* | https://* | ftp://* ) ;;
+                    http://* | https://* | ftp://* | file://* ) ;;
                     www.* ) url="http://$url" ;;
                     www.* ) url="http://$url" ;;
                     ftp.* ) url="ftp://$url" ;;
                     ftp.* ) url="ftp://$url" ;;
                     *.tar.gz | *.tgz ) url="ftpsearch:$url" ;;
                     *.tar.gz | *.tgz ) url="ftpsearch:$url" ;;
@@ -104,7 +106,7 @@ for url in "$@"; do
                 ;;
                 ;;
         esac
         esac
         case "$url" in
         case "$url" in
-            http://* | https://* | ftp://* )
+            http://* | https://* | ftp://* | file://* )
                 : # URL is already fully qualified
                 : # URL is already fully qualified
                 ;;
                 ;;
             google:* ) 
             google:* ) 
@@ -130,7 +132,7 @@ for url in "$@"; do
             whois:* )
             whois:* )
                 #   expand Geektools.com WHOIS query
                 #   expand Geektools.com WHOIS query
                 url=`echo "$url" | sed -e 's;^whois:;;'`
                 url=`echo "$url" | sed -e 's;^whois:;;'`
-                url="http://www.geektools.com/cgi-bin/proxy.cgi?query=$url"
+                url="http://www.whois-search.com/whois/$url"
                 ;;
                 ;;
             jargon:* )
             jargon:* )
                 #   expand UMEC Jargon File query
                 #   expand UMEC Jargon File query
@@ -152,11 +154,11 @@ for url in "$@"; do
         #   handling of first URL if restarting is necessary
         #   handling of first URL if restarting is necessary
         verbose "running new process"
         verbose "running new process"
         if [ ".$url" = ".about:blank" ]; then
         if [ ".$url" = ".about:blank" ]; then
-            verbose "exec: $thunderbird_bin >/dev/null 2>&1 &"
-            $thunderbird_bin >/dev/null 2>&1 &
+            verbose "exec: $thunderbird_browser_bin >/dev/null 2>&1 &"
+            $thunderbird_browser_bin >/dev/null 2>&1 &
         else
         else
-            verbose "exec: $thunderbird_bin \"$url\" >/dev/null 2>&1 &"
-            $thunderbird_bin "$url" >/dev/null 2>&1 &
+            verbose "exec: $thunderbird_browser_bin \"$url\" >/dev/null 2>&1 &"
+            $thunderbird_browser_bin "$url" >/dev/null 2>&1 &
         fi
         fi
     else
     else
         #   delayed waiting for process to be finally remotely available
         #   delayed waiting for process to be finally remotely available
@@ -168,7 +170,7 @@ for url in "$@"; do
             sleep 4 # give it a little bit of time to fully startup
             sleep 4 # give it a little bit of time to fully startup
             i=0
             i=0
             while [ $i -lt 10 ]; do
             while [ $i -lt 10 ]; do
-                $thunderbird_bin -remote "ping()" >/dev/null 2>&1
+                $thunderbird_remote_bin "ping()" >/dev/null 2>&1
                 if [ $? -eq 0 ]; then
                 if [ $? -eq 0 ]; then
                     break
                     break
                 fi
                 fi
@@ -177,6 +179,9 @@ for url in "$@"; do
             done
             done
         fi
         fi
 
 
+        #   try to activate (and bring to foreground) the Mozilla Thunderbird window
+        $wmctrl_bin -a "Mozilla Thunderbird" >/dev/null 2>&1 || true
+
         #   determine remote command
         #   determine remote command
         if [ ".$opt_w" = .yes ]; then
         if [ ".$opt_w" = .yes ]; then
             if [ ".$url" = ".about:blank" ]; then
             if [ ".$url" = ".about:blank" ]; then
@@ -192,8 +197,8 @@ for url in "$@"; do
 
 
         #   perform remote command
         #   perform remote command
         verbose "sending remote command to running process"
         verbose "sending remote command to running process"
-        verbose "exec: $thunderbird_bin -remote \"$cmd\" >/dev/null 2>&1"
-        $thunderbird_bin -remote "$cmd" >/dev/null 2>&1
+        verbose "exec: $thunderbird_remote_bin \"$cmd\" >/dev/null 2>&1"
+        $thunderbird_remote_bin "$cmd" >/dev/null 2>&1
     fi
     fi
     first=no
     first=no
 done
 done

+ 18 - 6
thunderbird/thunderbird.spec

@@ -32,11 +32,12 @@ Distribution: OpenPKG
 Class:        EVAL
 Class:        EVAL
 Group:        Web
 Group:        Web
 License:      MPL
 License:      MPL
-Version:      1.0.2
-Release:      20050330
+Version:      1.0.5
+Release:      20050715
 
 
 #   package options
 #   package options
-%option       with_optimize  yes
+%option       with_optimize   yes
+%option       with_svg        no
 
 
 #   list of sources
 #   list of sources
 Source0:      ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}-source.tar.bz2
 Source0:      ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}-source.tar.bz2
@@ -51,8 +52,12 @@ BuildPreReq:  OpenPKG, openpkg >= 20040130, make, gcc, perl, pkgconfig
 PreReq:       OpenPKG, openpkg >= 20040130, xsel, wmctrl
 PreReq:       OpenPKG, openpkg >= 20040130, xsel, wmctrl
 BuildPreReq:  X11, glib, gtk, png, jpeg, orbit, libiconv
 BuildPreReq:  X11, glib, gtk, png, jpeg, orbit, libiconv
 PreReq:       X11, glib, gtk, png, jpeg, orbit, libiconv
 PreReq:       X11, glib, gtk, png, jpeg, orbit, libiconv
-BuildPreReq:  infozip, zlib, openssl, freetype, cairo, cairo::with_x11 = yes
-PreReq:       infozip, zlib, openssl, freetype, cairo, cairo::with_x11 = yes
+BuildPreReq:  infozip, zlib, openssl, freetype
+PreReq:       infozip, zlib, openssl, freetype
+%if "%{with_svg}" == "yes"
+BuildPreReq:  cairo, cairo::with_x11 = yes
+PreReq:       cairo, cairo::with_x11 = yes
+%endif
 AutoReq:      no
 AutoReq:      no
 AutoReqProv:  no
 AutoReqProv:  no
 
 
@@ -100,7 +105,7 @@ AutoReqProv:  no
     CC="%{l_cc}"
     CC="%{l_cc}"
     CXX="%{l_cxx}"
     CXX="%{l_cxx}"
     CFLAGS="%{l_cflags} %{l_cppflags} -I${x11_incdir}"
     CFLAGS="%{l_cflags} %{l_cppflags} -I${x11_incdir}"
-    CXXFLAGS="%{l_cxxflags} -Wno-deprecated %{l_cppflags}"
+    CXXFLAGS="%{l_cxxflags} -Wno-deprecated %{l_cppflags} -I${x11_incdir}"
     CPPFLAGS="%{l_cppflags glib} -I${x11_incdir}"
     CPPFLAGS="%{l_cppflags glib} -I${x11_incdir}"
     LDFLAGS="-L`pwd`/dist/bin -L`pwd`/dist/lib -L`pwd`/dist/lib/components"
     LDFLAGS="-L`pwd`/dist/bin -L`pwd`/dist/lib -L`pwd`/dist/lib/components"
     LDFLAGS="$LDFLAGS %{l_ldflags} -L${x11_libdir}"
     LDFLAGS="$LDFLAGS %{l_ldflags} -L${x11_libdir}"
@@ -127,6 +132,9 @@ AutoReqProv:  no
         --x-includes=`%{l_rc} --query x11_incdir` \
         --x-includes=`%{l_rc} --query x11_incdir` \
         --x-libraries=`%{l_rc} --query x11_libdir` \
         --x-libraries=`%{l_rc} --query x11_libdir` \
         --enable-default-toolkit=gtk \
         --enable-default-toolkit=gtk \
+        --enable-toolkit-gtk \
+        --disable-toolkit-qt \
+        --disable-toolkit-xlib \
         --with-gtk-prefix=%{l_prefix} \
         --with-gtk-prefix=%{l_prefix} \
         --with-glib-prefix=%{l_prefix} \
         --with-glib-prefix=%{l_prefix} \
         --with-libIDL-prefix=%{l_prefix} \
         --with-libIDL-prefix=%{l_prefix} \
@@ -139,8 +147,12 @@ AutoReqProv:  no
         --enable-jsd \
         --enable-jsd \
         --enable-crypto \
         --enable-crypto \
         --enable-chrome-format=jar \
         --enable-chrome-format=jar \
+%if "%{with_svg}" == "yes"
         --enable-svg \
         --enable-svg \
         --enable-svg-renderer-cairo \
         --enable-svg-renderer-cairo \
+%else
+        --disable-svg \
+%endif
         --enable-static \
         --enable-static \
         --enable-strip \
         --enable-strip \
 %if "%{with_optimize}" == "yes"
 %if "%{with_optimize}" == "yes"