# HG changeset patch
# User Sean Farley <sean@mcs.anl.gov>
# Date 1335049331 18000
# Node ID 526a427fdc16a55ee77fea3a7e270073e23f3eae
# Parent 71c8c1a656994590cd629110ff1802fe29c44e4b
base: add macports.conf variable create_dsym
This variable creates the .dSYM bundle, thereby keeping all the debugging symbols, by running
dsymutil. By default, create_dsym is set to 'no' and has no affect on current users. This can also
be set via the command line, as follows:
$ port -vs install PORT create_dsym=yes
diff --git a/base/ChangeLog b/base/ChangeLog
a
|
b
|
|
101 | 101 | (raimue in r82760, r82761) |
102 | 102 | |
103 | 103 | - Added 'buildfromsource' macports.conf setting, which allows permanently |
104 | 104 | selecting the behaviour of the -s or -b option. (jmr in r81540) |
105 | 105 | |
| 106 | - Added 'create_dsym' macports.conf setting, which allows building the |
| 107 | .dSYM bundle with dsymutil |
| 108 | |
106 | 109 | Release 2.0.4 (2012-02-25 by jmr) |
107 | 110 | - Added -locale option for reinplace (jeremyhu in r89839) |
108 | 111 | |
109 | 112 | - Xcode 4.3 support: Change home directory for MacPorts user to |
110 | 113 | ${prefix}/var/macports/home. |
diff --git a/base/doc/macports.conf.in b/base/doc/macports.conf.in
a
|
b
|
|
89 | 89 | #portautoclean yes |
90 | 90 | |
91 | 91 | # Set to yes if you don't want logs to be deleted after successful builds |
92 | 92 | #keeplogs no |
93 | 93 | |
| 94 | # Set to yes if you want .dSYM bundles to be created |
| 95 | #create_dsym no |
| 96 | |
94 | 97 | # Rsync server to fetch MacPorts sources from. Note that this is only used |
95 | 98 | # for selfupdate. The source(s) for the ports tree are set in sources.conf. |
96 | 99 | # Known mirrors at time of writing (see https://trac.macports.org/wiki/Mirrors |
97 | 100 | # for the current list): |
98 | 101 | # rsync.macports.org - California, USA (master) |
diff --git a/base/src/macports1.0/macports.tcl b/base/src/macports1.0/macports.tcl
a
|
b
|
|
49 | 49 | applications_dir frameworks_dir developer_dir universal_archs build_arch macosx_deployment_target \ |
50 | 50 | macportsuser proxy_override_env proxy_http proxy_https proxy_ftp proxy_rsync proxy_skip \ |
51 | 51 | master_site_local patch_site_local archive_site_local buildfromsource \ |
52 | 52 | revupgrade_autorun revupgrade_mode revupgrade_check_id_loadcmds \ |
53 | 53 | host_blacklist preferred_hosts\ |
54 | | packagemaker_path default_compiler" |
| 54 | packagemaker_path default_compiler create_dsym" |
55 | 55 | variable user_options "submitter_name submitter_email submitter_key" |
56 | 56 | variable portinterp_options "\ |
57 | 57 | portdbpath porturl portpath portbuildpath auto_path prefix prefix_frozen portsharepath \ |
58 | 58 | registry.path registry.format user_home \ |
59 | 59 | portarchivetype archivefetch_pubkeys portautoclean porttrace keeplogs portverbose destroot_umask \ |
60 | 60 | rsync_server rsync_options rsync_dir startupitem_type startupitem_install place_worksymlink macportsuser \ |
61 | | mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs \ |
| 61 | mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs create_dsym\ |
62 | 62 | applications_dir current_phase frameworks_dir developer_dir universal_archs build_arch \ |
63 | 63 | os_arch os_endian os_version os_major os_platform macosx_version macosx_deployment_target \ |
64 | 64 | packagemaker_path default_compiler $user_options" |
65 | 65 | |
66 | 66 | # deferred options are only computed when needed. |
… |
… |
|
580 | 580 | global macports::macosx_deployment_target |
581 | 581 | global macports::archivefetch_pubkeys |
582 | 582 | global macports::ping_cache |
583 | 583 | global macports::host_blacklisted |
584 | 584 | global macports::host_preferred |
| 585 | global macports::create_dsym |
585 | 586 | |
586 | 587 | # Set the system encoding to utf-8 |
587 | 588 | encoding system utf-8 |
588 | 589 | |
589 | 590 | # set up platform info variables |
… |
… |
|
957 | 958 | |
958 | 959 | if {![info exists macports::macosx_deployment_target]} { |
959 | 960 | set macports::macosx_deployment_target $macosx_version |
960 | 961 | } |
961 | 962 | |
| 963 | if {![info exists macports::create_dsym]} { |
| 964 | set macports::create_dsym no |
| 965 | } |
| 966 | |
962 | 967 | if {![info exists macports::revupgrade_autorun]} { |
963 | 968 | set macports::revupgrade_autorun yes |
964 | 969 | } |
965 | 970 | if {![info exists macports::revupgrade_mode]} { |
966 | 971 | set macports::revupgrade_mode "rebuild" |
diff --git a/base/src/port1.0/portconfigure.tcl b/base/src/port1.0/portconfigure.tcl
a
|
b
|
|
693 | 693 | global configure.${tool} configure.${tool}_archflags |
694 | 694 | } |
695 | 695 | foreach flags {cflags cppflags cxxflags objcflags ldflags fflags f90flags fcflags} { |
696 | 696 | global configure.${flags} configure.universal_${flags} |
697 | 697 | } |
698 | | |
| 698 | |
| 699 | if {[option create_dsym]} { |
| 700 | foreach dsymflags {cflags cppflags cxxflags objcflags ldflags fflags f90flags fcflags} { |
| 701 | configure.${dsymflags}-append "-g" |
| 702 | } |
| 703 | } |
| 704 | |
699 | 705 | if {[tbool use_autoreconf]} { |
700 | 706 | if {[catch {command_exec autoreconf} result]} { |
701 | 707 | return -code error "[format [msgcat::mc "%s failure: %s"] autoreconf $result]" |
702 | 708 | } |
703 | 709 | } |
diff --git a/base/src/port1.0/portdestroot.tcl b/base/src/port1.0/portdestroot.tcl
a
|
b
|
|
151 | 151 | global UI_PREFIX destroot prefix subport startupitem.create destroot.violate_mtree |
152 | 152 | global applications_dir frameworks_dir destroot.keepdirs |
153 | 153 | global os.platform os.version |
154 | 154 | variable oldmask |
155 | 155 | |
| 156 | # create dsym bundle, if requested |
| 157 | if {[option create_dsym]} { |
| 158 | ui_debug "Generating the .dSYM bundles: find ${destroot}${prefix} -type f '(' -name '*.dylib' -or -name '*.so' ')' -exec dsymutil {} +" |
| 159 | system -W ${destroot}${prefix} "find . -type f '(' -name '*.dylib' -or -name '*.so' ')' -exec dsymutil {} +" |
| 160 | } |
| 161 | |
156 | 162 | # Create startup-scripts/items |
157 | 163 | if {[tbool startupitem.create]} { |
158 | 164 | package require portstartupitem 1.0 |
159 | 165 | portstartupitem::startupitem_create |
160 | 166 | } |