/[gentoo-x86]/www-client/mozilla-firefox/mozilla-firefox-2.0_beta1.ebuild
Gentoo

Contents of /www-client/mozilla-firefox/mozilla-firefox-2.0_beta1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat Oct 7 17:44:09 2006 UTC (14 years, 1 month ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
version bump, clean up old
(Portage version: 2.1.2_pre2-r5)
 (Unsigned Manifest commit)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-2.0_beta1.ebuild,v 1.5 2006/07/23 12:17:16 genstef Exp $
4
5 inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime mozextension autotools
6
7 PVER="1.2"
8 LANGS="ca cs da de el en-GB es-AR es-ES fi fr hu it ja lt mn nb-NO nl pl ru sk sl sv-SE tr zh-CN zh-TW"
9 SHORTLANGS="pt-PT nn-NO"
10 MY_PV=${PV/_beta/b}
11
12 DESCRIPTION="Firefox Web Browser"
13 HOMEPAGE="http://www.mozilla.org/projects/firefox/"
14
15 KEYWORDS="~amd64 ~x86"
16 SLOT="0"
17 LICENSE="MPL-1.1 NPL-1.1"
18 IUSE="java mozdevelop"
19
20 MOZ_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${MY_PV}"
21 SRC_URI="${MOZ_URI}/source/firefox-${MY_PV}-source.tar.bz2
22 mirror://gentoo/${P}-patches-${PVER}.tar.bz2
23 http://dev.gentoo.org/~azarah/firefox/${P}-patches-${PVER}.tar.bz2"
24
25 # These are in
26 #
27 # http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${MY_PV}/linux-i686/xpi/
28 #
29 for X in ${LANGS} ; do
30 SRC_URI="${SRC_URI}
31 linguas_${X/-/_}? ( mirror://gentoo/${P}-${X}.xpi
32 http://dev.gentoo.org/~azarah/firefox/${P}-${X}.xpi )"
33 IUSE="${IUSE} linguas_${X/-/_}"
34 done
35 for X in ${SHORTLANGS} ; do
36 SRC_URI="${SRC_URI}
37 linguas_${X%%-*}? ( mirror://gentoo/${P}-${X}.xpi
38 http://dev.gentoo.org/~azarah/firefox/${P}-${X}.xpi )"
39 IUSE="${IUSE} linguas_${X%%-*}"
40 done
41
42 RDEPEND="java? ( virtual/jre )
43 >=www-client/mozilla-launcher-1.39
44 >=sys-devel/binutils-2.16.1
45 >=dev-libs/nss-3.11.1-r1
46 >=dev-libs/nspr-4.6.1
47 ~sys-devel/autoconf-2.13"
48
49 DEPEND="${RDEPEND}
50 java? ( >=dev-java/java-config-0.2.0 )"
51
52 S="${WORKDIR}/mozilla"
53
54 linguas() {
55 local LANG SLANG
56 for LANG in ${LINGUAS}; do
57 if hasq ${LANG} en en_US; then
58 hasq en ${linguas} || linguas="${linguas:+"${linguas} "}en"
59 continue
60 elif hasq ${LANG} ${LANGS//-/_}; then
61 hasq ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
62 continue
63 else
64 for SLANG in ${SHORTLANGS}; do
65 if [[ ${LANG} == "${SLANG%%-*}" ]]; then
66 hasq ${SLANG} ${linguas} || linguas="${linguas:+"${linguas} "}${SLANG}"
67 continue 2
68 fi
69 done
70 fi
71 ewarn "Sorry, but mozilla-firefox does not support the ${LANG} LINGUA"
72 done
73 }
74
75 src_unpack() {
76 unpack "firefox-${MY_PV}-source.tar.bz2" "${P}-patches-${PVER}.tar.bz2"
77
78 linguas
79 for X in ${linguas}; do
80 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
81 done
82
83 cd "${S}"
84
85 # Apply our patches
86 EPATCH_FORCE="yes" epatch "${WORKDIR}"/patch
87
88 # Fix a compilation issue using the 32-bit userland with 64-bit kernel on
89 # PowerPC, because with that configuration, it detects a ppc64 system.
90 # -- hansmi, 2005-11-13
91 if use ppc && [[ "${PROFILE_ARCH}" == ppc64 ]]; then
92 sed -i -e "s#OS_TEST=\`uname -m\`\$#OS_TEST=${ARCH}#" \
93 "${S}"/configure
94 sed -i -e "s#OS_TEST :=.*uname -m.*\$#OS_TEST:=${ARCH}#" \
95 "${S}"/security/coreconf/arch.mk
96 fi
97
98 WANT_AUTOCONF="2.1" eautoreconf
99 }
100
101 src_compile() {
102 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
103
104 mozconfig_init
105 mozconfig_config
106
107 mozconfig_annotate '' --enable-application=browser
108 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
109 mozconfig_annotate '' --enable-image-encoder=all
110 mozconfig_annotate '' --enable-canvas
111 mozconfig_annotate '' --with-system-nspr
112 mozconfig_annotate '' --with-system-nss
113 mozconfig_annotate '' --enable-official-branding
114
115 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
116 # regardless of java setting.
117 mozconfig_annotate '' --enable-oji --enable-mathml
118
119 # Other ff-specific settings
120 mozconfig_use_enable mozdevelop jsd
121 mozconfig_use_enable mozdevelop xpctools
122 mozconfig_use_extension mozdevelop venkman
123 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
124
125 # Add build variables
126 mozconfig_build_opts
127
128 # Finalize and report settings
129 mozconfig_final
130
131 # -fstack-protector breaks us
132 gcc-specs-ssp && append-flags -fno-stack-protector-all
133 filter-flags -fstack-protector -fstack-protector-all
134
135 # Don't know a reason for that so commented out /peper
136 #append-flags -freorder-blocks -fno-reorder-functions
137
138 # Configure and build
139
140 CPPFLAGS="${CPPFLAGS} -DGENTOO_NSPLUGINS_DIR=\\\"/usr/$(get_libdir)/nsplugins\\\""
141 CPPFLAGS="${CPPFLAGS} -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/$(get_libdir)/nsbrowser/plugins\\\""
142 export CPPFLAGS
143 tc-export CC CXX LD
144 econf || die
145
146 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
147 # requirements while compiling
148 edit_makefiles
149
150 emake || die
151 }
152
153 pkg_preinst() {
154 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
155
156 einfo "Removing old install to eliminate any problems during install."
157 rm -rf "${ROOT}"/"${MOZILLA_FIVE_HOME}"
158 }
159
160 src_install() {
161 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
162
163 # Most of the installation happens here
164 dodir "${MOZILLA_FIVE_HOME}"
165 cp -RL "${S}"/dist/bin/* "${D}"/"${MOZILLA_FIVE_HOME}"/ || die "cp failed"
166
167 linguas
168 for X in ${linguas}; do
169 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
170 done
171
172 local LANG=${linguas%% *}
173 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
174 einfo "Setting default locale to ${LANG}"
175 dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
176 "${MOZILLA_FIVE_HOME}"/defaults/pref/firefox.js \
177 "${MOZILLA_FIVE_HOME}"/defaults/pref/firefox-l10n.js || \
178 die "sed failed to change locale"
179 fi
180
181 # Create /usr/bin/firefox
182 install_mozilla_launcher_stub firefox "${MOZILLA_FIVE_HOME}"
183
184 # Install icon and .desktop for menu entry
185 doicon "${FILESDIR}"/icon/firefox-icon.png
186 newmenu "${FILESDIR}"/icon/mozillafirefox-1.5.desktop \
187 mozillafirefox-2.0.desktop
188
189 # Fix icons to look the same everywhere
190 insinto "${MOZILLA_FIVE_HOME}"/icons
191 doins "${S}"/dist/branding/mozicon16.xpm
192 doins "${S}"/dist/branding/mozicon50.xpm
193
194
195 # Install files necessary for applications to build against firefox
196 einfo "Installing includes and idl files..."
197 dodir "${MOZILLA_FIVE_HOME}"/idl "${MOZILLA_FIVE_HOME}"/include
198 cp -LfR "${S}"/dist/include/* "${D}"/"${MOZILLA_FIVE_HOME}"/include/ || \
199 die "cp failed"
200 cp -LfR "${S}"/dist/idl/* "${D}"/"${MOZILLA_FIVE_HOME}"/idl || \
201 die "cp failed"
202
203 # Dirty hack to get some applications using this header running
204 dosym "${MOZILLA_FIVE_HOME}"/include/necko/nsIURI.h \
205 "${MOZILLA_FIVE_HOME}"/include/nsIURI.h
206
207 # Install pkgconfig files
208 insinto /usr/"$(get_libdir)"/pkgconfig
209 doins "${S}"/build/unix/*.pc
210
211 insinto "${MOZILLA_FIVE_HOME}"/greprefs
212 newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js
213 insinto "${MOZILLA_FIVE_HOME}"/defaults/pref
214 newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js
215 }
216
217 pkg_postinst() {
218 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
219
220 # This should be called in the postinst and postrm of all the
221 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
222 # thunderbird-bin ebuilds.
223 update_mozilla_launcher_symlinks
224
225 # Update mimedb for the new .desktop file
226 fdo-mime_desktop_database_update
227
228 elog "Please remember to rebuild any packages that you have built"
229 elog "against firefox. Some packages might be broken by the upgrade; if this"
230 elog "is the case, please search at http://bugs.gentoo.org and open a new bug"
231 elog "if one does not exist. Before filing any bugs, please move or remove ~/.mozilla"
232 elog "and test with a clean profile directory."
233 }
234
235 pkg_postrm() {
236 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
237
238 update_mozilla_launcher_symlinks
239 }

  ViewVC Help
Powered by ViewVC 1.1.20