Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/opera: opera-10.10-r1.ebuild ChangeLog
Date: Thu, 28 Jan 2010 21:46:57
Message-Id: E1NacCP-0005PO-Mt@stork.gentoo.org
1 jer 10/01/28 21:46:49
2
3 Modified: ChangeLog
4 Added: opera-10.10-r1.ebuild
5 Log:
6 Apply the same enhancement to 10.10.
7 (Portage version: 2.2_rc61/cvs/Linux i686)
8
9 Revision Changes Path
10 1.438 www-client/opera/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/opera/ChangeLog?rev=1.438&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/opera/ChangeLog?rev=1.438&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/opera/ChangeLog?r1=1.437&r2=1.438
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v
19 retrieving revision 1.437
20 retrieving revision 1.438
21 diff -u -r1.437 -r1.438
22 --- ChangeLog 28 Jan 2010 21:42:13 -0000 1.437
23 +++ ChangeLog 28 Jan 2010 21:46:49 -0000 1.438
24 @@ -1,6 +1,11 @@
25 # ChangeLog for www-client/opera
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.437 2010/01/28 21:42:13 jer Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.438 2010/01/28 21:46:49 jer Exp $
29 +
30 +*opera-10.10-r1 (28 Jan 2010)
31 +
32 + 28 Jan 2010; Jeroen Roovers <jer@g.o> +opera-10.10-r1.ebuild:
33 + Apply the same enhancement to 10.10.
34
35 28 Jan 2010; Jeroen Roovers <jer@g.o> opera-10.20_pre4744.ebuild:
36 Do not run the md5check in install.sh since we already check the entire
37
38
39
40 1.1 www-client/opera/opera-10.10-r1.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/opera/opera-10.10-r1.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/opera/opera-10.10-r1.ebuild?rev=1.1&content-type=text/plain
44
45 Index: opera-10.10-r1.ebuild
46 ===================================================================
47 # Copyright 1999-2010 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/www-client/opera/opera-10.10-r1.ebuild,v 1.1 2010/01/28 21:46:49 jer Exp $
50
51 EAPI="2"
52
53 GCONF_DEBUG="no"
54
55 inherit eutils gnome2
56
57 DESCRIPTION="A standards-compliant graphical Web browser"
58 HOMEPAGE="http://www.opera.com/"
59
60 SLOT="0"
61 LICENSE="OPERA-10.10"
62 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
63
64 RESTRICT="mirror test"
65
66 QA_DT_HASH="opt/${PN}/.*"
67 QA_PRESTRIPPED="
68 opt/${PN}/lib/${PN}/${PV/_pre*}/missingsyms.so
69 opt/${PN}/lib/${PN}/${PV/_pre*}/spellcheck.so
70 opt/${PN}/lib/${PN}/${PV/_pre*}/opera
71 opt/${PN}/lib/${PN}/${PV/_pre*}/works
72 opt/${PN}/lib/${PN}/${PV/_pre*}/operaplugincleaner
73 opt/${PN}/lib/${PN}/${PV/_pre*}/operapluginwrapper
74 "
75 QA_PRESTRIPPED_amd64="
76 ${QA_PRESTRIPPED}
77 opt/${PN}/lib/${PN}/${PV/_pre*}/operapluginwrapper-ia32-linux
78 opt/${PN}/lib/${PN}/${PV/_pre*}/operapluginwrapper-native
79 "
80
81 IUSE="elibc_FreeBSD gnome qt3 qt-static"
82 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"
83
84 for MY_LINGUA in ${MY_LINGUAS}; do
85 IUSE="${IUSE} linguas_${MY_LINGUA/-/_}"
86 done
87
88 O_U="mirror://opera/linux/1010/final/en/"
89
90 SRC_URI="
91 amd64? (
92 qt-static? ( ${O_U}x86_64/${P}.gcc4-bundled-qt4.x86_64.tar.bz2 )
93 !qt-static? (
94 qt3? ( ${O_U}x86_64/${P}.gcc4-shared-qt3.x86_64.tar.bz2 )
95 !qt3? ( ${O_U}x86_64/${P}.gcc4-qt4.x86_64.tar.bz2 )
96 )
97 )
98 ppc? ( ${O_U}ppc/shared/${P}.gcc4-shared-qt3.ppc.tar.bz2 )
99 x86? (
100 qt-static? ( ${O_U}i386/${P}.gcc4-bundled-qt4.i386.tar.bz2 )
101 !qt-static? (
102 qt3? ( ${O_U}i386/shared/${P}.gcc4-shared-qt3.i386.tar.bz2 )
103 !qt3? ( ${O_U}i386/${P}.gcc4-qt4.i386.tar.bz2 )
104 )
105 )
106 x86-fbsd? ( mirror://opera/unix/freebsd/1010/en/intel/shared/${P}-freebsd7-shared-qt3.i386.tar.bz2 )
107 "
108
109 DEPEND=">=sys-apps/sed-4"
110
111 RDEPEND="
112 media-libs/jpeg
113 media-libs/libexif
114 >=media-libs/fontconfig-2.1.94-r1
115 x11-libs/libXrandr
116 x11-libs/libXp
117 x11-libs/libXmu
118 x11-libs/libXi
119 x11-libs/libXft
120 x11-libs/libXext
121 x11-libs/libXcursor
122 x11-libs/libX11
123 x11-libs/libSM
124 x11-libs/libICE
125 amd64? (
126 qt-static? ( media-libs/nas )
127 !qt-static? (
128 qt3? ( =x11-libs/qt-3*[-immqt] )
129 !qt3? ( x11-libs/qt-core x11-libs/qt-gui )
130 )
131 )
132 ppc? ( =x11-libs/qt-3*[-immqt] )
133 x86? (
134 qt-static? ( media-libs/nas )
135 !qt-static? (
136 qt3? ( =x11-libs/qt-3*[-immqt] )
137 !qt3? ( x11-libs/qt-core x11-libs/qt-gui )
138 )
139 )
140 x86-fbsd? ( =x11-libs/qt-3*[-immqt] )
141 "
142
143 opera_linguas() {
144 # Remove unwanted LINGUAS:
145 local LINGUA
146 local LNGDIR="${D}/opt/opera/share/opera/locale"
147 einfo "Keeping these locales: ${LINGUAS}."
148 for LINGUA in ${MY_LINGUAS}; do
149 if ! use linguas_${LINGUA/-/_}; then
150 LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
151 rm -r "${LINGUA}"
152 fi
153 done
154 }
155
156 pkg_setup() {
157 elog "${WARN}If you seek support, please file a bug report at${NORMAL}"
158 elog "${WARN}https://bugs.gentoo.org and post the output of${NORMAL}"
159 elog "${WARN} \`emerge --info =${CATEGORY}/${P}'${NORMAL}"
160 }
161
162 src_unpack() {
163 unpack ${A}
164 if [[ ! -d ${S} ]]; then
165 cd "${WORKDIR}"/${PN}* || die "failed to enter work directory"
166 S="$(pwd)"
167 einfo "Setting WORKDIR to ${S}"
168 fi
169 }
170
171 src_prepare() {
172 epatch "${FILESDIR}/${PN}-gentoo.patch"
173 epatch "${FILESDIR}/${PN}-simplify-desktop.patch"
174 epatch "${FILESDIR}/${PN}-freedesktop.patch"
175
176 # bug #181300:
177 if use elibc_FreeBSD; then
178 epatch "${FILESDIR}/${PN}-10.00-pluginpath-fbsd.patch"
179 else
180 epatch "${FILESDIR}/${PN}-10.00-pluginpath.patch"
181 fi
182
183 sed -e "s|config_dir=\"/etc\"|config_dir=\"${D}/etc/\"|g" \
184 -e "s|\(str_localdirplugin=\).*$|\1/opt/opera/lib/opera/plugins|" \
185 -e 's|#\(export LD_PRELOAD OPERA_FORCE_JAVA_ENABLED\)|\1|' \
186 -e 's|#\(OPERA_FORCE_JAVA_ENABLED=\)|\1|' \
187 -e 's|md5sum|:|g' \
188 -i install.sh || die "sed failed"
189 }
190
191 # These workarounds are sadly needed because gnome2.eclass doesn't check
192 # whether a configure/Makefile script exists.
193 src_configure() { :; }
194 src_compile() { :; }
195
196 src_install() {
197 # Prepare installation directories for Opera's installer script.
198 dodir /etc
199
200 # Opera's native installer.
201 ./install.sh --prefix="${D}"/opt/opera || die "install.sh failed"
202
203 einfo "It is safe to ignore warnings about files that would be ignored."
204 einfo "Completing the installation where install.sh abandoned us ..."
205
206 # java workaround
207 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
208
209 dosed /opt/opera/bin/opera
210 dosed /opt/opera/share/opera/java/opera.policy
211
212 # Adapt desktop file to Gnome when needed
213 use gnome && sed -i -e s:"GenericName\[":"Comment\[": "${D}"/usr/share/applications/opera.desktop
214
215 # Install a symlink /usr/bin/opera
216 dodir /usr/bin
217 dosym /opt/opera/bin/opera /usr/bin/opera
218
219 dodir /etc/revdep-rebuild
220 echo 'SEARCH_DIRS_MASK="/opt/opera/lib/opera/plugins"' > "${D}"/etc/revdep-rebuild/90opera
221
222 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
223 if use elibc_FreeBSD; then
224 scanelf -qR -N libz.so.3 -F "#N" "${D}"/opt/${PN}/ | \
225 while read i; do
226 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
227 then
228 export SANITY_CHECK_LIBZ_FAILED=1
229 break
230 fi
231 sed -i -e 's/libz\.so\.3/libz.so.1/g' "$i"
232 done
233 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die "failed to change libz.so.3 to libz.so.1"
234 fi
235
236 # Add the Opera man dir to MANPATH:
237 insinto /etc/env.d
238 echo 'MANPATH="/opt/opera/share/man"' >> "${D}"/etc/env.d/90opera
239
240 [[ -z MY_LINGUAS ]] || opera_linguas
241 }
242
243 pkg_postinst() {
244 use gnome && gnome2_pkg_postinst
245
246 elog "To change the UI language, choose [Tools] -> [Preferences], open the"
247 elog "[General] tab, click on [Details...] then [Choose...] and point the"
248 elog "file chooser at /opt/opera/share/opera/locale/, then enter the"
249 elog "directory for the language you want and [Open] the .lng file."
250
251 if use elibc_FreeBSD; then
252 elog
253 elog "To improve shared memory usage please set:"
254 elog "$ sysctl kern.ipc.shm_allow_removed=1"
255 fi
256 }
257
258 pkg_postrm() {
259 use gnome && gnome2_pkg_postrm
260 }