Bug 269990 - audio/libdiscid: Fix pkg-config regression after update to 0.6.3
Summary: audio/libdiscid: Fix pkg-config regression after update to 0.6.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jason E. Hale
URL: https://github.com/metabrainz/libdisc...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-06 09:12 UTC by Emanuel Haupt
Modified: 2023-03-06 18:34 UTC (History)
1 user (show)

See Also:
jhale: maintainer-feedback+


Attachments
Fix pkg-config regression (1.13 KB, patch)
2023-03-06 09:12 UTC, Emanuel Haupt
no flags Details | Diff
Fix pkg-config regression (revised) (1.05 KB, patch)
2023-03-06 09:54 UTC, Emanuel Haupt
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuel Haupt freebsd_committer freebsd_triage 2023-03-06 09:12:09 UTC
Created attachment 240614 [details]
Fix pkg-config regression

After the update to 0.6.3 pkg-config returns:

# pkg-config --cflags libdiscid
-I 
# pkg-config --libs libdiscid
-L -ldiscid 

instead of:

# pkg-config --cflags libdiscid
-I/usr/local/include 
# pkg-config --libs libdiscid
-L/usr/local/lib -ldiscid 


As you can see in
https://github.com/metabrainz/libdiscid/compare/v0.6.2...v0.6.3

The following lines were removed in CMakeLists.txt:

SET(prefix ${CMAKE_INSTALL_PREFIX})
SET(exec_prefix ${EXEC_INSTALL_PREFIX})
SET(includedir ${INCLUDE_INSTALL_DIR})
SET(libdir ${LIB_INSTALL_DIR})

This should probably be reported upstream but meanwhile the attached patch fixes the port.
Comment 1 Mina Galić freebsd_triage 2023-03-06 09:33:05 UTC
(In reply to Emanuel Haupt from comment #0)


> This should probably be reported upstream

yes, please do.
Comment 2 Emanuel Haupt freebsd_committer freebsd_triage 2023-03-06 09:43:51 UTC
(In reply to Mina Galić from comment #1)

Upstream:
https://github.com/metabrainz/libdiscid/pull/62
Comment 3 Emanuel Haupt freebsd_committer freebsd_triage 2023-03-06 09:54:12 UTC
Created attachment 240616 [details]
Fix pkg-config regression (revised)

Revised patch. It's sufficient to restore includedir and libdir.
Comment 4 Jason E. Hale freebsd_committer freebsd_triage 2023-03-06 10:10:54 UTC
Thanks for the report! It might be better to just change the pc file template to use the already defined variables instead of creating new ones. I’ll look at it when I get home from work.
Comment 5 Emanuel Haupt freebsd_committer freebsd_triage 2023-03-06 14:07:59 UTC
(In reply to Jason E. Hale from comment #4)

Thanks Jason. The PR just got merged upstream.
Comment 6 Jason E. Hale freebsd_committer freebsd_triage 2023-03-06 18:29:46 UTC
(In reply to Emanuel Haupt from comment #5)
Ok, thanks! I'll just have the port download the patch from Github, then.
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-03-06 18:33:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dd8fe029daaa9a4dd13715c88be35bc6da78dd3e

commit dd8fe029daaa9a4dd13715c88be35bc6da78dd3e
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2023-03-06 18:24:43 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2023-03-06 18:31:59 +0000

    audio/libdiscid: Fix empty variables in pc file

    https://github.com/metabrainz/libdiscid/pull/62

    PR:             269990
    Reported by:    ehaupt

 audio/libdiscid/Makefile | 4 ++++
 audio/libdiscid/distinfo | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)