diff options
Diffstat (limited to 'media-libs/zxing-cpp')
-rw-r--r-- | media-libs/zxing-cpp/Manifest | 3 | ||||
-rw-r--r-- | media-libs/zxing-cpp/metadata.xml | 12 | ||||
-rw-r--r-- | media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild | 60 |
3 files changed, 75 insertions, 0 deletions
diff --git a/media-libs/zxing-cpp/Manifest b/media-libs/zxing-cpp/Manifest new file mode 100644 index 0000000..20c0877 --- /dev/null +++ b/media-libs/zxing-cpp/Manifest @@ -0,0 +1,3 @@ +DIST zxing-cpp-2.2.1.tar.gz 891055 BLAKE2B c6a3343cd0389d930e83dd9db4d6aeca6d4dda715c22c0b10dd76460e9d55bdd8e994c2ac24ba5d5a4f5e2069fcb035b2e4651a380b6b39bcce4b90d0c754df8 SHA512 f1de8df783061a152a18cd9102ac0c579c40c76ab4a5ba9f30bcb8ddb532f3fac08736840a631adbf7c30a7fa00ce8d65625c8cd695288620601708e8f256a53 +EBUILD zxing-cpp-2.2.1.ebuild 1417 BLAKE2B 833cde8f326983bfd6c921799bcf7e822851d57d7efa83ea1ebdde71d3fc2d161ed5d57e7c7c073ddb04e471cd56e888165c9cdc5ae61035239e4e780abaa5d0 SHA512 4a348dd43b578fe5a6bb07e1fddc2856f591f91acc198ee7919edb125ef4c92dc8d159197223adaabd82395d7a6f5d970b2b13959a750d4484b5313fd21b4693 +MISC metadata.xml 407 BLAKE2B ae4a26bc82d20868dd61f22f73f8c5dfcde69bea9c92292ef2693f5cb47bedb9c4040359aa47c70931bf2aad0d8bc534ced6314bcd68930da0903dd9b6380087 SHA512 8a65fb82f176a0897f68c78bd47ce28cdf967de9fdd320dbcd2ce203fd6a01cdc23595e2ae7707d0e3bd8a1dd11395217d3940d567e361493c5c2612f9ece5c5 diff --git a/media-libs/zxing-cpp/metadata.xml b/media-libs/zxing-cpp/metadata.xml new file mode 100644 index 0000000..17d8fcd --- /dev/null +++ b/media-libs/zxing-cpp/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>marcin.deranek@slonko.net</email> + <name>Marcin Deranek</name> + </maintainer> + <upstream> + <bugs-to>https://github.com/zxing-cpp/zxing-cpp/issues</bugs-to> + <remote-id type="github">zxing-cpp/zxing-cpp</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild b/media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild new file mode 100644 index 0000000..83bb922 --- /dev/null +++ b/media-libs/zxing-cpp/zxing-cpp-2.2.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..12} pypy3 ) + +inherit cmake python-single-r1 + +DESCRIPTION="C++ Multi-format 1D/2D barcode image processing library" +HOMEPAGE="https://github.com/zxing-cpp/zxing-cpp" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0/3" +KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86" +IUSE="python test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +RDEPEND=" + python? ( ${PYTHON_DEPS} ) +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + ${RDEPEND} + python? ( $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]') ) + test? ( + dev-cpp/gtest + dev-libs/stb + ) +" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + if use python; then + sed -i \ + -e "s#\${CMAKE_INSTALL_LIBDIR}#$(python_get_sitedir)#g" \ + wrappers/python/CMakeLists.txt || die "sed failed" + fi + sed -i \ + -e 's#zxing_add_package_stb.*#include_directories(/usr/include/stb)#' \ + -e 's#stb::stb##g' \ + example/CMakeLists.txt || die "sed failed" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_EXAMPLES=$(usex test ON OFF) + -DBUILD_BLACKBOX_TESTS=OFF # Require test/samples + -DBUILD_UNIT_TESTS=$(usex test ON OFF) + -DBUILD_PYTHON_MODULE=$(usex python ON OFF) + ) + cmake_src_configure +} |