source: trunk/dports/aqua/FScript/Portfile

Last change on this file was 110486, checked in by jmr@…, 4 years ago

FScript: nested pre-fetch blocks don't work

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 110486 2013-08-31 17:19:13Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup               xcode 1.0
6PortGroup               compiler_blacklist_versions 1.0
7
8name                    FScript
9version                 2.1
10revision                1
11categories              aqua lang
12platforms               darwin
13license                 BSD
14maintainers             ciserlohn
15
16description             Open-source interactive Cocoa scripting environment
17long_description        F-Script is an open-source interactive and scripting \
18                        environment for Cocoa.  Based on Smalltalk, F-Script \
19                        provides a pure object-oriented environment that \
20                        leverages Mac OS X technologies and frameworks.  It \
21                        aims to be a useful and fun tool for both beginners \
22                        and experts, allowing interactively exploring, testing \
23                        and using Cocoa-based objects and frameworks.
24
25homepage                http://www.fscript.org/
26
27master_sites            https://github.com/pmougin/F-Script/zipball/v${version}:fscript
28
29distfiles               pmougin-F-Script-v2.1-0-g25c850c.zip:fscript
30
31checksums               pmougin-F-Script-v2.1-0-g25c850c.zip \
32                        sha1    5f1afa244f41ab372953a616d27a72a1573f4a15 \
33                        rmd160  aa38b5e587bd3c0a8aeb1a8df8a38445d0036952
34
35use_zip                 yes
36
37post-extract {
38    file rename [glob ${workpath}/pmougin-F-Script-*] ${worksrcpath}
39}
40
41patchfiles              patch-FScript.xcodeproj-project.pbxproj.diff
42
43xcode.target            FScriptFramework F-Script
44xcode.destroot.settings SKIP_INSTALL=NO
45xcode.destroot.type     ""
46
47set is_xcode_4_x [expr [vercmp $xcodeversion 4] >= 0]
48
49if !$is_xcode_4_x {
50    default_variants        +ib_plugin
51}
52
53# It is wrong that MacPorts chooses an SDK based on deployment target.
54macosx_deployment_target 10.6
55compiler.blacklist {clang < 300}
56
57platform darwin 11 {
58    if {! [file exists ${configure.sdkroot}]} {
59        depends_lib
60        depends_run
61        pre-fetch {
62            ui_error "$name requires the 10.6 SDK to install on Lion."
63            error "unsupported platform"
64        }
65    }
66}
67
68platform darwin {
69    if {${os.major} >= 12} {
70        depends_lib
71        depends_run
72        pre-fetch {
73            ui_error "$name does not build on Mountain Lion or later."
74            error "unsupported platform"
75        }
76    }
77}
78
79variant ib_plugin description "Install the Interface Builder Plug-in" {
80        xcode.target-append FScriptIBPlugin
81        destroot.violate_mtree yes
82}
83
84variant injection_service description "Enable F-Script injection service" {
85    master_sites-append     http://www.fscript.org/download:injection_service
86    distfiles-append        F-ScriptInjectionService.zip:injection_service
87
88    checksums-append        F-ScriptInjectionService.zip \
89                            sha1   58436fe48375abdfed6251a2fc2ee2b2a39d6bf1 \
90                            rmd160 dd7dbf0580584f14742c5e38a5f59df4bbb5c951
91
92    destroot.violate_mtree  yes
93}
94
95pre-configure {
96    if {[variant_isset ib_plugin] && $is_xcode_4_x} {
97        ui_error "Xcode 4.x does not support Interface Builder plug-ins.\n \
98                  Please install ${name} without the Interface Builder plug-in:\n \
99                  sudo port install ${name} -ib_plugin"
100        return -code error "incompatible xcode version"
101    }
102}
103
104pre-build {
105            reinplace "s|MACPORTS_APP_DIR|${applications_dir}|g" ${worksrcpath}/FScript.xcodeproj/project.pbxproj
106            reinplace "s|MACPORTS_FRAMEWORK_DIR|${frameworks_dir}|g" ${worksrcpath}/FScript.xcodeproj/project.pbxproj
107}
108
109post-destroot {
110        if [variant_isset ib_plugin] {
111            set ibplugin_dir "${developer_dir}/Platforms/MacOSX.platform/Developer/Library/Interface Builder/Plug-ins"
112            xinstall -d -m 755 ${destroot}${ibplugin_dir}
113            file rename ${destroot}${applications_dir}/FScriptIBPlugin.ibplugin ${destroot}${ibplugin_dir}
114        }
115
116        if [variant_isset injection_service] {
117            xinstall -d ${destroot}/Library/Services
118            file rename "${workpath}/F-ScriptInjectionService/Inject F-Script into application.workflow" ${destroot}/Library/Services/
119            reinplace "s|/Library/Frameworks|${frameworks_dir}|g" "${destroot}/Library/Services/Inject F-Script into application.workflow/Contents/document.wflow"
120        }
121}
122
123livecheck.type      regex
124livecheck.url       https://github.com/pmougin/F-Script/tags
125livecheck.regex     archive/v(\[^"\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.