1SUMMARY="A software for reading and writing Data Matrix barcodes"
2DESCRIPTION="This is open source software for reading and writing Data Matrix \
3barcodes on Linux, Unix, OS X, Windows, and mobile devices. At its core \
4libdmtx is a native shared library, allowing C/C++ programs to use \
5its capabilities without extra restrictions or overhead."
6HOMEPAGE="http://libdmtx.sourceforge.net/
7	https://github.com/dmtx/dmtx-utils"
8COPYRIGHT="2009-2018 Mike Laughton, Vadim Misbakh-Soloviov and others"
9LICENSE="GNU GPL v2
10	GNU LGPL v2.1"
11REVISION="2"
12SOURCE_URI="https://github.com/dmtx/dmtx-utils/archive/v$portVersion.tar.gz"
13CHECKSUM_SHA256="0d396ec14f32a8cf9e08369a4122a16aa2e5fa1675e02218f16f1ab777ea2a28"
14SOURCE_FILENAME="dmtx-utils-v$portVersion.tar.gz"
15SOURCE_DIR="dmtx-utils-$portVersion"
16
17ARCHITECTURES="all !x86_gcc2"
18SECONDARY_ARCHITECTURES="x86"
19
20if [ "$targetArchitecture" != x86_gcc2 ]; then
21	commandBinDir=$binDir
22else
23	commandBinDir=$prefix/bin
24fi
25
26PROVIDES="
27	dmtx_utils$secondaryArchSuffix = $portVersion
28	cmd:dmtxquery = $portVersion
29	cmd:dmtxread = $portVersion
30	cmd:dmtxwrite = $portVersion
31	"
32REQUIRES="
33	haiku$secondaryArchSuffix
34	lib:libdmtx$secondaryArchSuffix
35	lib:libMagickCore_7.Q16HDRI$secondaryArchSuffix
36	lib:libMagickWand_7.Q16HDRI$secondaryArchSuffix
37	lib:libgomp$secondaryArchSuffix
38	"
39
40BUILD_REQUIRES="
41	haiku${secondaryArchSuffix}_devel
42	devel:libdmtx$secondaryArchSuffix
43	devel:libMagickCore_7.Q16HDRI$secondaryArchSuffix
44	devel:libMagickWand_7.Q16HDRI$secondaryArchSuffix
45	"
46BUILD_PREREQUIRES="
47	cmd:aclocal
48	cmd:autoreconf
49	cmd:awk
50	cmd:gcc$secondaryArchSuffix
51	cmd:libtoolize$secondaryArchSuffix
52	cmd:make
53	cmd:pkg_config$secondaryArchSuffix
54	"
55
56BUILD()
57{
58	export CFLAGS="-D_BSD_SOURCE"
59	autoreconf -vfi
60	runConfigure --omit-dirs binDir ./configure --bindir=$commandBinDir
61	make $jobArgs
62}
63
64INSTALL()
65{
66	make install
67}
68
69TEST()
70{
71	make check
72}
73