public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matthew Smith" <matthew@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/miniz/files/, dev-libs/miniz/
Date: Sat,  4 Jun 2022 19:49:55 +0000 (UTC)	[thread overview]
Message-ID: <1654372159.e4c20836dad0851f6213f73f7e4be49804d9d88a.matthew@gentoo> (raw)

commit:     e4c20836dad0851f6213f73f7e4be49804d9d88a
Author:     Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  4 08:43:32 2022 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Sat Jun  4 19:49:19 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4c20836

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 <AT> gentoo.org>

 dev-libs/miniz/files/miniz-2.2.0-fixincdir.patch | 18 ++++++++++++++++++
 dev-libs/miniz/files/miniz-2.2.0-fixpcpath.patch | 22 ++++++++++++++++++++++
 dev-libs/miniz/miniz-2.2.0-r1.ebuild             | 23 +++++++++++++++++++++++
 3 files changed, 63 insertions(+)

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 )


                 reply	other threads:[~2022-06-04 19:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1654372159.e4c20836dad0851f6213f73f7e4be49804d9d88a.matthew@gentoo \
    --to=matthew@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox