Changeset 87954


Ignore:
Timestamp:
Dec 14, 2011, 4:29:57 AM (8 years ago)
Author:
ryandesign@…
Message:

unittest-cpp: use muniversal portgroup instead of doing it manually; allow builds for non-default build_arch; ensure we're UsingTheRightCompiler; change case of header directory to match patch in upstream issue tracker

Location:
trunk/dports/devel/unittest-cpp
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/unittest-cpp/Portfile

    r87952 r87954  
    22
    33PortSystem 1.0
     4PortGroup               muniversal 1.0
    45
    56name                    unittest-cpp
    67version                 1.4
     8revision                1
    79categories              devel
    810platforms               darwin
     
    2527worksrcdir              UnitTest++
    2628
     29post-extract {
     30    # DOS to UNIX line endings so we can patch properly.
     31    reinplace "s|\r||g" ${worksrcpath}/Makefile
     32}
     33
     34patchfiles              patch-Makefile.diff
     35
    2736use_configure           no
    2837
    29 destroot {
    30     xinstall -m 755 -d ${destroot}${prefix}/include/unittest++/Posix
    31     eval xinstall -m 640 [glob ${worksrcpath}/src/*.h] \
    32         ${destroot}${prefix}/include/unittest++
    33     eval xinstall -m 640 [glob ${worksrcpath}/src/Posix/*.h] \
    34         ${destroot}${prefix}/include/unittest++/Posix
    35     xinstall -m 640 ${worksrcpath}/libUnitTest++.a \
    36         ${destroot}${prefix}/lib
     38foreach arch ${configure.universal_archs} {
     39    lappend merger_build_args(${arch})  CXX='${configure.cxx} -arch ${arch}'
     40}
     41if {![variant_isset universal]} {
     42    build.args-append   CXX='${configure.cxx} [get_canonical_archflags cxx]'
    3743}
    3844
    39 variant universal {
    40     build {
    41         # Build and test the library for the native architecture,
    42         # just to check if everything is fine.
    43         system "cd ${worksrcpath} && ${build.cmd} TestUnitTest++"
    44         system "cd ${worksrcpath} && ${build.cmd} clean"
    45        
    46         # Now build the library for all universal architectures.
    47         set lipo_args {}
    48         foreach arch ${universal_archs} {
    49             system "cd ${worksrcpath} && ${build.cmd} libUnitTest++.a CXXFLAGS='-arch ${arch}' LDFLAGS='-arch ${arch}'"
    50             move ${worksrcpath}/libUnitTest++.a ${worksrcpath}/libUnitTest++.a.${arch}
    51             system "cd ${worksrcpath} && ${build.cmd} clean"
    52             lappend lipo_args -arch ${arch} ${worksrcpath}/libUnitTest++.a.${arch}
    53         }
    54        
    55         # Roll a universal binary.
    56         system "lipo ${lipo_args} -create -output ${worksrcpath}/libUnitTest++.a"
    57     }
    58 }
     45destroot.args           prefix=${prefix}
Note: See TracChangeset for help on using the changeset viewer.