source: trunk/dports/php/pear-install-phar/Portfile

Last change on this file was 145189, checked in by pixilla@…, 22 months ago

php/pear-install-phar: update date version of unversioned file. Closes #49164

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 145189 2016-01-28 04:36:29Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                pear-install-phar
7version             20161027
8categories          php www
9platforms           darwin
10maintainers         pixilla openmaintainer
11homepage            http://pear.php.net
12master_sites        http://pear.php.net
13
14subport php5-pear {}
15
16subport php53-pear {
17
18    set php.port        [lindex [split $subport -] 0]
19    set php.db          /var/db/${php.port}
20    depends_lib         port:${php.port}
21}
22
23subport php54-pear {
24
25    set php.port        [lindex [split $subport -] 0]
26    set php.db          /var/db/${php.port}
27    depends_lib         port:${php.port}
28}
29
30subport php55-pear {
31
32    set php.port        [lindex [split $subport -] 0]
33    set php.db          /var/db/${php.port}
34    depends_lib         port:${php.port}
35}
36
37subport php56-pear {
38
39    set php.port        [lindex [split $subport -] 0]
40    set php.db          /var/db/${php.port}
41    depends_lib         port:${php.port}
42}
43
44subport php70-pear {
45
46    set php.port        [lindex [split $subport -] 0]
47    set php.db          /var/db/${php.port}
48    depends_lib         port:${php.port}
49}
50
51use_configure       no
52
53if {${name} == ${subport}} {
54
55    license             PHP-3 LGPL-2.1+
56    description         PEAR installer phar
57    long_description    ${description}
58
59    livecheck.type      moddate
60
61    dist_subdir         ${name}-${version}
62    distfiles           install-pear-nozlib.phar
63
64    checksums           rmd160  a1cd7802b9fb337ec431ae557d69985555e8dd0a \
65                        sha256  e5da70c8b744d5fb6e014dbe369d69ee1168661ae91bba4b96d829a2a955b4e4
66
67    set buildpath       ${worksrcpath}/build
68    set libpath         /lib/php/pear
69
70    extract.mkdir       yes
71    extract {
72
73        xinstall -d ${buildpath}${libpath}
74        file copy ${distpath}/install-pear-nozlib.phar ${buildpath}${libpath}
75    }
76
77    build {}
78    destroot {
79
80        xinstall -d ${destroot}${prefix}${libpath}
81        file copy ${buildpath}${libpath}/install-pear-nozlib.phar ${destroot}${prefix}${libpath}
82    }
83} elseif {${subport} eq {php5-pear}} {
84
85    replaced_by         php55-pear
86    PortGroup           obsolete 1.0
87} else {
88
89    license             BSD
90    description         Optional port adds the PEAR repository to the include path for ${php.port}.
91    long_description    ${description}
92
93    distfiles
94
95    worksrcdir          ${php.port}-pear
96    extract.dir         ${worksrcpath}
97    extract.mkdir       yes
98    post-extract {
99
100        copy ${filespath}/pear-ini.php ${worksrcpath}/pear-ini.php
101        copy ${filespath}/pear.ini ${worksrcpath}/pear.ini
102    }
103
104    post-patch {
105
106        reinplace "s,@PHP.PORT@,${php.port},g" \
107            ${worksrcpath}/pear.ini
108        reinplace "s,@PREFIX@,${prefix},g" \
109            ${worksrcpath}/pear-ini.php \
110            ${worksrcpath}/pear.ini
111    }
112
113    use_configure       no
114    build {}
115
116    destroot {
117
118        xinstall -d -m 0755 ${destroot}${prefix}/var/db/${php.port}/pear
119        xinstall -m 0644 ${worksrcpath}/pear-ini.php \
120            ${destroot}${prefix}/var/db/${php.port}/pear/pear-ini.php
121        xinstall -m 0644 ${worksrcpath}/pear.ini \
122            ${destroot}${prefix}/var/db/${php.port}/pear.ini
123    }
124}
Note: See TracBrowser for help on using the repository browser.