mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-14 15:50:07 +02:00
87 lines
2.1 KiB
Bash
87 lines
2.1 KiB
Bash
SUMMARY="C++ Multi-format 1D/2D barcode image processing library"
|
|
DESCRIPTION="ZXing-C++ (zebra crossing) is an open-source, multi-format linear/matrix barcode \
|
|
image processing library implemented in C++.
|
|
|
|
It was originally ported from the Java ZXing Library but has been developed further and now \
|
|
includes many improvements in terms of runtime and detection performance. It can both read and \
|
|
write barcodes in a number of formats."
|
|
HOMEPAGE="https://github.com/zxing-cpp/zxing-cpp"
|
|
COPYRIGHT="2016-2025 ZXing authors"
|
|
LICENSE="Apache v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/zxing-cpp/zxing-cpp/archive/refs/tags/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="64e4139103fdbc57752698ee15b5f0b0f7af9a0331ecbdc492047e0772c417ba"
|
|
SOURCE_DIR="zxing-cpp-$portVersion"
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
commandBinDir=$binDir
|
|
commandSuffix=$secondaryArchSuffix
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
zxing_cpp$secondaryArchSuffix = $portVersion
|
|
lib:libZXing$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
zxing_cpp${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libZXing$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
zxing_cpp$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libgtest$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
|
|
$cmakeDirArgs \
|
|
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
|
-DZXING_EXAMPLES=OFF \
|
|
-DZXING_UNIT_TESTS=OFF \
|
|
-Wno-dev
|
|
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
prepareInstalledDevelLib \
|
|
libZXing
|
|
fixPkgconfig
|
|
|
|
sed -i 's,\/include,/'${relativeIncludeDir}',g' \
|
|
$libDir/cmake/ZXing/ZXingTargets.cmake
|
|
|
|
packageEntries devel \
|
|
$developDir \
|
|
$libDir/cmake
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
ctest --test-dir build --output-on-failure
|
|
}
|