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 110484 2013-08-31 17:05:46Z jeremyhu@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup xcode 1.0 |
---|
6 | PortGroup compiler_blacklist_versions 1.0 |
---|
7 | |
---|
8 | name FScript |
---|
9 | version 2.1 |
---|
10 | revision 1 |
---|
11 | categories aqua lang |
---|
12 | platforms darwin |
---|
13 | license BSD |
---|
14 | maintainers ciserlohn |
---|
15 | |
---|
16 | description Open-source interactive Cocoa scripting environment |
---|
17 | long_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 | |
---|
25 | homepage http://www.fscript.org/ |
---|
26 | |
---|
27 | master_sites https://github.com/pmougin/F-Script/zipball/v${version}:fscript |
---|
28 | |
---|
29 | distfiles pmougin-F-Script-v2.1-0-g25c850c.zip:fscript |
---|
30 | |
---|
31 | checksums pmougin-F-Script-v2.1-0-g25c850c.zip \ |
---|
32 | sha1 5f1afa244f41ab372953a616d27a72a1573f4a15 \ |
---|
33 | rmd160 aa38b5e587bd3c0a8aeb1a8df8a38445d0036952 |
---|
34 | |
---|
35 | use_zip yes |
---|
36 | |
---|
37 | post-extract { |
---|
38 | file rename [glob ${workpath}/pmougin-F-Script-*] ${worksrcpath} |
---|
39 | } |
---|
40 | |
---|
41 | patchfiles patch-FScript.xcodeproj-project.pbxproj.diff |
---|
42 | |
---|
43 | xcode.target FScriptFramework F-Script |
---|
44 | xcode.destroot.settings SKIP_INSTALL=NO |
---|
45 | xcode.destroot.type "" |
---|
46 | |
---|
47 | set is_xcode_4_x [expr [vercmp $xcodeversion 4] >= 0] |
---|
48 | |
---|
49 | if !$is_xcode_4_x { |
---|
50 | default_variants +ib_plugin |
---|
51 | } |
---|
52 | |
---|
53 | # It is wrong that MacPorts chooses an SDK based on deployment target. |
---|
54 | macosx_deployment_target 10.6 |
---|
55 | compiler.blacklist {clang < 300} |
---|
56 | |
---|
57 | platform darwin 11 { |
---|
58 | pre-fetch { |
---|
59 | if {! [file exists ${configure.sdkroot}]} { |
---|
60 | depends_lib |
---|
61 | depends_run |
---|
62 | pre-fetch { |
---|
63 | ui_error "$name requires the 10.6 SDK to install on Lion." |
---|
64 | error "unsupported platform" |
---|
65 | } |
---|
66 | } |
---|
67 | } |
---|
68 | } |
---|
69 | |
---|
70 | platform darwin { |
---|
71 | if {${os.major} >= 12} { |
---|
72 | depends_lib |
---|
73 | depends_run |
---|
74 | pre-fetch { |
---|
75 | ui_error "$name does not build on Mountain Lion or later." |
---|
76 | error "unsupported platform" |
---|
77 | } |
---|
78 | } |
---|
79 | } |
---|
80 | |
---|
81 | variant ib_plugin description "Install the Interface Builder Plug-in" { |
---|
82 | xcode.target-append FScriptIBPlugin |
---|
83 | destroot.violate_mtree yes |
---|
84 | } |
---|
85 | |
---|
86 | variant injection_service description "Enable F-Script injection service" { |
---|
87 | master_sites-append http://www.fscript.org/download:injection_service |
---|
88 | distfiles-append F-ScriptInjectionService.zip:injection_service |
---|
89 | |
---|
90 | checksums-append F-ScriptInjectionService.zip \ |
---|
91 | sha1 58436fe48375abdfed6251a2fc2ee2b2a39d6bf1 \ |
---|
92 | rmd160 dd7dbf0580584f14742c5e38a5f59df4bbb5c951 |
---|
93 | |
---|
94 | destroot.violate_mtree yes |
---|
95 | } |
---|
96 | |
---|
97 | pre-configure { |
---|
98 | if {[variant_isset ib_plugin] && $is_xcode_4_x} { |
---|
99 | ui_error "Xcode 4.x does not support Interface Builder plug-ins.\n \ |
---|
100 | Please install ${name} without the Interface Builder plug-in:\n \ |
---|
101 | sudo port install ${name} -ib_plugin" |
---|
102 | return -code error "incompatible xcode version" |
---|
103 | } |
---|
104 | } |
---|
105 | |
---|
106 | pre-build { |
---|
107 | reinplace "s|MACPORTS_APP_DIR|${applications_dir}|g" ${worksrcpath}/FScript.xcodeproj/project.pbxproj |
---|
108 | reinplace "s|MACPORTS_FRAMEWORK_DIR|${frameworks_dir}|g" ${worksrcpath}/FScript.xcodeproj/project.pbxproj |
---|
109 | } |
---|
110 | |
---|
111 | post-destroot { |
---|
112 | if [variant_isset ib_plugin] { |
---|
113 | set ibplugin_dir "${developer_dir}/Platforms/MacOSX.platform/Developer/Library/Interface Builder/Plug-ins" |
---|
114 | xinstall -d -m 755 ${destroot}${ibplugin_dir} |
---|
115 | file rename ${destroot}${applications_dir}/FScriptIBPlugin.ibplugin ${destroot}${ibplugin_dir} |
---|
116 | } |
---|
117 | |
---|
118 | if [variant_isset injection_service] { |
---|
119 | xinstall -d ${destroot}/Library/Services |
---|
120 | file rename "${workpath}/F-ScriptInjectionService/Inject F-Script into application.workflow" ${destroot}/Library/Services/ |
---|
121 | reinplace "s|/Library/Frameworks|${frameworks_dir}|g" "${destroot}/Library/Services/Inject F-Script into application.workflow/Contents/document.wflow" |
---|
122 | } |
---|
123 | } |
---|
124 | |
---|
125 | livecheck.type regex |
---|
126 | livecheck.url https://github.com/pmougin/F-Script/tags |
---|
127 | livecheck.regex archive/v(\[^"\]+)${extract.suffix} |
---|