Ticket #9556: Portfile

File Portfile, 4.4 KB (added by pelopor@…, 18 years ago)

php-PEAR-base 1.4.9

Line 
1# $Id: Portfile,v 1.17 2004/10/28 16:59:45 olegb Exp $
2
3PortSystem                      1.0
4name                            php-PEAR-base
5version                         1.4.9
6categories                      www lang
7maintainers                     darwinports@opendarwin.org
8description                     PHP PEAR Base system (PEAR, Archive_Tar, Console_Getopt, XML_RPC)
9long_description        ${description}
10homepage                        http://pear.php.net
11master_sites            ${homepage}/get/
12distname                        PEAR-${version}
13set tar_name            Archive_Tar
14set tar_ver             1.3.1
15set tar_distname        ${tar_name}-${tar_ver}
16set console_name        Console_Getopt
17set console_ver         1.2
18set console_distname ${console_name}-${console_ver}
19set xml_name            XML_RPC
20set xml_ver                     1.4.8
21set xml_distname        ${xml_name}-${xml_ver}
22set pear_dir            ${prefix}/lib/php
23set indirs                      {OS PEAR}
24set pear_bin            {pear peardev pecl}
25platforms                       darwin
26extract.suffix          .tgz
27distfiles                       ${distname}${extract.suffix} \
28                                        ${tar_distname}${extract.suffix} \
29                                        ${console_distname}${extract.suffix} \
30                                        ${xml_distname}${extract.suffix}
31checksums                       ${distname}${extract.suffix} \
32                                                md5    52257e23987717c474a3da87f161a272 \
33                                                sha1   cb74e281d7d30b7105ce2b4f152036b775e68cf1 \
34                                                rmd160 038fb6f0f5d22bb1bb34fff1f80cf609d434cdd2 \
35                                        ${tar_distname}${extract.suffix} \
36                                                md5    31e54ce401302065d43888223a0be4d9 \
37                                                sha1   b1eb763a5fba1289686cf1355f90f0fe9149fa6d \
38                                                rmd160 e4d94299018d49835c9adb5d0d0bb7a4f3ee7fac \
39                                        ${console_distname}${extract.suffix} \
40                                                md5    8f9ec8253c04350bc01ee7ca941e24b6 \
41                                                sha1   706a9fb1724ef97ee333dadcda95cc7cc50c0c43 \
42                                                rmd160 d9bebe03b52a59b35a4d0fd0825da069037aa000 \
43                                        ${xml_distname}${extract.suffix} \
44                                                md5    c2e94575bd14a4425de9e20976c65d43 \
45                                                sha1   5fd5e0f4dfc49374a97b2a9c36254427462a604e \
46                                                rmd160 f4c541a6ed0758c32eca52d0a7da6ce2796a7f56
47                                       
48depends_lib                     port:php5
49
50configure                       {}
51build                           {# pearcmd.php
52                                        reinplace "s|@pear_version@|${version}|g" \
53                                                ${worksrcpath}/scripts/\pearcmd.php
54                                        # pear script
55                                        reinplace "s|@php_bin@|${prefix}/bin/php|g" \
56                                                ${worksrcpath}/scripts/\pear.sh
57                                        reinplace "s|@bin_dir@|${prefix}/bin|g" \
58                                                ${worksrcpath}/scripts/\pear.sh
59                                        reinplace "s|@php_dir@|${pear_dir}|g" \
60                                                ${worksrcpath}/scripts/\pear.sh
61                                        reinplace "s|-d output_buffering=1|-d output_buffering=1 -d memory_limit=16M|g" \
62                                                ${worksrcpath}/scripts/\pear.sh
63                                        # peardev script
64                                        reinplace "s|@php_bin@|${prefix}/bin/php|g" \
65                                                ${worksrcpath}/scripts/\peardev.sh
66                                        reinplace "s|@bin_dir@|${prefix}/bin|g" \
67                                                ${worksrcpath}/scripts/\peardev.sh
68                                        reinplace "s|@php_dir@|${pear_dir}|g" \
69                                                ${worksrcpath}/scripts/\peardev.sh
70                                        # pecl script
71                                        reinplace "s|@php_bin@|${prefix}/bin/php|g" \
72                                                ${worksrcpath}/scripts/\pecl.sh
73                                        reinplace "s|@bin_dir@|${prefix}/bin|g" \
74                                                ${worksrcpath}/scripts/\pecl.sh
75                                        reinplace "s|@php_dir@|${pear_dir}|g" \
76                                                ${worksrcpath}/scripts/\pecl.sh
77                                        # Dependency2.php
78                                        reinplace "s|@PEAR-VER@|${version}|g" \
79                                                ${worksrcpath}/PEAR/Dependency2.php
80                                        # /PEAR/Command/Package.php
81                                        reinplace "s|@package_version@|${version}|g" \
82                                                ${worksrcpath}/PEAR/Command/Package.php
83                                        reinplace "s|@DATA-DIR@|${pear_dir}/data|g" \
84                                                ${worksrcpath}/PEAR/Command/Package.php
85                                        }
86destroot                        {# Install PEAR
87                                        xinstall -d -m 755 ${destroot}${prefix}/bin/
88                                        foreach B ${pear_bin} {
89                                                xinstall -m 755 ${worksrcpath}/scripts/${B}.sh \
90                                                        ${destroot}${prefix}/bin/${B}
91                                                }
92                                        xinstall -d -m 755 ${destroot}${pear_dir}
93                                        foreach D ${indirs} {
94                                                file copy ${worksrcpath}/${D} ${destroot}${pear_dir}/${D}
95                                                #xinstall -d -m 755 ${destroot}${pear_dir}${D}
96                                                #eval xinstall -m 644 [glob ${worksrcpath}/${D}/*.php] \
97                                                #`      ${destroot}${pear_dir}/${D}
98                                                }
99                                        eval xinstall -m 644 [glob ${worksrcpath}/*.php] ${destroot}${pear_dir}
100
101                                        #Install Archive_tar
102                                        xinstall -d -m 755 ${destroot}${pear_dir}/Archive
103                                        eval xinstall -m 644 \
104                                                [glob ${workpath}/${tar_distname}/Archive/*] \
105                                                ${destroot}${pear_dir}/Archive
106
107                                        #Install Console_Getopt
108                                        xinstall -d -m 755 ${destroot}${pear_dir}/Console
109                                        eval xinstall -m 644 \
110                                                [glob ${workpath}/${console_distname}/Console/*] \
111                                                ${destroot}${pear_dir}/Console
112                                        #Install XML_RPC
113                                        xinstall -d -m 755 ${destroot}${pear_dir}/XML
114                                        eval xinstall -m 644 \
115                                                [glob ${workpath}/${xml_distname}/*.php] \
116                                                ${destroot}${pear_dir}/XML
117                                        }
118
119variant php4            { depends_lib-delete port:php5
120                                          depends_lib-append port:php4 }