aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Workman <rw@rlworkman.net>2010-05-11 22:25:38 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:25:38 +0200
commit292de0d830cdb755c81e9ce0763f9f50218d2b7e (patch)
tree56ae3db334cf0b25abdb7c528bbaa2815de9ebf1
parentfd0f6eef88bf02d1e4b3268cdd22af9b716553b8 (diff)
network/opera: Updated for version 9.62
-rw-r--r--network/opera/README2
-rw-r--r--network/opera/doinst.sh8
-rw-r--r--network/opera/opera.SlackBuild87
-rw-r--r--network/opera/opera.desktop40
-rw-r--r--network/opera/opera.info12
-rw-r--r--network/opera/opera_chinese_font_fix.diff24
6 files changed, 119 insertions, 54 deletions
diff --git a/network/opera/README b/network/opera/README
index a2467939d95c..bde3599daa28 100644
--- a/network/opera/README
+++ b/network/opera/README
@@ -1,3 +1 @@
Opera is a lightweight and free multiplatform web browser.
-
-This should create a menu entry in most desktop environments.
diff --git a/network/opera/doinst.sh b/network/opera/doinst.sh
index 72f86c9a69ee..8f79f530bcd9 100644
--- a/network/opera/doinst.sh
+++ b/network/opera/doinst.sh
@@ -14,11 +14,7 @@ config() {
config etc/opera6rc.new
config etc/opera6rc.fixed.new
-if [ -x usr/bin/update-desktop-database ]; then
- usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
-fi
-
-if [ -x usr/bin/update-mime-database ]; then
- usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
fi
diff --git a/network/opera/opera.SlackBuild b/network/opera/opera.SlackBuild
index cdb946e845ff..e5c1d070e5cb 100644
--- a/network/opera/opera.SlackBuild
+++ b/network/opera/opera.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for opera
# Copyright 2006 Martin Lefebvre <dadexter@gmail.com>
+# Copyright 2008 Robby Workman, Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,12 +23,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified by Robby Workman <rworkman@slackbuilds.org> for version 9.25
-
PRGNAM=opera
-VERSION=9.26
-DATESTRING='20080218.6'
-ARCH=i386 # Leave this alone for opera
+VERSION=9.62
+ARCH=i386 # Leave this alone
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -36,54 +34,79 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+# If you want Chinese in Opera to not be fugly, set this to "YES",
+# otherwise leave it be.
+# This can be specified on the command line when calling the build script:
+# CHINESE_FIX=YES ./opera.SlackBuild
+# Note that this makes Opera use wqy-zenhei as the default font
+# for Chinese AND Japanese
+CHINESE_FIX=${CHINESE_FIX:-NO}
+
+# Don't bother this - it's for easier manipulation and sed'ing later
+TOPDIR=$(tar tf $CWD/$PRGNAM-${VERSION}.gcc4-shared-qt3.i386.tar.bz2 |head -1)
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION-$DATESTRING-shared-qt.i386-en.tar.bz2
-cd $(tar -tf $CWD/$PRGNAM-$VERSION-$DATESTRING-shared-qt.i386-en.tar.bz2 |head -1|tr -d \/)
+rm -rf $TOPDIR
+tar xvf $CWD/$PRGNAM-${VERSION}.gcc4-shared-qt3.i386.tar.bz2
+cd $TOPDIR
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# Fix the path for opera to detect mozilla plugins
-sed -i 's#/usr/X11R6/lib/mozilla/plugins=1#/usr/lib/mozilla/plugins=1#' \
- ini/pluginpath.ini || return 1
-
-/bin/sh ./install.sh DESTDIR=$PKG
+# No, the --DESTDIR isn't documented. In fact, the presence of OPERADESTDIR
+# at the top of install.sh is damn misleading. I shouldn't have to actually
+# read the install script to figure out DESTDIR - the --help should show it.
+# --rworkman
+./install.sh \
+ --prefix=/usr \
+ --exec_prefix=/usr/lib/opera-$VERSION \
+ --sharedir=/usr/share/opera \
+ --wrapperdir=/usr/bin \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/opera-$VERSION \
+ --plugindir=/usr/lib/mozilla/plugins \
+ --DESTDIR=$PKG
+
+# Fix a potential security issue (minor, but still) with a hardcoded path to
+# the build directory lingering in /usr/bin/opera
+# Theoretically, a malicious user looks at that in /usr/bin/opera and later
+# recreates the directory and does some unknown havoc. It may very well be
+# completely safe and unexploitable and I'm just being Chicken Little here,
+# but it's easy enough to fix and I'd rather be safe than sorry. --rworkman
+sed -i "s|$TMP/$TOPDIR|/usr/bin/|g" $PKG/usr/bin/opera
# Include config files
-mkdir -p $PKG/etc
-cat config/opera6rc > $PKG/etc/opera6rc.new
-cat config/opera6rc.fixed > $PKG/etc/opera6rc.fixed.new
+mv etc $PKG
+mv $PKG/etc/opera6rc $PKG/etc/opera6rc.new
+mv $PKG/etc/opera6rc.fixed $PKG/etc/opera6rc.fixed.new
# Add an opera.desktop file and link the icon to /usr/share/pixmaps
-mkdir -p $PKG/usr/share/{applications,pixmaps}
+mv usr/share/icons usr/share/pixmaps $PKG/usr/share
+mkdir -p $PKG/usr/share/applications
install -m 0644 $CWD/opera.desktop $PKG/usr/share/applications
-( cd $PKG/usr/share/pixmaps ; ln -s ../opera/images/opera.xpm opera.xpm )
-# Relocate man pages and docs
-mv $PKG/usr/share/man $PKG/usr/man
-mv $PKG/usr/share/doc $PKG/usr
-mv $PKG/usr/doc/opera $PKG/usr/doc/$PRGNAM-$VERSION
+# Add a copy of the build script to the docs
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
+# Compress the man page
+gzip -9 $PKG/usr/man/man?/*.?
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
- )
-fi
+# Strip symbols we don't need
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
+
+# Patch for Chinese font handling
+if [ "$CHINESE_FIX" = "YES" ]; then
+ patch -p0 < $CWD/opera_chinese_font_fix.diff
+fi
+
/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/network/opera/opera.desktop b/network/opera/opera.desktop
index fba8ba5850ad..fe5a5cab7bfe 100644
--- a/network/opera/opera.desktop
+++ b/network/opera/opera.desktop
@@ -1,11 +1,35 @@
[Desktop Entry]
-Encoding=UTF-8
-Name=Opera Web Browser
-GenericName=Web Browser
-Comment=Opera is a lightweight and free multiplatform web browser
-Exec=opera
-Icon=/usr/share/pixmaps/opera.xpm
-StartupNotify=true
+Version=1.0
+Name=Opera
+Name[af]=opera
+Name[eo]=Opero
+Name[zu]=I Opera
+TryExec=opera
+Exec=opera %u
Terminal=false
+StartupNotify=true
+Icon=opera
+GenericName=Web browser
+GenericName[bs]=Web preglednik
+GenericName[de]=Web-Browser
+GenericName[eo]=TTT-rigardilo
+GenericName[es]=Navegador web
+GenericName[et]=Veebibrauser
+GenericName[eu]=Web arakatzailea
+GenericName[fi]=WWW-selain
+GenericName[fr]=Un navigateur web
+GenericName[is]=Vafri
+GenericName[it]=Browser Web
+GenericName[nl]=webbrowser
+GenericName[nn]=Nettlesar
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador
+GenericName[ro]=Navigator de web
+GenericName[sl]=Spletni brskalnik
+GenericName[ven]=Buronza ya Webu
+GenericName[xh]=Umkhangeli Zincwadi Zokubhaliweyo
+GenericName[zu]=Umkhangeli zincwadi we Web
+Comment=Web Browser
Type=Application
-Categories=Application;Network;
+Categories=Qt;Network;WebBrowser;
+MimeType=text/html;text/xml;application/xhtml+xml;
diff --git a/network/opera/opera.info b/network/opera/opera.info
index afe55dd1d675..b6bd83c91d56 100644
--- a/network/opera/opera.info
+++ b/network/opera/opera.info
@@ -1,8 +1,8 @@
PRGNAM="opera"
-VERSION="9.26"
+VERSION="9.62"
HOMEPAGE="http://www.opera.com"
-DOWNLOAD="ftp://ftp.tiscali.nl/pub/mirrors/opera/linux/926/final/en/i386/shared/opera-9.26-20080218.6-shared-qt.i386-en.tar.bz2"
-MD5SUM="e29856b248f503b5a724c7c548c42483"
-MAINTAINER="Martin Lefebvre"
-EMAIL="dadexter@gmail.com"
-APPROVED="David Somero"
+DOWNLOAD="ftp://ftp.opera.com/pub/opera/linux/962/final/en/i386/shared/opera-9.62.gcc4-shared-qt3.i386.tar.bz2"
+MD5SUM="42cdca1c97e1cc6a669c7ca73564c9a0"
+MAINTAINER="Robby Workman"
+EMAIL="rw@rlworkman.net"
+APPROVED="dsomero"
diff --git a/network/opera/opera_chinese_font_fix.diff b/network/opera/opera_chinese_font_fix.diff
new file mode 100644
index 000000000000..dc4b3331e524
--- /dev/null
+++ b/network/opera/opera_chinese_font_fix.diff
@@ -0,0 +1,24 @@
+--- usr/share/opera/ini/font.ini.bak 2008-06-30 11:55:03.000000000 -0700
++++ usr/share/opera/ini/font.ini 2008-07-24 12:45:29.000000000 -0700
+@@ -7,7 +7,7 @@
+
+ ; One can disable xft or core fonts if necessary
+ ;engine:xft=blacklist
+-;engine:x11=blacklist
++engine:x11=blacklist
+
+ ; Foundries that are generally known to have bad implementations
+ ;foundry:urw|abiword|ultimo=bad
+@@ -30,9 +30,9 @@
+ foundry:bitstream=excellent
+
+ ; Known fonts that solves specific problems
+-family:mincho|gothic=japanese good try-first
+-family:kochi*=japanese good try-first
+-family:song|song ti|fangsong*=chinese-s try-first
++family:WenQuanYi*=japanese excellent try-first
++family:WenQuanYi*=chinese-s excellent try-first
++family:WenQuanYi*=chinese-t excellent try-first
+ family:baekmuk*=korean good try-first
+
+ ; Fonts that we know should not be used for displaying text