source: trunk/dports/textproc/xercesc/Portfile

Last change on this file was 137207, checked in by khindenburg@…, 2 years ago

xercesc: disable livecheck

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# $Id: Portfile 137207 2015-06-06 17:42:28Z ryandesign@macports.org $
2
3PortSystem 1.0
4PortGroup               muniversal 1.0
5
6name                    xercesc
7conflicts               xercesc3
8version                 2.8.0
9revision                3
10categories              textproc
11maintainers             isode.com:chris.ridd
12license                 Apache-2
13description             an XML parser
14long_description        Xerces-C++ is a validating XML parser written in \
15                        a portable subset of C++.  Xerces-C++ makes it \
16                        easy to give your application the ability to read \
17                        and write XML data.  A shared library is provided \
18                        for parsing, generating, manipulating, and \
19                        validating XML documents.
20homepage                http://xerces.apache.org/xerces-c/
21master_sites            apache:xerces/c/2/sources/
22distname                xerces-c-src_[strsed ${version} {g/\./_/}]
23checksums               md5 5daf514b73f3e0de9e3fce704387c0d2
24platforms               darwin
25
26patchfiles              64-bit-no-carbon.diff
27
28configure.dir           ${worksrcpath}/src/xercesc
29configure.pre_args      -P "${prefix}"
30configure.args          -c ${configure.cc} \
31                        -x ${configure.cxx}
32configure.cmd           ./runConfigure
33configure.universal_args-delete --disable-dependency-tracking
34
35proc bits_arg_for_arch {arch} {
36        switch ${arch} {
37                x86_64  -
38                ppc64   { return {-b 64} }
39                i386    -
40                ppc     { return {-b 32} }
41        }
42}
43
44if {[variant_isset universal]} {
45        foreach arch ${configure.universal_archs} {
46                set merger_configure_args(${arch}) "-z -I${worksrcpath}-${arch}/src [bits_arg_for_arch ${arch}]"
47                set merger_configure_env(${arch}) XERCESCROOT=${worksrcpath}-${arch}
48                set merger_build_env(${arch}) $merger_configure_env(${arch})
49                set merger_destroot_env(${arch}) $merger_configure_env(${arch})
50        }
51} else {
52        configure.args-append -z -I${worksrcpath}/src \
53                              [bits_arg_for_arch ${configure.build_arch}]
54        configure.env   XERCESCROOT=${worksrcpath}
55        build.env               ${configure.env}
56        destroot.env    ${configure.env}
57}
58
59use_parallel_build      no
60build.dir               ${worksrcpath}/src/xercesc
61build.type              gnu
62
63platform darwin {
64        configure.args-append   -p macosx -n native
65}
66
67post-build {
68    if {![variant_isset universal]} {
69        xinstall -m 755 -W ${filespath} makestatic.sh.in ${build.dir}/makestatic.sh
70        reinplace s|@CXX@|${configure.cxx}| ${build.dir}/makestatic.sh
71        system "cd ${build.dir} && ${build.env} ./makestatic.sh"
72        } else {
73            foreach arch ${configure.universal_archs} {
74                set arch_build_dir [string map "${worksrcpath} ${worksrcpath}-${arch}" ${build.dir}]
75            xinstall -m 755 -W ${filespath} makestatic.sh.in ${arch_build_dir}/makestatic.sh
76            reinplace s|@CXX@|${configure.cxx}| ${arch_build_dir}/makestatic.sh
77            system "cd ${arch_build_dir} && $merger_build_env(${arch}) ./makestatic.sh"
78        }
79        }
80}
81
82pre-destroot    {
83    if {![variant_isset universal]} {
84        xinstall -d -m 755 ${destroot}${prefix}/lib
85            xinstall ${worksrcpath}/lib/libxerces-c.a ${destroot}${prefix}/lib
86        } else {
87            foreach arch ${configure.universal_archs} {
88                xinstall -d -m 755 ${destroot}-${arch}${prefix}/lib
89                xinstall ${worksrcpath}-${arch}/lib/libxerces-c.a ${destroot}-${arch}${prefix}/lib
90            }
91        }
92}
93
94post-destroot {
95        xinstall -d -m 755 ${destroot}${prefix}/share/doc
96        file copy ${worksrcpath}/doc/html ${destroot}${prefix}/share/doc/${name}
97        xinstall -m 644 -W ${worksrcpath} version.incl LICENSE.txt Readme.html \
98                credits.txt ${destroot}${prefix}/share/doc/${name}
99}
100
101post-destroot {
102    system "ranlib ${destroot}${prefix}/lib/libxerces-c.a"
103}
104
105livecheck.type      none
Note: See TracBrowser for help on using the repository browser.