Contents of /trunk/extras/nvu/nvu-1.0-r5.smage2
Parent Directory | Revision Log
Revision 2 -
(show annotations)
(download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 11 months ago) by niro
File size: 5814 byte(s)
Fri Oct 10 13:29:42 2008 UTC (15 years, 11 months ago) by niro
File size: 5814 byte(s)
import repo
1 | # $Header: /magellan-cvs/smage/nvu/nvu-1.0-r5.smage2,v 1.1 2007/05/16 22:18:52 niro Exp $ |
2 | |
3 | PNAME="nvu" |
4 | PVER="1.0" |
5 | PBUILD="r5" |
6 | |
7 | PCATEGORIE="app-editors" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="A complete Web Authoring System for Linux." |
11 | HOMEPAGE="http://nvu.com/" |
12 | |
13 | DEPEND=">= virtual/glibc |
14 | >= virtual/x11 |
15 | >= sys-libs/zlib-1.2 |
16 | >= media-libs/libmng-1.0.5 |
17 | >= media-libs/fontconfig-2.2 |
18 | >= media-libs/libjpeg-6b |
19 | >= media-libs/libpng-1.2.5 |
20 | >= dev-libs/expat-1.95.6 |
21 | >= dev-libs/libidl-0.8.4 |
22 | >= app-arch/zip-2.3 |
23 | >= app-arch/unzip-5.50 |
24 | >= x11-libs/gtk2+-2.12 |
25 | >= sys-apps/gawk-3 |
26 | >= dev-lang/perl-5.8.8 |
27 | >= media-libs/freetype-2.1.9" |
28 | |
29 | SDEPEND=">= dev-util/pkgconfig-0.15.0" |
30 | |
31 | SRCFILE="${PNAME}-${PVER}-sources.tar.bz2" |
32 | SRCDIR="${BUILDDIR}/mozilla" |
33 | |
34 | sminclude mozilla |
35 | |
36 | SRC_URI=( |
37 | mirror://${PNAME}/${SRCFILE} |
38 | mirror://${PNAME}/nvu.desktop |
39 | mirror://${PNAME}/nvu-0.50-dir.patch |
40 | mirror://${PNAME}/nvu-0.50-freetype-compile.patch |
41 | mirror://${PNAME}/nvu-1.0_pre-gcc4.patch |
42 | mirror://${PNAME}/nvu-0.50-nvu.patch |
43 | mirror://${PNAME}/nvu-1.0-gcc4-x86_64.patch |
44 | ) |
45 | |
46 | # we are building nvu |
47 | export MOZ_STANDALONE_COMPOSER=1 |
48 | export MOZILLA_OFFICIAL=1 |
49 | export BUILD_OFFICIAL=1 |
50 | |
51 | # set by configure (plus USE_AUTOCONF=1), but useful for NSPR |
52 | export MOZILLA_CLIENT=1 |
53 | export BUILD_OPT=1 |
54 | export NO_STATIC_LIB=1 |
55 | export USE_PTHREADS=1 |
56 | |
57 | # now strip optimization from CFLAGS so it doesn't end up in the |
58 | # compile string |
59 | export CFLAGS="${CFLAGS/-O*/}" |
60 | export CXXFLAGS="${CFLAGS}" |
61 | |
62 | # needed to build without warnings on gcc-3 |
63 | export CXXFLAGS="${CXXFLAGS} -Wno-deprecated" |
64 | |
65 | src_prepare() |
66 | { |
67 | munpack ${SRCFILE} || die |
68 | cd ${SRCDIR} |
69 | |
70 | # more proper dir locations |
71 | mpatch nvu-0.50-dir.patch || die |
72 | |
73 | # patch out ft caching code since the API changed between releases of |
74 | # freetype; this enables freetype-2.1.8+ compat. |
75 | # https://bugzilla.mozilla.org/show_bug.cgi?id=234035#c65 |
76 | mpatch nvu-0.50-freetype-compile.patch || die |
77 | |
78 | # fixes compilation with >= gcc34 |
79 | mpatch nvu-1.0_pre-gcc4.patch || die |
80 | mpatch nvu-1.0-gcc4-x86_64.patch || die |
81 | |
82 | # branding the source with our tags |
83 | sed -i "s|0000000000|Magellan Linux|" xpfe/global/build.dtd.in || die |
84 | |
85 | # fix scripts that call for /usr/local/bin/perl |
86 | sed -i '1s,usr/local/bin,usr/bin,' security/nss/cmd/smimetools/smime || die |
87 | |
88 | WANT_AUTOCONF=2.1 autoconf || die |
89 | } |
90 | |
91 | src_compile() |
92 | { |
93 | cd ${SRCDIR} |
94 | |
95 | # setup .mozconfig |
96 | : >.mozconfig || die |
97 | |
98 | # were to go |
99 | mozconf_add --prefix=/usr |
100 | mozconf_add --libdir=/usr/$(mlibdir) |
101 | mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/nvu |
102 | |
103 | # set optimization level based on CFLAGS |
104 | if [[ ${ARCH} = x86_64 ]] |
105 | then |
106 | # opts may cause segfaults on 64bit arches |
107 | mozconf_add --enable-optimize=-O1 |
108 | export CFLAGS="${CFLAGS} -fPIC" |
109 | export CXXFLAGS="${CXXFLAGS} -fPIC" |
110 | else |
111 | mozconf_add --enable-optimize=-O2 |
112 | fi |
113 | |
114 | if [[ ${ARCH} = i*86 ]] |
115 | then |
116 | # optimze build for x86 |
117 | mozconf_add --enable-elf-dynstr-gc |
118 | fi |
119 | |
120 | # disable debug build && enable stripping |
121 | mozconf_add --disable-debug |
122 | mozconf_add --disable-tests |
123 | mozconf_add --enable-reorder |
124 | mozconf_add --enable-strip |
125 | mozconf_add --enable-strip-libs |
126 | |
127 | # issue all warnings demanded by strict ANSI C |
128 | mozconf_add --disable-pedantic |
129 | |
130 | # enable gtk2 as default |
131 | mozconf_add --enable-toolkit=gtk2 |
132 | mozconf_add --enable-default-toolkit=gtk2 |
133 | |
134 | # enable xft2 |
135 | mozconf_add --enable-xft |
136 | |
137 | # want truetype fonts |
138 | mozconf_add --enable-freetype2 |
139 | |
140 | # want system jpeg, png, zlib |
141 | mozconf_add --with-system-jpeg |
142 | mozconf_add --with-system-png |
143 | mozconf_add --with-system-zlib |
144 | |
145 | # no svg; needs cairo |
146 | mozconf_add --disable-svg |
147 | |
148 | # no ldap |
149 | mozconf_add --disable-ldap |
150 | |
151 | # we don't need the installer |
152 | mozconf_add --disable-installer |
153 | |
154 | # don't want any news-mails |
155 | mozconf_add --disable-mailnews |
156 | |
157 | # linux has *no* activex (its better so anyway :) |
158 | mozconf_add --disable-activex |
159 | mozconf_add --disable-activex-scripting |
160 | |
161 | # not needed with nvu -> mozilla & firefox comes with them |
162 | mozconf_add --disable-oji |
163 | mozconf_add --disable-mathml |
164 | |
165 | # enable crypto support (Personal Security Manager) |
166 | mozconf_add --enable-crypto |
167 | |
168 | # no xprint ? |
169 | mozconf_add --disable-xprint |
170 | |
171 | # single profiling only ! |
172 | mozconf_add --enable-single-profile |
173 | mozconf_add --disable-profilesharing |
174 | |
175 | # short-wchar |
176 | mozconf_add --disable-short-wchar |
177 | |
178 | # no necko disk cache |
179 | mozconf_add --disable-necko-disk-cache |
180 | |
181 | # some standard extensions |
182 | mozconf_add --enable-extensions=wallet,xml-rpc,xmlextras,pref,universalchardet,editor/cascades,spellcheck |
183 | mozconf_add --enable-necko-protocols=http,ftp,file,jar,viewsource,res,data |
184 | |
185 | # removes extraneous CFLAGS |
186 | # to reduce RAM requirements while compiling |
187 | mozilla_remove_cflags |
188 | |
189 | make -f client.mk build_all || die |
190 | } |
191 | |
192 | src_install() |
193 | { |
194 | cd ${SRCDIR} |
195 | |
196 | # needed directories |
197 | install -d ${BINDIR}/usr/share/applications || die |
198 | |
199 | # fix MOZILLA_FIVE_HOME=/usr/lib/mozilla issue |
200 | mpatch nvu-0.50-nvu.patch || die |
201 | |
202 | make -f client.mk DESTDIR=${BINDIR} install || die |
203 | |
204 | # desktop file |
205 | install -m 0644 ${SOURCEDIR}/${PNAME}/nvu.desktop \ |
206 | ${BINDIR}/usr/share/applications || die |
207 | |
208 | sed -i "s:/usr/lib/nvu:/usr/$(mlibdir)/nvu:" \ |
209 | ${BINDIR}/usr/share/applications/nvu.desktop || die |
210 | } |
211 | |
212 | postinstall() |
213 | { |
214 | # update environment; needed for REGXPCOM |
215 | env-rebuild |
216 | source ${MROOT}/etc/profile |
217 | |
218 | # nvus mozilla_five_home |
219 | export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/nvu" |
220 | |
221 | # register nvu |
222 | echo "Registering Components and Chrome..." |
223 | |
224 | HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom |
225 | HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome |
226 | |
227 | # fix permissions of component registry |
228 | chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat |
229 | |
230 | # fix directory permissions |
231 | find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || : |
232 | |
233 | # fix permissions on chrome files |
234 | find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || : |
235 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |