Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 624794 Details for
Bug 712270
dev-libs/libgit2-0.99.0-r1 broken libgit2.pc pkg-config file (dev-util/gnome-builder-3.34.1: cc1: error: include: No such file or directory [-Werror=missing-include-dirs])
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
/etc/portage/patches/dev-libs/libgit2-0.99.0-r1/libgit2-0.99.0-87fc539f2ee-use_provided_install_dirs.patch
87fc539f2ee-use_provided_install_dirs.patch (text/plain), 5.24 KB, created by
Greg Turner
on 2020-03-23 21:06:52 UTC
(
hide
)
Description:
/etc/portage/patches/dev-libs/libgit2-0.99.0-r1/libgit2-0.99.0-87fc539f2ee-use_provided_install_dirs.patch
Filename:
MIME Type:
Creator:
Greg Turner
Created:
2020-03-23 21:06:52 UTC
Size:
5.24 KB
patch
obsolete
>based on: https://github.com/libgit2/libgit2/commit/87fc539f2ee733f86a83339a50aa3072d71890ef.patch > >quoting upstream commitmsg: > > From 87fc539f2ee733f86a83339a50aa3072d71890ef Mon Sep 17 00:00:00 2001 > From: Patrick Steinhardt <ps@pks.im> > Date: Fri, 13 Mar 2020 22:08:19 +0100 > Subject: [PATCH] cmake: use install directories provided via GNUInstallDirs > > We currently hand-code logic to configure where to install our artifacts > via the `LIB_INSTALL_DIR`, `INCLUDE_INSTALL_DIR` and `BIN_INSTALL_DIR` > variables. This is reinventing the wheel, as CMake already provide a way > to do that via `CMAKE_INSTALL_<DIR>` paths, e.g. `CMAKE_INSTALL_LIB`. > This requires users of libgit2 to know about the discrepancy and will > require special hacks for any build systems that handle these variables > in an automated way. One such example is Gentoo Linux, which sets up > these paths in both the cmake and cmake-utils eclass. > > So let's stop doing that: the GNUInstallDirs module handles it in a > better way for us, especially so as the actual values are dependent on > CMAKE_INSTALL_PREFIX. This commit removes our own set of variables and > instead refers users to use the standard ones. > > As a second benefit, this commit also fixes our pkgconfig generation to > use the GNUInstallDirs module. We had a bug there where we ignored the > CMAKE_INSTALL_PREFIX when configuring the libdir and includedir keys, so > if libdir was set to "lib64", then libdir would be an invalid path. With > GNUInstallDirs, we can now use `CMAKE_INSTALL_FULL_LIBDIR`, which > handles the prefix for us. > >-- >diff -urpN libgit2-0.99.0.orig/cmake/Modules/PkgBuildConfig.cmake libgit2-0.99.0/cmake/Modules/PkgBuildConfig.cmake >--- libgit2-0.99.0.orig/cmake/Modules/PkgBuildConfig.cmake 2020-03-23 13:52:19.175222614 -0700 >+++ libgit2-0.99.0/cmake/Modules/PkgBuildConfig.cmake 2020-03-23 13:58:53.405778558 -0700 >@@ -27,8 +27,8 @@ function(pkg_build_config) > # Write .pc "header" > file(WRITE "${PKGCONFIG_FILE}" > "prefix=\"${CMAKE_INSTALL_PREFIX}\"\n" >- "libdir=\"${LIB_INSTALL_DIR}\"\n" >- "includedir=\"${INCLUDE_INSTALL_DIR}\"\n" >+ "libdir=\"${CMAKE_INSTALL_FULL_LIBDIR}\"\n" >+ "includedir=\"${CMAKE_INSTALL_FULL_INCLUDEDIR}\"\n" > "\n" > "Name: ${PKGCONFIG_NAME}\n" > "Description: ${PKGCONFIG_DESCRIPTION}\n" >@@ -73,7 +73,5 @@ function(pkg_build_config) > file(APPEND "${PKGCONFIG_FILE}" "Cflags: -I\${includedir} ${PKGCONFIG_CFLAGS}\n") > > # Install .pc file >- install(FILES "${PKGCONFIG_FILE}" >- DESTINATION "${LIB_INSTALL_DIR}/pkgconfig" >- ) >+ install(FILES "${PKGCONFIG_FILE}" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") > endfunction() >diff -urpN libgit2-0.99.0.orig/CMakeLists.txt libgit2-0.99.0/CMakeLists.txt >--- libgit2-0.99.0.orig/CMakeLists.txt 2020-03-23 13:52:19.789232822 -0700 >+++ libgit2-0.99.0/CMakeLists.txt 2020-03-23 13:58:53.405778558 -0700 >@@ -36,6 +36,7 @@ INCLUDE(AddCFlagIfSupported) > INCLUDE(FindPkgLibraries) > INCLUDE(FindThreads) > INCLUDE(FindStatNsec) >+INCLUDE(GNUInstallDirs) > INCLUDE(IdeSplitSources) > INCLUDE(FeatureSummary) > INCLUDE(EnableWarnings) >diff -urpN libgit2-0.99.0.orig/README.md libgit2-0.99.0/README.md >--- libgit2-0.99.0.orig/README.md 2020-02-19 02:27:00.000000000 -0800 >+++ libgit2-0.99.0/README.md 2020-03-23 13:58:53.405778558 -0700 >@@ -248,9 +248,9 @@ For more advanced use or questions about > > The following CMake variables are declared: > >-- `BIN_INSTALL_DIR`: Where to install binaries to. >-- `LIB_INSTALL_DIR`: Where to install libraries to. >-- `INCLUDE_INSTALL_DIR`: Where to install headers to. >+- `CMAKE_INSTALL_BINDIR`: Where to install binaries to. >+- `CMAKE_INSTALL_LIBDIR`: Where to install libraries to. >+- `CMAKE_INSTALL_INCLUDEDIR`: Where to install headers to. > - `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON) > - `BUILD_CLAR`: Build [Clar](https://github.com/vmg/clar)-based test suite (defaults to ON) > - `THREADSAFE`: Build libgit2 with threading support (defaults to ON) >diff -urpN libgit2-0.99.0.orig/src/CMakeLists.txt libgit2-0.99.0/src/CMakeLists.txt >--- libgit2-0.99.0.orig/src/CMakeLists.txt 2020-03-23 13:52:19.656230610 -0700 >+++ libgit2-0.99.0/src/CMakeLists.txt 2020-03-23 13:58:53.405778558 -0700 >@@ -21,12 +21,6 @@ SET(LIBGIT2_INCLUDES > SET(LIBGIT2_SYSTEM_INCLUDES "") > SET(LIBGIT2_LIBS "") > >-# Installation paths >-# >-SET(BIN_INSTALL_DIR bin CACHE PATH "Where to install binaries to.") >-SET(LIB_INSTALL_DIR lib CACHE PATH "Where to install libraries to.") >-SET(INCLUDE_INSTALL_DIR include CACHE PATH "Where to install headers to.") >- > # Enable tracing > IF (ENABLE_TRACE STREQUAL "ON") > SET(GIT_TRACE 1) >@@ -387,9 +381,9 @@ ENDIF () > > # Install > INSTALL(TARGETS git2 >- RUNTIME DESTINATION ${BIN_INSTALL_DIR} >- LIBRARY DESTINATION ${LIB_INSTALL_DIR} >- ARCHIVE DESTINATION ${LIB_INSTALL_DIR} >+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} >+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} >+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} > ) >-INSTALL(DIRECTORY ${libgit2_SOURCE_DIR}/include/git2 DESTINATION ${INCLUDE_INSTALL_DIR} ) >-INSTALL(FILES ${libgit2_SOURCE_DIR}/include/git2.h DESTINATION ${INCLUDE_INSTALL_DIR} ) >+INSTALL(DIRECTORY ${libgit2_SOURCE_DIR}/include/git2 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) >+INSTALL(FILES ${libgit2_SOURCE_DIR}/include/git2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 712270
:
618092
| 624794