Files
haikuports/media-gfx/qrencode/qrencode-4.1.1.recipe
2023-07-29 15:56:23 +00:00

109 lines
2.8 KiB
Bash

SUMMARY="QR Code encoding library"
DESCRIPTION="Libqrencode is a library for encoding data in a QR Code symbol, \
a kind of 2D symbology that can be scanned by handy terminals such as a \
mobile phone with a camera. The capacity of QR Code is up to 7000 digits or \
4000 characters, and has high robustness.
Libqrencode accepts a string or a list of data chunks then encodes in a QR Code \
symbol as a bitmap array. While other QR Code applications generate an image \
file, using libqrencode allows applications to render QR Code symbols from raw \
bitmap data directly. This library also contains a command-line utility to \
output a QR Code symbol as PNG image. This helps light-weight CGI programs."
HOMEPAGE="https://fukuchi.org/works/qrencode/"
COPYRIGHT="2006-2020 Kentaro Fukuchi
2002, 2003, 2004, 2006 Phil Karn, KA9Q (Reed-Solomon code encoder)"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://fukuchi.org/works/qrencode/qrencode-$portVersion.tar.bz2"
CHECKSUM_SHA256="e455d9732f8041cf5b9c388e345a641fd15707860f928e94507b1961256a6923"
ARCHITECTURES="all ?arm ?ppc"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
qrencode$secondaryArchSuffix = $portVersion
lib:libqrencode$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
"
PROVIDES_devel="
qrencode${secondaryArchSuffix}_devel = $portVersion
devel:libqrencode$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
qrencode$secondaryArchSuffix == $portVersion base
"
PROVIDES_tools="
qrencode${secondaryArchSuffix}_tools = $portVersion
cmd:qrencode$commandSuffix = $portVersion
"
REQUIRES_tools="
qrencode$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libpng16$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:awk
cmd:autoconf
cmd:automake
cmd:autoheader
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
defineDebugInfoPackage qrencode$secondaryArchSuffix \
$libDir/libqrencode.so.$libVersion \
"$(getPackagePrefix tools)"/bin/qrencode
BUILD()
{
./autogen.sh
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir \
--disable-static
make $jobArgs
}
INSTALL()
{
make install
# remove libtool file
rm -f $libDir/libqrencode.la
prepareInstalledDevelLib libqrencode
fixPkgconfig
# devel package
packageEntries devel \
$developDir
packageEntries tools \
$commandBinDir \
$documentationDir
}