View Issue Details

IDProjectCategoryView StatusLast Update
0000419fileGeneralpublic2023-02-04 13:23
Reporterdavidjb Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.44 
Fixed in Version5.45 
Summary0000419: Add Cflags compile-time flags for pkg-config
DescriptionBeing able to use libmagic (magic.h) requires knowledge of where it its headers are located on the system. In my case, I'm compiling a project that depends on magic.h on a system where the path isn't set system wide (e.g. macOS, Homebrew). In other words by running `pkg-config --cflags` should return the location of the header files for this project such that it's usable.

I've attached the patch that facilitates this for libmagic.pc.in. It would be greatly appreciated if you could incorporate this fix. Thanks very much for such a useful library!
Steps To Reproduce1. ./configure && make && make install
2. Run pkg-config --cflags and observe no output
TagsNo tags attached.

Activities

davidjb

2023-02-02 06:56

reporter  

libmagic.pc.in-cflags.patch (273 bytes)   
diff --git a/libmagic.pc.in b/libmagic.pc.in
index 3ad1290..140d70a 100644
--- a/libmagic.pc.in
+++ b/libmagic.pc.in
@@ -8,3 +8,4 @@ Description: Magic number recognition library
 Version: @VERSION@
 Libs: -L${libdir} -lmagic
 Libs.private: @LIBS@
+Cflags: -I${includedir}
libmagic.pc.in-cflags.patch (273 bytes)   

christos

2023-02-04 13:23

manager   ~0003894

committed, thanks

Issue History

Date Modified Username Field Change
2023-02-02 06:56 davidjb New Issue
2023-02-02 06:56 davidjb File Added: libmagic.pc.in-cflags.patch
2023-02-04 13:23 christos Assigned To => christos
2023-02-04 13:23 christos Status new => assigned
2023-02-04 13:23 christos Status assigned => resolved
2023-02-04 13:23 christos Resolution open => fixed
2023-02-04 13:23 christos Fixed in Version => 5.45
2023-02-04 13:23 christos Note Added: 0003894