source: trunk/dports/science/collada-dom/Portfile @ 87050

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

collada-dom: simplify universal archs code

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1# $Id: Portfile 87050 2011-11-08 18:00:41Z ryandesign@macports.org $
2
3PortSystem      1.0
4
5name            collada-dom
6version         2.2
7set branch      [join [lrange [split ${version} .] 0 1] .]
8categories      science devel
9maintainers     nomaintainer
10platforms       darwin
11description     COLLADA Document Object Model (DOM)
12
13long_description \
14    The COLLADA Document Object Model (DOM) is an application programming \
15    interface (API) that provides a C++ object representation of a COLLADA XML \
16    instance document.
17
18homepage        http://collada.org/mediawiki/index.php/Portal:COLLADA_DOM
19master_sites    sourceforge
20use_zip         yes
21
22checksums       md5     bbb76ef2a8037c945c5cdf26829dcb7d \
23                sha1    e6b72ca4c0327fbc342ab87a1d9d76530a980b5d \
24                rmd160  b2d4387dfe97d97b30b702f39e4ee312dba6d13a
25
26worksrcdir      ${name}/dom
27
28patchfiles \
29    patch-src-dae-daeUtils.cpp.diff \
30    patch-test-1.4-domTest.cpp.diff \
31    patch-test-1.5-domTest.cpp.diff
32
33post-patch {
34    reinplace {s/filter-out x86 ppc/& x86_64/} ${worksrcpath}/Makefile
35    reinplace {s/\$(subst x86,i386,\$(archs))/$(subst i386_64,x86_64,&)/} \
36        ${worksrcpath}/make/common.mk
37    reinplace s:/usr/include:${prefix}/include: ${worksrcpath}/make/dom.mk
38    reinplace "s:-lxml2:-L${prefix}/lib &:" ${worksrcpath}/make/dom.mk
39    reinplace -E s:-Iexternal-libs/(pcre|boost):-I${prefix}/include: \
40        ${worksrcpath}/make/dom.mk \
41        ${worksrcpath}/make/domTest.mk
42    reinplace s:external-libs/pcre/lib/\\\$(buildID)/:${prefix}/lib/: \
43        ${worksrcpath}/make/dom.mk
44    reinplace {/libpcre/s/\.a/\.dylib/g} ${worksrcpath}/make/dom.mk
45    reinplace -E \
46        s:external-libs/boost/lib/\\\$\\(buildID\\)/(libboost_\[a-z\]*)\.a:${prefix}/lib/\\1.dylib: \
47        ${worksrcpath}/make/dom.mk ${worksrcpath}/make/domTest.mk
48    reinplace {s/# minizip/dependentLibs += $(outPath)libminizip.a/} \
49        ${worksrcpath}/make/dom.mk
50}
51
52depends_lib \
53    port:boost \
54    port:libxml2 \
55    port:pcre
56
57use_configure   no
58
59variant universal {}
60
61build.args \
62    colladaVersion=all \
63    parsers=libxml
64
65if {[variant_isset universal]} {
66    build.args-append arch="${configure.universal_archs}"
67} else {
68    build.args-append arch=${build_arch}
69}
70
71test.run        yes
72test.args       ${build.args}
73
74destroot {
75    foreach v {1.4 1.5} {
76        set fw Collada[join [split ${v} .] ""]Dom
77        set path ${prefix}/Library/Frameworks/${fw}.framework
78        copy ${worksrcpath}/build/mac-${v}/${fw}.framework \
79            ${destroot}${path}
80        set dylib [lindex [glob -tails -types d -directory ${destroot}${path} Versions/*] 0]/${fw}
81        system "install_name_tool -id ${path}/${dylib} ${destroot}${path}/${dylib}"
82    }
83
84    set docdir ${prefix}/share/doc/${name}
85    xinstall -d ${destroot}${docdir}
86    xinstall -m 644 -W ${worksrcpath} license.txt license/minizip-license.txt \
87        readme.txt ${destroot}${docdir}
88}
89
90livecheck.type  regex
91livecheck.url   http://sourceforge.net/projects/collada-dom/
92livecheck.regex {collada-dom-(\d+(?:\.\d+)*)}
Note: See TracBrowser for help on using the repository browser.