Fetching contributors…
Cannot retrieve contributors at this time
97 lines (76 sloc) 3.44 KB
PortSystem 1.0
PortGroup xcode 1.0
name activewire
version 4.0
categories devel
license GPL-2+
platforms darwin
maintainers nomaintainer
description Driver for the ActiveWire board
long_description An independent project focusing on the development \
of drivers for the ActiveWire board on Mac OS X. \
The REALbasic Plugin not included.
master_sites sourceforge:project/activewire-osx/activewire-osx/${version}
distname aw_${version}
checksums md5 857800a7187ebf29281438b231100c5e \
sha1 6ea56df40235f28d63bc8fd1bb371cf69a5d7622 \
rmd160 11740b6f835a2ebfbaea14f12dcec921a8a9a03b
worksrcdir ${distname}/Source/
use_dmg yes
set extract.asroot yes
xcode.configuration Default
default_variants +doc \
variant awdriver description {Install ActiveWire driver} {}
variant awconfig description {Install awconfig utility} {}
variant doc description {Install documentation} {}
variant dev description {Install header files for development} {}
# variant realbasic description {Install REALbasic plugin} {}
patchfiles patch-Shared-aw_sock.h.diff \
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"
if {${configure.sdkroot} == ""} {
reinplace "\\|/Developer/SDKs/MacOSX10.4u.sdk|d" "${worksrcpath}/$i/$i.xcodeproj/project.pbxproj"
} else {
reinplace "s|/Developer/SDKs/MacOSX10.4u.sdk|${configure.sdkroot}|g" "${worksrcpath}/$i/$i.xcodeproj/project.pbxproj"
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 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} \
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"