Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 474910 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/www-client/firefox-bin/firefox-bin-30.0.ebuild (-37 / +67 lines)
Lines 1-6 Link Here
1
# Copyright 1999-2014 Gentoo Foundation
1
# Copyright 1999-2014 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-30.0.ebuild,v 1.3 2014/06/16 08:53:45 pacho Exp $
3
# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-27.0.ebuild,v 1.1 2014/02/07 14:11:02 polynomial-c Exp $
4
4
5
EAPI="5"
5
EAPI="5"
6
6
Lines 21-82 Link Here
21
# We don't use the http mirror because it deletes old tarballs.
21
# We don't use the http mirror because it deletes old tarballs.
22
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/"
22
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/"
23
23
24
inherit eutils multilib pax-utils fdo-mime gnome2-utils mozlinguas nsplugins
24
inherit eutils pax-utils fdo-mime gnome2-utils mozlinguas nsplugins multilib-minimal
25
25
26
DESCRIPTION="Firefox Web Browser"
26
DESCRIPTION="Firefox Web Browser"
27
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases"
27
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases"
28
SRC_URI="${SRC_URI}
28
SRC_URI="${SRC_URI}
29
	amd64? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
29
	abi_x86_64? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
30
	x86? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
30
	abi_x86_32? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
31
HOMEPAGE="http://www.mozilla.com/firefox"
31
HOMEPAGE="http://www.mozilla.com/firefox"
32
RESTRICT="strip mirror"
32
RESTRICT="strip mirror"
33
33
34
KEYWORDS="-* ~amd64 ~x86"
34
KEYWORDS="-* ~amd64 ~x86"
35
SLOT="0"
35
SLOT="0"
36
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
36
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
37
IUSE="selinux startup-notification"
37
IUSE="startup-notification"
38
38
39
DEPEND="app-arch/unzip
39
DEPEND="app-arch/unzip"
40
	selinux? ( sec-policy/selinux-mozilla )"
41
RDEPEND="dev-libs/dbus-glib
40
RDEPEND="dev-libs/dbus-glib
42
	virtual/freedesktop-icon-theme
41
	virtual/freedesktop-icon-theme
43
	x11-libs/libXrender
42
	x11-libs/libXrender
44
	x11-libs/libXt
43
	x11-libs/libXt
45
	x11-libs/libXmu
44
	x11-libs/libXmu
46
45
47
	selinux? ( sec-policy/selinux-mozilla )
48
	>=x11-libs/gtk+-2.2:2
46
	>=x11-libs/gtk+-2.2:2
49
	>=media-libs/alsa-lib-1.0.16
47
	>=media-libs/alsa-lib-1.0.16
48
49
	!net-libs/libproxy[spidermonkey]
50
	amd64? ( abi_x86_32? (
51
		|| (
52
			(
53
				app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
54
				app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
55
				app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)]
56
				app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
57
			)
58
			(
59
				dev-libs/dbus-glib[abi_x86_32(-)]
60
				x11-libs/libXrender[abi_x86_32(-)]
61
				x11-libs/libXt[abi_x86_32(-)]
62
				x11-libs/libXmu[abi_x86_32(-)]
63
				>=x11-libs/gtk+-2.2:2[abi_x86_32(-)]
64
				>=media-libs/alsa-lib-1.0.16[abi_x86_32(-)]
65
			)
66
		)
67
	) )
50
"
68
"
51
69
52
QA_PREBUILT="
70
QA_PREBUILT="
53
	opt/${MOZ_PN}/*.so
71
	opt/${MOZ_PN}*/*.so
54
	opt/${MOZ_PN}/${MOZ_PN}
72
	opt/${MOZ_PN}*/${MOZ_PN}
55
	opt/${MOZ_PN}/${PN}
73
	opt/${MOZ_PN}*/${PN}
56
	opt/${MOZ_PN}/crashreporter
74
	opt/${MOZ_PN}*/crashreporter
57
	opt/${MOZ_PN}/webapprt-stub
75
	opt/${MOZ_PN}*/webapprt-stub
58
	opt/${MOZ_PN}/plugin-container
76
	opt/${MOZ_PN}*/plugin-container
59
	opt/${MOZ_PN}/mozilla-xremote-client
77
	opt/${MOZ_PN}*/mozilla-xremote-client
60
	opt/${MOZ_PN}/updater
78
	opt/${MOZ_PN}*/updater
61
"
79
"
62
80
63
S="${WORKDIR}/${MOZ_PN}"
81
S="${WORKDIR}"
82
BUILD_DIR="${S}/${MOZ_PN}"
64
83
65
src_unpack() {
84
src_unpack() {
66
	unpack ${A}
85
	local i
86
	for i in ${A} ; do
87
		[[ $i = *.xpi ]] && continue
88
		unpack "${i}"
89
		mv "${MOZ_PN}" "${MOZ_PN}-$([[ $i = *i686* ]] && echo abi_x86_32.x86 || echo abi_x86_64.amd64)" || die
90
	done
67
91
68
	# Unpack language packs
92
	# Unpack language packs
69
	mozlinguas_src_unpack
93
	mozlinguas_src_unpack
70
}
94
}
71
95
72
src_install() {
96
multilib_src_install() {
73
	declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN}
97
	local suffix=
98
	multilib_is_native_abi || suffix="-${ABI}"
99
	local MY_PN="${PN}${suffix}"
100
101
	declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN}${suffix}
