[82135] trunk/base/src/package1.0/portdpkg.tcl

afb at macports.org afb at macports.org
Mon Aug 8 07:30:17 PDT 2011


Revision: 82135
          http://trac.macports.org/changeset/82135
Author:   afb at macports.org
Date:     2011-08-08 07:30:17 -0700 (Mon, 08 Aug 2011)
Log Message:
-----------
fix the arch of deb packages

Modified Paths:
--------------
    trunk/base/src/package1.0/portdpkg.tcl

Modified: trunk/base/src/package1.0/portdpkg.tcl
===================================================================
--- trunk/base/src/package1.0/portdpkg.tcl	2011-08-08 14:29:17 UTC (rev 82134)
+++ trunk/base/src/package1.0/portdpkg.tcl	2011-08-08 14:30:17 UTC (rev 82135)
@@ -53,7 +53,7 @@
 set_ui_prefix
 
 proc portdpkg::main {args} {
-	global UI_PREFIX destpath os.arch os.platform
+	global UI_PREFIX destpath os.arch os.platform supported_archs configure.build_arch
     
 	ui_msg "$UI_PREFIX [format [msgcat::mc "Creating dpkg for %s-%s"] [option subport] [option version]]"
 
@@ -131,8 +131,9 @@
 	# sparc and sparc64. The operating system, os, is one of: linux, gnu,          
 	# freebsd and openbsd. Use of gnu in this string is reserved for the           
 	# GNU/Hurd operating system.
-	switch -regex ${os.arch} {
+	switch -regex ${configure.build_arch} {
 		i[3-9]86 { set pkg_arch "i386" }
+		x86_64 { set pkg_arch "x86_64" }
 		default { set pkg_arch ${os.arch} }
 	}
 
@@ -140,7 +141,14 @@
 	# the operating system name
 	if {${os.platform} != "linux"} {
 		set pkg_arch "${os.platform}-${pkg_arch}"
+	} elseif {${pkg_arch} == "x86_64"} {
+		set pkg_arch "amd64"
 	}
+	
+	# An architecture-independent package
+	if {$supported_archs == "noarch"} {
+		set pkg_arch "all"
+	}
 
 	puts $controlfd "Package: [option subport]"
 	puts $controlfd "Architecture: ${pkg_arch}"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110808/d5ac48da/attachment.html>


More information about the macports-changes mailing list