1 |
commit: e65221f043fa0582fa1835b4ae580e030bb09b8d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 24 08:52:31 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 24 09:08:59 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e65221f0 |
7 |
|
8 |
dev-libs/libgit2: Fix pkg-config install path |
9 |
|
10 |
Closes: https://bugs.gentoo.org/710572 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
.../libgit2/files/libgit2-0.99.0-pkg-config.patch | 81 ++++++++++++++++++++++ |
14 |
...git2-0.99.0.ebuild => libgit2-0.99.0-r1.ebuild} | 4 ++ |
15 |
2 files changed, 85 insertions(+) |
16 |
|
17 |
diff --git a/dev-libs/libgit2/files/libgit2-0.99.0-pkg-config.patch b/dev-libs/libgit2/files/libgit2-0.99.0-pkg-config.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..4a60037c612 |
20 |
--- /dev/null |
21 |
+++ b/dev-libs/libgit2/files/libgit2-0.99.0-pkg-config.patch |
22 |
@@ -0,0 +1,81 @@ |
23 |
+From fbda0575b133a57d8f5d264742098994c7624c99 Mon Sep 17 00:00:00 2001 |
24 |
+From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= <kloczko.tomasz@×××××.com> |
25 |
+Date: Wed, 19 Feb 2020 12:54:19 +0000 |
26 |
+Subject: [PATCH] Fix #5410: fix installing libgit2.pc in wrong location |
27 |
+ |
28 |
+Remove using custom PKG_BUILD_PREFIu, PKG_BUILD_LIBDIR and |
29 |
+PKG_BUILD_INCLUDEDIR variables. |
30 |
+Use cmake CMAKE_INSTALL_PREFIX, LIB_INSTALL_DIR, INCLUDE_INSTALL_DIR instead. |
31 |
+This patch fixes install libgit2.pc file in correct location and simpifies |
32 |
+cmake module. |
33 |
+--- |
34 |
+ cmake/Modules/PkgBuildConfig.cmake | 39 +++--------------------------- |
35 |
+ 1 file changed, 4 insertions(+), 35 deletions(-) |
36 |
+ |
37 |
+diff --git a/cmake/Modules/PkgBuildConfig.cmake b/cmake/Modules/PkgBuildConfig.cmake |
38 |
+index 1c0079eb0..e4c574431 100644 |
39 |
+--- a/cmake/Modules/PkgBuildConfig.cmake |
40 |
++++ b/cmake/Modules/PkgBuildConfig.cmake |
41 |
+@@ -1,10 +1,5 @@ |
42 |
+ # pkg-config file generation |
43 |
+ # |
44 |
+-# Uses the following globals: |
45 |
+-# - PKG_BUILD_PREFIX: the build location (aka prefix). Defaults to CMAKE_INSTALL_PREFIX |
46 |
+-# - PKG_BUILD_LIBDIR: the libdir location. Defaults to ${prefix}/lib. |
47 |
+-# - PKG_BUILD_INCLUDEDIR: the includedir location. Defaults to ${prefix}/include. |
48 |
+-# |
49 |
+ |
50 |
+ function(pkg_build_config) |
51 |
+ set(options) |
52 |
+@@ -29,37 +24,11 @@ function(pkg_build_config) |
53 |
+ message(FATAL_ERROR "Missing VERSION argument") |
54 |
+ endif() |
55 |
+ |
56 |
+- if (DEFINED PKG_BUILD_PREFIX) |
57 |
+- set(PKGCONFIG_PREFIX "${PKG_BUILD_PREFIX}") |
58 |
+- else() |
59 |
+- set(PKGCONFIG_PREFIX "${CMAKE_INSTALL_PREFIX}") |
60 |
+- endif() |
61 |
+- |
62 |
+- if(DEFINED PKG_BUILD_LIBDIR) |
63 |
+- if (IS_ABSOLUTE ${PKG_BUILD_LIBDIR}) |
64 |
+- set(PKGCONFIG_LIBDIR ${PKG_BUILD_LIBDIR}) |
65 |
+- else() |
66 |
+- set(PKGCONFIG_LIBDIR "\${prefix}/${PKG_BUILD_LIBDIR}") |
67 |
+- endif() |
68 |
+- else() |
69 |
+- set(PKGCONFIG_LIBDIR "\${prefix}/lib") |
70 |
+- endif() |
71 |
+- |
72 |
+- if(DEFINED PKG_BUILD_INCLUDEDIR) |
73 |
+- if (IS_ABSOLUTE ${PKG_BUILD_INCLUDEDIR}) |
74 |
+- set(PKGCONFIG_INCLUDEDIR ${PKG_BUILD_INCLUDEDIR}) |
75 |
+- else() |
76 |
+- set(PKGCONFIG_INCLUDEDIR "\${prefix}/${PKG_BUILD_INCLUDEDIR}") |
77 |
+- endif() |
78 |
+- else() |
79 |
+- set(PKGCONFIG_INCLUDEDIR "\${prefix}/include") |
80 |
+- endif() |
81 |
+- |
82 |
+ # Write .pc "header" |
83 |
+ file(WRITE "${PKGCONFIG_FILE}" |
84 |
+- "prefix=\"${PKGCONFIG_PREFIX}\"\n" |
85 |
+- "libdir=\"${PKGCONFIG_LIBDIR}\"\n" |
86 |
+- "includedir=\"${PKGCONFIG_INCLUDEDIR}\"\n" |
87 |
++ "prefix=\"${CMAKE_INSTALL_PREFIX}\"\n" |
88 |
++ "libdir=\"${LIB_INSTALL_DIR}\"\n" |
89 |
++ "includedir=\"${INCLUDE_INSTALL_DIR}\"\n" |
90 |
+ "\n" |
91 |
+ "Name: ${PKGCONFIG_NAME}\n" |
92 |
+ "Description: ${PKGCONFIG_DESCRIPTION}\n" |
93 |
+@@ -105,6 +74,6 @@ function(pkg_build_config) |
94 |
+ |
95 |
+ # Install .pc file |
96 |
+ install(FILES "${PKGCONFIG_FILE}" |
97 |
+- DESTINATION "${PKGCONFIG_PREFIX}/${PKGCONFIG_LIBDIR}/pkgconfig" |
98 |
++ DESTINATION "${LIB_INSTALL_DIR}/pkgconfig" |
99 |
+ ) |
100 |
+ endfunction() |
101 |
+-- |
102 |
+2.25.1 |
103 |
+ |
104 |
|
105 |
diff --git a/dev-libs/libgit2/libgit2-0.99.0.ebuild b/dev-libs/libgit2/libgit2-0.99.0-r1.ebuild |
106 |
similarity index 97% |
107 |
rename from dev-libs/libgit2/libgit2-0.99.0.ebuild |
108 |
rename to dev-libs/libgit2/libgit2-0.99.0-r1.ebuild |
109 |
index 3abe4784a16..8d7000bba6c 100644 |
110 |
--- a/dev-libs/libgit2/libgit2-0.99.0.ebuild |
111 |
+++ b/dev-libs/libgit2/libgit2-0.99.0-r1.ebuild |
112 |
@@ -30,6 +30,10 @@ DEPEND="${RDEPEND} |
113 |
virtual/pkgconfig |
114 |
" |
115 |
|
116 |
+PATCHES=( |
117 |
+ "${FILESDIR}"/${P}-pkg-config.patch |
118 |
+) |
119 |
+ |
120 |
src_prepare() { |
121 |
cmake_src_prepare |
122 |
# relying on forked http-parser to support some obscure URI form |