74
102
75
	local size sizes icon_path icon name
103
	local size sizes icon_path icon name
76
	sizes="16 32 48"
104
	sizes="16 32 48"
77
	icon_path="${S}/browser/chrome/icons/default"
105
	icon_path="${BUILD_DIR}/browser/chrome/icons/default"
78
	icon="${PN}"
106
	icon="${PN}-icon"
79
	name="Mozilla Firefox"
107
	name="Mozilla Firefox (bin/${ABI})"
80
108
81
	# Install icons and .desktop for menu entry
109
	# Install icons and .desktop for menu entry
82
	for size in ${sizes}; do
110
	for size in ${sizes}; do
Lines 87-111 Link Here
87
	insinto "/usr/share/icons/hicolor/128x128/apps"
115
	insinto "/usr/share/icons/hicolor/128x128/apps"
88
	newins "${icon_path}/../../../icons/mozicon128.png" "${icon}.png" || die
116
	newins "${icon_path}/../../../icons/mozicon128.png" "${icon}.png" || die
89
	# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
117
	# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
90
	newicon "${S}"/browser/chrome/icons/default/default48.png ${PN}.png
118
	newicon "${BUILD_DIR}"/browser/chrome/icons/default/default48.png ${PN}-icon.png
91
	domenu "${FILESDIR}"/${PN}.desktop
119
	newmenu "${FILESDIR}"/${PN}.desktop "${MY_PN}".desktop
92
	sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
120
	sed -e "/^Name/s:=.*:=${name}:" \
93
		"${ED}/usr/share/applications/${PN}.desktop" || die
121
		-e "/^Icon/s:=.*:=${icon}:" \
122
		-e "/^Exec/s:=.*:=/usr/bin/${MY_PN} %u:" \
123
		-i "${ED}/usr/share/applications/${MY_PN}.desktop" || die
94
124
95
	# Add StartupNotify=true bug 237317
125
	# Add StartupNotify=true bug 237317
96
	if use startup-notification; then
126
	if use startup-notification; then
97
		echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}.desktop
127
		echo "StartupNotify=true" >> "${D}"/usr/share/applications/${MY_PN}.desktop
98
	fi
128
	fi
99
129
100
	# Install firefox in /opt
130
	# Install firefox in /opt
101
	dodir ${MOZILLA_FIVE_HOME%/*}
131
	dodir ${MOZILLA_FIVE_HOME%/*}
102
	mv "${S}" "${D}"${MOZILLA_FIVE_HOME} || die
132
	mv "${BUILD_DIR}" "${D}"${MOZILLA_FIVE_HOME} || die
103
133
104
	# Fix prefs that make no sense for a system-wide install
134
	# Fix prefs that make no sense for a system-wide install
105
	insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
135
	insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
106
	doins "${FILESDIR}"/local-settings.js
136
	doins "${FILESDIR}"/local-settings.js
107
	# Copy preferences file so we can do a simple rename.
137
	# Copy preferences file so we can do a simple rename.
108
	cp "${FILESDIR}"/all-gentoo-1.js  "${D}"${MOZILLA_FIVE_HOME}/all-gentoo.js
138
	cp "${FILESDIR}"/all-gentoo-1.js  "${D}"${MOZILLA_FIVE_HOME}/all-gentoo.js || die
109
139
110
	# Install language packs
140
	# Install language packs
111
	mozlinguas_src_install
141
	mozlinguas_src_install
Lines 120-138 Link Here
120
150
121
	# Create /usr/bin/firefox-bin
151
	# Create /usr/bin/firefox-bin
122
	dodir /usr/bin/
152
	dodir /usr/bin/
123
	cat <<-EOF >"${D}"/usr/bin/${PN}
153
	cat <<-EOF >"${D}"/usr/bin/${MY_PN}
124
	#!/bin/sh
154
	#!/bin/sh
125
	unset LD_PRELOAD
155
	unset LD_PRELOAD
126
	LD_LIBRARY_PATH="/opt/firefox/"
156
	LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}"
127
	GTK_PATH=/usr/lib/gtk-2.0/
157
	GTK_PATH=/usr/$(get_libdir)/gtk-2.0/
128
	exec /opt/${MOZ_PN}/${MOZ_PN} "\$@"
158
	exec ${MOZILLA_FIVE_HOME}/${MOZ_PN} "\$@"
129
	EOF
159
	EOF
130
	fperms 0755 /usr/bin/${PN}
160
	fperms 0755 /usr/bin/${MY_PN}
131
161
132
	# revdep-rebuild entry
162
	# revdep-rebuild entry
133
	insinto /etc/revdep-rebuild
163
	insinto /etc/revdep-rebuild
134
	echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10${PN}
164
	echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10${MY_PN}
135
	doins "${T}"/10${PN} || die
165
	doins "${T}"/10${MY_PN} || die
136
166
137
	# Plugins dir
167
	# Plugins dir
138
	share_plugins_dir
168
	share_plugins_dir

Return to bug 474910