[91264] trunk/dports/devel/odcctools/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Tue Mar 27 18:29:25 PDT 2012


Revision: 91264
          https://trac.macports.org/changeset/91264
Author:   jeremyhu at macports.org
Date:     2012-03-27 18:29:25 -0700 (Tue, 27 Mar 2012)
Log Message:
-----------
odcctools: Provide a useful version of cctools from XCode 4.3

Modified Paths:
--------------
    trunk/dports/devel/odcctools/Portfile

Modified: trunk/dports/devel/odcctools/Portfile
===================================================================
--- trunk/dports/devel/odcctools/Portfile	2012-03-28 01:27:18 UTC (rev 91263)
+++ trunk/dports/devel/odcctools/Portfile	2012-03-28 01:29:25 UTC (rev 91264)
@@ -4,15 +4,20 @@
 PortSystem 1.0
 
 name            odcctools
-version         20090808
+set my_name     cctools
+epoch           1
+version         822
 revision        1
+set llvm_version 3.0
 categories      devel
-maintainers     nomaintainer
-homepage        http://odcctools.macosforge.org/
-master_sites    http://svn.macosforge.org/repository/odcctools/release/
+maintainers     jeremyhu openmaintainer
+homepage        http://opensource.apple.com/
+master_sites    http://opensource.apple.com/tarballs/${my_name}/
 platforms       darwin
 license         apsl-2.0
 
+distname        ${my_name}-${version}
+
 description     Darwin cctools build system.
 long_description \
     The odcctools project is geared towards improving the \
@@ -23,29 +28,63 @@
     and analyzing Mach-O and fat files, and support \
     libraries.
 
-use_bzip2       yes
+use_bzip2       no
 
-checksums       md5     cb8ce536e204fc2399fc27079012c37b \
-                sha1    8099a75396d5ac1621f04c977212067d97e3c540 \
-                rmd160  8c672b3f1d9fd75ad25ddbe7287e099693f7e742
+checksums           md5     7a5e044c34b0d2745dddbdf3a5d3061d \
+                    sha1    bd04447522aa69c1f71ab01811ac46dca23b92b7 \
+                    rmd160  1caf207acbf421cdc975926a392fc75dc1d2594c
 
-depends_lib     port:llvm-2.9
+depends_lib     port:llvm-${llvm_version}
 
-configure.cppflags-delete -I${prefix}/include
-configure.ldflags-delete -L${prefix}/lib
-configure.args  --program-prefix=od
+post-patch {
+    reinplace "s:\"llvm-mc\":\"llvm-mc-mp-${llvm_version}\":" ${worksrcpath}/as/driver.c
 
-build.target    default
+    foreach file [glob ${worksrcpath}/{*/,}Makefile] {
+        reinplace "s:/usr/local:${prefix}:g" ${file}
+        reinplace "s:/usr:${prefix}:g" ${file}
+        reinplace "s:${prefix}/efi:${prefix}:g" ${file}
+        reinplace "s:${prefix}/man:${prefix}/share/man:g" ${file}
+    }
+}
 
+use_configure   no
 use_parallel_build  yes
 
-post-destroot {
-    set mandir ${destroot}${prefix}/share/man/man1
-    foreach manpage [glob -d ${mandir} *.1] {
-        file rename ${manpage} [strsed ${manpage} "s%${mandir}/%${mandir}/od%"]
+build.target    all
+build.args-append \
+    TRIE="" \
+    USE_DEPENDENCY_FILE=NO \
+    BUILD_DYLIBS=NO \
+    LTO=-DLTO_SUPPORT \
+    CC="${configure.cc}" \
+    CXX="${configure.cxx}" \
+    RC_CFLAGS="[get_canonical_archflags]" \
+    LLVM_MC="llvm-mc-mp-${llvm_version}"
+
+destroot.args-append \
+    TRIE="" \
+    USE_DEPENDENCY_FILE=NO \
+    BUILD_DYLIBS=NO \
+    LTO=-DLTO_SUPPORT \
+    CC="${configure.cc}" \
+    CXX="${configure.cxx}" \
+    RC_CFLAGS="[get_canonical_archflags]" \
+    LLVM_MC="llvm-mc-mp-${llvm_version}"
+
+platform macos {
+    # DON'T DO THIS!  I'm leaving it here as a warning to curious minds.
+    # build.args-append RC_OS="macos"
+
+    if {${os.major} < 10} {
+        build.args-append \
+            OLD_LIBKLD=YES
+
+        destroot.args-append \
+            OLD_LIBKLD=YES
     }
 }
 
-livecheck.type  regex
-livecheck.url   [lindex ${master_sites} 0]
-livecheck.regex ${name}-(\\d+)${extract.suffix}
+destroot.args-append DSTROOT=${destroot}
+post-destroot {
+    system "rm -rf ${destroot}${prefix}/{OpenSourceLicenses,OpenSourceVersions,RelNotes}"
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120327/f8e6bd9e/attachment-0001.html>


More information about the macports-changes mailing list