[MacPorts] #17865: deleting all default configure flags causes error.
MacPorts
noreply at macports.org
Sat Jan 3 12:38:22 PST 2009
#17865: deleting all default configure flags causes error.
--------------------------------+-------------------------------------------
Reporter: tonytung@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 1.7.0
Keywords: cppflags ldflags | Port: tcl
--------------------------------+-------------------------------------------
In the tcl port, -I${prefix}/include is removed from cppflags:
{{{
configure.cppflags-delete -I${prefix}/include
}}}
When handle_option-delete processes this, it yields an empty string and
unsets the option.
{{{
##
# Handle option-delete
#
# @param option name of the option
# @param args arguments
proc handle_option-delete {option args} {
global $option user_options option_procs
if {![info exists user_options($option)] && [info exists $option]} {
set temp [set $option]
foreach val $args {
set temp [ldelete $temp $val]
}
if {$temp eq ""} {
unset $option
} else {
set $option $temp
}
}
}
}}}
This results in portconfigure.tcl declaring ${configure.cppflags} as an
unknown variable in configure_main(..), yielding this error message:
{{{
Error: Target org.macports.configure returned: can't read
"configure.cppflags": no such variable
}}}
Replacing these lines:
{{{
append_list_to_environment_value configure "CPPFLAGS"
${configure.cppflags}
append_list_to_environment_value configure "LDFLAGS" ${configure.ldflags}
}}}
with:
{{{
catch {append_list_to_environment_value configure "CPPFLAGS"
${configure.cppflags}}
catch {append_list_to_environment_value configure "LDFLAGS"
${configure.ldflags}}
}}}
seems to do the trick (i.e., everything builds fine).
--
Ticket URL: <http://trac.macports.org/ticket/17865>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list