This patch makes pugixml install its headers to a standard location when built as a shared library. Taken from this upstream commit: https://github.com/zeux/pugixml/commit/daeb8013b20f9c47e85730faaa4131064a1f9c2e diff --git a/CMakeLists.txt b/CMakeLists.txt index 90fa6793..d7bc1b20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(pugixml) option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF) option(BUILD_TESTS "Build tests" OFF) -option(BUILD_PKGCONFIG "Build in PKGCONFIG mode" OFF) +option(USE_VERSIONED_LIBDIR "Use a private subdirectory to install the headers and libs" OFF) set(BUILD_DEFINES "" CACHE STRING "Build defines") @@ -55,7 +55,7 @@ endif() set_target_properties(pugixml PROPERTIES VERSION 1.9 SOVERSION 1) get_target_property(PUGIXML_VERSION_STRING pugixml VERSION) -if(BUILD_PKGCONFIG) +if(USE_VERSIONED_LIBDIR) # Install library into its own directory under LIBDIR set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING}) endif() @@ -71,10 +71,8 @@ install(TARGETS pugixml EXPORT pugixml-config install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX}) install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml) -if(BUILD_PKGCONFIG) - configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY) - install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) -endif() +configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY) +install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) if(BUILD_TESTS) file(GLOB TEST_SOURCES tests/*.cpp) diff --git a/scripts/pugixml.pc.in b/scripts/pugixml.pc.in index 3c97c28d..804c4d38 100644 --- a/scripts/pugixml.pc.in +++ b/scripts/pugixml.pc.in @@ -1,11 +1,11 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} -includedir=${prefix}/include/pugixml-@PUGIXML_VERSION_STRING@ -libdir=${exec_prefix}/lib/pugixml-@PUGIXML_VERSION_STRING@ +includedir=${prefix}/include@INSTALL_SUFFIX@ +libdir=${exec_prefix}/lib@INSTALL_SUFFIX@ Name: pugixml Description: Light-weight, simple and fast XML parser for C++ with XPath support. URL: http://pugixml.org/ Version: @PUGIXML_VERSION_STRING@ Cflags: -I${includedir} -Libs: -L${libdir} -lpugixml \ No newline at end of file +Libs: -L${libdir} -lpugixml guix.in?id=5e46b563c8ca3adf0f04b33de8774b7606994d02&showmsg=1'>Expand)Author 2018-06-09pull: Install the new Guix in a profile....* guix/scripts/pull.scm (%pull-version): New variable. (build-from-source): Pass #:pull-version to BUILD. (whole-package-for-legacy, derivation->manifest-entry): New procedure. (build-and-install): Rewrite in terms of 'build-and-use-profile'. * guix/scripts/system.scm (maybe-suggest-running-guix-pull)[latest]: Switch to "/current". * scripts/guix.in (augment-load-paths!): Remove use of ~/.config/guix/latest. * build-aux/compile-as-derivation.scm: Replace "/guix/latest/" with "/current/share/guile/site/X.Y" * guix/scripts.scm (warn-about-old-distro)[age]: Check "/current" instead of "/latest". * doc/guix.texi (Invoking guix pull): Document it. * doc/contributing.texi (Running Guix Before It Is Installed): Remove footnote about abusing ~/.config/guix/latest. Ludovic Courtès 2018-01-28guix: Let Emacs detect “scripts/guix.in” appropriate mode....Since commit 6f774d481839f87178c5895ac2d661e141f879b8 which introduces the use of Guile's meta switch in “scripts/guix.in”, Emacs was not using ‘scheme-mode’ for this file. * scripts/guix.in: Replace "-*- scheme -*-" with a local variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Mathieu Lirzin 2018-01-23guix: Refactor script....* scripts/guix.in: Remove empty surrounding ‘let’. Define 'main' as the procedure called when running the script. (maybe-augment-load-paths!): Rename to ... (augment-load-paths!): ... this. Use 'and=>' for 'file-exists?'. (run-guix-main): Rename to ... (main): ... this. Call 'augment-load-paths!'. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Mathieu Lirzin 2018-01-23build: Expand ‘scripts/guix’ at Make time....This moves the complexity of Autotools variable expansion outside of the application code. * scripts/guix.in (config-lookup): Delete. (maybe-augment-load-paths!, run-guix-main): Use fully expanded variables instead of calling ‘config-lookup’. * configure.ac: Don't use AC_CONFIG_FILES for ‘scripts/guix’. Use AC_PROG_SED. * Makefile.am (scripts/guix): New rule. (do_subst): New variable. (CLEANFILES, EXTRA_DIST): Adapt. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Mathieu Lirzin 2017-03-20build: Install .go files to $libdir/guile/X.Y....* configure.ac: Define and substitute 'guileobjectdir'. * Makefile.am (nobase_nodist_guilemodule_DATA): Remove $(GOBJECTS). (nobase_nodist_guileobject_DATA): New variable. (guix_install_go_files): Adjust accordingly. (install-data-hook): Likewise. * scripts/guix.in (config-lookup): Add 'exec_prefix' and 'guileobjectdir'. Add '_' in VAR-REF-REGEXP. (maybe-augment-load-paths!): Distinguish OBJECT-DIR from MODULE-DIR. Ludovic Courtès