[60880] trunk/dports/sysutils/osxutils/Portfile

jmr at macports.org jmr at macports.org
Thu Nov 26 18:29:21 PST 2009


Revision: 60880
          http://trac.macports.org/changeset/60880
Author:   jmr at macports.org
Date:     2009-11-26 18:29:15 -0800 (Thu, 26 Nov 2009)
Log Message:
-----------
osxutils: use more of the xcode portgroup so the right SDK etc is used (#20910), force 32-bit build, leave out jam-based projects on darwin 10+

Modified Paths:
--------------
    trunk/dports/sysutils/osxutils/Portfile

Modified: trunk/dports/sysutils/osxutils/Portfile
===================================================================
--- trunk/dports/sysutils/osxutils/Portfile	2009-11-27 01:20:56 UTC (rev 60879)
+++ trunk/dports/sysutils/osxutils/Portfile	2009-11-27 02:29:15 UTC (rev 60880)
@@ -1,11 +1,11 @@
 # $Id$
 
 PortSystem 1.0
+PortGroup xcode 1.0
 
 name		osxutils
 version		1.7
 categories	sysutils
-PortGroup       xcode 1.0
 
 maintainers	waqar
 description	Command line utilities for Finder commands
@@ -17,7 +17,6 @@
 	file meta-data such as Finder flags, heritage file Type and 	\
 	Creator codes, comments and suffixes/file extensions.
 homepage        http://sourceforge.net/projects/osxutils
-platforms	macosx
 master_sites    sourceforge
 use_zip		yes
 
@@ -27,31 +26,57 @@
 		sha1 5cbd1badf4cd7fe36431baf5e1358a68f9967eac		\
 		rmd160 b91fa4644ee8348c0013f55aaa9d0d8f2e46dafe
 
-use_configure	no
-build		{}
+# all but one of these tools use 32-bit-only carbon bits
+if {$build_arch == "x86_64"} {
+    configure.build_arch i386
+} elseif {$build_arch == "ppc64"} {
+    configure.build_arch ppc
+}
+set bt {getfcomment geticon hfsdata seticon setlabel wsupdate}
+if {${os.major} < 10} {
+    # jam-based targets
+    append bt lsmac mkalias setfcomment setfctypes setfflags setsuffix
+}
 
-destroot	{
-	set bt {getfcomment geticon hfsdata lsmac mkalias \
-			setfcomment setfctypes setfflags seticon setlabel \
-			setsuffix wsupdate}
-	foreach item ${bt} {
-		system "cd ${worksrcpath}/$item && \
-			${build.cmd} DSTROOT=${destroot} \
-			INSTALL_PATH=${prefix}/bin install \
-			INSTALL_MODE_FLAG=755"
-		system "cd ${worksrcpath}/$item && \
-			cp $item.1 ${destroot}${prefix}/share/man/man1"
-	}
+# Mostly clagged from xcode portgroup. Not pretty, but the portgroup doesn't
+# support multiple projects.
+build {
+    # set some arguments.
+    set xcode_configuration_arg [xcode::get_configuration_arg ${xcode.configuration}]
+    set xcode_build_args [xcode::get_build_args]
 
-	set it {cpath google rcmac setvolume trash wiki}
-	foreach item ${it} {
-		system "cd ${worksrcpath}/$item && \
-			cp $item ${destroot}${prefix}/bin"
-		system "cd ${worksrcpath}/$item && \
-			cp $item.1 ${destroot}${prefix}/share/man/man1"
+    foreach item ${bt} {
+        xcode.project ${item}/${item}.xcodeproj
+        set xcode_project_arg [xcode::get_project_arg ${xcode.project}]
+        xcode::build_one_target \
+            "$xcode_project_arg -alltargets $xcode_configuration_arg" \
+            "$xcode_build_args ${xcode.build.settings}"
+    }
+}
+
+xcode.destroot.path ${prefix}/bin
+destroot {
+    # set some arguments.
+    set xcode_configuration_arg [xcode::get_configuration_arg ${xcode.configuration}]
+    set xcode_install_path_setting [xcode::get_install_path_setting \
+                                        ${xcode.destroot.path} ${xcode.destroot.type}]
+    set xcode_build_args [xcode::get_build_args]
+
+    foreach item ${bt} {
+        xcode.project ${item}/${item}.xcodeproj
+        # let Xcode 2.1+ find resources.
+        xcode::fix_resource_dependencies
+        set xcode_project_arg [xcode::get_project_arg ${xcode.project}]
+        xcode::destroot_one_target \
+            "$xcode_project_arg -alltargets $xcode_configuration_arg" \
+            "$xcode_install_path_setting $xcode_build_args ${xcode.destroot.settings}"
+        copy ${worksrcpath}/${item}/${item}.1 ${destroot}${prefix}/share/man/man1
+    }
+
+    foreach item {cpath google rcmac setvolume trash wiki} {
+		copy ${worksrcpath}/${item}/${item} ${destroot}${prefix}/bin
+		copy ${worksrcpath}/${item}/${item}.1 ${destroot}${prefix}/share/man/man1
 	}
-
-	system "cd ${worksrcpath}/osxutils && \
-		cp osxutils ${destroot}${prefix}/bin"
-	file delete -force ${destroot}/usr
+	copy ${worksrcpath}/osxutils/osxutils ${destroot}${prefix}/bin
+	delete ${destroot}/usr
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091126/378957e0/attachment-0001.html>


More information about the macports-changes mailing list