Modified: trunk/dports/devel/libftd2xx/Portfile (79925 => 79926)
--- trunk/dports/devel/libftd2xx/Portfile 2011-06-29 11:31:58 UTC (rev 79925)
+++ trunk/dports/devel/libftd2xx/Portfile 2011-06-29 11:47:55 UTC (rev 79926)
@@ -4,7 +4,7 @@
PortSystem 1.0
name libftd2xx
-version 1.0.2
+version 1.0.4
categories devel
maintainers gmail.com:ranauei
description FTDI D2XX Driver
@@ -15,22 +15,33 @@
homepage http://www.ftdichip.com/Drivers/D2XX.htm
platforms macosx
distname D2XX${version}
-master_sites http://www.ftdichip.com/Drivers/D2XX/MacOSX/UniBin/
-checksums md5 6375f18945b02fdb028a4c4dbd1b1a09 \
- sha1 6cf0873d2a9e2d3a7575ddc4ec0fc3baa0a8ef77 \
- rmd160 f6bb86ff23d3d91d887cbe5955bc11d6c1732599
+master_sites http://www.ftdichip.com/Drivers/D2XX/MacOSX/
+
+checksums sha1 0a4aac50f18c6929ec8daf76bcdfb769e896c147 \
+ rmd160 a26c1878d256e356486c2fb21d7d8562632a0e9e
+
use_dmg yes
use_configure no
-build {}
+variant universal {}
+if { ${os.major}=="8" } {
+ set os_dir 10.4
+ supported_archs i386 ppc
+ configure.universal_archs i386 ppc
+} elseif { ${os.major}>=9 } {
+ set os_dir 10.5\ -\ 10.6
+ supported_archs i386 ppc x86_64
+ configure.universal_archs i386 ppc x86_64
+}
+
+build {
+ if {![variant_isset universal]} {
+ system "cd '${worksrcpath}/D2XX/bin/${os_dir}' && lipo -extract ${configure.build_arch} ${name}.${version}.dylib -output ${name}.${version}.dylib"
+ }
+}
+
destroot {
- if { ${os.major}=="8" } {
- set os_dir 10.4
- } elseif { ${os.major}>=9 } {
- set os_dir 10.5\ -\ 10.6
- }
-
xinstall ${worksrcpath}/D2XX/bin/${os_dir}/${name}.${version}.dylib ${destroot}${prefix}/lib
xinstall -m 644 -W ${worksrcpath}/D2XX bin/ftd2xx.h Samples/WinTypes.h ${destroot}${prefix}/include
ln -s ${name}.${version}.dylib ${destroot}${prefix}/lib/${name}.dylib