Skip to content

Commit

Permalink
update to openjpeg-2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
timmooney authored and alarcher committed Sep 10, 2019
1 parent 5fbe432 commit 28c8532
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 176 deletions.
40 changes: 34 additions & 6 deletions components/library/openjpeg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,36 @@
# CDDL HEADER END
#
# Copyright (c) 2013-2016, Aurelien Larcher. All rights reserved.
# Copyright (c) 2019, Tim Mooney
#
include ../../../make-rules/shared-macros.mk

COMPONENT_NAME= openjpeg
COMPONENT_VERSION= 2.1.2
COMPONENT_SUMMARY= OpenJPEG library : Open source JPEG 2000 codecs
COMPONENT_VERSION= 2.3.1
COMPONENT_FMRI= image/library/openjpeg
COMPONENT_CLASSIFICATION=System/Libraries
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_PROJECT_URL= http://www.openjpeg.org/
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= \
sha256:4ce77b6ef538ef090d9bde1d5eeff8b3069ab56c4906f083475517c2c023dfa7
sha256:63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9
COMPONENT_ARCHIVE_URL= https://github.com/uclouvain/openjpeg/archive/v$(COMPONENT_VERSION).tar.gz
COMPONENT_LICENSE= BSD
COMPONENT_LICENSE_FILE= $(COMPONENT_NAME).license
COMPONENT_SUMMARY= OpenJPEG library : Open source JPEG 2000 codecs
COMPONENT_LICENSE= BSD
COMPONENT_LICENSE_FILE= $(COMPONENT_NAME).license

#
# the test suite requires an extra 600+ MiB download of conformance data.
# if you want to include the conformance data, you need to uncomment
# the COMPONENT_*_1 lines, below:
#
#COMPONENT_NAME_1= openjpeg-data
#COMPONENT_SRC_1= $(COMPONENT_NAME_1)-master
#COMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).zip
#COMPONENT_ARCHIVE_URL_1=https://github.com/uclouvain/$(COMPONENT_NAME_1)/archive/master.zip
#COMPONENT_ARCHIVE_HASH_1= \
# sha256:88cec290f19318785f2b6804e28523f6ae119fdd0c17c9867e9966c68d9461f0
#COMPONENT_LICENSE_1= $(COMPONENT_LICENSE)

include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/cmake.mk
Expand All @@ -56,14 +70,28 @@ CMAKE_OPTIONS+= -DBUILD_JPWL:BOOL=ON
CMAKE_OPTIONS+= -DBUILD_MJ2:BOOL=ON
CMAKE_OPTIONS+= -DBUILD_PKGCONFIG_FILES:BOOL=ON
CMAKE_OPTIONS+= -DBUILD_SHARED_LIBS:BOOL=ON
CMAKE_OPTIONS+= -DBUILD_TESTING:BOOL=OFF
CMAKE_OPTIONS+= -DBUILD_THIRDPARTY:BOOL=ON
# default: no tests:
CMAKE_OPTIONS+= -DBUILD_TESTING:BOOL=OFF
#
# if you've uncommented the COMPONENT_*_1 settings, above, to download
# the conformance data, then you can enable the test suite by uncommenting
# the next two lines:
#
#CMAKE_OPTIONS+= -DBUILD_TESTING:BOOL=ON
#CMAKE_OPTIONS+= -DOPJ_DATA_ROOT:PATH="$(BUILD_DIR_$(BITS))/../../$(COMPONENT_SRC_1)"

build: $(BUILD_32_and_64)

install: $(INSTALL_32_and_64)

# default: no tests
test: $(NO_TESTS)

# if you've enabled the COMPONENT_*_1 and uncommented the CMAKE_OPTIONS to
# BUILD_TESTING and set OPJ_DATA_ROOT, then to run the test suite:
#test: $(TEST_32_and_64)

# Auto-generated dependencies
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math
22 changes: 12 additions & 10 deletions components/library/openjpeg/manifests/sample-manifest.p5m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#

#
# Copyright 2016 <contributor>
# Copyright 2018 <contributor>
#

