/[gentoo-x86]/www-client/mozilla-firefox/mozilla-firefox-1.5-r9.ebuild
Gentoo

Contents of /www-client/mozilla-firefox/mozilla-firefox-1.5-r9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Jun 12 02:09:24 2006 UTC (14 years, 5 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
removed most vulnerable versions, will remove 1.0.7 soon as ia64 marks 1.5.0.4 stable
(Portage version: 2.1)
 (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-1.5-r9.ebuild,v 1.3 2006/02/01 21:37:10 anarchy Exp $
4
5 unset ALLOWED_FLAGS # stupid extra-functions.sh ... bug 49179
6 MOZ_FREETYPE2="no" # Need to disable for newer .. remove here and in mozconfig
7 # when older is removed from tree.
8 MOZ_PANGO="yes" # Need to enable for newer .. remove here and in mozconfig
9 # when older is removed from tree.
10
11 inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime mozextension autotools
12
13 LANGS="ar ca cs da de el es-AR es-ES fi fr he it ja ko nb-NO nl pl pt-BR ro ru sk sl sv-SE tr zh-CN zh-TW"
14 PVER="1.0"
15
16 DESCRIPTION="Firefox Web Browser"
17 HOMEPAGE="http://www.mozilla.org/projects/firefox/"
18 SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/source/firefox-${PV}-source.tar.bz2
19 mirror://gentoo/${P}-patches-${PVER}.tar.bz2
20 http://dev.gentoo.org/~anarchy/dist/${P}-patches-${PVER}.tar.bz2"
21
22 for X in ${LANGS} ; do
23 SRC_URI="${SRC_URI} linguas_${X}? ( http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/linux-i686/xpi/${X}.xpi )"
24 done
25
26 KEYWORDS="-* ~amd64 ~ppc ~x86"
27 SLOT="0"
28 LICENSE="MPL-1.1 NPL-1.1"
29 IUSE="java mozdevelop"
30
31 RDEPEND="java? ( virtual/jre )
32 >=www-client/mozilla-launcher-1.39"
33
34 DEPEND="${RDEPEND}
35 app-arch/unzip
36 java? ( >=dev-java/java-config-0.2.0 )"
37
38 S=${WORKDIR}/mozilla
39
40 # Needed by src_compile() and src_install().
41 # Would do in pkg_setup but that loses the export attribute, they
42 # become pure shell variables.
43 export MOZ_CO_PROJECT=browser
44 export BUILD_OFFICIAL=1
45 export MOZILLA_OFFICIAL=1
46
47 src_unpack() {
48 unpack firefox-${PV}-source.tar.bz2 ${P}-patches-${PVER}.tar.bz2
49
50 strip-linguas ${LANGS} en
51 for X in ${LINGUAS/en}; do
52 xpi_unpack ${X}.xpi
53 done
54
55 if ! use alpha; then
56 rm ${WORKDIR}/patch/001_mozilla-1.3-alpha-stubs.patch.bz2
57 fi
58
59 # Apply our patches
60 cd ${S} || die "cd failed"
61 epatch ${WORKDIR}/patch/*
62
63 # Fix a compilation issue using the 32-bit userland with 64-bit kernel on
64 # PowerPC, because with that configuration, it detects a ppc64 system.
65 # -- hansmi, 2005-11-13
66 if use ppc && [[ "${PROFILE_ARCH}" == ppc64 ]]; then
67 sed -i -e "s#OS_TEST=\`uname -m\`\$#OS_TEST=${ARCH}#" \
68 ${S}/configure
69 sed -i -e "s#OS_TEST :=.*uname -m.*\$#OS_TEST:=${ARCH}#" \
70 ${S}/security/coreconf/arch.mk
71 fi
72
73 eautoreconf || die "failed running eautoreconf"
74 }
75
76 src_compile() {
77 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
78
79 ####################################
80 #
81 # mozconfig, CFLAGS and CXXFLAGS setup
82 #
83 ####################################
84
85 mozconfig_init
86 mozconfig_config
87
88 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
89 mozconfig_annotate '' --disable-mailnews
90 #mozconfig_annotate '' --enable-native-uconv
91 mozconfig_annotate '' --enable-image-encoder=all
92 mozconfig_annotate '' --enable-canvas
93 mozconfig_annotate '' --without-system-nspr
94
95 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
96 # regardless of java setting.
97 mozconfig_annotate '' --enable-oji --enable-mathml
98
99 # Other ff-specific settings
100 mozconfig_use_enable mozdevelop jsd
101 mozconfig_use_enable mozdevelop xpctools
102 mozconfig_use_extension mozdevelop venkman
103 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
104
105 # Finalize and report settings
106 mozconfig_final
107
108 # hardened GCC uses -fstack-protector-all by default, which breaks us
109 has_hardened && append-flags -fno-stack-protector-all
110 # remove -fstack-protector because now it borks firefox
111 CFLAGS=${CFLAGS/-fstack-protector-all/}
112 CFLAGS=${CFLAGS/-fstack-protector/}
113 CXXFLAGS=${CXXFLAGS/-fstack-protector-all/}
114 CXXFLAGS=${CXXFLAGS/-fstack-protector/}
115
116 append-flags -freorder-blocks -fno-reorder-functions
117
118 ####################################
119 #
120 # Configure and build
121 #
122 ####################################
123
124 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
125 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
126 econf || die
127
128 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
129 # to econf, but the quotes cause configure to fail.
130 sed -i -e \
131 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
132 ${S}/config/autoconf.mk \
133 ${S}/nsprpub/config/autoconf.mk \
134 ${S}/xpfe/global/buildconfig.html
135
136 # Fixup the RPATH
137 sed -i -e \
138 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \
139 ${S}/config/rules.mk \
140 ${S}/nsprpub/config/rules.mk \
141 ${S}/security/coreconf/rules.mk
142
143 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
144 # requirements while compiling
145 edit_makefiles
146
147 emake || die
148 }
149
150 src_install() {
151 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
152
153 # Most of the installation happens here
154 dodir ${MOZILLA_FIVE_HOME}
155 cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME}
156
157 # Create directory structure to support portage-installed extensions.
158 # See update_chrome() in mozilla-launcher
159 keepdir ${MOZILLA_FIVE_HOME}/chrome.d
160 keepdir ${MOZILLA_FIVE_HOME}/extensions.d
161 cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \
162 ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt
163
164 strip-linguas ${LANGS} en
165 for X in ${LINGUAS/en}; do
166 xpi_install ${WORKDIR}/${X}
167 done
168
169 if [ -n ${LINGUAS%% *} ] && [ "${LINGUAS%% *}" != "en" ]; then
170 ebegin "Setting default locale to ${LINGUAS%% *}"
171 sed -i "s:pref(\"general.useragent.locale\", \"en-US\"):pref(\"general.useragent.locale\", \"${LINGUAS%% *}\"):" \
172 ${D}${MOZILLA_FIVE_HOME}/defaults/pref/firefox.js \
173 ${D}${MOZILLA_FIVE_HOME}/defaults/pref/firefox-l10n.js
174 eend $? || die "sed failed to change locale"
175 fi
176
177 # Create /usr/bin/firefox
178 install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME}
179
180 # Install icon and .desktop for menu entry
181 doicon ${FILESDIR}/icon/firefox-icon.png
182 domenu ${FILESDIR}/icon/mozillafirefox-1.5.desktop
183
184 # Fix icons to look the same everywhere
185 insinto ${MOZILLA_FIVE_HOME}/icons
186 doins ${S}/dist/branding/mozicon16.xpm
187 doins ${S}/dist/branding/mozicon50.xpm
188
189 ####################################
190 #
191 # Install files necessary for applications to build against firefox
192 #
193 ####################################
194
195 ewarn "Installing includes and idl files..."
196 dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include
197 cd ${S}/dist
198 cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy"
199 cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy"
200
201 # Dirty hack to get some applications using this header running
202 dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \
203 /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h
204
205
206 # Fix pkgconfig files and install them
207 insinto /usr/$(get_libdir)/pkgconfig
208 for x in ${S}/build/unix/*.pc; do
209 doins ${x}
210 done
211
212 ####################################
213 #
214 # Some preferences, probably gentoo.org as start-page also
215 #
216 ####################################
217
218 dodir ${MOZILLA_FIVE_HOME}/greprefs
219 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js
220 dodir ${MOZILLA_FIVE_HOME}/defaults/pref
221 cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js
222
223 # Install docs
224 dodoc LEGAL
225 }
226
227 pkg_postinst() {
228 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
229
230 # This should be called in the postinst and postrm of all the
231 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
232 # thunderbird-bin ebuilds.
233 update_mozilla_launcher_symlinks
234
235 # Update mimedb for the new .desktop file
236 fdo-mime_desktop_database_update
237
238 echo ""
239 ewarn "Please remember to rebuild any packages that you have built"
240 ewarn "against firefox. Some packages might be busted please search"
241 ewarn "http://bugs.gentoo.org if no bug is open, then please open a new"
242 ewarn "bug report so these can be fixed. Before filling bugs make sure you"
243 ewarn "have moved $HOME/.mozilla our of way and tested with clean profile."
244 ewarn "Thank you! anarchy@gentoo.org."
245 echo ""
246 einfo "I am unable to brand firefox or thunderbird officially yet."
247 einfo "You will see that everything says Deer Park cause of this."
248
249 epause 15
250 }
251
252 pkg_postrm() {
253 declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN}
254
255 update_mozilla_launcher_symlinks
256 }

  ViewVC Help
Powered by ViewVC 1.1.20