1 | # $Id: $ |
---|
2 | PortSystem 1.0 |
---|
3 | |
---|
4 | ## Note: This file should work for all Mozilla products (firefox, thunderbird, ...) |
---|
5 | ## by only changing following variables. |
---|
6 | |
---|
7 | name firefox |
---|
8 | version 1.0 |
---|
9 | description Mozilla.org's popular stand-alone browser. |
---|
10 | categories www |
---|
11 | worksrcdir mozilla |
---|
12 | set mozconfig ${worksrcpath}/browser/config/mozconfig |
---|
13 | |
---|
14 | |
---|
15 | ## The rest of the file should be the same for all Mozilla products. |
---|
16 | |
---|
17 | # Not entirely sure if these are the same for all products, but strongly I suspect so. |
---|
18 | depends_lib lib:libIDL.a:libidl1 \ |
---|
19 | lib:libglib.1:glib1 |
---|
20 | |
---|
21 | homepage http://www.mozilla.org/products/${name}/ |
---|
22 | master_sites http://ftp.mozilla.org/pub/mozilla.org/${name}/releases/${version}/source/ |
---|
23 | distname ${name}-${version}-source |
---|
24 | use_bzip2 yes |
---|
25 | checksums md5 49c16a71f4de014ea471be81e46b1da8 |
---|
26 | |
---|
27 | build.target build |
---|
28 | build.pre_args -f client.mk ${build.target} |
---|
29 | destroot.target install |
---|
30 | destroot.pre_args -f client.mk ${destroot.target} |
---|
31 | |
---|
32 | configure.env CPPFLAGS=-I${prefix}/include \ |
---|
33 | LDFLAGS=-L${prefix}/lib |
---|
34 | configure.args --enable-optimize \ |
---|
35 | --disable-debug \ |
---|
36 | --enable-shared \ |
---|
37 | --disable-tests |
---|
38 | |
---|
39 | |
---|
40 | configure { |
---|
41 | # Build the .mozconfig file. |
---|
42 | |
---|
43 | set mc [open "${worksrcpath}/.mozconfig" w] |
---|
44 | puts ${mc} ". ${mozconfig}" |
---|
45 | puts ${mc} "" |
---|
46 | |
---|
47 | foreach x ${configure.env} { |
---|
48 | puts ${mc} "export ${x}" |
---|
49 | } |
---|
50 | |
---|
51 | puts ${mc} "" |
---|
52 | puts ${mc} "ac_add_options --prefix=${prefix}" |
---|
53 | foreach x ${configure.args} { |
---|
54 | puts ${mc} "ac_add_options ${x}" |
---|
55 | } |
---|
56 | |
---|
57 | close ${mc} |
---|
58 | } |
---|
59 | |
---|
60 | variant gtk { |
---|
61 | configure.args-append --enable-default-toolkit=gtk2 \ |
---|
62 | --enable-xft \ |
---|
63 | --disable-freetype2 |
---|
64 | depends_lib-append lib:libgtk+-2.0:gtk2 |
---|
65 | |
---|
66 | # There seems to be a bug in the Mozilla build system: |
---|
67 | # In browser/components/build, the -l flags for gdk-pixbuf are missing. |
---|
68 | # The following line is a quick and dirty work-around. |
---|
69 | set pixbuf-libs [exec pkg-config --libs-only-l gdk-pixbuf-2.0] |
---|
70 | configure.env-append "LIBS=\"\${LIBS} ${pixbuf-libs}\"" |
---|
71 | } |
---|
72 | |
---|
73 | # The Boehm GC doesn't seem to have support for the Darwin/PPC platform. |
---|
74 | #variant boehm { |
---|
75 | # configure.args-append --enable-boehm |
---|
76 | #} |
---|