set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
Expand Down Expand Up @@ -48,9 +48,10 @@ file path=usr/bin/opj_mj2_compress
file path=usr/bin/opj_mj2_decompress
file path=usr/bin/opj_mj2_extract
file path=usr/bin/opj_mj2_wrap
file path=usr/include/openjpeg-2.1/openjpeg.h
file path=usr/include/openjpeg-2.1/opj_config.h
file path=usr/include/openjpeg-2.1/opj_stdint.h
file path=usr/include/openjpeg-2.3/openjpeg.h
file path=usr/include/openjpeg-2.3/opj_config.h
file path=usr/include/openjpeg-2.3/opj_stdint.h
file path=usr/lib/$(MACH64)/libopenjp2.a
link path=usr/lib/$(MACH64)/libopenjp2.so target=libopenjp2.so.7
file path=usr/lib/$(MACH64)/libopenjp2.so.$(COMPONENT_VERSION)
link path=usr/lib/$(MACH64)/libopenjp2.so.7 \
Expand All @@ -67,12 +68,13 @@ link path=usr/lib/$(MACH64)/libopenmj2.so target=libopenmj2.so.7
file path=usr/lib/$(MACH64)/libopenmj2.so.$(COMPONENT_VERSION)
link path=usr/lib/$(MACH64)/libopenmj2.so.7 \
target=libopenmj2.so.$(COMPONENT_VERSION)
file path=usr/lib/$(MACH64)/openjpeg-2.1/OpenJPEGConfig.cmake
file path=usr/lib/$(MACH64)/openjpeg-2.1/OpenJPEGTargets-noconfig.cmake
file path=usr/lib/$(MACH64)/openjpeg-2.1/OpenJPEGTargets.cmake
file path=usr/lib/$(MACH64)/openjpeg-2.3/OpenJPEGConfig.cmake
file path=usr/lib/$(MACH64)/openjpeg-2.3/OpenJPEGTargets-noconfig.cmake
file path=usr/lib/$(MACH64)/openjpeg-2.3/OpenJPEGTargets.cmake
file path=usr/lib/$(MACH64)/pkgconfig/libopenjp2.pc
file path=usr/lib/$(MACH64)/pkgconfig/libopenjpip.pc
file path=usr/lib/$(MACH64)/pkgconfig/libopenjpwl.pc
file path=usr/lib/libopenjp2.a
link path=usr/lib/libopenjp2.so target=libopenjp2.so.7
file path=usr/lib/libopenjp2.so.$(COMPONENT_VERSION)
link path=usr/lib/libopenjp2.so.7 target=libopenjp2.so.$(COMPONENT_VERSION)
Expand All @@ -85,9 +87,9 @@ link path=usr/lib/libopenjpwl.so.7 target=libopenjpwl.so.$(COMPONENT_VERSION)
link path=usr/lib/libopenmj2.so target=libopenmj2.so.7
file path=usr/lib/libopenmj2.so.$(COMPONENT_VERSION)
link path=usr/lib/libopenmj2.so.7 target=libopenmj2.so.$(COMPONENT_VERSION)
file path=usr/lib/openjpeg-2.1/OpenJPEGConfig.cmake
file path=usr/lib/openjpeg-2.1/OpenJPEGTargets-noconfig.cmake
file path=usr/lib/openjpeg-2.1/OpenJPEGTargets.cmake
file path=usr/lib/openjpeg-2.3/OpenJPEGConfig.cmake
file path=usr/lib/openjpeg-2.3/OpenJPEGTargets-noconfig.cmake
file path=usr/lib/openjpeg-2.3/OpenJPEGTargets.cmake
file path=usr/lib/pkgconfig/libopenjp2.pc
file path=usr/lib/pkgconfig/libopenjpip.pc
file path=usr/lib/pkgconfig/libopenjpwl.pc
Expand Down
20 changes: 11 additions & 9 deletions components/library/openjpeg/openjpeg.p5m
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ file path=usr/bin/opj_mj2_compress
file path=usr/bin/opj_mj2_decompress
file path=usr/bin/opj_mj2_extract
file path=usr/bin/opj_mj2_wrap
file path=usr/include/openjpeg-2.1/openjpeg.h
file path=usr/include/openjpeg-2.1/opj_config.h
file path=usr/include/openjpeg-2.1/opj_stdint.h
file path=usr/include/openjpeg-2.3/openjpeg.h
file path=usr/include/openjpeg-2.3/opj_config.h
file path=usr/include/openjpeg-2.3/opj_stdint.h
# skip libopenjp2.a
link path=usr/lib/$(MACH64)/libopenjp2.so target=libopenjp2.so.7
file path=usr/lib/$(MACH64)/libopenjp2.so.$(COMPONENT_VERSION)
link path=usr/lib/$(MACH64)/libopenjp2.so.7 \
Expand All @@ -69,12 +70,13 @@ link path=usr/lib/$(MACH64)/libopenmj2.so target=libopenmj2.so.7
file path=usr/lib/$(MACH64)/libopenmj2.so.$(COMPONENT_VERSION)
link path=usr/lib/$(MACH64)/libopenmj2.so.7 \
target=libopenmj2.so.$(COMPONENT_VERSION)
file path=usr/lib/$(MACH64)/openjpeg-2.1/OpenJPEGConfig.cmake
file path=usr/lib/$(MACH64)/openjpeg-2.1/OpenJPEGTargets-noconfig.cmake
file path=usr/lib/$(MACH64)/openjpeg-2.1/OpenJPEGTargets.cmake
file path=usr/lib/$(MACH64)/openjpeg-2.3/OpenJPEGConfig.cmake
file path=usr/lib/$(MACH64)/openjpeg-2.3/OpenJPEGTargets-noconfig.cmake
file path=usr/lib/$(MACH64)/openjpeg-2.3/OpenJPEGTargets.cmake
file path=usr/lib/$(MACH64)/pkgconfig/libopenjp2.pc
file path=usr/lib/$(MACH64)/pkgconfig/libopenjpip.pc
file path=usr/lib/$(MACH64)/pkgconfig/libopenjpwl.pc
# skip libopenjp2.a
link path=usr/lib/libopenjp2.so target=libopenjp2.so.7
file path=usr/lib/libopenjp2.so.$(COMPONENT_VERSION)
link path=usr/lib/libopenjp2.so.7 target=libopenjp2.so.$(COMPONENT_VERSION)
Expand All @@ -87,9 +89,9 @@ link path=usr/lib/libopenjpwl.so.7 target=libopenjpwl.so.$(COMPONENT_VERSION)
link path=usr/lib/libopenmj2.so target=libopenmj2.so.7
file path=usr/lib/libopenmj2.so.$(COMPONENT_VERSION)
link path=usr/lib/libopenmj2.so.7 target=libopenmj2.so.$(COMPONENT_VERSION)
file path=usr/lib/openjpeg-2.1/OpenJPEGConfig.cmake
file path=usr/lib/openjpeg-2.1/OpenJPEGTargets-noconfig.cmake
file path=usr/lib/openjpeg-2.1/OpenJPEGTargets.cmake
file path=usr/lib/openjpeg-2.3/OpenJPEGConfig.cmake
file path=usr/lib/openjpeg-2.3/OpenJPEGTargets-noconfig.cmake
file path=usr/lib/openjpeg-2.3/OpenJPEGTargets.cmake
file path=usr/lib/pkgconfig/libopenjp2.pc
file path=usr/lib/pkgconfig/libopenjpip.pc
file path=usr/lib/pkgconfig/libopenjpwl.pc
Expand Down
78 changes: 43 additions & 35 deletions components/library/openjpeg/patches/openjpeg-01-index_t.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
--- ./src/lib/openjpip/openjpip.h.orig 2015-02-11 06:20:47.740450785 +0000
+++ ./src/lib/openjpip/openjpip.h 2015-02-11 06:24:12.124327493 +0000
@@ -276,23 +276,20 @@

openjpip.h and openjpip.c can't use index_t as a convenience typedef,
because OI inherited index_t in sys/types.h from Solaris. Adjust to
use the underlying index_param_t instead.

diff -ur openjpeg-2.3.1.orig/src/lib/openjpip/openjpip.h openjpeg-2.3.1/src/lib/openjpip/openjpip.h
--- openjpeg-2.3.1.orig/src/lib/openjpip/openjpip.h 2019-04-02 07:45:15.000000000 +0000
+++ openjpeg-2.3.1/src/lib/openjpip/openjpip.h 2019-06-10 18:57:32.089518326 +0000
@@ -281,23 +281,20 @@
* test the format of index (cidx) box in JP2 file
*/

Expand All @@ -9,66 +15,68 @@
-
/**
* Parse JP2 file and get index information from cidx box inside
*
*
* @param[in] fd file descriptor of the JP2 file
* @return pointer to the generated structure of index parameters
*/
-OPJ_API index_t * OPJ_CALLCONV get_index_from_JP2file( int fd);
+OPJ_API index_param_t * OPJ_CALLCONV get_index_from_JP2file( int fd);
-OPJ_API index_t * OPJ_CALLCONV get_index_from_JP2file(int fd);
+OPJ_API index_param_t * OPJ_CALLCONV get_index_from_JP2file(int fd);

