Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 629876

Summary: libmad-0.15.1b-r8 constructs bad pkg-config mad.pc file for EPREFIX builds
Product: Gentoo/Alt Reporter: Matthias Gerstner <mgerstner>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED OBSOLETE    
Severity: normal CC: sound
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: suggested patch
suggested patch to explicitly pass boost include path to configure

Description Matthias Gerstner 2017-09-04 12:42:35 UTC
In the libmad-0.15.1b-r8.ebuild in function multilib_src_install() a mad.pc file from the package's files is patched and installed. This package config file is broken for prefix installations, because

  pkg-config mad --cflags

will return "-I/usr/include", i.e. an include switch for the host system's headers. This, for instance, broke my build of media-sound/mpd, because headers from the host's standard headers have been mixed up with headers of the prefix's standard headers.

I will attach a suggested patch that replaces the prefix in the pkg-config file with EPREFIX and also bases the libdir replacement on that. This fixed the issue for me.

Reproducible: Always

Steps to Reproduce:
1. emerge libmad (on prefix install)
pkg-config mad --cflags will return '-I/usr/include', which it shouldn't
Actual Results:  
`pkg-config mad --cflags` will return '-I/usr/include'

Expected Results:  
`pkg-config mad --cflags` should actually return nothing
Comment 1 Matthias Gerstner 2017-09-04 12:43:04 UTC
Created attachment 492248 [details, diff]
suggested patch
Comment 2 Matthias Gerstner 2017-09-04 13:02:20 UTC
Created attachment 492252 [details, diff]
suggested patch to explicitly pass boost include path to configure
Comment 3 Matthias Gerstner 2017-09-04 13:03:43 UTC
Comment on attachment 492252 [details, diff]
suggested patch to explicitly pass boost include path to configure

sorry, added to the wrong bug
Comment 4 Fabian Groffen gentoo-dev 2017-09-12 18:56:04 UTC
@maintainers: I'd appreciate your opinion on this patch
Comment 5 Fabian Groffen gentoo-dev 2021-01-06 20:35:04 UTC
I think mad.pc should be fixed, not mpd.