summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Smith <matthew@gentoo.org>2022-06-04 09:43:32 +0100
committerMatthew Smith <matthew@gentoo.org>2022-06-04 20:49:19 +0100
commite4c20836dad0851f6213f73f7e4be49804d9d88a (patch)
treea68e40c6ace85342c0c0a1d79eec166a8807783d
parentnet-p2p/nicotine+: 3.2.2 version bump. (diff)
downloadgentoo-e4c20836dad0851f6213f73f7e4be49804d9d88a.tar.gz
gentoo-e4c20836dad0851f6213f73f7e4be49804d9d88a.tar.bz2
gentoo-e4c20836dad0851f6213f73f7e4be49804d9d88a.zip
dev-libs/miniz: pkg-config tweaks
Install the pkg-config file in into the correct (architecture specific) directory, and also correct the include directory so that it behaves the same as the CMake config file. Closes: https://bugs.gentoo.org/849578 Signed-off-by: Matthew Smith <matthew@gentoo.org>
-rw-r--r--dev-libs/miniz/files/miniz-2.2.0-fixincdir.patch18
-rw-r--r--dev-libs/miniz/files/miniz-2.2.0-fixpcpath.patch22
-rw-r--r--dev-libs/miniz/miniz-2.2.0-r1.ebuild23
3 files changed, 63 insertions, 0 deletions
diff --git a/dev-libs/miniz/files/miniz-2.2.0-fixincdir.patch b/dev-libs/miniz/files/miniz-2.2.0-fixincdir.patch
new file mode 100644
index 000000000000..e0379baf49e3
--- /dev/null
+++ b/dev-libs/miniz/files/miniz-2.2.0-fixincdir.patch
@@ -0,0 +1,18 @@
+From 37ea28133d9abea3926248c9517676be9b558ca7 Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matthew@gentoo.org>
+Date: Sat, 4 Jun 2022 09:31:06 +0100
+Subject: [PATCH 2/2] build: Set pkgconfig includedir to miniz directory
+
+Allows users to include <miniz.h> instead of <miniz/miniz.h> which
+seems to be the intended behaviour.
+--- a/miniz.pc.in
++++ b/miniz.pc.in
+@@ -1,7 +1,7 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/miniz
+
+ Name: @PROJECT_NAME@
+ Description: @PROJECT_DESCRIPTION@
diff --git a/dev-libs/miniz/files/miniz-2.2.0-fixpcpath.patch b/dev-libs/miniz/files/miniz-2.2.0-fixpcpath.patch
new file mode 100644
index 000000000000..37f8c7737819
--- /dev/null
+++ b/dev-libs/miniz/files/miniz-2.2.0-fixpcpath.patch
@@ -0,0 +1,22 @@
+From 9cd715b3b1f5accc2e7cd0b167808c1a47a08938 Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matthew@gentoo.org>
+Date: Sat, 4 Jun 2022 09:22:37 +0100
+Subject: [PATCH 1/2] build: Install .pc file in correct directory
+
+/usr/share/pkgconfig should be used for architecture independent
+libraries (e.g. data or scripts), while an architecture dependent
+directory like /usr/lib64/pkgconfig should be used for native
+binaries.
+
+Co-authored-by: Sam James <sam@gentoo.org>
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -173,7 +173,7 @@ if(NOT BUILD_HEADER_ONLY)
+ if(INSTALL_PROJECT)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/miniz.pc
+- DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig)
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif()
+ endif()
+
diff --git a/dev-libs/miniz/miniz-2.2.0-r1.ebuild b/dev-libs/miniz/miniz-2.2.0-r1.ebuild
new file mode 100644
index 000000000000..2c45fe4f591a
--- /dev/null
+++ b/dev-libs/miniz/miniz-2.2.0-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="A lossless, high performance data compression library"
+HOMEPAGE="https://github.com/richgel999/miniz"
+SRC_URI="https://github.com/richgel999/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=(
+ # https://bugs.gentoo.org/849578
+ # https://github.com/richgel999/miniz/pull/239
+ "${FILESDIR}"/${PN}-2.2.0-fixpcpath.patch
+ "${FILESDIR}"/${PN}-2.2.0-fixincdir.patch
+)
+
+DOCS=( ChangeLog.md readme.md )