1 | # $Id: Portfile,v 1.6 2003/08/17 19:10:08 fkr Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name php4-cli |
---|
5 | version 4.3.2 |
---|
6 | revision 1 |
---|
7 | categories lang www |
---|
8 | maintainers bchesneau@mac.com |
---|
9 | description PHP: Hypertext Preprocessor |
---|
10 | long_description PHP is a widely-used general-purpose scripting language \ |
---|
11 | that is especially suited for Web development and can be \ |
---|
12 | embedded into HTML. |
---|
13 | platforms darwin freebsd |
---|
14 | distname php-${version} |
---|
15 | worksrcdir php-${version} |
---|
16 | master_sites http://fr.php.net/distributions/ \ |
---|
17 | http://www.php.net/distributions/ |
---|
18 | checksums php-4.3.2.tar.gz md5 8433a1d0ce679780990d4813ae094590 |
---|
19 | |
---|
20 | depends_lib lib:libiconv.2:libiconv \ |
---|
21 | lib:libexpat.0.4:expat \ |
---|
22 | lib:libintl:gettext \ |
---|
23 | lib:libz.1:zlib |
---|
24 | |
---|
25 | configure.env LDFLAGS=-L${prefix}/lib \ |
---|
26 | CPPFLAGS=-I${prefix}/include |
---|
27 | |
---|
28 | |
---|
29 | configure.args --enable-discard-path --mandir=${prefix}/share/man --infodir=${prefix}/share/info \ |
---|
30 | --with-config-file-path=${prefix}/etc --enable-calendar \ |
---|
31 | --with-iconv=${prefix} --enable-exif --enable-ftp --enable-wddx\ |
---|
32 | --with-zlib --without-mysql --with-gettext=${prefix} \ |
---|
33 | --with-expat-dir=${prefix} --with-iconv-dir=${prefix} \ |
---|
34 | --with-xmlrpc --enable-filepro --enable-bcmath |
---|
35 | |
---|
36 | variant darwin { |
---|
37 | depends_lib-append lib:libdl.1:dlcompat |
---|
38 | } |
---|
39 | |
---|
40 | variant crypt { |
---|
41 | |
---|
42 | depends_lib-append lib:libmhash:mhash \ |
---|
43 | lib:libmcrypt:libmcrypt |
---|
44 | configure.args-append --with-mhash=${prefix} --with-mcrypt=${prefix} |
---|
45 | } |
---|
46 | |
---|
47 | variant curl { |
---|
48 | depends_lib-append lib:libcurl.2:curl |
---|
49 | configure.args-append --with-curl=${prefix} |
---|
50 | } |
---|
51 | |
---|
52 | variant gd { |
---|
53 | depends_lib-append lib:libjpeg.9:jpeg \ |
---|
54 | lib:libpng3:libpng |
---|
55 | |
---|
56 | |
---|
57 | configure.args-append --with-gd \ |
---|
58 | --with-jpeg-dir=${prefix} \ |
---|
59 | --with-png-dir=${prefix} |
---|
60 | } |
---|
61 | |
---|
62 | variant mysql { |
---|
63 | |
---|
64 | if [file readable ${prefix}/lib/mysql/libmysqlclient.so.10 ] { |
---|
65 | depends_lib-append lib:libmysqlclient.10:mysql |
---|
66 | } elseif [file readable ${prefix}/lib/mysql/libmysqlclient.so.12 ] { |
---|
67 | depends_lib-append lib:libmysqlclient.12:mysql4 |
---|
68 | } else { |
---|
69 | depends_lib-append lib:libmysqlclient.10:mysql |
---|
70 | } |
---|
71 | configure.args-append --with-mysql=${prefix} |
---|
72 | } |
---|
73 | |
---|
74 | variant postgresql { |
---|
75 | configure.env-append LDFLAGS=-L${prefix}/lib -L${prefix}/pgsql |
---|
76 | |
---|
77 | depends_lib-append lib:plpgsql:postgresql |
---|
78 | configure.args-append --with-pgsql=${prefix}/pgsql |
---|
79 | } |
---|
80 | |
---|
81 | variant ssl { |
---|
82 | configure.args-append --with-openssl=/usr |
---|
83 | } |
---|
84 | |
---|
85 | variant imap { |
---|
86 | depends_lib-append lib:c-client:cclient |
---|
87 | configure.env-append CFLAGS=-I${prefix}/include/c-client |
---|
88 | |
---|
89 | |
---|
90 | if { [variant_isset ssl] } { |
---|
91 | configure.args-append --with-imap=${prefix} --with-imap-ssl=/usr |
---|
92 | } else { |
---|
93 | configure.args-append --with-imap=${prefix} |
---|
94 | } |
---|
95 | } |
---|
96 | |
---|
97 | variant xslt { |
---|
98 | depends_lib-append lib:libsablot:sablotron |
---|
99 | |
---|
100 | configure.args-append --enable-xslt --with-xslt-sablot=${prefix} \ |
---|
101 | --with-iconv-dir=${prefix} --with-expat-dir=${prefix} |
---|
102 | } |
---|
103 | |
---|
104 | |
---|
105 | destroot.args INSTALL_ROOT=${destroot}${prefix} PHP_PEAR_INSTALL_DIR=${prefix}/lib/php |
---|
106 | |
---|
107 | post-destroot { |
---|
108 | |
---|
109 | #copy php.ini |
---|
110 | file mkdir ${destroot}${prefix}/etc |
---|
111 | system "install -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist" |
---|
112 | system "install -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended" |
---|
113 | |
---|
114 | } |
---|