You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Check cxx_stdlib, delete_la_files for archive sites
Fixes: https://trac.macports.org/ticket/56053
This commit is contained in:
@@ -29,6 +29,19 @@
|
||||
# installation used to create the source's archives. This must
|
||||
# match the value of "frameworks_dir" set in macports.conf, or the
|
||||
# source is not used. Defaults to "[prefix]/Library/Frameworks".
|
||||
#
|
||||
# cxx_stdlib: The C++ standard library used by the MacPorts
|
||||
# installation used to create the source's archives. This must
|
||||
# match the value of "cxx_stdlib" set in macports.conf, or the
|
||||
# source is not used. Defaults to "libc++" on OS X 10.9 or later,
|
||||
# and "libstdc++" on 10.8 and earlier.
|
||||
#
|
||||
# delete_la_files: Whether the MacPorts installation used to create
|
||||
# the source's archives was configured to delete the .la files
|
||||
# installed by GNU libtool. This must match the value of
|
||||
# "delete_la_files" set in macports.conf, or the source is not
|
||||
# used. Defaults to "yes" on OS X 10.9 or later, and "no" on
|
||||
# 10.8 and earlier.
|
||||
|
||||
# Example source:
|
||||
#name My Source
|
||||
|
||||
@@ -5253,9 +5253,15 @@ proc macports::get_archive_sites_conf_values {} {
|
||||
if {![info exists archive_sites_conf_values]} {
|
||||
set archive_sites_conf_values {}
|
||||
set all_names {}
|
||||
array set defaults {applications_dir /Applications/MacPorts prefix /opt/local type tbz2}
|
||||
set defaults_list {applications_dir /Applications/MacPorts prefix /opt/local type tbz2}
|
||||
if {$macports::os_platform eq "darwin" && $macports::os_major <= 12} {
|
||||
lappend defaults_list cxx_stdlib libstdc++ delete_la_files no
|
||||
} else {
|
||||
lappend defaults_list cxx_stdlib libc++ delete_la_files yes
|
||||
}
|
||||
array set defaults $defaults_list
|
||||
set conf_file ${macports_conf_path}/archive_sites.conf
|
||||
set conf_options {applications_dir frameworks_dir name prefix type urls}
|
||||
set conf_options {applications_dir cxx_stdlib delete_la_files frameworks_dir name prefix type urls}
|
||||
if {[file isfile $conf_file]} {
|
||||
set fd [open $conf_file r]
|
||||
while {[gets $fd line] >= 0} {
|
||||
|
||||
@@ -65,10 +65,13 @@ default archive.subdir {${subport}}
|
||||
|
||||
proc portarchivefetch::filter_sites {} {
|
||||
global prefix frameworks_dir applications_dir porturl \
|
||||
cxx_stdlib delete_la_files \
|
||||
portfetch::mirror_sites::sites portfetch::mirror_sites::archive_type \
|
||||
portfetch::mirror_sites::archive_prefix \
|
||||
portfetch::mirror_sites::archive_frameworks_dir \
|
||||
portfetch::mirror_sites::archive_applications_dir
|
||||
portfetch::mirror_sites::archive_applications_dir \
|
||||
portfetch::mirror_sites::archive_cxx_stdlib \
|
||||
portfetch::mirror_sites::archive_delete_la_files
|
||||
|
||||
# get defaults from ports tree resources
|
||||
set mirrorfile [get_full_archive_sites_path]
|
||||
@@ -83,7 +86,7 @@ proc portarchivefetch::filter_sites {} {
|
||||
set ret {}
|
||||
foreach site [array names portfetch::mirror_sites::archive_prefix] {
|
||||
set missing 0
|
||||
foreach var {archive_frameworks_dir archive_applications_dir archive_type} {
|
||||
foreach var {archive_frameworks_dir archive_applications_dir archive_type archive_cxx_stdlib archive_delete_la_files} {
|
||||
if {![info exists portfetch::mirror_sites::${var}($site)]} {
|
||||
ui_warn "no $var configured for site '$site'"
|
||||
set missing 1
|
||||
@@ -96,6 +99,8 @@ proc portarchivefetch::filter_sites {} {
|
||||
$portfetch::mirror_sites::archive_prefix($site) eq $prefix &&
|
||||
$portfetch::mirror_sites::archive_frameworks_dir($site) eq $frameworks_dir &&
|
||||
$portfetch::mirror_sites::archive_applications_dir($site) eq $applications_dir &&
|
||||
$portfetch::mirror_sites::archive_cxx_stdlib($site) eq $cxx_stdlib &&
|
||||
$portfetch::mirror_sites::archive_delete_la_files($site) eq $delete_la_files &&
|
||||
![catch {archiveTypeIsSupported $portfetch::mirror_sites::archive_type($site)}]} {
|
||||
# using the archive type as a tag
|
||||
lappend ret ${site}::$portfetch::mirror_sites::archive_type($site)
|
||||
|
||||
Reference in New Issue
Block a user