1 |
commit: e4c20836dad0851f6213f73f7e4be49804d9d88a |
2 |
Author: Matthew Smith <matthew <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 4 08:43:32 2022 +0000 |
4 |
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 4 19:49:19 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4c20836 |
7 |
|
8 |
dev-libs/miniz: pkg-config tweaks |
9 |
|
10 |
Install the pkg-config file in into the correct (architecture specific) |
11 |
directory, and also correct the include directory so that it behaves the |
12 |
same as the CMake config file. |
13 |
|
14 |
Closes: https://bugs.gentoo.org/849578 |
15 |
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org> |
16 |
|
17 |
dev-libs/miniz/files/miniz-2.2.0-fixincdir.patch | 18 ++++++++++++++++++ |
18 |
dev-libs/miniz/files/miniz-2.2.0-fixpcpath.patch | 22 ++++++++++++++++++++++ |
19 |
dev-libs/miniz/miniz-2.2.0-r1.ebuild | 23 +++++++++++++++++++++++ |
20 |
3 files changed, 63 insertions(+) |
21 |
|
22 |
diff --git a/dev-libs/miniz/files/miniz-2.2.0-fixincdir.patch b/dev-libs/miniz/files/miniz-2.2.0-fixincdir.patch |
23 |
new file mode 100644 |
24 |
index 000000000000..e0379baf49e3 |
25 |
--- /dev/null |
26 |
+++ b/dev-libs/miniz/files/miniz-2.2.0-fixincdir.patch |
27 |
@@ -0,0 +1,18 @@ |
28 |
+From 37ea28133d9abea3926248c9517676be9b558ca7 Mon Sep 17 00:00:00 2001 |
29 |
+From: Matthew Smith <matthew@g.o> |
30 |
+Date: Sat, 4 Jun 2022 09:31:06 +0100 |
31 |
+Subject: [PATCH 2/2] build: Set pkgconfig includedir to miniz directory |
32 |
+ |
33 |
+Allows users to include <miniz.h> instead of <miniz/miniz.h> which |
34 |
+seems to be the intended behaviour. |
35 |
+--- a/miniz.pc.in |
36 |
++++ b/miniz.pc.in |
37 |
+@@ -1,7 +1,7 @@ |
38 |
+ prefix=@CMAKE_INSTALL_PREFIX@ |
39 |
+ exec_prefix=${prefix} |
40 |
+ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ |
41 |
+-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ |
42 |
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/miniz |
43 |
+ |
44 |
+ Name: @PROJECT_NAME@ |
45 |
+ Description: @PROJECT_DESCRIPTION@ |
46 |
|
47 |
diff --git a/dev-libs/miniz/files/miniz-2.2.0-fixpcpath.patch b/dev-libs/miniz/files/miniz-2.2.0-fixpcpath.patch |
48 |
new file mode 100644 |
49 |
index 000000000000..37f8c7737819 |
50 |
--- /dev/null |
51 |
+++ b/dev-libs/miniz/files/miniz-2.2.0-fixpcpath.patch |
52 |
@@ -0,0 +1,22 @@ |
53 |
+From 9cd715b3b1f5accc2e7cd0b167808c1a47a08938 Mon Sep 17 00:00:00 2001 |
54 |
+From: Matthew Smith <matthew@g.o> |
55 |
+Date: Sat, 4 Jun 2022 09:22:37 +0100 |
56 |
+Subject: [PATCH 1/2] build: Install .pc file in correct directory |
57 |
+ |
58 |
+/usr/share/pkgconfig should be used for architecture independent |
59 |
+libraries (e.g. data or scripts), while an architecture dependent |
60 |
+directory like /usr/lib64/pkgconfig should be used for native |
61 |
+binaries. |
62 |
+ |
63 |
+Co-authored-by: Sam James <sam@g.o> |
64 |
+--- a/CMakeLists.txt |
65 |
++++ b/CMakeLists.txt |
66 |
+@@ -173,7 +173,7 @@ if(NOT BUILD_HEADER_ONLY) |
67 |
+ if(INSTALL_PROJECT) |
68 |
+ install(FILES |
69 |
+ ${CMAKE_CURRENT_BINARY_DIR}/miniz.pc |
70 |
+- DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig) |
71 |
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) |
72 |
+ endif() |
73 |
+ endif() |
74 |
+ |
75 |
|
76 |
diff --git a/dev-libs/miniz/miniz-2.2.0-r1.ebuild b/dev-libs/miniz/miniz-2.2.0-r1.ebuild |
77 |
new file mode 100644 |
78 |
index 000000000000..2c45fe4f591a |
79 |
--- /dev/null |
80 |
+++ b/dev-libs/miniz/miniz-2.2.0-r1.ebuild |
81 |
@@ -0,0 +1,23 @@ |
82 |
+# Copyright 1999-2022 Gentoo Authors |
83 |
+# Distributed under the terms of the GNU General Public License v2 |
84 |
+ |
85 |
+EAPI=8 |
86 |
+ |
87 |
+inherit cmake |
88 |
+ |
89 |
+DESCRIPTION="A lossless, high performance data compression library" |
90 |
+HOMEPAGE="https://github.com/richgel999/miniz" |
91 |
+SRC_URI="https://github.com/richgel999/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
92 |
+ |
93 |
+LICENSE="MIT" |
94 |
+SLOT="0/${PV}" |
95 |
+KEYWORDS="~amd64 ~x86" |
96 |
+ |
97 |
+PATCHES=( |
98 |
+ # https://bugs.gentoo.org/849578 |
99 |
+ # https://github.com/richgel999/miniz/pull/239 |
100 |
+ "${FILESDIR}"/${PN}-2.2.0-fixpcpath.patch |
101 |
+ "${FILESDIR}"/${PN}-2.2.0-fixincdir.patch |
102 |
+) |
103 |
+ |
104 |
+DOCS=( ChangeLog.md readme.md ) |