From 5e94bd636239f14b6cbb0b5099955b76eafd6a2c Mon Sep 17 00:00:00 2001 From: sthen Date: Fri, 6 Nov 2015 15:45:17 +0000 Subject: [PATCH] update to newer version of ZXing (fork), gets rid of scons and imagemagick dep --- graphics/zxing/Makefile | 40 ++---- graphics/zxing/distinfo | 4 +- graphics/zxing/patches/patch-cpp_SConscript | 53 -------- .../zxing/patches/patch-cpp_blackboxtest_sh | 20 --- ..._core_src_zxing_qrcode_detector_Detector_h | 10 -- graphics/zxing/pkg/DESCR | 27 ++-- graphics/zxing/pkg/PLIST | 125 +++++++++++++++++- 7 files changed, 149 insertions(+), 130 deletions(-) delete mode 100644 graphics/zxing/patches/patch-cpp_SConscript delete mode 100644 graphics/zxing/patches/patch-cpp_blackboxtest_sh delete mode 100644 graphics/zxing/patches/patch-cpp_core_src_zxing_qrcode_detector_Detector_h diff --git a/graphics/zxing/Makefile b/graphics/zxing/Makefile index 63845a1ce1b..a7c6ae16ef8 100644 --- a/graphics/zxing/Makefile +++ b/graphics/zxing/Makefile @@ -1,40 +1,24 @@ -# $OpenBSD: Makefile,v 1.3 2013/03/11 11:10:56 espie Exp $ +# $OpenBSD: Makefile,v 1.4 2015/11/06 15:45:17 sthen Exp $ -COMMENT = barcode image processing library +COMMENT = barcode image processing library -DISTNAME = ZXing-2.0 -PKGNAME = ${DISTNAME:L} -REVISION = 0 +GH_ACCOUNT = glassechidna +GH_PROJECT = zxing-cpp +GH_COMMIT = 5ce91bb1c23b6cfb6a9ac076f10a4b2037810a91 -CATEGORIES = graphics +DISTNAME = zxing-20151004 -HOMEPAGE = https://code.google.com/p/zxing/ +CATEGORIES = graphics # Apache 2.0 -PERMIT_PACKAGE_CDROM = Yes +PERMIT_PACKAGE_CDROM = Yes -WANTLIB += Magick++ MagickCore MagickWand c m pthread stdc++ +WANTLIB += c m stdc++ -MASTER_SITES = https://zxing.googlecode.com/files/ -EXTRACT_SUFX = .zip - -MODULES = converters/libiconv devel/scons -BUILD_DEPENDS = devel/cppunit -LIB_DEPENDS = graphics/ImageMagick - -WRKDIST = ${WRKDIR}/${DISTNAME:L} -WRKSRC = ${WRKDIST}/cpp - -SUBST_VARS += WRKDIST WRKSRC CXX CXXFLAGS - -pre-configure: - ${SUBST_CMD} ${WRKSRC}/SConscript ${WRKSRC}/blackboxtest.sh - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/build/zxing ${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/build/libzxing.a ${PREFIX}/lib +MODULES = converters/libiconv devel/cmake +BUILD_DEPENDS = devel/cppunit do-test: - sh ${WRKSRC}/blackboxtest.sh + ${WRKBUILD}/testrunner .include diff --git a/graphics/zxing/distinfo b/graphics/zxing/distinfo index c7926982fda..e1781dceffb 100644 --- a/graphics/zxing/distinfo +++ b/graphics/zxing/distinfo @@ -1,2 +1,2 @@ -SHA256 (ZXing-2.0.zip) = oy7p1W/vWdnD8/AFekk7CmSOxHAlaozz6IlcviY41lc= -SIZE (ZXing-2.0.zip) = 72080269 +SHA256 (zxing-20151004.tar.gz) = e14fGXo1JWGLM3p1uhdgQvZw7uVOLJZuIzh+X3A0DV8= +SIZE (zxing-20151004.tar.gz) = 308090 diff --git a/graphics/zxing/patches/patch-cpp_SConscript b/graphics/zxing/patches/patch-cpp_SConscript deleted file mode 100644 index 4657d882709..00000000000 --- a/graphics/zxing/patches/patch-cpp_SConscript +++ /dev/null @@ -1,53 +0,0 @@ -$OpenBSD: patch-cpp_SConscript,v 1.2 2012/04/27 19:55:53 naddy Exp $ ---- cpp/SConscript.orig Sat Jan 14 11:38:44 2012 -+++ cpp/SConscript Fri Apr 27 21:38:41 2012 -@@ -5,9 +5,9 @@ import fnmatch - import os - - vars = Variables() --vars.Add(BoolVariable('DEBUG', 'Set to disable optimizations', 1)) -+vars.Add(BoolVariable('DEBUG', 'Set to disable optimizations', 0)) - vars.Add(BoolVariable('PIC', 'Set to 1 for to always generate PIC code', 0)) --env = Environment(variables = vars) -+env = Environment(variables = vars, CXX = "${CXX}") - # env.Replace(CXX = "clang++") - - debug = env['DEBUG'] -@@ -17,7 +17,7 @@ if debug: - #compile_options['CPPDEFINES'] = "-DDEBUG" - flags.append("-O0 -g3 -ggdb -Wall") - else: -- flags.append("-Os -g3 -Wall") -+ flags.append("${CXXFLAGS} -Wall") - if env['PIC']: - flags.append("-fPIC") - -@@ -26,7 +26,7 @@ flags.append("-Wextra -Werror") - # flags.append("-pedantic") - - compile_options['CXXFLAGS'] = ' '.join(flags) --compile_options['LINKFLAGS'] = "-ldl -L/usr/lib -L/opt/local/lib" -+compile_options['LINKFLAGS'] = '-L/usr/lib -L/opt/local/lib -L${LOCALBASE}/lib -L${X11BASE}/lib -pthread' - - def all_files(dir, ext='.cpp', level=6): - files = [] -@@ -36,8 +36,8 @@ def all_files(dir, ext='.cpp', level=6): - - - --magick_include = ['/usr/include/ImageMagick/', '/opt/local/include/ImageMagick/'] --magick_libs = ['Magick++', 'MagickWand', 'MagickCore'] -+magick_include = ['${LOCALBASE}/include', '${LOCALBASE}/include/ImageMagick/'] -+magick_libs = ['Magick++', 'MagickWand', 'MagickCore', 'iconv'] - - # check for existence of libiconv and add it to magick_libs if possible - matches = [] -@@ -53,7 +53,7 @@ cppunit_libs = ['cppunit'] - - zxing_files = all_files('core/src') - --zxing_include = ['core/src'] -+zxing_include = ['${LOCALBASE}/include', 'core/src'] - zxing_libs = env.Library('zxing', source=zxing_files, CPPPATH=zxing_include, **compile_options) - - app_files = ['magick/src/MagickBitmapSource.cpp', 'magick/src/main.cpp'] diff --git a/graphics/zxing/patches/patch-cpp_blackboxtest_sh b/graphics/zxing/patches/patch-cpp_blackboxtest_sh deleted file mode 100644 index cba602a2116..00000000000 --- a/graphics/zxing/patches/patch-cpp_blackboxtest_sh +++ /dev/null @@ -1,20 +0,0 @@ -$OpenBSD: patch-cpp_blackboxtest_sh,v 1.1.1.1 2012/04/04 03:38:45 bentley Exp $ ---- cpp/blackboxtest.sh.orig Mon Jul 19 22:20:20 2010 -+++ cpp/blackboxtest.sh Sun Feb 26 17:35:08 2012 -@@ -1,6 +1,6 @@ - #!/bin/sh - --blackboxpath="../core/test/data/blackbox" -+blackboxpath="${WRKDIST}/core/test/data/blackbox" - - if [ "$*" != "" ]; then - formats="$*" -@@ -32,7 +32,7 @@ for format in $formats; do - tmp="${tmp%PNG}"; - txt="${tmp}txt"; - expected=`cat "$txt"`; -- actual=`build/zxing $pic`; -+ actual=`${WRKSRC}/build/zxing $pic`; - if [ "$expected" == "$actual" ]; then - echo "passed." - passed=$((passed+1)); diff --git a/graphics/zxing/patches/patch-cpp_core_src_zxing_qrcode_detector_Detector_h b/graphics/zxing/patches/patch-cpp_core_src_zxing_qrcode_detector_Detector_h deleted file mode 100644 index 70082be3eef..00000000000 --- a/graphics/zxing/patches/patch-cpp_core_src_zxing_qrcode_detector_Detector_h +++ /dev/null @@ -1,10 +0,0 @@ -$OpenBSD: patch-cpp_core_src_zxing_qrcode_detector_Detector_h,v 1.1.1.1 2012/04/04 03:38:45 bentley Exp $ ---- cpp/core/src/zxing/qrcode/detector/Detector.h.orig Sun Feb 26 15:23:55 2012 -+++ cpp/core/src/zxing/qrcode/detector/Detector.h Sun Feb 26 15:24:06 2012 -@@ -63,4 +63,4 @@ class Detector : public Counted { (public) - } - } - --#endif // __DETECTOR_H__ -\ No newline at end of file -+#endif // __DETECTOR_H__ diff --git a/graphics/zxing/pkg/DESCR b/graphics/zxing/pkg/DESCR index 2aa6655a8a4..cc5f0b1ef8c 100644 --- a/graphics/zxing/pkg/DESCR +++ b/graphics/zxing/pkg/DESCR @@ -1,17 +1,12 @@ -ZXing (pronounced "zebra crossing") is an open-source, multi-format -1D/2D barcode image processing library. It currently supports these -formats: +ZXing (pronounced "zebra crossing") is an open-source, multi-format 1D/2D +barcode image processing library and command-line tool. It supports: - - UPC-A and UPC-E - - EAN-8 and EAN-13 - - Data Matrix - - Code 39 - - Code 93 - - Code 128 - - ITF - - Codabar - - RSS-14 (all variants) - - QR Code - - Data Matrix - - Aztec - - PDF 417 + Aztec EAN-8 and EAN-13 + Codabar ITF + Code 128 PDF 417 + Code 39 QR Code + Code 93 RSS-14 (all variants) + Data Matrix UPC-A and UPC-E + +The original ZXing project no longer provides the C++ code; this package +is built from Glass Echidna's fork. diff --git a/graphics/zxing/pkg/PLIST b/graphics/zxing/pkg/PLIST index 0830ce75b96..ed8b54ed3a8 100644 --- a/graphics/zxing/pkg/PLIST +++ b/graphics/zxing/pkg/PLIST @@ -1,3 +1,126 @@ -@comment $OpenBSD: PLIST,v 1.1.1.1 2012/04/04 03:38:45 bentley Exp $ +@comment $OpenBSD: PLIST,v 1.2 2015/11/06 15:45:17 sthen Exp $ @bin bin/zxing +include/zxing/ +include/zxing/BarcodeFormat.h +include/zxing/Binarizer.h +include/zxing/BinaryBitmap.h +include/zxing/ChecksumException.h +include/zxing/DecodeHints.h +include/zxing/Exception.h +include/zxing/FormatException.h +include/zxing/IllegalStateException.h +include/zxing/InvertedLuminanceSource.h +include/zxing/LuminanceSource.h +include/zxing/MultiFormatReader.h +include/zxing/NotFoundException.h +include/zxing/Reader.h +include/zxing/ReaderException.h +include/zxing/Result.h +include/zxing/ResultPoint.h +include/zxing/ResultPointCallback.h +include/zxing/ZXing.h +include/zxing/aztec/ +include/zxing/aztec/AztecDetectorResult.h +include/zxing/aztec/AztecReader.h +include/zxing/aztec/decoder/ +include/zxing/aztec/decoder/Decoder.h +include/zxing/aztec/detector/ +include/zxing/aztec/detector/Detector.h +include/zxing/common/ +include/zxing/common/Array.h +include/zxing/common/BitArray.h +include/zxing/common/BitMatrix.h +include/zxing/common/BitSource.h +include/zxing/common/CharacterSetECI.h +include/zxing/common/Counted.h +include/zxing/common/DecoderResult.h +include/zxing/common/DetectorResult.h +include/zxing/common/GlobalHistogramBinarizer.h +include/zxing/common/GreyscaleLuminanceSource.h +include/zxing/common/GreyscaleRotatedLuminanceSource.h +include/zxing/common/GridSampler.h +include/zxing/common/HybridBinarizer.h +include/zxing/common/IllegalArgumentException.h +include/zxing/common/PerspectiveTransform.h +include/zxing/common/Point.h +include/zxing/common/Str.h +include/zxing/common/StringUtils.h +include/zxing/common/detector/ +include/zxing/common/detector/JavaMath.h +include/zxing/common/detector/MathUtils.h +include/zxing/common/detector/MonochromeRectangleDetector.h +include/zxing/common/detector/WhiteRectangleDetector.h +include/zxing/common/reedsolomon/ +include/zxing/common/reedsolomon/GenericGF.h +include/zxing/common/reedsolomon/GenericGFPoly.h +include/zxing/common/reedsolomon/ReedSolomonDecoder.h +include/zxing/common/reedsolomon/ReedSolomonException.h +include/zxing/datamatrix/ +include/zxing/datamatrix/DataMatrixReader.h +include/zxing/datamatrix/Version.h +include/zxing/datamatrix/decoder/ +include/zxing/datamatrix/decoder/BitMatrixParser.h +include/zxing/datamatrix/decoder/DataBlock.h +include/zxing/datamatrix/decoder/DecodedBitStreamParser.h +include/zxing/datamatrix/decoder/Decoder.h +include/zxing/datamatrix/detector/ +include/zxing/datamatrix/detector/CornerPoint.h +include/zxing/datamatrix/detector/Detector.h +include/zxing/datamatrix/detector/DetectorException.h +include/zxing/multi/ +include/zxing/multi/ByQuadrantReader.h +include/zxing/multi/GenericMultipleBarcodeReader.h +include/zxing/multi/MultipleBarcodeReader.h +include/zxing/multi/qrcode/ +include/zxing/multi/qrcode/QRCodeMultiReader.h +include/zxing/multi/qrcode/detector/ +include/zxing/multi/qrcode/detector/MultiDetector.h +include/zxing/multi/qrcode/detector/MultiFinderPatternFinder.h +include/zxing/oned/ +include/zxing/oned/CodaBarReader.h +include/zxing/oned/Code128Reader.h +include/zxing/oned/Code39Reader.h +include/zxing/oned/Code93Reader.h +include/zxing/oned/EAN13Reader.h +include/zxing/oned/EAN8Reader.h +include/zxing/oned/ITFReader.h +include/zxing/oned/MultiFormatOneDReader.h +include/zxing/oned/MultiFormatUPCEANReader.h +include/zxing/oned/OneDReader.h +include/zxing/oned/OneDResultPoint.h +include/zxing/oned/UPCAReader.h +include/zxing/oned/UPCEANReader.h +include/zxing/oned/UPCEReader.h +include/zxing/pdf417/ +include/zxing/pdf417/PDF417Reader.h +include/zxing/pdf417/decoder/ +include/zxing/pdf417/decoder/BitMatrixParser.h +include/zxing/pdf417/decoder/DecodedBitStreamParser.h +include/zxing/pdf417/decoder/Decoder.h +include/zxing/pdf417/decoder/ec/ +include/zxing/pdf417/decoder/ec/ErrorCorrection.h +include/zxing/pdf417/decoder/ec/ModulusGF.h +include/zxing/pdf417/decoder/ec/ModulusPoly.h +include/zxing/pdf417/detector/ +include/zxing/pdf417/detector/Detector.h +include/zxing/pdf417/detector/LinesSampler.h +include/zxing/qrcode/ +include/zxing/qrcode/ErrorCorrectionLevel.h +include/zxing/qrcode/FormatInformation.h +include/zxing/qrcode/QRCodeReader.h +include/zxing/qrcode/Version.h +include/zxing/qrcode/decoder/ +include/zxing/qrcode/decoder/BitMatrixParser.h +include/zxing/qrcode/decoder/DataBlock.h +include/zxing/qrcode/decoder/DataMask.h +include/zxing/qrcode/decoder/DecodedBitStreamParser.h +include/zxing/qrcode/decoder/Decoder.h +include/zxing/qrcode/decoder/Mode.h +include/zxing/qrcode/detector/ +include/zxing/qrcode/detector/AlignmentPattern.h +include/zxing/qrcode/detector/AlignmentPatternFinder.h +include/zxing/qrcode/detector/Detector.h +include/zxing/qrcode/detector/FinderPattern.h +include/zxing/qrcode/detector/FinderPatternFinder.h +include/zxing/qrcode/detector/FinderPatternInfo.h lib/libzxing.a