Special case handling for -framework on MacOSX fails in some cases #56

Closed
opened 2013-09-20 19:19:19 +00:00 by dankegel · 2 comments
dankegel commented 2013-09-20 19:19:19 +00:00 (Migrated from github.com)

Testing pkgconf-0.9.3.

Qt builds fine, but woe unto you if two different packages use the same framework, and you ask for both of their --libs.

Happiily, adding the single line to tests/run.sh demonstrates the problem:

run_test "PKG_CONFIG_PATH='{selfdir}/lib1' {1} --libs framework-1 framework-2"
"-F/usr/lib -framework framework-1 -framework framework-2"

This fails with

!!! Test 73 failed.
!!! $ PKG_CONFIG_PATH='/Users/dank/src/yobuild-builder/unified/btmp/pkgconf-0.9.3/tests/lib1' ./pkgconf --libs framework-1 framework-2
!!! -F/usr/lib -framework -framework framework-2 -framework framework-1
!!! expected '-F/usr/lib -framework framework-1 -framework framework-2' in output

Testing pkgconf-0.9.3. Qt builds fine, but woe unto you if two different packages use the same framework, and you ask for both of their --libs. Happiily, adding the single line to tests/run.sh demonstrates the problem: run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs framework-1 framework-2" \ "-F/usr/lib -framework framework-1 -framework framework-2" This fails with !!! Test 73 failed. !!! $ PKG_CONFIG_PATH='/Users/dank/src/yobuild-builder/unified/btmp/pkgconf-0.9.3/tests/lib1' ./pkgconf --libs framework-1 framework-2 !!! -F/usr/lib -framework -framework framework-2 -framework framework-1 !!! expected '-F/usr/lib -framework framework-1 -framework framework-2' in output
dankegel commented 2013-10-02 19:20:54 +00:00 (Migrated from github.com)

Here's a commit that adds the test case and a hacky patch to fix the problem.
After this, all the strncmp(foo, "-framework", 10)'s need to be reviewed, as this patch may break or obsolete them.
549c12c87c

Here's a commit that adds the test case and a hacky patch to fix the problem. After this, all the strncmp(foo, "-framework", 10)'s need to be reviewed, as this patch may break or obsolete them. https://github.com/dankegel/pkgconf/commit/549c12c87c38182ffec4b51002334e856c1e7c98

Hmm, this is kind of hacky. Want to clean it up a little and submit a pull request? The basic idea looks OK.

Hmm, this is kind of hacky. Want to clean it up a little and submit a pull request? The basic idea looks OK.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#56
There is no content yet.