source: trunk/dports/devel/activewire/Portfile @ 89680

Last change on this file since 89680 was 86303, checked in by ryandesign@…, 8 years ago

rewrite master_sites to avoid redirects

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