<http://my.opera.com/desktopteam/blog/2010/06/24/more-stability-work>.
authorJeroen Roovers <jer@gentoo.org>
Thu, 24 Jun 2010 15:17:17 +0000 (15:17 +0000)
committerJeroen Roovers <jer@gentoo.org>
Thu, 24 Jun 2010 15:17:17 +0000 (15:17 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux i686

www-client/opera/ChangeLog
www-client/opera/Manifest
www-client/opera/opera-10.10.ebuild [deleted file]
www-client/opera/opera-10.60_pre6380.ebuild [new file with mode: 0644]

index f7cd2742e07339ddc63e34fad1e4818832d0dc66..b4f2ba92689e644950d28899e6b8bed73500d19a 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for www-client/opera
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.498 2010/06/23 17:49:10 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.499 2010/06/24 15:17:17 jer Exp $
+
+*opera-10.60_pre6380 (24 Jun 2010)
+
+  24 Jun 2010; Jeroen Roovers <jer@gentoo.org> -opera-10.10.ebuild,
+  +opera-10.60_pre6380.ebuild:
+  <http://my.opera.com/desktopteam/blog/2010/06/24/more-stability-work>.
 
 *opera-10.60_pre6379 (23 Jun 2010)
 
index 750dbaa39a5e716f17d335b8fe101df1bdd755cf..cdf7b2932718920f84dd26ddd9ce7258ca674876 100644 (file)
@@ -5,10 +5,6 @@ AUX opera-freedesktop.patch 995 RMD160 9ebe36fa34b25a4ab151033a10f7b53494cb4a4a
 AUX opera-gentoo.patch 2276 RMD160 6b68de743af9f420454e0555d242643dbcb45470 SHA1 7dbf662019b7e07df515d27f1519a0da86dce765 SHA256 bcfd73704420fd3bf4a191c1a018b4bb209031aab505544b5e95c24702b9ef01
 AUX opera-localepath.patch 433 RMD160 cdea79f8b020c921e658c704fdf3f4293197738a SHA1 9c07a7e9085a49af331578da841c5afdee36ea4b SHA256 2086ad1feee1572b2c487ca190c35a39c3c05679d4ceeb2f3777b62e2c8f2bfe
 AUX opera-simplify-desktop.patch 637 RMD160 017fea605f8a81aa4f48b6cc3081c990fffa3842 SHA1 eb2011ef0d4f8754bb43b506e27ef7b622ab8e91 SHA256 c0009b41727023b3d03faa7c891764d886e92641cb57d8fa762353c9137e0a74
-DIST opera-10.10.gcc4-bundled-qt4.i386.tar.bz2 16529068 RMD160 b10ddc7f727352e7ca9243b3d12bda88737b3f90 SHA1 9823c686ff2cce92da5b24f83cd6aa3982b2649b SHA256 bdec041032a798f4b8b492546269396d05987538376cc5d28acd9562849e8944
-DIST opera-10.10.gcc4-bundled-qt4.x86_64.tar.bz2 17297117 RMD160 2a3be809b1463858e444e19c32b596081dec0dd9 SHA1 9f744474dac1da9fc08ce16857f1b867620daf6e SHA256 25b9b119da04068d0b99a93446cdb5496ece81a4e2d387f9bc9ca274178713da
-DIST opera-10.10.gcc4-qt4.i386.tar.bz2 11691076 RMD160 c567e56211e096bfed792e52f016a9e12ea94115 SHA1 f6d2938acdc8bbe2d762521313892989fd62a8be SHA256 c35992860387a88303bfdc4b7fe354914a720e7fdebfd37025dbebe721e6467a
-DIST opera-10.10.gcc4-qt4.x86_64.tar.bz2 12537317 RMD160 db34e4a2b92965472ecc47cab7be9209c97c488b SHA1 6098ac4e4b2fd0519bdbfdb32dc97e50d17fd004 SHA256 63d7678414f3ac40917fda71d745d81d048dadd723da56300fd424542a012df8
 DIST opera-10.11.gcc4-bundled-qt4.i386.tar.bz2 16651128 RMD160 409f5d27ab435005ac688c0f6bdfc7c768c0ab91 SHA1 e41799773e767648accf37d469ad38c6f8fd412b SHA256 94677b37a2158cadbece44b5cc8b3a068e9570b158d9b1a1516cdaf50d48f612
 DIST opera-10.11.gcc4-bundled-qt4.x86_64.tar.bz2 17415883 RMD160 9593266a89d483beff8b9ceac68b290a86fd8cb9 SHA1 dec9036cd3d23aad5f301475bb73d05ede213c07 SHA256 61cf1d6628f52167310673836e930f7e31ca2e6befcb1dacd513d7774b69d1a2
 DIST opera-10.11.gcc4-qt4.i386.tar.bz2 11809013 RMD160 9b8cd7a1ebf2d37945049c08b6c50f199dc323ab SHA1 a8be6753d64e815f4797c1654eec521299019440 SHA256 d390e5d9713dffeb349e097f9f51f8622467ec27b5b102a846648c9e3eb5ce1e
@@ -33,12 +29,16 @@ DIST opera-10.60-6379.i386.freebsd.tar.bz2 13707276 RMD160 9df2774b85f26d2000c53
 DIST opera-10.60-6379.i386.linux.tar.bz2 13708982 RMD160 08e88fca9b37712c66348b201fc6f4365ab0cb3c SHA1 56c35c17e3f0974539ac381a6c9c692ede3fb671 SHA256 eaa58afae016dd15fffe201b280e820e52c0975cd8bcdbad99b3190d4bc62007
 DIST opera-10.60-6379.ppc.linux.tar.bz2 14016463 RMD160 8c4d22a6b2c2131acaa93fc94e106827d57d5d6c SHA1 5a97a22ecbe370e324a5596ac62a0bc7fed90a05 SHA256 8540541585cb2ac962404e891eaf20a816164989b297b4534537bcd074f09b2d
 DIST opera-10.60-6379.x86_64.linux.tar.bz2 14767803 RMD160 836ab3c6821730ccfea4e99203b3b3b27c20077f SHA1 5d00a3b6543cb5127a35a7393bebaa7082532f18 SHA256 5fc1e37d7b77998c11055e1b223f521e15c8ea0d0476e85125dd1244fa5e79b4
-EBUILD opera-10.10.ebuild 4893 RMD160 6691d79a5f95c3e3d0701b4129a481875399d587 SHA1 2bd8f1a8e97f79607afc1f2ad0edf8a4c80c7f62 SHA256 8dc65519c765759956195bad7bd25bade46c222bfeb10d9e5057bf4f7bb90565
+DIST opera-10.60-6380.i386.freebsd.tar.bz2 13708403 RMD160 49885b3653ba37047c17696ff334d7bca1c2e859 SHA1 9ca243b2bde8d1ffa6454d0dd96f7f36f4c72bc3 SHA256 851cc0ef077e0ba7eba4cb7dfdf88d0b19ea153e7ab1a1164f51d1ed35032c34
+DIST opera-10.60-6380.i386.linux.tar.bz2 13710826 RMD160 7bc7173886f77989f23ae64905c6c2206202abb5 SHA1 4eb4002598b20e5d725ecfee12b6af5d78bf8a6d SHA256 4f330b0c1e3e63ca47c8454197d0fe4eb4fad347442bd3b597926c4df9a85e0a
+DIST opera-10.60-6380.ppc.linux.tar.bz2 14016560 RMD160 33890f192a35a0ea796ca1abb278b3c9fee77361 SHA1 ba97490df0a958db84146fce68eb0e4bca57f056 SHA256 0c180b35f2524942d4447aeddb54a13ccdd3f142ae0cd1978339322caf89171d
+DIST opera-10.60-6380.x86_64.linux.tar.bz2 14769262 RMD160 2d2eddc6d48e1230d9acfe5c1c26532902c9d95f SHA1 452c5f88e056aa6f5998a8d5e181d66f6dfe4150 SHA256 bdae148f2d87d346e5e8ba06e206daf1cf74edad074937a7a12eab4265abe50f
 EBUILD opera-10.11.ebuild 4895 RMD160 135051e159b1d6e5bd29b97efcc54b5a4b7d21eb SHA1 a395b737002353fbf71ece26ea14efc4572b5be1 SHA256 81cd524417d11b31e4733b942f45a0712eba2b3445257c1df1abfdc4d901e14d
 EBUILD opera-10.60_pre6368.ebuild 4883 RMD160 96c7bd86a6e8793f062dc6210d587a7bdf0d7ffb SHA1 5533f3b0f57da31769601ef1ddaa65a60ab2408f SHA256 c5e5d713be8c1dc893af258469d88392378147a075a1e7bfb10805492978dd32
 EBUILD opera-10.60_pre6372.ebuild 4867 RMD160 28d75737d9d11aee7e4ae0274901788c63d68844 SHA1 ec757129f897d40e3d33c542d40fb4c55239ccdd SHA256 7d278b70edd2b28065065e2499d9920331cb7e7ec41197f1825121813839e127
 EBUILD opera-10.60_pre6374.ebuild 4867 RMD160 0236fb461ae89a3d11176b25d9e89651f26781f5 SHA1 f64fe131e3b7aa62f146ae36070eb54dc285f784 SHA256 94475802c9d7e0f3078191e8c44839770d6e73361ad662846c2a27d89d25eede
 EBUILD opera-10.60_pre6378.ebuild 4867 RMD160 acac7b968443810ebbde4b30f988f2e3745efc8e SHA1 66b845181247923a0c432b25d9f204af58a930c3 SHA256 65f4293cc7a6592852b9ef87349705f4b5d6f3c25e4f95230c08646d4adcbaa6
 EBUILD opera-10.60_pre6379.ebuild 4866 RMD160 f9bd611eb1a354ce97def36dd4d5d7f04829096c SHA1 b1db8382245d487adab15ba37f467899f837852c SHA256 26763a336f70aa944907dd892d61c20bcd378f1f3545ce5e8f1165b0cecef31c
-MISC ChangeLog 96612 RMD160 76f3cf3d9d590366b8a3067718f3658a9fe3764a SHA1 ac1ad4076709f6adc71d66e3f482d6c94e658bdc SHA256 b44e940a0862b3d67d80739c93e2cab3d0f35f9f946b283c43e08cff5dbb12a6
+EBUILD opera-10.60_pre6380.ebuild 4871 RMD160 6ae1884ed33ca4d647ef10dfc83db2bd113ddf79 SHA1 10cf88f616906ceba1aeb721977156d714357af8 SHA256 9cb187d9ea2bca4091c52023e25f9e136c1001f9490bd56fd6e380f2c0a73c67
+MISC ChangeLog 96821 RMD160 ea5dca7a20ed2578e54ddcb69d29accc483d2daa SHA1 d1a4dd8c53d85020742d935366b98015d6f57562 SHA256 4ec136d42f09cc7206fa857fa9140e9023ba5d237f263e3aeac161a0639b0fd2
 MISC metadata.xml 722 RMD160 f424184eb789ae7afcf8c19a74de21a6029366d2 SHA1 5726f20bc46f15fd7a769293bda721afd2d3df8c SHA256 415493d83f3ebe328fd8a4038f90833cbcc0f983b43c01d9440782bbcfeb4e3a
diff --git a/www-client/opera/opera-10.10.ebuild b/www-client/opera/opera-10.10.ebuild
deleted file mode 100644 (file)
index 76473fa..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/opera/opera-10.10.ebuild,v 1.9 2010/02/16 18:13:18 jer Exp $
-
-EAPI="2"
-
-GCONF_DEBUG="no"
-
-inherit eutils gnome2
-
-DESCRIPTION="A standards-compliant graphical Web browser"
-HOMEPAGE="http://www.opera.com/"
-
-SLOT="0"
-LICENSE="OPERA-10.10"
-KEYWORDS="amd64 x86"
-
-RESTRICT="mirror test"
-
-QA_DT_HASH="opt/${PN}/.*"
-QA_PRESTRIPPED="
-       opt/${PN}/lib/${PN}/${PV/_pre*}/missingsyms.so
-       opt/${PN}/lib/${PN}/${PV/_pre*}/spellcheck.so
-       opt/${PN}/lib/${PN}/${PV/_pre*}/opera
-       opt/${PN}/lib/${PN}/${PV/_pre*}/works
-       opt/${PN}/lib/${PN}/${PV/_pre*}/operaplugincleaner
-       opt/${PN}/lib/${PN}/${PV/_pre*}/operapluginwrapper
-"
-QA_PRESTRIPPED_amd64="
-       ${QA_PRESTRIPPED}
-       opt/${PN}/lib/${PN}/${PV/_pre*}/operapluginwrapper-ia32-linux
-       opt/${PN}/lib/${PN}/${PV/_pre*}/operapluginwrapper-native
-"
-
-IUSE="gnome qt-static"
-MY_LINGUAS="be bg cs da de el en-GB es-ES es-LA et fi fr fr-CA fy hi hr hu id it ja ka ko lt mk nb nl nn pl pt pt-BR ro ru sk sr sv ta te tr uk zh-CN zh-HK zh-TW"
-
-for MY_LINGUA in ${MY_LINGUAS}; do
-       IUSE="${IUSE} linguas_${MY_LINGUA/-/_}"
-done
-
-O_U="mirror://opera/linux/1010/final/en/"
-
-SRC_URI="
-       amd64? (
-               qt-static? ( ${O_U}x86_64/${P}.gcc4-bundled-qt4.x86_64.tar.bz2 )
-               !qt-static? ( ${O_U}x86_64/${P}.gcc4-qt4.x86_64.tar.bz2 )
-       )
-       x86? (
-               qt-static? ( ${O_U}i386/${P}.gcc4-bundled-qt4.i386.tar.bz2 )
-               !qt-static? ( ${O_U}i386/${P}.gcc4-qt4.i386.tar.bz2 )
-       )
-       "
-
-DEPEND=">=sys-apps/sed-4"
-
-RDEPEND="
-       media-libs/jpeg
-       media-libs/libexif
-       >=media-libs/fontconfig-2.1.94-r1
-       x11-libs/libXrandr
-       x11-libs/libXp
-       x11-libs/libXmu
-       x11-libs/libXi
-       x11-libs/libXft
-       x11-libs/libXext
-       x11-libs/libXcursor
-       x11-libs/libX11
-       x11-libs/libSM
-       x11-libs/libICE
-       amd64? (
-               qt-static? ( media-libs/nas )
-               !qt-static? ( x11-libs/qt-gui )
-       )
-       x86? (
-               qt-static? ( media-libs/nas )
-               !qt-static? ( x11-libs/qt-gui )
-       )
-       "
-
-opera_linguas() {
-       # Remove unwanted LINGUAS:
-       local LINGUA
-       local LNGDIR="${D}/opt/opera/share/opera/locale"
-       einfo "Keeping these locales: ${LINGUAS}."
-       for LINGUA in ${MY_LINGUAS}; do
-               if ! use linguas_${LINGUA/-/_}; then
-                       LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
-                       rm -r "${LINGUA}"
-               fi
-       done
-}
-
-pkg_setup() {
-       elog "${WARN}If you seek support, please file a bug report at${NORMAL}"
-       elog "${WARN}https://bugs.gentoo.org and post the output of${NORMAL}"
-       elog "${WARN} \`emerge --info =${CATEGORY}/${P}'${NORMAL}"
-}
-
-src_unpack() {
-       unpack ${A}
-       if [[ ! -d ${S} ]]; then
-               cd "${WORKDIR}"/${PN}* || die "failed to enter work directory"
-               S="$(pwd)"
-               einfo "Setting WORKDIR to ${S}"
-       fi
-}
-
-src_prepare() {
-       epatch "${FILESDIR}/${PN}-gentoo.patch"
-       epatch "${FILESDIR}/${PN}-simplify-desktop.patch"
-       epatch "${FILESDIR}/${PN}-freedesktop.patch"
-
-       # bug #181300:
-       epatch "${FILESDIR}/${PN}-10.00-pluginpath.patch"
-
-       sed -i -e "s:config_dir=\"/etc\":config_dir=\"${D}/etc/\":g" \
-               -e "s:\(str_localdirplugin=\).*$:\1/opt/opera/lib/opera/plugins:" \
-               -e 's:#\(export LD_PRELOAD OPERA_FORCE_JAVA_ENABLED\):\1:' \
-               -e 's:#\(OPERA_FORCE_JAVA_ENABLED=\):\1:' \
-               install.sh || die "sed failed"
-}
-
-# These workarounds are sadly needed because gnome2.eclass doesn't check
-# whether a configure/Makefile script exists.
-src_configure() { :; }
-src_compile() { :; }
-
-src_install() {
-       # Prepare installation directories for Opera's installer script.
-       dodir /etc
-
-       # Opera's native installer.
-       ./install.sh --prefix="${D}"/opt/opera || die "install.sh failed"
-
-       einfo "It is safe to ignore warnings about failed checksums"
-       einfo "and about files that would be ignored ..."
-       einfo "Completing the installation where install.sh abandoned us ..."
-
-       # java workaround
-       sed -i -e 's:LD_PRELOAD="${OPERA_JAVA_DIR}/libawt.so":LD_PRELOAD="$LD_PRELOAD"\:"${OPERA_JAVA_DIR}/libawt.so":' "${D}"/opt/opera/bin/opera
-
-       dosed /opt/opera/bin/opera
-       dosed /opt/opera/share/opera/java/opera.policy
-
-       # Adapt desktop file to Gnome when needed
-       use gnome && sed -i -e s:"GenericName\[":"Comment\[": "${D}"/usr/share/applications/opera.desktop
-
-       # Install a symlink /usr/bin/opera
-       dodir /usr/bin
-       dosym /opt/opera/bin/opera /usr/bin/opera
-
-       dodir /etc/revdep-rebuild
-       echo 'SEARCH_DIRS_MASK="/opt/opera/lib/opera/plugins"' > "${D}"/etc/revdep-rebuild/90opera
-
-       # Add the Opera man dir to MANPATH:
-       insinto /etc/env.d
-       echo 'MANPATH="/opt/opera/share/man"' >> "${D}"/etc/env.d/90opera
-
-       [[ -z MY_LINGUAS ]] || opera_linguas
-}
-
-pkg_postinst() {
-       use gnome && gnome2_pkg_postinst
-
-       elog "To change the UI language, choose [Tools] -> [Preferences], open the"
-       elog "[General] tab, click on [Details...] then [Choose...] and point the"
-       elog "file chooser at /opt/opera/share/opera/locale/, then enter the"
-       elog "directory for the language you want and [Open] the .lng file."
-}
-
-pkg_postrm() {
-       use gnome && gnome2_pkg_postrm
-}
diff --git a/www-client/opera/opera-10.60_pre6380.ebuild b/www-client/opera/opera-10.60_pre6380.ebuild
new file mode 100644 (file)
index 0000000..9a890db
--- /dev/null
@@ -0,0 +1,187 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-client/opera/opera-10.60_pre6380.ebuild,v 1.1 2010/06/24 15:17:17 jer Exp $
+
+EAPI="2"
+
+inherit eutils multilib
+
+DESCRIPTION="A standards-compliant graphical Web browser"
+HOMEPAGE="http://www.opera.com/"
+
+SLOT="0"
+LICENSE="OPERA-10.53 LGPL-2 LGPL-3"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
+IUSE="elibc_FreeBSD gtk kde"
+
+RESTRICT="mirror test"
+
+OPREFIX="/usr/$(get_libdir)"
+
+QA_DT_HASH="${OPREFIX}/${PN}/.*"
+QA_PRESTRIPPED="${OPREFIX}/${PN}/.*"
+
+MY_LINGUAS="
+       be bg cs da de el en-GB es-ES es-LA et fi fr fr-CA fy hi hr hu id it ja ka
+       ko lt mk nb nl nn pl pt pt-BR ro ru sk sr sv ta te tr uk vi zh-CN zh-HK
+       zh-TW
+"
+
+for MY_LINGUA in ${MY_LINGUAS}; do
+       IUSE="${IUSE} linguas_${MY_LINGUA/-/_}"
+done
+
+O_U="http://snapshot.opera.com/unix/pineapple_${PV/_pre/-}/"
+O_P="${P/_pre/-}"
+
+SRC_URI="
+       amd64? ( ${O_U}${O_P}.x86_64.linux.tar.bz2 )
+       ppc? ( ${O_U}${O_P}.ppc.linux.tar.bz2 )
+       x86? ( ${O_U}${O_P}.i386.linux.tar.bz2 )
+       x86-fbsd? ( ${O_U}${O_P}.i386.freebsd.tar.bz2 )
+"
+
+DEPEND=">=sys-apps/sed-4"
+
+RDEPEND="
+       gtk? (
+               =x11-libs/gtk+-2*
+               dev-libs/atk
+               dev-libs/glib
+               media-libs/glitz
+               media-libs/libpng
+               x11-libs/cairo
+               x11-libs/pango
+               x11-libs/pixman
+       )
+       kde? (
+               kde-base/kdelibs
+       )
+       dev-libs/expat
+       media-libs/fontconfig
+       media-libs/freetype
+       media-plugins/gst-plugins-meta
+       sys-apps/util-linux
+       sys-libs/zlib
+       virtual/opengl
+       x11-libs/libICE
+       x11-libs/libSM
+       x11-libs/libX11
+       x11-libs/libXau
+       x11-libs/libXcomposite
+       x11-libs/libXcursor
+       x11-libs/libXdamage
+       x11-libs/libXdmcp
+       x11-libs/libXext
+       x11-libs/libXfixes
+       x11-libs/libXi
+       x11-libs/libXmu
+       x11-libs/libXrandr
+       x11-libs/libXrender
+       x11-libs/libXt
+       x11-libs/libxcb
+       x11-libs/xcb-util
+       "
+
+opera_linguas() {
+       # Remove unwanted LINGUAS:
+       local LINGUA
+       local LNGDIR="${D}usr/share/${PN}/locale"
+       einfo "Keeping these locales: ${LINGUAS}."
+       for LINGUA in ${MY_LINGUAS}; do
+               if ! use linguas_${LINGUA/-/_}; then
+                       LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
+                       rm -r "${LINGUA}"
+               fi
+       done
+}
+
+pkg_setup() {
+       echo -e \
+               " ${GOOD}****************************************************${NORMAL}"
+       elog "If you seek support, please file a bug report at"
+       elog "https://bugs.gentoo.org and post the output of"
+       elog " \`emerge --info =${CATEGORY}/${P}'"
+       echo -e \
+               " ${GOOD}****************************************************${NORMAL}"
+}
+
+src_unpack() {
+       unpack ${A}
+       if [[ ! -d ${S} ]]; then
+               cd "${WORKDIR}"/${PN}* || die "failed to enter work directory"
+               S="$(pwd)"
+               einfo "Setting WORKDIR to ${S}"
+       fi
+}
+
+src_install() {
+       # Remove "license directory" (bug #315473)
+       rm -rf "share/doc/opera"
+
+       # We install into usr instead of opt as Opera does not support the latter
+       dodir /usr
+       mv lib/  "${D}/${OPREFIX}" || die "mv lib/ failed"
+       mv share/ "${D}/usr/" || die "mv share/ failed"
+
+       # Unzip the man pages before sedding
+       gunzip "${D}"/usr/share/man/man1/* || die "gunzip failed"
+
+       # Replace PREFIX and SUFFIX in various files
+       sed -i \
+               -e "s:@@{PREFIX}:/usr:g" \
+               -e "s:@@{SUFFIX}::g" \
+               -e "s:@@{_SUFFIX}::g" \
+               -e "s:@@{USUFFIX}::g" \
+               "${D}"/usr/share/mime/packages/opera-widget.xml \
+               "${D}"/usr/share/man/man1/* \
+               "${D}"/usr/share/applications/opera-browser.desktop \
+               "${D}"/usr/share/applications/opera-widget-manager.desktop || die "sed failed"
+
+       # Sed libdir in opera script
+       sed "${FILESDIR}"/opera \
+               -e "s|OPERA_LIBDIR|${OPREFIX}|g" > opera \
+               || die "sed opera script failed"
+
+       # Sed libdir in defaults/pluginpath.ini
+       sed -i \
+               -e "s|/usr/lib32|${OPREFIX}|g" \
+               "${D}"/usr/share/opera/defaults/pluginpath.ini \
+               || die "sed pluginpath.ini failed"
+
+       # Install startup scripts
+       dobin ${PN} ${PN}-widget-manager || die "dobin failed"
+
+       # Stop revdep-rebuild from checking opera binaries
+       dodir /etc/revdep-rebuild
+       echo "SEARCH_DIRS_MASK=\"${OPREFIX}/${PN}\"" > "${D}"/etc/revdep-rebuild/90opera
+
+       # Change libz.so.3 to libz.so.1 for gentoo/freebsd
+       if use elibc_FreeBSD; then
+               scanelf -qR -N libz.so.3 -F "#N" "${D}"${OPREFIX}/${PN}/ | \
+               while read i; do
+                       if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
+                       then
+                               export SANITY_CHECK_LIBZ_FAILED=1
+                               break
+                       fi
+                       sed -i -e 's/libz\.so\.3/libz.so.1/g' "$i"
+               done
+               [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die "failed to change libz.so.3 to libz.so.1"
+       fi
+
+       [[ -z MY_LINGUAS ]] || opera_linguas
+}
+
+pkg_postinst() {
+       elog "To change the UI language, choose [Tools] -> [Preferences], open the"
+       elog "[General] tab, click on [Details...] then [Choose...] and point the"
+       elog "file chooser at /usr/share/opera/locale/, then enter the"
+       elog "directory for the language you want and [Open] the .lng file."
+
+       if use elibc_FreeBSD; then
+               elog
+               elog "To improve shared memory usage please set:"
+               elog "$ sysctl kern.ipc.shm_allow_removed=1"
+       fi
+}