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-21.0.ebuild (-30 / +46 lines)
Lines 21-33 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
Lines 47-82 Link Here
47
	>=media-libs/alsa-lib-1.0.16
47
	>=media-libs/alsa-lib-1.0.16
48
48
49
	!net-libs/libproxy[spidermonkey]
49
	!net-libs/libproxy[spidermonkey]
50
	amd64? ( abi_x86_32? ( app-emulation/emul-linux-x86-gtklibs ) )
50
"
51
"
51
52
52
QA_PREBUILT="
53
QA_PREBUILT="
53
	opt/${MOZ_PN}/*.so
54
	opt/${MOZ_PN}*/*.so
54
	opt/${MOZ_PN}/${MOZ_PN}
55
	opt/${MOZ_PN}*/${MOZ_PN}
55
	opt/${MOZ_PN}/${PN}
56
	opt/${MOZ_PN}*/${PN}
56
	opt/${MOZ_PN}/crashreporter
57
	opt/${MOZ_PN}*/crashreporter
57
	opt/${MOZ_PN}/webapprt-stub
58
	opt/${MOZ_PN}*/webapprt-stub
58
	opt/${MOZ_PN}/plugin-container
59
	opt/${MOZ_PN}*/plugin-container
59
	opt/${MOZ_PN}/mozilla-xremote-client
60
	opt/${MOZ_PN}*/mozilla-xremote-client
60
	opt/${MOZ_PN}/updater
61
	opt/${MOZ_PN}*/updater
61
"
62
"
62
63
63
S="${WORKDIR}/${MOZ_PN}"
64
S="${WORKDIR}"
65
BUILD_DIR="${S}/${MOZ_PN}"
64
66
65
src_unpack() {
67
src_unpack() {
66
	unpack ${A}
68
	local i
69
	for i in ${A} ; do
70
		[[ $i = *.xpi ]] && continue
71
		unpack "${i}"
72
		mv "${MOZ_PN}" "${MOZ_PN}-$([[ $i = *i686* ]] && echo x86 || echo amd64)" || die
73
	done
67
74
68
	# Unpack language packs
75
	# Unpack language packs
69
	mozlinguas_src_unpack
76
	mozlinguas_src_unpack
70
}
77
}
71
78
72
src_install() {
79
multilib_src_install() {
73
	declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN}
80
	local abis=( $(multilib_get_enabled_abis) )
81
	local best_abi="${abis[$(( ${#abis[@]} - 1 ))]}"
82
	local suffix=
83
	[[ ${ABI} = ${best_abi} ]] || suffix="-${ABI}"
84
	local MY_PN="${PN}${suffix}"
85
86
	declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN}${suffix}
74
87
75
	local size sizes icon_path icon name
88
	local size sizes icon_path icon name
76
	sizes="16 32 48"
89
	sizes="16 32 48"
77
	icon_path="${S}/browser/chrome/icons/default"
90
	icon_path="${BUILD_DIR}/browser/chrome/icons/default"
78
	icon="${PN}"
91
	icon="${PN}-icon"
79
	name="Mozilla Firefox"
92
	name="Mozilla Firefox (bin/${ABI})"
80
93
81
	# Install icons and .desktop for menu entry
94
	# Install icons and .desktop for menu entry
82
	for size in ${sizes}; do
95
	for size in ${sizes}; do
Lines 87-105 Link Here
87
	insinto "/usr/share/icons/hicolor/128x128/apps"
100
	insinto "/usr/share/icons/hicolor/128x128/apps"
88
	newins "${icon_path}/../../../icons/mozicon128.png" "${icon}.png" || die
101
	newins "${icon_path}/../../../icons/mozicon128.png" "${icon}.png" || die
89
	# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
102
	# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
90
	newicon "${S}"/browser/chrome/icons/default/default48.png ${PN}-icon.png
103
	newicon "${BUILD_DIR}"/browser/chrome/icons/default/default48.png ${PN}-icon.png
91
	domenu "${FILESDIR}"/${PN}.desktop
104
	newmenu "${FILESDIR}"/${PN}.desktop "${MY_PN}".desktop
92
	sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
105
	sed -e "/^Name/s:=.*:=${name}:" \
93
		"${ED}/usr/share/applications/${PN}.desktop" || die
106
		-e "/^Icon/s:=.*:=${icon}:" \
107
		-e "/^Exec/s:=.*:=/usr/bin/${MY_PN} %u:" \
108
		-i "${ED}/usr/share/applications/${MY_PN}.desktop" || die
94
109
95
	# Add StartupNotify=true bug 237317
110
	# Add StartupNotify=true bug 237317
96
	if use startup-notification; then
111
	if use startup-notification; then
97
		echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}.desktop
112
		echo "StartupNotify=true" >> "${D}"/usr/share/applications/${MY_PN}.desktop
98
	fi
113
	fi
99
114
100
	# Install firefox in /opt
115
	# Install firefox in /opt
101
	dodir ${MOZILLA_FIVE_HOME%/*}
116
	dodir ${MOZILLA_FIVE_HOME%/*}
102
	mv "${S}" "${D}"${MOZILLA_FIVE_HOME} || die
117
	mv "${BUILD_DIR}" "${D}"${MOZILLA_FIVE_HOME} || die
103
118
104
	# Fix prefs that make no sense for a system-wide install
119
	# Fix prefs that make no sense for a system-wide install
105
	insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
120
	insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
Lines 120-137 Link Here
120
135
121
	# Create /usr/bin/firefox-bin
136
	# Create /usr/bin/firefox-bin
122
	dodir /usr/bin/
137
	dodir /usr/bin/
123
	cat <<-EOF >"${D}"/usr/bin/${PN}
138
	cat <<-EOF >"${D}"/usr/bin/${MY_PN}
124
	#!/bin/sh
139
	#!/bin/sh
125
	unset LD_PRELOAD
140
	unset LD_PRELOAD
126
	LD_LIBRARY_PATH="/opt/firefox/"
141
	LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}"
127
	GTK_PATH=/usr/lib/gtk-2.0/
142
	GTK_PATH=/usr/$(get_libdir)/gtk-2.0/
128
	exec /opt/${MOZ_PN}/${MOZ_PN} "\$@"
143
	exec /opt/${MOZ_PN}${suffix}/${MOZ_PN} "\$@"
129
	EOF
144
	EOF
130
	fperms 0755 /usr/bin/${PN}
145
	fperms 0755 /usr/bin/${MY_PN}
131
146
132
	# revdep-rebuild entry
147
	# revdep-rebuild entry
133
	insinto /etc/revdep-rebuild
148
	insinto /etc/revdep-rebuild
134
	doins "${FILESDIR}"/10${PN} || die
149
	sed -e "s:${MOZ_PN}:&${suffix}:" "${FILESDIR}/10${PN}" > "${T}/10${MY_PN}" || die
150
	doins "${T}"/10${MY_PN} || die
135
151
136
	# Plugins dir
152
	# Plugins dir
137
	share_plugins_dir
153
	share_plugins_dir

Return to bug 474910