/[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.5 - (hide annotations) (download)
Fri Sep 7 06:47:55 2007 UTC (7 years ago) by mr_bones_
Branch: MAIN
Changes since 1.4: +2 -2 lines
whitespace
(Portage version: 2.1.2.12)

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

  ViewVC Help
Powered by ViewVC 1.1.20