Ticket #40117: Portfile-collada-dom.diff

File Portfile-collada-dom.diff, 3.5 KB (added by kyle.j.kauffman@…, 11 years ago)

Modified Portfile diff after comments.

  • Portfile

    old new  
    33PortSystem      1.0
    44
    55name            collada-dom
    6 version         2.2
    7 revision        1
     6version         2.4.0
     7revision        0
    88set branch      [join [lrange [split ${version} .] 0 1] .]
    99categories      science devel
    1010maintainers     nomaintainer
    1111platforms       darwin
    1212description     COLLADA Document Object Model (DOM)
     13PortGroup               cmake 1.0
    1314
    1415long_description \
    1516    The COLLADA Document Object Model (DOM) is an application programming \
     
    1718    instance document.
    1819
    1920homepage        http://collada.org/mediawiki/index.php/Portal:COLLADA_DOM
    20 master_sites    sourceforge
    21 use_zip         yes
     21master_sites    sourceforge:project/collada-dom/Collada%20DOM/Collada%20DOM%20${branch}
    2222
    23 checksums       md5     bbb76ef2a8037c945c5cdf26829dcb7d \
    24                 sha1    e6b72ca4c0327fbc342ab87a1d9d76530a980b5d \
    25                 rmd160  b2d4387dfe97d97b30b702f39e4ee312dba6d13a
    26 
    27 worksrcdir      ${name}/dom
    28 
    29 patchfiles \
    30     patch-src-dae-daeUtils.cpp.diff \
    31     patch-test-1.4-domTest.cpp.diff \
    32     patch-test-1.5-domTest.cpp.diff
    33 
    34 post-patch {
    35     reinplace {s/filter-out x86 ppc/& x86_64/} ${worksrcpath}/Makefile
    36     reinplace {s/\$(subst x86,i386,\$(archs))/$(subst i386_64,x86_64,&)/} \
    37         ${worksrcpath}/make/common.mk
    38     reinplace s:/usr/include:${prefix}/include: ${worksrcpath}/make/dom.mk
    39     reinplace "s:-lxml2:-L${prefix}/lib &:" ${worksrcpath}/make/dom.mk
    40     reinplace -E s:-Iexternal-libs/(pcre|boost):-I${prefix}/include: \
    41         ${worksrcpath}/make/dom.mk \
    42         ${worksrcpath}/make/domTest.mk
    43     reinplace s:external-libs/pcre/lib/\\\$(buildID)/:${prefix}/lib/: \
    44         ${worksrcpath}/make/dom.mk
    45     reinplace {/libpcre/s/\.a/\.dylib/g} ${worksrcpath}/make/dom.mk
    46     reinplace -E \
    47         s:external-libs/boost/lib/\\\$\\(buildID\\)/(libboost_\[a-z\]*)\.a:${prefix}/lib/\\1.dylib: \
    48         ${worksrcpath}/make/dom.mk ${worksrcpath}/make/domTest.mk
    49     reinplace {s/# minizip/dependentLibs += $(outPath)libminizip.a/} \
    50         ${worksrcpath}/make/dom.mk
    51 }
     23checksums           md5     20399de4206eab850c32e65c04e907cb \
     24                    sha1    74e28d670497abc897c06a41df7d28eea2bac836 \
     25                    rmd160  e8ddb9430d667856eb0fbf69106cd877784f42f1
     26
     27extract.suffix .tgz
     28
     29patchfiles      patch-CMakeLists.txt.diff
    5230
    5331depends_lib \
    5432    port:boost \
    5533    port:libxml2 \
    5634    port:pcre
    57 
    58 use_configure   no
    59 
    60 variant universal {}
    61 
    62 build.args \
    63     colladaVersion=all \
    64     parsers=libxml
    65 
    66 if {[variant_isset universal]} {
    67     build.args-append arch="${configure.universal_archs}"
    68 } else {
    69     build.args-append arch=${build_arch}
    70 }
    71 
    72 test.run        yes
    73 test.args       ${build.args}
    74 
    75 destroot {
    76     foreach v {1.4 1.5} {
    77         set fw Collada[join [split ${v} .] ""]Dom
    78         set path ${prefix}/Library/Frameworks/${fw}.framework
    79         copy ${worksrcpath}/build/mac-${v}/${fw}.framework \
    80             ${destroot}${path}
    81         set dylib [lindex [glob -tails -types d -directory ${destroot}${path} Versions/*] 0]/${fw}
    82         system "install_name_tool -id ${path}/${dylib} ${destroot}${path}/${dylib}"
    83     }
    84 
    85     set docdir ${prefix}/share/doc/${name}
    86     xinstall -d ${destroot}${docdir}
    87     xinstall -m 644 -W ${worksrcpath} license.txt license/minizip-license.txt \
    88         readme.txt ${destroot}${docdir}
    89 }
    90 
    91 livecheck.type  regex
    92 livecheck.url   http://sourceforge.net/projects/collada-dom/
    93 livecheck.regex {collada-dom-(\d+(?:\.\d+)*)}