List Archive

Thread

Thread Index

Message

From: Pavel Raiskup <praiskup%redhat.com@localhost>
To: libzip-discuss%nih.at@localhost
Subject: [PATCH] installing zipconf.h into includedir?
Date: Wed, 06 Sep 2017 10:07:24 +0200

Please consider the attached patch (the rationale is documented inside).

The point is that nowadays, either the projects need to depend on pkg-config or
the projects need to use different 'cc -I' option for 32/64bit builds.

Alternative would be to install the header into ${includedir}/libzip/zipconf.h
or ${includedir}/libzip-private/zipconf.h while changing tze zip.h to:

    #include <libzip-private/zipconf.h>

Thanks for considering, I'd be glad to fix the patch when needed.

Pavel
From 67f8eb9878e8f1821620b8dbd00a290d946f4144 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup%redhat.com@localhost>
Date: Wed, 6 Sep 2017 09:42:45 +0200
Subject: [PATCH] Install zipconf.h into arch-independent directory

Since zipconf.h is mostly arch independent nowadays (on systems
with stdint.h), don't install zipconf into arch-dependant
directory.  Doing so only complicated packaging for such systems
with multiarch/multilib support because package maintainers had to
manually install header wrapper on '$includedir/zipconf.h'
conditionally including appropriate header from arch-dependant
location (because 'zip.h' includes '<zipconf.h>', and not
every dependant project relies on pkg-config).
---
 lib/Makefile.am | 3 +--
 libzip.pc.in    | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index e631db1..d3f6ba1 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2,12 +2,11 @@
 SUBDIRS=       gladman-fcrypt
 
 AM_CFLAGS=     @CFLAG_VISIBILITY@
-libincludedir = ${libdir}/@PACKAGE@/include
 
 lib_LTLIBRARIES = libzip.la
 noinst_HEADERS = zipint.h gladman-fcrypt.h
 include_HEADERS = zip.h
-nodist_libinclude_HEADERS = zipconf.h
+nodist_include_HEADERS = zipconf.h
 
 # also update CMakeLists.txt when changing version
 libzip_la_LDFLAGS=-no-undefined -version-info 5:0:0
diff --git a/libzip.pc.in b/libzip.pc.in
index ef8af2d..53abc47 100644
--- a/libzip.pc.in
+++ b/libzip.pc.in
@@ -2,7 +2,6 @@ prefix=@prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
-libincludedir=@libdir@/@PACKAGE@/include
 
 zipcmp=@prefix@/bin/zipcmp
 
@@ -10,5 +9,5 @@ Name: libzip
 Description: library for handling zip archives
 Version: @VERSION@
 Libs: @PKG_CONFIG_RPATH@ -L${libdir} -lzip @LIBS@
-Cflags: -I${includedir} -I${libincludedir}
+Cflags: -I${includedir}
 
-- 
2.13.5

Made by MHonArc.