Date: Mon, 18 Jul 2022 15:26:15 GMT From: =?utf-8?Q?Fernando=20Apestegu=C3=ADa?= <fernape@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: cd714f2f4e30 - main - graphics/leptonica: fix build with openjpeg 2.5.0 Message-ID: <202207181526.26IFQF1j001466@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=cd714f2f4e30a136df40f77eafd79448ca11c90a commit cd714f2f4e30a136df40f77eafd79448ca11c90a Author: VVD <vvd@unislabs.com> AuthorDate: 2022-07-18 08:54:30 +0000 Commit: Fernando ApesteguĂa <fernape@FreeBSD.org> CommitDate: 2022-07-18 15:23:17 +0000 graphics/leptonica: fix build with openjpeg 2.5.0 ChangeLog: https://github.com/DanBloomberg/leptonica/issues/623 Fix detection of openjpeg 2.5.0 PR: 264684 Reported by: vvd@unislabs.com Approved by: hiroto.kagotani@gmail.com (maintainer, timeout > 1 month) --- graphics/leptonica/files/patch-openjpeg-2.5 | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/graphics/leptonica/files/patch-openjpeg-2.5 b/graphics/leptonica/files/patch-openjpeg-2.5 new file mode 100644 index 000000000000..4b4e95a9457e --- /dev/null +++ b/graphics/leptonica/files/patch-openjpeg-2.5 @@ -0,0 +1,59 @@ +diff -u CMakeLists.txt.orig CMakeLists.txt +--- CMakeLists.txt.orig ++++ CMakeLists.txt +@@ -141,6 +141,17 @@ + set(HAVE_LIBJP2K 1) + endif() + endif() ++ if(NOT JP2K) ++ find_path(JP2K_INCLUDE_DIR /openjpeg-2.5/openjpeg.h) ++ find_library(JP2K_LIBRARY NAMES openjp2) ++ if (JP2K_INCLUDE_DIR AND JP2K_LIBRARY) ++ set(JP2K 1) ++ set(JP2K_FOUND TRUE) ++ set(JP2K_LIBRARIES ${JP2K_LIBRARY}) ++ set(JP2K_INCLUDE_DIRS ${JP2K_INCLUDE_DIR}) ++ set(HAVE_LIBJP2K 1) ++ endif() ++ endif() + set(libs_private "${libs_private} -lopenjp2") + endif() + endif() +diff -u cmake/Configure.cmake.orig cmake/Configure.cmake +--- cmake/Configure.cmake.orig ++++ cmake/Configure.cmake +@@ -69,6 +69,7 @@ + openjpeg-2.2/openjpeg.h + openjpeg-2.3/openjpeg.h + openjpeg-2.4/openjpeg.h ++ openjpeg-2.5/openjpeg.h + ) + check_includes(include_files_list) + +@@ -146,7 +147,9 @@ + /* Define to 1 if you have zlib. */ + #cmakedefine HAVE_LIBZ 1 + +-#if defined(HAVE_OPENJPEG_2_4_OPENJPEG_H) ++#if defined(HAVE_OPENJPEG_2_5_OPENJPEG_H) ++#define LIBJP2K_HEADER <openjpeg-2.5/openjpeg.h> ++#elif defined(HAVE_OPENJPEG_2_4_OPENJPEG_H) + #define LIBJP2K_HEADER <openjpeg-2.4/openjpeg.h> + #elif defined(HAVE_OPENJPEG_2_3_OPENJPEG_H) + #define LIBJP2K_HEADER <openjpeg-2.3/openjpeg.h> +diff -u config/config.h.in.orig config/config.h.in +--- config/config.h.in.orig ++++ config/config.h.in +@@ -51,6 +51,12 @@ + /* Define to 1 if you have the <openjpeg-2.3/openjpeg.h> header file. */ + #undef HAVE_OPENJPEG_2_3_OPENJPEG_H + ++/* Define to 1 if you have the <openjpeg-2.4/openjpeg.h> header file. */ ++#undef HAVE_OPENJPEG_2_4_OPENJPEG_H ++ ++/* Define to 1 if you have the <openjpeg-2.5/openjpeg.h> header file. */ ++#undef HAVE_OPENJPEG_2_5_OPENJPEG_H ++ + /* Define to 1 if you have the <stdint.h> header file. */ + #undef HAVE_STDINT_H +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207181526.26IFQF1j001466>