On Sun Jun 04, 2023 at 09:38:46AM +0200, Rafael Sadowski wrote:
> Hi Stuart, Hi ports@,
> 
> I would like to update zxing because I need zxing>=2.0 as a dependency
> for KDE Gear 23.04 (kitinerary). Looks like our zxing port is pretty
> old. The disadvantage of these update is the loss of bin/zxing.
> 
> Looks like nothing depends on it expect kitinerary.
> 
> Do we need BUILD_PYTHON_MODULE enabled?

After feedback from Stuart, thanks:

- Remove includes, shared libs ... from current port and build a static
  linked zxing binary (Tests are still passed).
- Add a new port graphics/zxing-cpp (attached)

Information for inst:zxing-cpp-2.0.0

Comment:
C++ barcode image processing library

Required by:
debug-zxing-cpp-2.0.0

Description:
ZXing-C++ ("zebra crossing") is an open-source, multi-format linear/matrix
barcode image processing library implemented in C++.

Maintainer: Rafael Sadowski <[email protected]>

WWW: https://github.com/zxing-cpp/zxing-cpp


I think no conflicts tags are necessary.



> 
> If I get an okay I would commit it with the KDE Gear update.
> 

Still valid. No rush.


diff --git a/graphics/zxing/Makefile b/graphics/zxing/Makefile
index fae0248dc9d..26380c25cb5 100644
--- a/graphics/zxing/Makefile
+++ b/graphics/zxing/Makefile
@@ -1,13 +1,11 @@
 COMMENT=       barcode image processing library
 
-SHARED_LIBS=   zxing 0.0
-
 GH_ACCOUNT=    glassechidna
 GH_PROJECT=    zxing-cpp
 GH_COMMIT=     e0e40ddec63f38405aca5c8c1ff60b85ec8b1f10
 
 DISTNAME=      zxing-20190320
-REVISION=      2
+REVISION=      3
 
 MAINTAINER=    Stuart Henderson <[email protected]>
 
@@ -26,12 +24,7 @@ MODULES=     devel/cmake
 LIB_DEPENDS=   converters/libiconv
 BUILD_DEPENDS= devel/cppunit
 
-CONFIGURE_ARGS= -DCMAKE_LIBRARY_PATH=${LOCALBASE}/lib \
-               -DBUILD_TESTING=yes
-
-SUBST_VARS+=   LIBzxing_VERSION
-pre-configure:
-       ${SUBST_CMD} ${WRKSRC}/CMakeLists.txt
+CONFIGURE_ARGS=        -DBUILD_TESTING=ON
 
 do-test:
        ${WRKBUILD}/testrunner
diff --git a/graphics/zxing/patches/patch-CMakeLists_txt 
b/graphics/zxing/patches/patch-CMakeLists_txt
index d160f20f5a9..d5098c52f5a 100644
--- a/graphics/zxing/patches/patch-CMakeLists_txt
+++ b/graphics/zxing/patches/patch-CMakeLists_txt
@@ -10,14 +10,42 @@ Index: CMakeLists.txt
  if(OpenCV_FOUND)
      list(APPEND LIBZXING_FILES
          opencv/src/zxing/MatSource.cpp
-@@ -57,8 +57,8 @@ if(OpenCV_FOUND)
+@@ -87,20 +87,17 @@ file(GLOB_RECURSE ZXING_FILES
+ add_executable(zxing ${ZXING_FILES})
+ target_link_libraries(zxing libzxing)
+ 
+-install(TARGETS zxing libzxing EXPORT zxing-targets
+-      LIBRARY DESTINATION lib
++install(TARGETS zxing 
+       RUNTIME DESTINATION bin
+-      ARCHIVE DESTINATION lib
+-    INCLUDES DESTINATION include
+ )
+ 
+-install(EXPORT zxing-targets DESTINATION lib/zxing/cmake NAMESPACE zxing::)
++#install(EXPORT zxing-targets DESTINATION lib/zxing/cmake NAMESPACE zxing::)
+ 
+-install(
+-    DIRECTORY core/src/zxing/
+-    DESTINATION include/zxing
+-    FILES_MATCHING PATTERN "*.h"
+-)
++#install(
++#    DIRECTORY core/src/zxing/
++#    DESTINATION include/zxing
++#    FILES_MATCHING PATTERN "*.h"
++#)
+ 
+ if(OpenCV_FOUND)
+     install(
+@@ -110,8 +107,8 @@ if(OpenCV_FOUND)
+     )
  endif()
  
- include_directories(core/src)
--add_library(libzxing ${LIBZXING_FILES})
--set_target_properties(libzxing PROPERTIES PREFIX "")
-+add_library(libzxing SHARED ${LIBZXING_FILES})
-+set_target_properties(libzxing PROPERTIES PREFIX "" VERSION 
${LIBzxing_VERSION})
+-configure_file(cmake/zxing-config.cmake.in zxing-config.cmake @ONLY)
+-install(FILES ${CMAKE_BINARY_DIR}/zxing-config.cmake DESTINATION 
lib/zxing/cmake)
++#configure_file(cmake/zxing-config.cmake.in zxing-config.cmake @ONLY)
++#install(FILES ${CMAKE_BINARY_DIR}/zxing-config.cmake DESTINATION 
lib/zxing/cmake)
  
- find_package(Iconv)
- if(ICONV_FOUND)
+ if(BUILD_TESTING)
+     # Add testrunner executable.
diff --git a/graphics/zxing/pkg/PLIST b/graphics/zxing/pkg/PLIST
index b35ccaac754..be52734c703 100644
--- a/graphics/zxing/pkg/PLIST
+++ b/graphics/zxing/pkg/PLIST
@@ -1,130 +1 @@
 @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 lib/libzxing.so.${LIBzxing_VERSION}
-lib/zxing/
-lib/zxing/cmake/
-lib/zxing/cmake/zxing-config.cmake
-lib/zxing/cmake/zxing-targets${MODCMAKE_BUILD_SUFFIX}
-lib/zxing/cmake/zxing-targets.cmake

Attachment: zxing-cpp.tgz.tar.gz
Description: application/tar-gz

Reply via email to