Ticket #2522: Portfile

File Portfile, 2.3 KB (added by pesco@…, 19 years ago)

ATTACHMENT: firefox-1.0

Line 
1# $Id: $
2PortSystem          1.0
3
4## Note: This file should work for all Mozilla products (firefox, thunderbird, ...)
5## by only changing following variables.
6
7name                firefox
8version             1.0
9description         Mozilla.org's popular stand-alone browser.
10categories          www
11worksrcdir          mozilla
12set 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.
18depends_lib         lib:libIDL.a:libidl1 \
19                    lib:libglib.1:glib1
20
21homepage            http://www.mozilla.org/products/${name}/
22master_sites        http://ftp.mozilla.org/pub/mozilla.org/${name}/releases/${version}/source/
23distname            ${name}-${version}-source
24use_bzip2           yes
25checksums           md5 49c16a71f4de014ea471be81e46b1da8
26
27build.target        build
28build.pre_args      -f client.mk ${build.target}
29destroot.target     install
30destroot.pre_args   -f client.mk ${destroot.target}
31
32configure.env       CPPFLAGS=-I${prefix}/include \
33                    LDFLAGS=-L${prefix}/lib
34configure.args      --enable-optimize \
35                    --disable-debug \
36                    --enable-shared \
37                    --disable-tests
38
39
40configure {
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
60variant 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#}