[54045] trunk/dports/devel
jameskyle at macports.org
jameskyle at macports.org
Sun Jul 19 12:14:09 PDT 2009
Revision: 54045
http://trac.macports.org/changeset/54045
Author: jameskyle at macports.org
Date: 2009-07-19 12:14:08 -0700 (Sun, 19 Jul 2009)
Log Message:
-----------
Provides drivers and development files for activewire board.
Added Paths:
-----------
trunk/dports/devel/activewire/
trunk/dports/devel/activewire/Portfile
Added: trunk/dports/devel/activewire/Portfile
===================================================================
--- trunk/dports/devel/activewire/Portfile (rev 0)
+++ trunk/dports/devel/activewire/Portfile 2009-07-19 19:14:08 UTC (rev 54045)
@@ -0,0 +1,157 @@
+# $Id$
+
+PortSystem 1.0
+PortGroup xcode 1.0
+
+name activewire
+version 4.0
+categories devel
+maintainers
+description This is an independent project focusing on the development of drivers for the ActiveWire board on osx. (REALbasic Plugin not included)
+long_description $description
+homepage http://activewire-osx.sourceforge.net/
+platforms darwin
+master_sites sourceforge:activewire-osx
+
+distname aw_${version}
+extract.suffix .dmg
+
+checksums md5 857800a7187ebf29281438b231100c5e \
+ sha1 6ea56df40235f28d63bc8fd1bb371cf69a5d7622 \
+ rmd160 11740b6f835a2ebfbaea14f12dcec921a8a9a03b
+
+worksrcdir ${distname}/Source/
+use_bzip2 no
+xcode.configuration Default
+default_variants +doc \
+ +dev
+
+# Doesn't build with 10.5
+macosx_deployment_target 10.4
+variant awdriver description {Installs the ActiveWire driver} {}
+variant awconfig description {Installs the awconfig utility} {}
+variant doc description {Install documentation} {}
+variant dev description {Install header files for development} {}
+
+# variant realbasic description {Installs the realbasic plugin} {}
+
+extract {
+ file mkdir /tmp/${distname}
+ system "hdiutil attach ${distpath}/${distname}.dmg -private -nobrowse -mountpoint /tmp/${distname}"
+
+ file mkdir ${workpath}/${distname}
+ file copy /tmp/${distname}/Documentation ${workpath}/${distname}
+ file copy /tmp/${distname}/Examples ${workpath}/${distname}
+ file copy /tmp/${distname}/Source ${workpath}/${distname}
+ file copy /tmp/${distname}/LICENSE.txt ${workpath}/${distname}
+
+ system "hdiutil detach /tmp/${distname}"
+}
+
+pre-configure {
+ foreach {i} {libaw awdriver awconfig} {
+ reinplace "s|/usr/local|${prefix}|g" "${worksrcpath}/$i/$i.xcodeproj/project.pbxproj"
+
+ reinplace "s|/usr/share/man/man1/|${prefix}/include|g" "${worksrcpath}/$i/$i.xcodeproj/project.pbxproj"
+
+ }
+}
+
+proc xcode::get_build_args {args} {
+ global tcl_platform
+ global universal_archs universal_target macosx_deployment_target
+ global os.major os.arch
+ global developer_dir
+
+ set xcode_build_args "OBJROOT=build/ SYMROOT=build/"
+
+ # MACOSX_DEPLOYMENT_TARGET
+ if {[variant_isset universal] && [info exists universal_target]} {
+ append xcode_build_args " MACOSX_DEPLOYMENT_TARGET=${universal_target}"
+ } else {
+ append xcode_build_args " MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}"
+ }
+
+ # ARCHS
+ if {[variant_isset universal]} {
+ append xcode_build_args " ARCHS=\"${universal_archs}\""
+ } else {
+ if {${os.major} >= 10 && $tcl_platform(wordSize) == 8} {
+ append xcode_build_args " ARCHS=x86_64"
+ } elseif {${os.arch} == "powerpc"} {
+ append xcode_build_args " ARCHS=ppc"
+ } else {
+ append xcode_build_args " ARCHS=i386"
+ }
+ }
+
+ # SDKROOT
+ if {[variant_isset universal] && ${os.arch} == "powerpc" && ${os.major} == "8"} {
+ if {[info exists developer_dir]} {
+ append xcode_build_args " SDKROOT=\"${developer_dir}/SDKs/MacOSX10.4u.sdk\""
+ } else {
+ append xcode_build_args " SDKROOT=\"/Developer/SDKs/MacOSX10.4u.sdk\""
+ }
+ }
+ return $xcode_build_args
+}
+
+build {
+ set xcode_build_args [xcode::get_build_args]
+
+ foreach {i} {libaw awdriver awconfig} {
+ if {[variant_isset $i] || $i == "libaw"} {
+ set command "cd '${worksrcpath}/$i' && ${build.cmd} ${xcode_build_args}"
+ ui_debug "Assembled Command: ${command}"
+ system ${command}
+ }
+
+ }
+
+}
+destroot {
+ xinstall -m 755 -d ${destroot}${prefix}/bin
+ xinstall -m 755 -d ${destroot}${prefix}/lib
+ xinstall -m 0755 -d ${destroot}${prefix}/share/activewire
+ xinstall -m 0755 -d ${destroot}${prefix}/share/doc/activewire
+
+ set xcode_build_args [xcode::get_build_args]
+
+
+
+ foreach {target dest} { libaw lib awconfig bin awdriver bin } {
+ set pre_command "cd '${worksrcpath}/${target}' && ${build.cmd} \
+ ${xcode_build_args} install DSTROOT=${destroot} \
+ INSTALL_PATH=${prefix}"
+
+ if {[variant_isset $target] || $target == "libaw"} {
+ set command "${pre_command}/${dest}"
+ ui_debug "Assembled Command: ${command}"
+ system ${command}
+ }
+ }
+
+
+ if {[variant_isset doc]} {
+ set doc_path "${worksrcpath}/../Documentation/"
+ foreach i [glob -tails -directory $doc_path *] {
+ file copy $doc_path/$i "${destroot}${prefix}/share/doc/activewire"
+ }
+
+ set example_path "${worksrcpath}/../Examples"
+ system "cp -r '${example_path}/C Example' ${destroot}${prefix}/share/doc/activewire"
+ system "cp -r '${example_path}/Cocoa Example' ${destroot}${prefix}/share/doc/activewire"
+
+ }
+}
+# destroot {
+# # ui_debug "Creating ${destroot}"
+# # xinstall -m 755 -d ${destroot}${prefix}/etc/
+# # # let Xcode 2.1+ find resources.
+# # xcode::fix_resource_dependencies
+# #
+
+
+
+#
+# }
Property changes on: trunk/dports/devel/activewire/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090719/8a706071/attachment-0001.html>
More information about the macports-changes
mailing list