/**
* Destroy index parameters
*
* @param[in,out] idx addressof the index pointer
*/
-OPJ_API void OPJ_CALLCONV destroy_index( index_t **idx);
+OPJ_API void OPJ_CALLCONV destroy_index( index_param_t **idx);
-OPJ_API void OPJ_CALLCONV destroy_index(index_t **idx);
+OPJ_API void OPJ_CALLCONV destroy_index(index_param_t **idx);


/**
@@ -300,7 +297,7 @@
@@ -305,7 +302,7 @@
*
* @param[in] index index parameters
*/
-OPJ_API void OPJ_CALLCONV output_index( index_t *index);
+OPJ_API void OPJ_CALLCONV output_index( index_param_t *index);
-OPJ_API void OPJ_CALLCONV output_index(index_t *index);
+OPJ_API void OPJ_CALLCONV output_index(index_param_t *index);

#endif /*SERVER*/

--- ./src/lib/openjpip/openjpip.c.orig 2015-02-11 06:20:19.227751378 +0000
+++ ./src/lib/openjpip/openjpip.c 2015-02-11 06:23:37.274451134 +0000
@@ -409,7 +409,7 @@
opj_free( *dec);
diff -ur openjpeg-2.3.1.orig/src/lib/openjpip/openjpip.c openjpeg-2.3.1/src/lib/openjpip/openjpip.c
--- openjpeg-2.3.1.orig/src/lib/openjpip/openjpip.c 2019-04-02 07:45:15.000000000 +0000
+++ openjpeg-2.3.1/src/lib/openjpip/openjpip.c 2019-06-10 18:58:14.867415880 +0000
@@ -443,7 +443,7 @@
opj_free(*dec);
}

-index_t * OPJ_CALLCONV get_index_from_JP2file( int fd)
+index_param_t * OPJ_CALLCONV get_index_from_JP2file( int fd)
-index_t * OPJ_CALLCONV get_index_from_JP2file(int fd)
+index_param_t * OPJ_CALLCONV get_index_from_JP2file(int fd)
{
char *data;
@@ -437,12 +437,12 @@
return parse_jp2file( fd);
char *data;

@@ -471,12 +471,12 @@
return parse_jp2file(fd);
}

-void OPJ_CALLCONV destroy_index( index_t **idx)
+void OPJ_CALLCONV destroy_index( index_param_t **idx)
-void OPJ_CALLCONV destroy_index(index_t **idx)
+void OPJ_CALLCONV destroy_index(index_param_t **idx)
{
delete_index( idx);
delete_index(idx);
}

-void OPJ_CALLCONV output_index( index_t *index)
+void OPJ_CALLCONV output_index( index_param_t *index)
-void OPJ_CALLCONV output_index(index_t *index)
+void OPJ_CALLCONV output_index(index_param_t *index)
{
print_index( *index);
print_index(*index);
}
--- ./src/bin/jpip/opj_jpip_test.c.orig 2015-02-11 06:21:44.574812169 +0000
+++ ./src/bin/jpip/opj_jpip_test.c 2015-02-11 06:22:17.156907327 +0000
diff -ur openjpeg-2.3.1.orig/src/bin/jpip/opj_jpip_test.c openjpeg-2.3.1/src/bin/jpip/opj_jpip_test.c
--- openjpeg-2.3.1.orig/src/bin/jpip/opj_jpip_test.c 2019-04-02 07:45:15.000000000 +0000
+++ openjpeg-2.3.1/src/bin/jpip/opj_jpip_test.c 2019-06-10 18:58:50.711326186 +0000
@@ -52,7 +52,7 @@
main(int argc, char *argv[])
{
int fd;
- index_t *jp2idx;
+ index_param_t *jp2idx;
if( argc < 2 ) return 1;

if( (fd = open( argv[1], O_RDONLY)) == -1){
int fd;
- index_t *jp2idx;
+ index_param_t *jp2idx;
if (argc < 2) {
return 1;
}
Loading

0 comments on commit 28c8532

Please sign in to comment.