source: trunk/dports/net/curl/Portfile @ 36442

Last change on this file since 36442 was 36442, checked in by ryandesign@…, 9 years ago

curl: fix curl-config so it doesn't contain the universal -arch flags when the port is built universal; closes #15116. This same problem was previously fixed for the libcurl.pc pkg-config file in r33404.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1# $Id: Portfile 36442 2008-05-02 01:41:59Z ryandesign@macports.org $
2
3PortSystem              1.0
4
5name                    curl
6# keep the version in sync with the curl-ca-bundle port
7version                 7.18.1
8revision                2
9categories              net www
10maintainers             ryandesign
11homepage                http://curl.haxx.se/
12platforms               darwin freebsd
13use_bzip2               yes
14
15description \
16    Tool for transferring files with URL syntax
17
18long_description \
19    curl is a client to get documents/files from servers, using any of \
20    the supported protocols. The command is designed to work without \
21    user interaction or any kind of interactivity.
22
23# keep the master_sites in sync with the curl-ca-bundle port
24master_sites \
25    http://curl.haxx.se/download/ \
26    ftp://ftp.sunet.se/pub/www/utilities/curl/ \
27    http://curl.sourceforge.net/download/ \
28    http://cool.haxx.se/curl/ \
29    ftp://gd.tuwien.ac.at/utils/archivers/curl/ \
30    http://gd.tuwien.ac.at/utils/archivers/curl/ \
31    http://www.execve.net/curl/ \
32    sourceforge
33
34checksums \
35    md5 805834fc1136ff7600d2179bc0386c5a \
36    sha1 685b9388ee9e646158a83cd435f7be664816ad78 \
37    rmd160 f7dac868b2a449aa92a3466b24fe2bb3309ff1e0
38
39configure.args \
40    --disable-ipv6 \
41    --without-libidn \
42    --without-libssh2 \
43    --without-ssl \
44    --disable-ldap \
45    --with-zlib=${prefix}
46
47configure.env \
48    PKG_CONFIG_PATH=${prefix}
49
50depends_build \
51    port:pkgconfig
52
53depends_lib \
54    port:zlib
55
56test.run                yes
57test.target             test-full
58
59set docdir ${prefix}/share/doc/${name}-${version}
60
61post-destroot {
62    if {[variant_isset universal]} {
63        reinplace "s|${configure.universal_ldflags}||" \
64            ${destroot}${prefix}/bin/curl-config \
65            ${destroot}${prefix}/lib/pkgconfig/libcurl.pc
66    }
67   
68    xinstall -d ${destroot}${docdir}
69    xinstall -m 0644 -W ${worksrcpath} \
70        CHANGES \
71        COPYING \
72        README \
73        RELEASE-NOTES \
74        ${destroot}${docdir}
75    xinstall -m 0644 -W ${worksrcpath}/docs \
76        BUGS \
77        CONTRIBUTE \
78        FAQ \
79        FEATURES \
80        HISTORY \
81        INTERNALS \
82        KNOWN_BUGS \
83        MANUAL \
84        RESOURCES \
85        THANKS \
86        TODO \
87        VERSIONS \
88        ${destroot}${docdir}
89}
90
91platform darwin 6 {
92    depends_lib-append      lib:libdl:dlcompat
93}
94
95variant ssl {
96    depends_lib-append      port:openssl \
97                            port:curl-ca-bundle
98    configure.args-append   --with-ca-bundle=${prefix}/share/curl/curl-ca-bundle.crt
99    configure.args-delete   --without-ssl
100}
101
102variant ipv6 {
103    configure.args-delete   --disable-ipv6
104    configure.args-append   --enable-ipv6
105}
106
107variant ares conflicts ipv6 description {Add support for resolving names asynchronously} {
108    depends_lib-append      lib:libcares:c-ares
109    configure.args-append   --enable-ares=${prefix}
110}
111
112variant idn description {Add support for internationalized domain names} {
113    depends_lib-append      port:libidn
114    configure.args-delete   --without-libidn
115}
116
117variant spnego description {Enable SPNEGO authentication support} {
118    # kind of broken?
119    depends_lib-append      port:fbopenssl
120    configure.args-append   --with-spnego=${prefix}
121}
122
123variant gnutls conflicts ssl {
124    depends_lib-append      port:gnutls
125    configure.args-append   --with-gnutls
126}
127
128variant gss {
129    depends_lib-append      port:gss
130    configure.args-append   --with-gssapi=${prefix}
131}
132
133variant openldap {
134    depends_lib-append      port:openldap
135    configure.args-delete   --disable-ldap
136}
137
138variant sftp_scp description {Add SFTP/SCP support via libssh2} {
139    depends_lib-append      port:libssh2
140    configure.args-delete   --without-libssh2
141}
142
143variant doc {
144    post-destroot {
145        xinstall -d ${destroot}${docdir}/html/libcurl
146        xinstall -m 0644 -W ${worksrcpath}/docs TheArtOfHttpScripting ${destroot}${docdir}/html
147        eval xinstall -m 0644 [glob ${worksrcpath}/docs/*.html] ${destroot}${docdir}/html
148        eval xinstall -m 0644 [glob ${worksrcpath}/docs/libcurl/*.html] \
149            ${destroot}${docdir}/html/libcurl
150
151        xinstall -d ${destroot}${docdir}/pdf/libcurl
152        xinstall -m 0644 -W ${worksrcpath}/docs curl-config.pdf curl.pdf ${destroot}${docdir}/pdf
153        eval xinstall -m 0644 [glob ${worksrcpath}/docs/libcurl/*.pdf] ${destroot}${docdir}/pdf/libcurl
154    }
155}
156
157livecheck.check             freshmeat
Note: See TracBrowser for help on using the repository browser.