#65667 closed defect (fixed)

pg cmake 1.1: Unable to use backslash in configure flags

Reported by: mohd-akram (Mohamed Akram) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: cmake Cc: mascguy (Christopher Nielsen)
Port:

Description

I'm trying to build this port (attached), and need to escape the < and > characters in a flag, but MacPorts ends up wrapping the entire thing in braces.

configure.cppflags-append  -DDB_H_ABS_PATH=\\<db.h\\>

Result:

CFLAGS='-pipe -Os -DNDEBUG -I/opt/local/include {-DDB_H_ABS_PATH=\<db.h\>} -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'

Attachments (1)

Portfile (794 bytes) - added by mohd-akram (Mohamed Akram) 21 months ago.

Download all attachments as: .zip

Change History (7)

Changed 21 months ago by mohd-akram (Mohamed Akram)

Attachment: Portfile added

comment:1 Changed 21 months ago by jmroot (Joshua Root)

Component: baseports
Summary: Unable to use backslash in configure flagscmake portgroup: Unable to use backslash in configure flags

Works as expected without the cmake portgroup:

:debug:configure CPPFLAGS='-I/opt/local/include -DDB_H_ABS_PATH=\<db.h\> -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'

comment:2 Changed 21 months ago by jmroot (Joshua Root)

I have no idea why the portgroup is doing things the way it does (using split on something that is already a list) rather than

configure.cflags-append {*}${configure.cppflags}
configure.cxxflags-append {*}${configure.cppflags}
configure.objcflags-append {*}${configure.cppflags}
configure.objcxxflags-append {*}${configure.cppflags}
configure.cppflags

comment:3 Changed 21 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:4 Changed 21 months ago by mascguy (Christopher Nielsen)

Keywords: cmake added
Summary: cmake portgroup: Unable to use backslash in configure flagspg cmake 1.1: Unable to use backslash in configure flags

comment:5 Changed 21 months ago by mohd-akram (Mohamed Akram)

Looks like there was some extra parsing logic in the beginning. I guess it can be simplified (and fixed) now?

comment:6 Changed 21 months ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In 3dd4d32b217807e848de3bb065d75e25efdf337d/macports-ports (master):

cmake 1.1 pg: fix list handling

Closes: #65667

Note: See TracTickets for help on using tickets.