commit:     c180e5b4af5f256037845b662c7e017f9dae7ec8
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 08:03:46 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 11:45:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c180e5b4

media-libs/zxing-cpp: 1.4.0 version bump, add subslot

1.4.0 is not ABI compatible to 1.3.0 without bumping soname.
Thankfully upstream was made aware of this and will change SO handling
going forward.

Downstream patch: Install one private header needed for
app-office/libreoffice to build successfully.

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-libs/zxing-cpp/Manifest                      |  1 +
 ...pp-1.4.0-install-required-private-headers.patch | 43 ++++++++++++++++++++++
 media-libs/zxing-cpp/zxing-cpp-1.4.0.ebuild        | 28 ++++++++++++++
 3 files changed, 72 insertions(+)

diff --git a/media-libs/zxing-cpp/Manifest b/media-libs/zxing-cpp/Manifest
index 1e76da116ca3..8a7287886422 100644
--- a/media-libs/zxing-cpp/Manifest
+++ b/media-libs/zxing-cpp/Manifest
@@ -1 +1,2 @@
 DIST zxing-cpp-1.3.0.tar.gz 97938087 BLAKE2B 
f0c9c906ab2b534c67cf66605eca0ecc22a90fc9d69e23397bcb0bc8eaf3d68a7ad41631ea6d9c7f292ee03165d2e038d84f497307384205e2d6f37fef5dddba
 SHA512 
27821667dea3d09b91bf9825ff25483ed658d850fd238009f1c7e43b1b09e62d24b3a2cd78d4e39d29725931b32bfce3e21e7ec871830b3ad69a5a69c72d8de8
+DIST zxing-cpp-1.4.0.tar.gz 1018225 BLAKE2B 
98b6badfe0ddfa39650eb4fbfc02bc01f5237cdd5edfafd7b88067997a22caa2e64d067328b534c439d7d89fef5b6d48acf4bc29389142b332123b477f3e3dde
 SHA512 
05c5b9282f13b76fa0897b21e5b73cb7df0c52e62f1a2d9760fe774aa0378fde97f5f9896690b65b28b4b96ba6ad2703bed53ffaf9d3784636d29cbe860d4bad

diff --git 
a/media-libs/zxing-cpp/files/zxing-cpp-1.4.0-install-required-private-headers.patch
 
b/media-libs/zxing-cpp/files/zxing-cpp-1.4.0-install-required-private-headers.patch
new file mode 100644
index 000000000000..2a85252f5439
--- /dev/null
+++ 
b/media-libs/zxing-cpp/files/zxing-cpp-1.4.0-install-required-private-headers.patch
@@ -0,0 +1,43 @@
+From 4159a44bdc785b27013bc6be1d32b2e442c73b74 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Thu, 14 Jul 2022 12:04:27 +0200
+Subject: [PATCH] Add INSTALL_PRIVATE_HEADERS switch to unbreak LibreOffice
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ CMakeLists.txt      | 1 +
+ core/CMakeLists.txt | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e947ce8d..2e41e773 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,6 +9,7 @@ option (BUILD_BLACKBOX_TESTS "Build the black box 
reader/writer tests" OFF)
+ option (BUILD_UNIT_TESTS "Build the unit tests (don't enable for production 
builds)" OFF)
+ option (BUILD_PYTHON_MODULE "Build the python module" OFF)
+ set(BUILD_DEPENDENCIES "AUTO" CACHE STRING "Fetch from github or use locally 
installed (AUTO/GITHUB/LOCAL)")
++option (INSTALL_PRIVATE_HEADERS "Install (some) private headers to unbreak 
(some) revdeps broken by 1.4.0 cleanup" OFF)
+ 
+ if (WIN32)
+     option (BUILD_SHARED_LIBS "Build and link as shared library" OFF)
+diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
+index 7382bcae..575e696b 100644
+--- a/core/CMakeLists.txt
++++ b/core/CMakeLists.txt
+@@ -174,6 +174,12 @@ if (BUILD_WRITERS)
+     )
+ endif()
+ # end of public header set
++if (INSTALL_PRIVATE_HEADERS)
++    set (PUBLIC_HEADERS ${PUBLIC_HEADERS}
++        src/BitArray.h
++    )
++endif()
++# end of 'private' public header set
+ 
+ set (AZTEC_FILES
+ )
+-- 
+2.35.1
+

diff --git a/media-libs/zxing-cpp/zxing-cpp-1.4.0.ebuild 
b/media-libs/zxing-cpp/zxing-cpp-1.4.0.ebuild
new file mode 100644
index 000000000000..7fe3f592a74c
--- /dev/null
+++ b/media-libs/zxing-cpp/zxing-cpp-1.4.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="C++ Multi-format 1D/2D barcode image processing library"
+HOMEPAGE="https://github.com/nu-book/zxing-cpp";
+SRC_URI="https://github.com/nu-book/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/1.4"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE=""
+
+# Downstream patch until revdeps like LibreOffice are fixed
+PATCHES=( "${FILESDIR}/${P}-install-required-private-headers.patch" )
+
+src_configure() {
+       local mycmakeargs=(
+               -DINSTALL_PRIVATE_HEADERS=ON # required by LibreOffice as of 
7.3.5.1
+               -DBUILD_EXAMPLES=OFF # nothing is installed
+               -DBUILD_BLACKBOX_TESTS=OFF # FIXME: FetchContent.cmake module 
usage
+               -DBUILD_UNIT_TESTS=OFF # for both tests options. no thanks. bug 
#793173
+       )
+       cmake_src_configure
+}

Reply via email to