source: trunk/dports/sysutils/MacPorts/Portfile

Last change on this file was 140728, checked in by jmr@…, 22 months ago

MacPorts port: update to 2.3.4

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