/[gentoo-x86]/www-client/opera/opera-9.50_alpha1567.ebuild
Gentoo

Contents of /www-client/opera/opera-9.50_alpha1567.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Tue Oct 9 08:15:06 2007 UTC (10 years, 8 months ago) by jer
Branch: MAIN
Changes since 1.6: +8 -8 lines
Fix quoting issues caught by latest repoman.
(Portage version: 2.1.3.12)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/opera/opera-9.50_alpha1567.ebuild,v 1.6 2007/09/07 15:12:23 jer Exp $
4
5 GCONF_DEBUG="no"
6
7 inherit eutils gnome2
8
9 DESCRIPTION="Opera web browser"
10 HOMEPAGE="http://www.opera.com/"
11
12 SLOT="0"
13 LICENSE="OPERA-9.0"
14 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
15
16 IUSE="qt-static spell gnome elibc_FreeBSD"
17 RESTRICT="strip mirror"
18
19 O_LNG=""
20 O_SUFF="1567"
21 O_VER="9.50-20070903"
22
23 O_URI="http://snapshot.opera.com/unix/9.50-Alpha-1/"
24 SRC_URI="
25 x86? ( qt-static? (
26 ${O_URI}intel-linux/${PN}-${O_VER}.9-static-qt.i386${O_LNG}-${O_SUFF}.tar.bz2 ) )
27 x86? ( !qt-static? ( ${O_URI}intel-linux/${PN}-${O_VER}.6-shared-qt.i386${O_LNG}-${O_SUFF}.tar.bz2 ) )
28 amd64? ( ${O_URI}x86_64-linux/${PN}-${O_VER}.2-shared-qt.x86_64${O_LNG}-${O_SUFF}.tar.bz2 )
29 ppc? ( ${O_URI}ppc-linux/${PN}-${O_VER}.1-static-qt.ppc${O_LNG}-${O_SUFF}.tar.bz2 )
30 x86-fbsd? ( !qt-static? ( ${O_URI}intel-freebsd/${PN}-${O_VER}.4-shared-qt.i386.freebsd${O_LNG}-${O_SUFF}.tar.bz2 ) )
31 x86-fbsd? ( qt-static? ( ${O_URI}/intel-freebsd/${PN}-${O_VER}.1-static-qt.i386.freebsd${O_LNG}-${O_SUFF}.tar.bz2 ) )"
32
33 # amd64? ( qt-static? ( ${O_URI}x86_64-linux/${PN}-${O_VER}.2-static-qt.i386${O_LNG}-${O_SUFF}.tar.bz2 ) )
34 # sparc? ( ${O_URI}sparc-linux/${PN}-${O_VER}.1-static-qt.sparc${O_LNG}-${O_SUFF}.tar.bz2 )
35
36 DEPEND=">=sys-apps/sed-4"
37
38 RDEPEND="x11-libs/libXrandr
39 x11-libs/libXp
40 x11-libs/libXmu
41 x11-libs/libXi
42 x11-libs/libXft
43 x11-libs/libXext
44 x11-libs/libXcursor
45 x11-libs/libX11
46 x11-libs/libSM
47 x11-libs/libICE
48 >=media-libs/fontconfig-2.1.94-r1
49 !qt-static? ( =x11-libs/qt-3* )
50 media-libs/libexif
51 spell? ( app-text/aspell )
52 media-libs/jpeg
53 x86-fbsd? ( =virtual/libstdc++-3* )"
54
55 S=${WORKDIR}/${A/.tar.bz2/}
56
57 src_unpack() {
58 unpack ${A}
59 cd "${S}"
60
61 epatch "${FILESDIR}/${PN}-9.00-install.patch"
62 use elibc_FreeBSD || epatch "${FILESDIR}/${PN}-9.50-pluginpath.patch"
63 use elibc_FreeBSD && epatch "${FILESDIR}/${PN}-9.50-pluginpath-fbsd.patch"
64
65 sed -i -e "s:config_dir=\"/etc\":config_dir=\"${D}/etc/\":g" \
66 -e "s:/usr/share/applnk:${D}/usr/share/applnk:g" \
67 -e "s:/usr/share/pixmaps:${D}/usr/share/pixmaps:g" \
68 -e "s:/usr/share/icons:${D}/usr/share/icons:g" \
69 -e "s:/etc/X11:${D}/etc/X11:g" \
70 -e "s:/usr/share/gnome:${D}/usr/share/gnome:g" \
71 -e "s:/opt/gnome/share:${D}/opt/gnome/share:g" \
72 -e 's:#\(OPERA_FORCE_JAVA_ENABLED=\):\1:' \
73 -e 's:#\(export LD_PRELOAD OPERA_FORCE_JAVA_ENABLED\):\1:' \
74 -e 's:read str_answer:return 0:' \
75 -e "s:/opt/kde:${D}/usr/kde:" \
76 -e "s:\(str_localdirplugin=\).*$:\1/opt/opera/lib/opera/plugins:" \
77 install.sh || die "sed failed"
78 }
79
80 src_compile() {
81 # This workaround is sadly needed because gnome2.eclass doesn't check
82 # whether a configure script or Makefile exists.
83 true
84 }
85
86 src_install() {
87 local res
88 # Prepare installation directories for Opera's installer script.
89 dodir /etc
90
91 # Opera's native installer.
92 ./install.sh --prefix="${D}"/opt/opera || die "install.sh failed"
93
94 einfo "It is safe to ignore warnings about failed checksums"
95 einfo "and about files that would be ignored ..."
96 einfo "Completing the installation where install.sh abandoned us ..."
97
98 # java workaround
99 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
100
101 dosed /opt/opera/bin/opera
102 dosed /opt/opera/share/opera/java/opera.policy
103
104 # Install the icons
105 insinto /usr/share/pixmaps
106 doins usr/share/pixmaps/opera.xpm
107 for res in 16x16 22x22 32x32 48x48 ; do
108 insinto /usr/share/icons/hicolor/${res}/apps
109 doins usr/share/icons/hicolor/${res}/apps/opera.png
110 done
111
112 # Install the menu entry
113 insinto /usr/share/applications
114 doins "${FILESDIR}"/opera.desktop
115
116 # Install a symlink /usr/bin/opera
117 dodir /usr/bin
118 dosym /opt/opera/bin/opera /usr/bin/opera
119
120 # fix plugin path
121 echo "Plugin Path=/opt/opera/lib/opera/plugins" >> "${D}"/etc/opera6rc
122
123 # enable spellcheck
124 if use spell; then
125 if use qt-static; then
126 DIR=$O_VER.1
127 else
128 use sparc && DIR=$O_VER.2 || DIR=$O_VER.5
129 fi
130 echo "Spell Check Engine=/opt/opera/lib/opera/${DIR}/spellcheck.so" >> "${D}"/opt/opera/share/opera/ini/spellcheck.ini
131 fi
132
133 dodir /etc/revdep-rebuild
134 echo 'SEARCH_DIRS_MASK="/opt/opera/lib/opera/plugins"' > "${D}"/etc/revdep-rebuild/90opera
135
136 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
137 if use elibc_FreeBSD; then
138 scanelf -qR -N libz.so.3 -F "#N" "${D}"/opt/${PN}/ | \
139 while read i; do
140 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
141 then
142 export SANITY_CHECK_LIBZ_FAILED=1
143 break
144 fi
145 sed -i -e 's/libz\.so\.3/libz.so.1/g' "$i"
146 done
147 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die "failed to change libz.so.3 to libz.so.1"
148 fi
149
150 # symlink to libflash-player.so:
151 dosym /opt/netscape/plugins/libflashplayer.so \
152 /opt/opera/lib/opera/plugins/libflashplayer.so
153
154 # Add the Opera man dir to MANPATH:
155 insinto /etc/env.d
156 echo 'MANPATH="/opt/opera/share/man"' >> "${D}"/etc/env.d/90opera
157 }
158
159 pkg_postinst() {
160 use gnome && gnome2_pkg_postinst
161
162 elog "For localized language files take a look at:"
163 elog " http://www.opera.com/download/languagefiles/index.dml"
164 elog
165 elog "To use the spellchecker (USE=spell) for non-English simply do"
166 elog "$ emerge app-dicts/aspell-[your language]."
167
168 if use elibc_FreeBSD; then
169 elog
170 elog "To improve shared memory usage please set:"
171 elog "$ sysctl kern.ipc.shm_allow_removed=1"
172 fi
173 }
174
175 pkg_postrm() {
176 use gnome && gnome2_pkg_postrm
177 }

  ViewVC Help
Powered by ViewVC 1.1.20