From nobody Sun Feb 13 14:25:27 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7A8EE194D095; Sun, 13 Feb 2022 14:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JxV4l2yVPz3lgN; Sun, 13 Feb 2022 14:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644762327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7gIas/s3+SLQU0flGwuM09en1Zdor0XXPXcG9MGRZk=; b=eCb1FIs3u9JcX/NJaICyM5fTqgQXT9FK8l4rOpoVz8FaJX0RUL0LoflznmYO+OmxZaFknQ lJRtRkcYre8JXexJWiwVq9xz/rRU6FwrsMOD4+tsB/pswnF0zkmnKEJtsrK9OO7bgDM2sG gYRu7YgkvunuCpKYBjclb1ohF+dXH3A54uFp3L7QUbNc3brWEdIL0ds4onDuxEukjeDYSx JBTgbidiok5b1CmuB5/g5/fqlY0AOkiH5OS8ncdH2iVXRWfN6avHgDwPUgHswUbltQmFY/ Ylk/JYjPuCgqLgskpaB4Utis3FC/HJRgXusfyvpIj1eZJWGvj25OEHfkk3c+9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 462611CBA7; Sun, 13 Feb 2022 14:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21DEPRQf081205; Sun, 13 Feb 2022 14:25:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21DEPRiJ081204; Sun, 13 Feb 2022 14:25:27 GMT (envelope-from git) Date: Sun, 13 Feb 2022 14:25:27 GMT Message-Id: <202202131425.21DEPRiJ081204@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Rainer Hurling Subject: git: 91c8d5f580a9 - main - graphics/leptonica: Update to 1.82.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rhurlin X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91c8d5f580a9954293ae3cea4420a96479fc80c0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644762327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7gIas/s3+SLQU0flGwuM09en1Zdor0XXPXcG9MGRZk=; b=CX5eUoeCUTIkWUl6vydyBn+/5gerLIvOvblZSw0lNimLtWKIXqIJlUxAwqKRCk+EK+jLAS THivv0gPfa7n8SboPHXn2rvw5YGUHFcYlMa+vuMq++uWIcRjTdA0fJZ1MF7LWItcoVpggH Ck4QOMJgshO9Q4b4/Yfl6b5WUAZGWTpk6QoWQ37bJMTKsV//OHq0+v8mJWlntMdnLIjZ26 fiwykzvbahy1XLndtJAYxPs++njjHLqU2Bq3hhQf2sE+7jXj/k6b25gVpyDKlnF49Q4j6f itzKfQv2h3Zx8fK3ZQecmOWcwQbKdHuh8fwZnesNm+4KI/4YhDGZSq+qgbiXmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644762327; a=rsa-sha256; cv=none; b=Vz1DAMHG3YRaY94b2xxZq+7KXm34VlqV+s7vcEnbJ+U4uaQDgGUY0Nq0Re7RzYuZ+gDx+R q7/mx0/JKOXsndP8te1ZyB63LyGgekH5kAqNQ0AQ1eeBWSllcXdZtl99VlLrrBpDq/y28T i0vtGA1/8rBm0V/HuXgFMCBl4fCibQcp4S/cuxDA9OyGVNlXGY9b7VlQg42xv5F+g+4onO RJcweUpIMDqSIaw+O+kNmtL3lVffrxwbrf8StsxmEhKASFqK651WA6dxhLsxRFYm+LAYxm U73613ncQ+BBfk/402xGa5h2lRGh7Ag1wYwJLqIP9LcMKZ6ZCWQNlCFaKP8tiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rhurlin: URL: https://cgit.FreeBSD.org/ports/commit/?id=91c8d5f580a9954293ae3cea4420a96479fc80c0 commit 91c8d5f580a9954293ae3cea4420a96479fc80c0 Author: John Hein AuthorDate: 2022-02-13 14:04:54 +0000 Commit: Rainer Hurling CommitDate: 2022-02-13 14:25:06 +0000 graphics/leptonica: Update to 1.82.0 If graphics/tesseract is installed and then graphics/opencv is to be installed, OpenCV uses TesseractConfig.cmake to check for the presence of Leptonica and wants to use FindLeptonica.cmake for that. Therefore the new version adds a file cmake/FindLeptonica.cmake. After switching from autotools to cmake, the libraries are named as libleptonica.so instead of liblept.so. Upstream it is not yet decided which naming will be used in the future [1]. As a workaround, the port links the new naming to the previous one, since several dependent ports still use the old names of the libraries. [1] https://github.com/DanBloomberg/leptonica/issues/253 Changelog: https://github.com/DanBloomberg/leptonica/compare/1.76.0...1.82.0 PR: 260079 Co-authored-by: Daniel Engberg --- graphics/leptonica/Makefile | 70 ++++++++++++-------------- graphics/leptonica/distinfo | 8 +-- graphics/leptonica/files/patch-cmake-findlib | 55 ++++++++++++++++++++ graphics/leptonica/files/patch-src-Makefile.am | 9 ---- graphics/leptonica/pkg-plist | 14 +++++- 5 files changed, 104 insertions(+), 52 deletions(-) diff --git a/graphics/leptonica/Makefile b/graphics/leptonica/Makefile index 65dcce42271d..e0368744b07b 100644 --- a/graphics/leptonica/Makefile +++ b/graphics/leptonica/Makefile @@ -1,9 +1,13 @@ # Created by: Hiroto Kagotani PORTNAME= leptonica -PORTVERSION= 1.76.0 -PORTREVISION= 1 +DISTVERSION= 1.82.0 CATEGORIES= graphics +MASTER_SITES= https://github.com/DanBloomberg/${PORTNAME}/releases/download/${DISTVERSION}/ \ + http://www.${PORTNAME}.org/source/ + +PATCH_SITES= https://github.com/DanBloomberg/leptonica/commit/ +PATCHFILES= b282ed9482e335439ccc429d4cd1dba517ba0c4d.patch:-p1 MAINTAINER= hiroto.kagotani@gmail.com COMMENT= C library for efficient image processing and image analysis operations @@ -11,52 +15,42 @@ COMMENT= C library for efficient image processing and image analysis operations LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/leptonica-license.txt -CONFLICTS= leptonlib +USES= cmake cpe localbase pkgconfig +USE_LDCONFIG= yes -USES= autoreconf cpe libtool localbase:ldflags pathfix pkgconfig +CONFLICTS= leptonlib -USE_GITHUB= yes -GH_ACCOUNT= DanBloomberg +CMAKE_ON= BUILD_SHARED_LIBS -GNU_CONFIGURE= yes -USE_LDCONFIG= yes -INSTALL_TARGET= install-strip - -OPTIONS_DEFINE= BIN GIF JPEG JPEG2000 PNG TIFF WEBP ZLIB -OPTIONS_DEFAULT= BIN GIF JPEG PNG TIFF WEBP ZLIB +OPTIONS_DEFINE= BIN GIF JPEG JPEG2000 PNG TIFF WEBP +OPTIONS_DEFAULT= BIN GIF JPEG PNG TIFF WEBP OPTIONS_SUB= yes BIN_DESC= Build additional programs -BIN_CONFIGURE_ENABLE= programs + +BIN_CMAKE_BOOL= BUILD_PROG GIF_LIB_DEPENDS= libgif.so:graphics/giflib -GIF_CONFIGURE_WITH= giflib -JPEG_USES= jpeg -JPEG_CONFIGURE_WITH= jpeg +GIF_CMAKE_OFF= CMAKE_DISABLE_FIND_PACKAGE_GIF:BOOL=True JPEG2000_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg -JPEG2000_CONFIGURE_WITH=libopenjpeg +JPEG2000_CMAKE_BOOL= OPENJPEG_SUPPORT +JPEG_USES= jpeg +JPEG_CMAKE_OFF= CMAKE_DISABLE_FIND_PACKAGE_JPEG:BOOL=True PNG_LIB_DEPENDS= libpng.so:graphics/png -PNG_CONFIGURE_WITH= libpng +PNG_CMAKE_OFF= CMAKE_DISABLE_FIND_PACKAGE_PNG:BOOL=True TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff -TIFF_CONFIGURE_WITH= libtiff +TIFF_CMAKE_OFF= CMAKE_DISABLE_FIND_PACKAGE_TIFF WEBP_LIB_DEPENDS= libwebp.so:graphics/webp -WEBP_CONFIGURE_WITH= libwebp -ZLIB_CONFIGURE_WITH= zlib - -TESTS?= generate compare -.if defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING) -BUILD_DEPENDS+= ${LOCALBASE}/bin/gnuplot:math/gnuplot -.endif -#the display portion of the regression tests is interactive, -#and requires the use of xv, xli or xzgv as an image viewer -.if defined(MAINTAINER_MODE) && !defined(BATCH) -TESTS+= display -.endif - -do-test: -.for c in ${TESTS} - @cd ${WRKSRC}/prog; ${SETENV} \ - LD_LIBRARY_PATH="${WRKSRC}/src/.libs:${LOCALBASE}/lib" \ - ${WRKSRC}/prog/alltests_reg ${c} -.endfor +WEBP_CMAKE_BOOL= LIBWEBP_SUPPORT + +post-install: + ${RLN} ${STAGEDIR}${PREFIX}/lib/libleptonica.so.5.4.0 \ + ${STAGEDIR}${PREFIX}/lib/liblept.so + ${RLN} ${STAGEDIR}${PREFIX}/lib/libleptonica.so.5.4.0 \ + ${STAGEDIR}${PREFIX}/lib/liblept.so.5 + ${RLN} ${STAGEDIR}${PREFIX}/lib/libleptonica.so.5.4.0 \ + ${STAGEDIR}${PREFIX}/lib/liblept.so.5.4.0 + ${MKDIR} ${STAGEDIR}${PREFIX}/share/cmake/Modules + ${INSTALL_DATA} ${WRKSRC}/cmake/FindLeptonica.cmake \ + ${STAGEDIR}${PREFIX}/share/cmake/Modules/ .include diff --git a/graphics/leptonica/distinfo b/graphics/leptonica/distinfo index 31fd7266c77f..cd3da62ff805 100644 --- a/graphics/leptonica/distinfo +++ b/graphics/leptonica/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1526412216 -SHA256 (DanBloomberg-leptonica-1.76.0_GH0.tar.gz) = ff98ffef6103cda0e400676f81113a8157569ac0f453c6e03a1a27b305ba25a7 -SIZE (DanBloomberg-leptonica-1.76.0_GH0.tar.gz) = 11557709 +TIMESTAMP = 1641427253 +SHA256 (leptonica-1.82.0.tar.gz) = 155302ee914668c27b6fe3ca9ff2da63b245f6d62f3061c8f27563774b8ae2d6 +SIZE (leptonica-1.82.0.tar.gz) = 14041481 +SHA256 (b282ed9482e335439ccc429d4cd1dba517ba0c4d.patch) = 5a9b7afa4adf0d72338c38ff802f4b312bcee3f06bde697177b905d3c7a60a38 +SIZE (b282ed9482e335439ccc429d4cd1dba517ba0c4d.patch) = 13952 diff --git a/graphics/leptonica/files/patch-cmake-findlib b/graphics/leptonica/files/patch-cmake-findlib new file mode 100644 index 000000000000..825326552380 --- /dev/null +++ b/graphics/leptonica/files/patch-cmake-findlib @@ -0,0 +1,55 @@ +--- cmake/FindLeptonica.cmake.orig 2021-11-28 11:06:50 UTC ++++ cmake/FindLeptonica.cmake +@@ -0,0 +1,52 @@ ++# ++# Find Leptonica ++# ++# Exported variables: ++# Leptonica_FOUND ++# Leptonica_INCLUDE_DIRS ++# Leptonica_LIBRARIES ++# ++# Leptonica_VERSION ++# Leptonica_MAJOR_VERSION ++# Leptonica_MINOR_VERSION ++# ++ ++find_path(Leptonica_INCLUDE_DIR leptonica/allheaders.h ++ HINTS ++ /usr/include ++ /usr/local/include ++ /opt/include ++ /opt/local/include ++ ${Leptonica_DIR}/include ++) ++if(NOT "${Leptonica_INCLUDE_DIR}" EQUAL "Leptonica_INCLUDE_DIR-NOTFOUND") ++ set(Leptonica_INCLUDE_DIRS ${Leptonica_INCLUDE_DIR}/leptonica) ++ file(STRINGS ${Leptonica_INCLUDE_DIRS}/allheaders.h Leptonica_MAJOR_VERSION REGEX "LIBLEPT_MAJOR_VERSION") ++ file(STRINGS ${Leptonica_INCLUDE_DIRS}/allheaders.h Leptonica_MINOR_VERSION REGEX "LIBLEPT_MINOR_VERSION") ++ string(REGEX MATCH "[0-9]+" Leptonica_MAJOR_VERSION ${Leptonica_MAJOR_VERSION}) ++ string(REGEX MATCH "[0-9]+" Leptonica_MINOR_VERSION ${Leptonica_MINOR_VERSION}) ++ set(Leptonica_VERSION ${Leptonica_MAJOR_VERSION}.${Leptonica_MINOR_VERSION}) ++endif() ++ ++find_library(Leptonica_LIBRARY NAMES lept liblept ++ HINTS ++ /usr/lib ++ /usr/local/lib ++ /opt/lib ++ /opt/local/lib ++ ${Leptonica_DIR}/lib ++) ++set(Leptonica_LIBRARIES ${Leptonica_LIBRARY}) ++ ++include(FindPackageHandleStandardArgs) ++ ++find_package_handle_standard_args(Leptonica ++ REQUIRED_VARS ++ Leptonica_INCLUDE_DIRS ++ Leptonica_LIBRARIES ++ VERSION_VAR Leptonica_VERSION ++ FAIL_MESSAGE "Try to set Leptonica_DIR or Leptonica_ROOT" ++) ++ ++mark_as_advanced(Leptonica_INCLUDE_DIRS Leptonica_LIBRARIES) ++ diff --git a/graphics/leptonica/files/patch-src-Makefile.am b/graphics/leptonica/files/patch-src-Makefile.am deleted file mode 100644 index e7cbe0b53f27..000000000000 --- a/graphics/leptonica/files/patch-src-Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ ---- src/Makefile.am.orig 2018-05-02 22:12:19 UTC -+++ src/Makefile.am -@@ -1,5 +1,5 @@ - AM_CFLAGS = $(DEBUG_FLAGS) --AM_CPPFLAGS = $(ZLIB_CFLAGS) $(LIBPNG_CFLAGS) $(JPEG_CFLAGS) $(LIBTIFF_CFLAGS) $(LIBWEBP_CFLAGS) $(LIBJP2K_CFLAGS) -+AM_CPPFLAGS = $(LIBJP2K_CFLAGS) $(ZLIB_CFLAGS) $(LIBPNG_CFLAGS) $(JPEG_CFLAGS) $(LIBTIFF_CFLAGS) $(LIBWEBP_CFLAGS) - - lib_LTLIBRARIES = liblept.la - liblept_la_LIBADD = $(LIBM) $(ZLIB_LIBS) $(LIBPNG_LIBS) $(JPEG_LIBS) $(GIFLIB_LIBS) $(LIBTIFF_LIBS) $(LIBWEBP_LIBS) $(LIBJP2K_LIBS) $(GDI_LIBS) diff --git a/graphics/leptonica/pkg-plist b/graphics/leptonica/pkg-plist index 52d022df9ece..b4f431a774dc 100644 --- a/graphics/leptonica/pkg-plist +++ b/graphics/leptonica/pkg-plist @@ -6,6 +6,7 @@ %%BIN%%bin/converttopdf %%BIN%%bin/converttops %%BIN%%bin/fileinfo +%%BIN%%bin/imagetops %%BIN%%bin/xtractprotos include/leptonica/allheaders.h include/leptonica/alltypes.h @@ -17,10 +18,12 @@ include/leptonica/bmf.h include/leptonica/bmfdata.h include/leptonica/bmp.h include/leptonica/ccbord.h +include/leptonica/colorfill.h include/leptonica/dewarp.h include/leptonica/endianness.h include/leptonica/environ.h include/leptonica/gplot.h +include/leptonica/hashmap.h include/leptonica/heap.h include/leptonica/imageio.h include/leptonica/jbclass.h @@ -38,8 +41,15 @@ include/leptonica/stack.h include/leptonica/stringcode.h include/leptonica/sudoku.h include/leptonica/watershed.h -lib/liblept.a +lib/cmake/leptonica/LeptonicaConfig-version.cmake +lib/cmake/leptonica/LeptonicaConfig.cmake +lib/cmake/leptonica/LeptonicaTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/leptonica/LeptonicaTargets.cmake lib/liblept.so lib/liblept.so.5 -lib/liblept.so.5.0.3 +lib/liblept.so.5.4.0 +lib/libleptonica.so +lib/libleptonica.so.5 +lib/libleptonica.so.5.4.0 libdata/pkgconfig/lept.pc +share/cmake/Modules/FindLeptonica.cmake