/[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.3 - (hide annotations) (download)
Thu Sep 6 16:31:42 2007 UTC (11 years, 1 month ago) by jer
Branch: MAIN
Changes since 1.2: +2 -2 lines
Remove unneeded amd64? qt-static? for this build.
(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 jer 1.3 # $Header: /var/cvsroot/gentoo-x86/www-client/opera/opera-9.50_alpha1567.ebuild,v 1.2 2007/09/06 16:15:41 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     # opera-9.50-20070903.1-static-qt.ppc-1567.tar.bz2
24    
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.1
66     sed -i -e "s:config_dir=\"/etc\":config_dir=\"${D}/etc/\":g" \
67     -e "s:/usr/share/applnk:${D}/usr/share/applnk:g" \
68     -e "s:/usr/share/pixmaps:${D}/usr/share/pixmaps:g" \
69     -e "s:/usr/share/icons:${D}/usr/share/icons:g" \
70     -e "s:/etc/X11:${D}/etc/X11:g" \
71     -e "s:/usr/share/gnome:${D}/usr/share/gnome:g" \
72     -e "s:/opt/gnome/share:${D}/opt/gnome/share:g" \
73     -e 's:#\(OPERA_FORCE_JAVA_ENABLED=\):\1:' \
74     -e 's:#\(export LD_PRELOAD OPERA_FORCE_JAVA_ENABLED\):\1:' \
75     -e 's:read str_answer:return 0:' \
76     -e "s:/opt/kde:${D}/usr/kde:" \
77     -e "s:\(str_localdirplugin=\).*$:\1/opt/opera/lib/opera/plugins:" \
78     install.sh || die "sed failed"
79     }
80    
81     src_compile() {
82     # This workaround is sadly needed because gnome2.eclass doesn't check
83     # whether a configure script or Makefile exists.
84     true
85     }
86    
87     src_install() {
88     local res
89     # Prepare installation directories for Opera's installer script.
90     dodir /etc
91    
92     # Opera's native installer.
93     ./install.sh --prefix="${D}"/opt/opera || die "install.sh failed"
94    
95     einfo "It is safe to ignore warnings about failed checksums"
96     einfo "and about files that would be ignored ..."
97     einfo "Completing the installation where install.sh abandoned us ..."
98    
99     # java workaround
100     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
101    
102     dosed /opt/opera/bin/opera
103     dosed /opt/opera/share/opera/java/opera.policy
104    
105     # Install the icons
106     insinto /usr/share/pixmaps
107     doins usr/share/pixmaps/opera.xpm
108     for res in 16x16 22x22 32x32 48x48 ; do
109     insinto /usr/share/icons/hicolor/${res}/apps
110     doins usr/share/icons/hicolor/${res}/apps/opera.png
111     done
112    
113     # Install the menu entry
114     insinto /usr/share/applications
115     doins ${FILESDIR}/opera.desktop
116    
117     # Install a symlink /usr/bin/opera
118     dodir /usr/bin
119     dosym /opt/opera/bin/opera /usr/bin/opera
120    
121     # fix plugin path
122     echo "Plugin Path=/opt/opera/lib/opera/plugins" >> ${D}/etc/opera6rc
123    
124     # enable spellcheck
125     if use spell; then
126     if use qt-static; then
127     DIR=$O_VER.1
128     else
129     use sparc && DIR=$O_VER.2 || DIR=$O_VER.5
130     fi
131     echo "Spell Check Engine=/opt/opera/lib/opera/${DIR}/spellcheck.so" >> ${D}/opt/opera/share/opera/ini/spellcheck.ini
132     fi
133    
134     dodir /etc/revdep-rebuild
135     echo 'SEARCH_DIRS_MASK="/opt/opera/lib/opera/plugins"' > ${D}/etc/revdep-rebuild/90opera
136    
137     # Change libz.so.3 to libz.so.1 for gentoo/freebsd
138 jer 1.2 if use elibc_FreeBSD; then
139 jer 1.1 scanelf -qR -N libz.so.3 -F "#N" "${D}"/opt/${PN}/ | \
140     while read i; do
141     if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
142     then
143     export SANITY_CHECK_LIBZ_FAILED=1
144     break
145     fi
146     sed -i -e 's/libz\.so\.3/libz.so.1/g' "$i"
147     done
148     [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die "failed to change libz.so.3 to libz.so.1"
149     fi
150    
151     # symlink to libflash-player.so:
152     dosym /opt/netscape/plugins/libflashplayer.so \
153     /opt/opera/lib/opera/plugins/libflashplayer.so
154    
155     # Add the Opera man dir to MANPATH:
156     insinto /etc/env.d
157     echo 'MANPATH="/opt/opera/share/man"' >> ${D}/etc/env.d/90opera
158     }
159    
160     pkg_postinst() {
161     use gnome && gnome2_pkg_postinst
162    
163     elog "For localized language files take a look at:"
164     elog " http://www.opera.com/download/languagefiles/index.dml"
165     elog
166     elog "To use the spellchecker (USE=spell) for non-English simply do"
167     elog "$ emerge app-dicts/aspell-[your language]."
168    
169 jer 1.2 if use elibc_FreeBSD; then
170 jer 1.1 elog
171     elog "To improve shared memory usage please set:"
172     elog "$ sysctl kern.ipc.shm_allow_removed=1"
173     fi
174     }
175    
176     pkg_postrm() {
177     use gnome && gnome2_pkg_postrm
178     }

  ViewVC Help
Powered by ViewVC 1.1.20