graphics/openjp2: update to 2.5.0.

see https://github.com/uclouvain/openjpeg/blob/v2.5.0/CHANGELOG.md#v250-2022-05-13

ok sthen@
This commit is contained in:
landry 2022-06-28 08:54:11 +00:00
parent e1348824fc
commit 55b9fae71d
7 changed files with 54 additions and 26 deletions

View File

@ -2,10 +2,10 @@ COMMENT= open-source JPEG 2000 codec library
GH_ACCOUNT= uclouvain
GH_PROJECT= openjpeg
GH_TAGNAME= v2.4.0
GH_TAGNAME= v2.5.0
DISTNAME= openjp2-${GH_TAGNAME:S/v//}
SHARED_LIBS += openjp2 4.0
SHARED_LIBS += openjp2 5.0
CATEGORIES= graphics

View File

@ -1,2 +1,2 @@
SHA256 (openjp2-2.4.0.tar.gz) = hwK6aLRCZX8RqusrM4RDyo1fuVsNhFdXlop74x738W0=
SIZE (openjp2-2.4.0.tar.gz) = 2233229
SHA256 (openjp2-2.5.0.tar.gz) = AzOAbWrezG96kSQ7K4Of9NIFOCNjTU9u16WbyHQJEio=
SIZE (openjp2-2.5.0.tar.gz) = 1867111

View File

@ -1,7 +1,7 @@
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -108,7 +108,10 @@ endif()
@@ -109,7 +109,10 @@ endif()
option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
string(TOLOWER ${PROJECT_NAME} projectname)

View File

@ -1,7 +1,7 @@
Index: src/bin/jp2/convert.c
--- src/bin/jp2/convert.c.orig
+++ src/bin/jp2/convert.c
@@ -664,7 +664,7 @@ static int tga_readheader(FILE *fp, unsigned int *bits
@@ -662,7 +662,7 @@ static int tga_readheader(FILE *fp, unsigned int *bits
return 1;
}

View File

@ -1,12 +0,0 @@
Index: src/lib/openmj2/opj_malloc.h
--- src/lib/openmj2/opj_malloc.h.orig
+++ src/lib/openmj2/opj_malloc.h
@@ -86,7 +86,7 @@ Allocate memory aligned to a 16 byte boundary
#elif defined(__FreeBSD__)
#define HAVE_POSIX_MEMALIGN
/* Linux x86_64 and OSX always align allocations to 16 bytes */
-#elif !defined(__amd64__) && !defined(__APPLE__) && !defined(_AIX)
+#elif !defined(__amd64__) && !defined(__APPLE__) && !defined(_AIX) && !defined(__OpenBSD__)
#define HAVE_MEMALIGN
#include <malloc.h>
#endif

View File

@ -0,0 +1,40 @@
https://github.com/uclouvain/openjpeg/pull/1431
Index: thirdparty/CMakeLists.txt
--- thirdparty/CMakeLists.txt.orig
+++ thirdparty/CMakeLists.txt
@@ -89,8 +89,15 @@ else(BUILD_THIRDPARTY)
message(STATUS "Your system seems to have a TIFF lib available, we will use it")
set(OPJ_HAVE_TIFF_H 1 PARENT_SCOPE)
set(OPJ_HAVE_LIBTIFF 1 PARENT_SCOPE)
- set(TIFF_LIBNAME ${TIFF_LIBRARIES} ${PC_TIFF_STATIC_LIBRARIES} PARENT_SCOPE)
- set(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR} ${PC_TIFF_STATIC_INCLUDE_DIRS} PARENT_SCOPE)
+ if(BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
+ # Probably incorrect as PC_TIFF_STATIC_LIBRARIES will lack the path to the libraries
+ # and will only work if they are in system directories
+ set(TIFF_LIBNAME ${PC_TIFF_STATIC_LIBRARIES} PARENT_SCOPE)
+ set(TIFF_INCLUDE_DIRNAME ${PC_TIFF_STATIC_INCLUDE_DIRS} PARENT_SCOPE)
+ else()
+ set(TIFF_LIBNAME ${TIFF_LIBRARIES} PARENT_SCOPE)
+ set(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR} PARENT_SCOPE)
+ endif()
else(TIFF_FOUND) # not found
set(OPJ_HAVE_TIFF_H 0 PARENT_SCOPE)
set(OPJ_HAVE_LIBTIFF 0 PARENT_SCOPE)
@@ -124,8 +131,15 @@ else(BUILD_THIRDPARTY)
message(STATUS "Your system seems to have a LCMS2 lib available, we will use it")
set(OPJ_HAVE_LCMS2_H 1 PARENT_SCOPE)
set(OPJ_HAVE_LIBLCMS2 1 PARENT_SCOPE)
- set(LCMS_LIBNAME ${LCMS2_LIBRARIES} ${PC_LCMS2_STATIC_LIBRARIES} PARENT_SCOPE)
- set(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIRS} ${PC_LCMS2_STATIC_INCLUDE_DIRS} PARENT_SCOPE)
+ if(BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
+ # Probably incorrect as PC_LCMS2_STATIC_LIBRARIES will lack the path to the libraries
+ # and will only work if they are in system directories
+ set(LCMS_LIBNAME ${PC_LCMS2_STATIC_LIBRARIES} PARENT_SCOPE)
+ set(LCMS_INCLUDE_DIRNAME ${PC_LCMS2_STATIC_INCLUDE_DIRS} PARENT_SCOPE)
+ else()
+ set(LCMS_LIBNAME ${LCMS2_LIBRARIES} PARENT_SCOPE)
+ set(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIRS} PARENT_SCOPE)
+ endif()
else(LCMS2_FOUND) # not found lcms2
# try to find LCMS
find_package(LCMS)

View File

@ -2,16 +2,16 @@
@bin bin/opj_compress
@bin bin/opj_decompress
@bin bin/opj_dump
include/openjpeg-2.4/
include/openjpeg-2.4/openjpeg.h
include/openjpeg-2.4/opj_config.h
include/openjpeg-2.4/opj_stdint.h
include/openjpeg-2.5/
include/openjpeg-2.5/openjpeg.h
include/openjpeg-2.5/opj_config.h
include/openjpeg-2.5/opj_stdint.h
@static-lib lib/libopenjp2.a
@lib lib/libopenjp2.so.${LIBopenjp2_VERSION}
lib/openjpeg-2.4/
lib/openjpeg-2.4/OpenJPEGConfig.cmake
lib/openjpeg-2.4/OpenJPEGTargets${MODCMAKE_BUILD_SUFFIX}
lib/openjpeg-2.4/OpenJPEGTargets.cmake
lib/openjpeg-2.5/
lib/openjpeg-2.5/OpenJPEGConfig.cmake
lib/openjpeg-2.5/OpenJPEGTargets${MODCMAKE_BUILD_SUFFIX}
lib/openjpeg-2.5/OpenJPEGTargets.cmake
lib/pkgconfig/libopenjp2.pc
@man man/man1/opj_compress.1
@man man/man1/opj_decompress.1