-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
+PORTFILE
301 lines (277 loc) · 15.3 KB
/
+PORTFILE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
PortSystem 1.0
PortGroup github 1.0
github.setup macports macports-base 2.4.1 v
name MacPorts
categories sysutils macports
platforms darwin freebsd
maintainers lists.macports.org:macports-mgr
license BSD
description The MacPorts Infrastructure
long_description \
MacPorts provides the infrastructure that allows easy installation and \
management of freely available software on Mac OS X 10.4 or newer systems.
notes "This port cannot directly be used to upgrade MacPorts; use 'port\
selfupdate' for that."
homepage http://www.macports.org/
distname ${name}-${version}
github.tarball_from releases
use_bzip2 yes
checksums rmd160 4f7f8467f2ac011a4982af79bde2f6c05ee87ee5 \
sha256 df371e6b610ce47fcbe815dbc6f6c24ab7b58edd2faf6add0a8973db3f2c2fb1
variant keep_prefix description "Use configured prefix instead of enforcing /opt/local" {}
if {![variant_isset keep_prefix]} {
prefix /opt/local
}
# Readline is disabled by default to avoid support issues with people who
# have a readline in /usr/local. Since this portfile is presumably used in a
# clean environment, enable it here.
configure.args --enable-readline
# We don't want to use anything supplied by ports when building MacPorts itself.
configure.env PATH=/usr/bin:/bin:/usr/sbin:/sbin
# Some of MacPorts' default flags don't play well when we're building MacPorts
# itself; nuke them.
configure.cppflags
configure.ldflags
configure.cc_archflags
configure.objc_archflags
configure.ld_archflags
compiler.cpath
compiler.library_path
# MacPorts' configure removes ${prefix}/bin from $PATH,
# so better do not use ccache, to avoid problems.
configure.ccache no
post-destroot {
# Only install .default versions of config files.
delete ${destroot}${prefix}/etc/macports/archive_sites.conf
delete ${destroot}${prefix}/etc/macports/macports.conf
delete ${destroot}${prefix}/etc/macports/pubkeys.conf
delete ${destroot}${prefix}/etc/macports/sources.conf
delete ${destroot}${prefix}/etc/macports/variants.conf
}
if {!${package.flat}} {
package.scripts ${package.resources}
}
set resources_lang ${package.resources}/English.lproj
pre-pkg {
file copy -force -- ${worksrcpath}/portmgr/dmg/ReadMe.rtf ${resources_lang}
file copy -force -- ${worksrcpath}/portmgr/dmg/License.html ${resources_lang}
file copy -force -- ${worksrcpath}/portmgr/dmg/postflight ${package.scripts}
file copy -force -- ${worksrcpath}/src/upgrade_sources_conf_default.tcl ${package.scripts}
file copy -force -- ${worksrcpath}/src/images_to_archives.tcl ${package.scripts}
file copy -force -- ${worksrcpath}/src/dedup_portfiles.tcl ${package.scripts}
file attributes ${package.scripts}/postflight -permissions 0755
file attributes ${package.scripts}/upgrade_sources_conf_default.tcl -permissions 0755
file attributes ${package.scripts}/images_to_archives.tcl -permissions 0755
file attributes ${package.scripts}/dedup_portfiles.tcl -permissions 0755
file attributes ${resources_lang}/ReadMe.rtf -permissions 0644
file attributes ${resources_lang}/License.html -permissions 0644
reinplace "s|__PREFIX__|${prefix}|g" \
${resources_lang}/ReadMe.rtf
if {${os.major} < 11} {
reinplace "s|is built|contains a Universal installer|" ${resources_lang}/ReadMe.rtf
}
reinplace "s|__XVERS__|${macosx_deployment_target}|" ${resources_lang}/ReadMe.rtf
if {${package.flat}} {
file copy -force -- ${worksrcpath}/portmgr/dmg/Distribution ${workpath}
file attributes ${workpath}/Distribution -permissions 0644
reinplace "s|__PREFIX__|${prefix}|g" ${workpath}/Distribution
switch $macosx_deployment_target {
10.4 {set xcode_cli "Command Line Support"}
10.5 -
10.6 {set xcode_cli "UNIX Development"}
default {set xcode_cli "Command Line Tools or UNIX Development"}
}
reinplace "s|__XCODECLITOOLS__|${xcode_cli}|g" ${workpath}/Distribution
reinplace "s|__XVERS__|${macosx_deployment_target}|" ${workpath}/Distribution
set next_major [lindex [split $macosx_deployment_target .] 0].[expr [lindex [split $macosx_deployment_target .] 1] + 1]
reinplace "s|__NEXT_XVERS__|$next_major|" ${workpath}/Distribution
reinplace "s|__VERSION__|${version}|" ${workpath}/Distribution
move ${package.scripts}/postflight ${package.scripts}/postinstall
} else {
file copy -force -- ${worksrcpath}/portmgr/dmg/InstallationCheck ${package.resources}
file copy -force -- ${worksrcpath}/portmgr/dmg/InstallationCheck.strings ${resources_lang}
file attributes ${package.resources}/InstallationCheck -permissions 0755
file attributes ${resources_lang}/InstallationCheck.strings -permissions 0644
reinplace "s|__PREFIX__|${prefix}|g" \
${package.resources}/InstallationCheck
reinplace "s|__DARWINVERS__|${os.major}|" ${package.resources}/InstallationCheck
reinplace "s|__XVERS__|${macosx_deployment_target}|" \
${resources_lang}/InstallationCheck.strings
}
reinplace "s|or newer ||" ${resources_lang}/Welcome.html
if {${os.major} > 8} {
reinplace "s|10\\.4|${macosx_deployment_target}|" ${resources_lang}/Welcome.html
}
}
platform darwin 8 {
# has ${prefix}/include ahead of /usr/include in default search path
compiler.blacklist apple-gcc-4.2
}
platform darwin 8 powerpc {
pre-configure {
set sdkrootpath /Developer/SDKs/MacOSX10.4u.sdk
if {[file exists ${sdkrootpath}]} {
# User has SDK installed.
set tclstubpath /System/Library/Frameworks/Tcl.framework/Versions/8.4/libtclstub8.4.a
if {![file exists ${sdkrootpath}${tclstubpath}]} {
ui_msg "Fixing your MacOSX10.4u installation by copying libtclstub8.4.a to ${sdkrootpath}${tclstubpath}"
xinstall -p ${tclstubpath} ${sdkrootpath}${tclstubpath}
}
# Supply architecture and sysroot flags to build MacPorts universal.
configure.cflags-append -isysroot ${sdkrootpath} -arch ppc -arch i386
configure.env-append SHLIB_LDFLAGS='-Wl,-syslibroot,${sdkrootpath} -arch ppc -arch i386'
}
}
}
platform darwin 8 i386 {
# Supply architecture flags to build MacPorts universal.
configure.cflags-append -arch ppc -arch i386
configure.args-append SHLIB_LDFLAGS='-arch ppc -arch i386'
}
platform darwin 9 {
# Supply architecture flags to build MacPorts universal.
configure.cflags-append -arch ppc -arch i386
configure.args-append SHLIB_LDFLAGS='-arch ppc -arch i386'
}
platform darwin {
if {${os.major} >= 11} {
# Lion and above only run on x86_64.
configure.cflags-append -arch x86_64
configure.args-append SHLIB_LDFLAGS='-arch x86_64'
} elseif {${os.major} == 10} {
# Supply architecture flags to build MacPorts universal.
configure.cflags-append -arch x86_64 -arch i386
configure.args-append SHLIB_LDFLAGS='-arch x86_64 -arch i386'
}
}
destroot.violate_mtree yes
destroot.keepdirs ${destroot}${prefix}/include \
${destroot}${prefix}/lib \
${destroot}${prefix}/libexec \
${destroot}${prefix}/sbin \
${destroot}${prefix}/share/doc \
${destroot}${prefix}/share/info \
${destroot}${prefix}/share/man/cat1 \
${destroot}${prefix}/share/man/cat2 \
${destroot}${prefix}/share/man/cat3 \
${destroot}${prefix}/share/man/cat4 \
${destroot}${prefix}/share/man/cat5 \
${destroot}${prefix}/share/man/cat6 \
${destroot}${prefix}/share/man/cat7 \
${destroot}${prefix}/share/man/cat8 \
${destroot}${prefix}/share/man/cat9 \
${destroot}${prefix}/share/man/catl \
${destroot}${prefix}/share/man/catn \
${destroot}${prefix}/share/man/man1 \
${destroot}${prefix}/share/man/man2 \
${destroot}${prefix}/share/man/man3 \
${destroot}${prefix}/share/man/man4 \
${destroot}${prefix}/share/man/man5 \
${destroot}${prefix}/share/man/man6 \
${destroot}${prefix}/share/man/man7 \
${destroot}${prefix}/share/man/man8 \
${destroot}${prefix}/share/man/man9 \
${destroot}${prefix}/share/man/manl \
${destroot}${prefix}/share/man/mann \
${destroot}${prefix}/share/nls/C \
${destroot}${prefix}/share/nls/skel \
${destroot}${prefix}/share/nls/af_ZA.ISO8859-1 \
${destroot}${prefix}/share/nls/af_ZA.ISO8859-15 \
${destroot}${prefix}/share/nls/bg_BG.CP1251 \
${destroot}${prefix}/share/nls/cs_CZ.ISO8859-2 \
${destroot}${prefix}/share/nls/da_DK.ISO8859-1 \
${destroot}${prefix}/share/nls/da_DK.ISO8859-15 \
${destroot}${prefix}/share/nls/de_AT.ISO8859-1 \
${destroot}${prefix}/share/nls/de_AT.ISO8859-15 \
${destroot}${prefix}/share/nls/de_CH.ISO8859-1 \
${destroot}${prefix}/share/nls/de_CH.ISO8859-15 \
${destroot}${prefix}/share/nls/de_DE.ISO8859-1 \
${destroot}${prefix}/share/nls/de_DE.ISO8859-15 \
${destroot}${prefix}/share/nls/el_GR.ISO8859-7 \
${destroot}${prefix}/share/nls/en_AU.ISO8859-1 \
${destroot}${prefix}/share/nls/en_AU.ISO8859-15 \
${destroot}${prefix}/share/nls/en_AU.US-ASCII \
${destroot}${prefix}/share/nls/en_CA.ISO8859-1 \
${destroot}${prefix}/share/nls/en_CA.ISO8859-15 \
${destroot}${prefix}/share/nls/en_CA.US-ASCII \
${destroot}${prefix}/share/nls/en_GB.ISO8859-1 \
${destroot}${prefix}/share/nls/en_GB.ISO8859-15 \
${destroot}${prefix}/share/nls/en_GB.US-ASCII \
${destroot}${prefix}/share/nls/en_NZ.ISO8859-1 \
${destroot}${prefix}/share/nls/en_NZ.ISO8859-15 \
${destroot}${prefix}/share/nls/en_NZ.US-ASCII \
${destroot}${prefix}/share/nls/en_US.ISO8859-1 \
${destroot}${prefix}/share/nls/en_US.ISO8859-15 \
${destroot}${prefix}/share/nls/es_ES.ISO8859-1 \
${destroot}${prefix}/share/nls/es_ES.ISO8859-15 \
${destroot}${prefix}/share/nls/et_EE.ISO8859-15 \
${destroot}${prefix}/share/nls/fi_FI.ISO8859-1 \
${destroot}${prefix}/share/nls/fi_FI.ISO8859-15 \
${destroot}${prefix}/share/nls/fr_BE.ISO8859-1 \
${destroot}${prefix}/share/nls/fr_BE.ISO8859-15 \
${destroot}${prefix}/share/nls/fr_CA.ISO8859-1 \
${destroot}${prefix}/share/nls/fr_CA.ISO8859-15 \
${destroot}${prefix}/share/nls/fr_CH.ISO8859-1 \
${destroot}${prefix}/share/nls/fr_CH.ISO8859-15 \
${destroot}${prefix}/share/nls/fr_FR.ISO8859-1 \
${destroot}${prefix}/share/nls/fr_FR.ISO8859-15 \
${destroot}${prefix}/share/nls/hi_IN.ISCII-DEV \
${destroot}${prefix}/share/nls/hr_HR.ISO8859-2 \
${destroot}${prefix}/share/nls/hu_HU.ISO8859-2 \
${destroot}${prefix}/share/nls/is_IS.ISO8859-1 \
${destroot}${prefix}/share/nls/is_IS.ISO8859-15 \
${destroot}${prefix}/share/nls/it_CH.ISO8859-1 \
${destroot}${prefix}/share/nls/it_CH.ISO8859-15 \
${destroot}${prefix}/share/nls/it_IT.ISO8859-1 \
${destroot}${prefix}/share/nls/it_IT.ISO8859-15 \
${destroot}${prefix}/share/nls/ja_JP.SJIS \
${destroot}${prefix}/share/nls/ja_JP.eucJP \
${destroot}${prefix}/share/nls/ko_KR.eucKR \
${destroot}${prefix}/share/nls/la_LN.ISO8859-1 \
${destroot}${prefix}/share/nls/la_LN.ISO8859-15 \
${destroot}${prefix}/share/nls/la_LN.ISO8859-2 \
${destroot}${prefix}/share/nls/la_LN.ISO8859-4 \
${destroot}${prefix}/share/nls/la_LN.US-ASCII \
${destroot}${prefix}/share/nls/lt_LT.ISO8859-4 \
${destroot}${prefix}/share/nls/nl_BE.ISO8859-1 \
${destroot}${prefix}/share/nls/nl_BE.ISO8859-15 \
${destroot}${prefix}/share/nls/nl_NL.ISO8859-1 \
${destroot}${prefix}/share/nls/nl_NL.ISO8859-15 \
${destroot}${prefix}/share/nls/no_NO.ISO8859-1 \
${destroot}${prefix}/share/nls/no_NO.ISO8859-15 \
${destroot}${prefix}/share/nls/pl_PL.ISO8859-2 \
${destroot}${prefix}/share/nls/pt_BR.ISO8859-1 \
${destroot}${prefix}/share/nls/pt_PT.ISO8859-1 \
${destroot}${prefix}/share/nls/pt_PT.ISO8859-15 \
${destroot}${prefix}/share/nls/ro_RO.ISO8859-2 \
${destroot}${prefix}/share/nls/ru_RU.CP866 \
${destroot}${prefix}/share/nls/ru_RU.ISO8859-5 \
${destroot}${prefix}/share/nls/ru_RU.KOI8-R \
${destroot}${prefix}/share/nls/sk_SK.ISO8859-2 \
${destroot}${prefix}/share/nls/sl_SI.ISO8859-2 \
${destroot}${prefix}/share/nls/sv_SE.ISO8859-1 \
${destroot}${prefix}/share/nls/sv_SE.ISO8859-15 \
${destroot}${prefix}/share/nls/tr_TR.ISO8859-9 \
${destroot}${prefix}/share/nls/uk_UA.ISO8859-5 \
${destroot}${prefix}/share/nls/uk_UA.KOI8-U \
${destroot}${prefix}/share/nls/zh_CN.eucCN \
${destroot}${prefix}/share/nls/zh_TW.Big5 \
${destroot}${prefix}/var/cache \
${destroot}${prefix}/var/db \
${destroot}${prefix}/var/run \
${destroot}${prefix}/var/spool \
${destroot}${prefix}/var/macports/build \
${destroot}${prefix}/var/macports/distfiles \
${destroot}${prefix}/var/macports/registry \
${destroot}${prefix}/var/macports/sip-workaround
pre-activate {
ui_error ""
ui_error "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
ui_error "!! DO NOT INSTALL THE MACPORTS PORT !!"
ui_error "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
ui_error "The MacPorts port is only used to build the installers you can download from"
ui_error "macports.org It is not intended for installation by a user, and doing so will"
ui_error "overwrite your MacPorts installation and render it unusable when removed."
ui_error ""
error "Installation aborted"
}