source: trunk/dports/devel/activewire/Portfile

Last change on this file was 124948, checked in by jmr@…, 3 years ago

activewire: license

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# $Id: Portfile 124948 2014-09-01 01:42:48Z ryandesign@macports.org $
2
3PortSystem          1.0
4PortGroup           xcode 1.0
5
6name                activewire
7version             4.0
8categories          devel
9license             GPL-2+
10platforms           darwin
11maintainers         nomaintainer
12
13description         Driver for the ActiveWire board
14
15long_description    An independent project focusing on the development \
16                    of drivers for the ActiveWire board on Mac OS X. \
17                    The REALbasic Plugin not included.
18
19homepage            http://activewire-osx.sourceforge.net/
20master_sites        sourceforge:project/activewire-osx/activewire-osx/${version}
21
22distname            aw_${version}
23
24checksums           md5     857800a7187ebf29281438b231100c5e \
25                    sha1    6ea56df40235f28d63bc8fd1bb371cf69a5d7622 \
26                    rmd160  11740b6f835a2ebfbaea14f12dcec921a8a9a03b
27
28worksrcdir          ${distname}/Source/
29use_dmg             yes
30set extract.asroot  yes
31xcode.configuration Default
32
33default_variants    +doc \
34                    +dev
35
36variant awdriver description {Install ActiveWire driver} {}
37variant awconfig description {Install awconfig utility} {}
38variant doc description {Install documentation} {}
39variant dev description {Install header files for development} {}
40
41# variant realbasic description {Install REALbasic plugin} {}
42
43patchfiles          patch-Shared-aw_sock.h.diff \
44                    patch-Shared-libCdsaCrypt-libCdsaCrypt.cpp.diff
45
46pre-configure {
47    foreach i {libaw awdriver awconfig} {
48        reinplace "s|/usr/local|${prefix}|g" "${worksrcpath}/$i/$i.xcodeproj/project.pbxproj"
49        reinplace "s|/usr/share/man/man1/|${prefix}/include|g" "${worksrcpath}/$i/$i.xcodeproj/project.pbxproj"
50        if {${configure.sdkroot} == ""} {
51            reinplace "\\|/Developer/SDKs/MacOSX10.4u.sdk|d" "${worksrcpath}/$i/$i.xcodeproj/project.pbxproj"
52        } else {
53            reinplace "s|/Developer/SDKs/MacOSX10.4u.sdk|${configure.sdkroot}|g" "${worksrcpath}/$i/$i.xcodeproj/project.pbxproj"
54        }
55    }
56}
57
58build {
59    set xcode_build_args [xcode::get_build_args]
60   
61    foreach i {libaw awdriver awconfig} {
62        if {[variant_isset $i] || $i == "libaw"} {
63            set command "cd '${worksrcpath}/$i' && ${build.cmd} ${xcode_build_args}"
64            ui_debug "Assembled Command: ${command}"
65            system ${command}
66        }
67    }
68}
69
70destroot {
71    xinstall -m 0755 -d ${destroot}${prefix}/share/activewire
72    xinstall -m 0755 -d ${destroot}${prefix}/share/doc/activewire
73   
74    set xcode_build_args [xcode::get_build_args]
75   
76    foreach {target dest} {libaw lib awconfig bin awdriver bin} {
77        set pre_command "cd '${worksrcpath}/${target}' && ${build.cmd} \
78            ${xcode_build_args} install DSTROOT=${destroot} \
79            INSTALL_PATH=${prefix}"
80       
81        if {[variant_isset $target] || $target == "libaw"} {
82            set command "${pre_command}/${dest}"
83            ui_debug "Assembled Command: ${command}"
84            system ${command}
85        }
86    }
87   
88    if {[variant_isset doc]} {
89        set doc_path "${worksrcpath}/../Documentation/"
90        foreach i [glob -tails -directory  $doc_path *] {
91            file copy $doc_path/$i "${destroot}${prefix}/share/doc/activewire"
92        }
93       
94        set example_path "${worksrcpath}/../Examples"
95        system "cp -r '${example_path}/C Example' ${destroot}${prefix}/share/doc/activewire"
96        system "cp -r '${example_path}/Cocoa Example' ${destroot}${prefix}/share/doc/activewire"
97    }
98}
Note: See TracBrowser for help on using the repository browser.