From 3560d2b775e409f36c40c664f508e67c8f3837c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Mon, 25 Oct 2021 12:36:42 +0200 Subject: [PATCH] Remove unmaintained JPWL, JP3D and MJ2 Since https://github.com/uclouvain/openjpeg/pull/1350/commits/85a87cd505f37027c4b74363b529a1e166e32651 the components JPWL, JP3d and MJ2 are not maintained. As win32 build was facing an issue with mj2 and lrintf inline, see https://github.com/uclouvain/openjpeg/pull/1339 Better to remove these useles componentes who will be removed in v2.5.0. --- meson.build | 28 ++---------------- meson_options.txt | 3 -- src/bin/jp3d/meson.build | 21 -------------- src/bin/jpwl/meson.build | 27 ----------------- src/bin/meson.build | 10 +------ src/bin/mj2/meson.build | 17 ----------- src/lib/meson.build | 27 ++++++++--------- src/lib/openjp3d/meson.build | 39 ------------------------- src/lib/openjpwl/meson.build | 48 ------------------------------- src/lib/openmj2/meson.build | 45 ----------------------------- wrapping/java/openjp2/meson.build | 3 -- 11 files changed, 17 insertions(+), 251 deletions(-) delete mode 100644 src/bin/jp3d/meson.build delete mode 100644 src/bin/jpwl/meson.build delete mode 100644 src/bin/mj2/meson.build delete mode 100644 src/lib/openjp3d/meson.build delete mode 100644 src/lib/openjpwl/meson.build delete mode 100644 src/lib/openmj2/meson.build diff --git a/meson.build b/meson.build index 61d24d1ea..c7745b9e6 100644 --- a/meson.build +++ b/meson.build @@ -67,7 +67,7 @@ subdir('src/lib') #----------------------------------------------------------------------------- # Build Applications -if get_option('build_codec') or get_option('build_mj2') +if get_option('build_codec') # OFF: It will only build 3rd party libs if they are not found on the system # ON: 3rd party libs will ALWAYS be build, and used subdir('src/bin') @@ -110,31 +110,7 @@ endif #----------------------------------------------------------------------------- # pkgconfig support -if get_option('build_pkgconfig_files') - pkgconfig = import('pkgconfig') - pkgconfig.generate(openjp2_lib, name: 'libopenjp2', - description: 'JPEG2000 library (Part 1 and 2)', - version: meson.project_version(), - libraries: openjp2_lib) - if get_option('build_jpwl') - pkgconfig.generate(openjpwl_lib, name: 'libopenjpwl', - description: 'JPEG2000 Wireless library (Part 11)', - version: meson.project_version(), - libraries: openjpwl_lib) - endif - if get_option('build_jpip') - pkgconfig.generate(openjpip_lib, name: 'libopenjpip', - description: 'JPEG2000 Interactivity tools, APIs and protocols (Part 9)', - version: meson.project_version(), - libraries: openjpip_lib) - endif - if get_option('build_jp3d') - pkgconfig.generate(openjp3d_lib, name: 'libopenjp3d', - description: 'JPEG2000 Extensions for three-dimensional data (Part 10)', - version: meson.project_version(), - libraries: openjp3d_lib) - endif -endif + #----------------------------------------------------------------------------- # build our version of astyle #with_astyle = ['FALSE', 'CACHE', 'BOOL', 'If you plan to contribute you should reindent with scripts/prepare-commit.sh (using 'our' astyle)'] diff --git a/meson_options.txt b/meson_options.txt index eec2382d0..7332f3c02 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -5,13 +5,10 @@ option('opj_use_thread', type : 'boolean', value : true, description : 'Build wi option('build_luts_generator', type : 'boolean', value : false, description : 'Build utility to generate t1_luts.h') option('build_unit_tests', type : 'boolean', value : false, description : 'Build unit tests (bench_dwt, test_sparse_array, etc..)') option('build_codec', type : 'boolean', value : true, description : 'Build the CODEC executables') -option('build_mj2', type : 'boolean', value : false, description : 'Build the MJ2 executables.') -option('build_jpwl', type : 'boolean', value : false, description : 'Build the JPWL library and executables') option('build_jpip', type : 'boolean', value : false, description : 'Build the JPIP library and executables.') option('build_jpip_server', type : 'boolean', value : false, description : 'Build the JPIP server.') option('build_viewer', type : 'boolean', value : false, description : 'Build the OPJViewer executable (C++)') option('build_java', type : 'boolean', value : false, description : 'Build the openjpeg jar (Java)') -option('build_jp3d', type : 'boolean', value : false, description : 'Build the JP3D comp') option('build_testing', type : 'boolean', value : false, description : 'Build the tests.') option('build_pkgconfig_files', type : 'boolean', value : true, description : 'Build and install pkg-config files') option('with_astyle', type : 'boolean', value : false, description : 'Build with astyle') diff --git a/src/bin/jp3d/meson.build b/src/bin/jp3d/meson.build deleted file mode 100644 index f6295b646..000000000 --- a/src/bin/jp3d/meson.build +++ /dev/null @@ -1,21 +0,0 @@ -# Build the demo app, small examples -# First thing define the common source: -common_srcs = ['convert.c' - ,'../common/opj_getopt.c'] - -inc_dirs = include_directories('../../lib/openjp2', '../../lib/openjp3d', '../common') - -openjp3d_c_args = [] - -# Loop over all executables: -foreach exe : ['opj_jp3d_compress', 'opj_jp3d_decompress'] - exe_c = exe + '.c' - exe_src = [exe_c] + common_srcs - exe_deps = [libopenjp3d_dep, zlib_dep, rt_dep, m_dep] - exe_exe = executable (exe, exe_src - , c_args : openjp3d_c_args - , include_directories : inc_dirs - , dependencies: exe_deps - , install: true - ) -endforeach diff --git a/src/bin/jpwl/meson.build b/src/bin/jpwl/meson.build deleted file mode 100644 index b67e4f4dc..000000000 --- a/src/bin/jpwl/meson.build +++ /dev/null @@ -1,27 +0,0 @@ -# jpwl apps -# First thing define the common source: -common_srcs = ['convert.c' - , 'index.c' - , '../common/color.c' - , '../common/opj_getopt.c'] -# Headers file are located here: -inc_dirs = include_directories('../../lib/openmj2', '../../lib/openjp2', '../common') - -openjpwl_c_args = [] - - -openjpwl_c_args += ['-DOPJ_USE_LEGACY', '-DUSE_JPWL'] - - -foreach exe : ['decompress', 'compress'] - jpwl_exe = 'opj_jpwl_' + exe - exe_c = jpwl_exe + '.c' - exe_src = [exe_c] + common_srcs - exe_deps = [libopenjpwl_dep, libpng_dep, libtiff_dep, liblcms2_dep, m_dep, zlib_dep ] - exe_exe = executable (exe, exe_src - , c_args : openjpwl_c_args - , include_directories : inc_dirs - , dependencies: exe_deps - , install: true - ) -endforeach diff --git a/src/bin/meson.build b/src/bin/meson.build index 5b915711e..37f4d9146 100644 --- a/src/bin/meson.build +++ b/src/bin/meson.build @@ -25,17 +25,9 @@ subdir('common') # Part 1 & 2: subdir('jp2') # optionals components: -if get_option('build_jpwl') - subdir('jpwl') -endif -if get_option('build_mj2') - subdir('mj2') -endif + if get_option('build_jpip') subdir('jpip') endif -if get_option('build_jp3d') - subdir('jp3d') -endif # wx apps: subdir('wx') diff --git a/src/bin/mj2/meson.build b/src/bin/mj2/meson.build deleted file mode 100644 index 9296ea94f..000000000 --- a/src/bin/mj2/meson.build +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for the MJ2 codecs of the OpenJPEG library: frames_to_mj2, mj2_to_frames, extract_j2k_from_mj2 and wrap_j2k_in_mj2 -common_srcs = ['../common/opj_getopt.c'] -inc_dirs = include_directories('../../lib/openmj2','../../lib/openjp2', '../common') - -foreach exe : ['opj_mj2_wrap', 'opj_mj2_extract', 'opj_mj2_decompress', 'opj_mj2_compress'] - jpwl_exe = 'opj_jpwl_${exe}' - exe_c = exe + '.c' - exe_src = [exe_c] + common_srcs - c_args = ['-DUSE_MJ2', '-DUSE_JPWL'] - exe_deps = [common_dep, libopenjp2_dep, libopenmj2_dep, liblcms2_dep, m_dep] - exe_exe = executable (exe, exe_src - , c_args : c_args - , include_directories : inc_dirs - , dependencies: exe_deps - , install: true - ) -endforeach diff --git a/src/lib/meson.build b/src/lib/meson.build index 3a9a4a92c..5e008a657 100644 --- a/src/lib/meson.build +++ b/src/lib/meson.build @@ -1,21 +1,22 @@ # source code for openjpeg project: # Part 1 & 2: subdir('openjp2') -# optionals components: -if get_option('build_jpwl') - subdir('openjpwl') - if get_option('build_mj2') - subdir('openmj2') - endif -else - if get_option('build_mj2') - message('WARNING: you need to enable JPWL to get MJ2') - endif -endif +# optionals components: if get_option('build_jpip') subdir('openjpip') endif -if get_option('build_jp3d') - subdir('openjp3d') + +if get_option('build_pkgconfig_files') + pkgconfig = import('pkgconfig') + pkgconfig.generate(openjp2_lib, name: 'libopenjp2', + description: 'JPEG2000 library (Part 1 and 2)', + version: meson.project_version(), + libraries: openjp2_lib) + if get_option('build_jpip') + pkgconfig.generate(openjpip_lib, name: 'libopenjpip', + description: 'JPEG2000 Interactivity tools, APIs and protocols (Part 9)', + version: meson.project_version(), + libraries: openjpip_lib) + endif endif diff --git a/src/lib/openjp3d/meson.build b/src/lib/openjp3d/meson.build deleted file mode 100644 index c14bc3e02..000000000 --- a/src/lib/openjp3d/meson.build +++ /dev/null @@ -1,39 +0,0 @@ -# Defines the source code for the library -openjp3d_srcs = ['bio.c' - , 'cio.c' - , 'dwt.c' - , 'event.c' - , 'jp3d.c' - , 'jp3d_lib.c' - , 'mct.c' - , 'mqc.c' - , 'openjp3d.c' - , 'pi.c' - , 'raw.c' - , 't1.c' - , 't1_3d.c' - , 't2.c' - , 'tcd.c' - , 'tgt.c' - , 'volume.c' - ] -openjp3d_headers = ['openjp3d.h'] - -inc_dirs = include_directories('.', '../openjp2') - -openjp3d_args = [] - -# build jp3d lib: -openjp3d_lib = library('openjp3d', openjp3d_srcs, - c_args : openjp3d_args, - include_directories : inc_dirs, - dependencies : [m_dep], - install : true, - version : meson.project_version()) - -incdir = include_directories('.') - -libopenjp3d_dep = declare_dependency(link_with : openjp3d_lib, - include_directories : inc_dirs) - -install_headers(openjp3d_headers) diff --git a/src/lib/openjpwl/meson.build b/src/lib/openjpwl/meson.build deleted file mode 100644 index 2300e8b60..000000000 --- a/src/lib/openjpwl/meson.build +++ /dev/null @@ -1,48 +0,0 @@ -# Makefile for the main JPWL OpenJPEG codecs: JPWL_ j2k_to_image and JPWL_image_to_j2k - -openjpeg_srcs = ['../openmj2/bio.c' - , '../openmj2/cio.c' - , '../openmj2/dwt.c' - , '../openmj2/event.c' - , '../openmj2/image.c' - , '../openmj2/j2k.c' - , '../openmj2/jp2.c' - , '../openmj2/jpt.c' - , '../openmj2/mct.c' - , '../openmj2/mqc.c' - , '../openmj2/openjpeg.c' - , '../openmj2/j2k_lib.c' - , '../openmj2/pi.c' - , '../openmj2/raw.c' - , '../openmj2/t1.c' - , '../openmj2/t2.c' - , '../openmj2/tcd.c' - , '../openmj2/tgt.c'] - -jpwl_srcs = ['crc.c', 'jpwl.c', 'jpwl_lib.c', 'rs.c'] - -jpwl_headers = ['jpwl.h'] - -inc_dirs = include_directories('.', '..', '../openmj2', '../openjp2', '../openjpwl') - -openjpwl_c_args = ['-DUSE_JPWL'] -openjpwl_link_args = [] - -if ['darwin', 'ios'].contains(host_system) - openjpwl_c_args += ['-fno-common'] - # set_source_files_properties(['rs.c', 'PROPERTIES', 'COMPILE_FLAGS', '-fno-common']) -endif - - -openjpwl_lib = library('openjpwl', openjpeg_srcs + jpwl_srcs, - c_args : openjpwl_c_args, - link_args : openjpwl_link_args, - install : true, - dependencies : [m_dep], - include_directories : inc_dirs, - version : meson.project_version() - ) -libopenjpwl_dep = declare_dependency(link_with : openjpwl_lib, - include_directories : inc_dirs) - -install_headers(jpwl_headers) diff --git a/src/lib/openmj2/meson.build b/src/lib/openmj2/meson.build deleted file mode 100644 index c984aa3ec..000000000 --- a/src/lib/openmj2/meson.build +++ /dev/null @@ -1,45 +0,0 @@ -openmj2_srcs = ['mj2.c' - , 'mj2_convert.c' - , 'j2k_lib.c' - , 'cio.c' - , 'jp2.c' - , 'j2k.c' - , 'tcd.c' - , 'mct.c' - , 't1.c' - , 't2.c' - , 'pi.c' - , 'bio.c' - , 'mqc.c' - , 'tgt.c' - , 'dwt.c' - , 'event.c' - , 'image.c' - , 'jpt.c' - , 'raw.c' - , 'openjpeg.c'] - - -openmj2_headers = ['opj_includes.h', 'openjpeg.h'] - -inc_dirs = include_directories('.', '../openjp2', '../openjpwl') - -openmj2_c_args = ['-DUSE_JPWL'] -openmj2_link_args = [] - - -# build mj2 lib: -openmj2_lib = library('openmj2', - openmj2_srcs, - c_args : openmj2_c_args, - link_args : openmj2_link_args, - install : true, - dependencies : [libopenjpwl_dep, m_dep], - include_directories : inc_dirs, - version : meson.project_version() - ) - -libopenmj2_dep = declare_dependency(link_with : openmj2_lib, - include_directories : inc_dirs) - -install_headers(openmj2_headers) diff --git a/wrapping/java/openjp2/meson.build b/wrapping/java/openjp2/meson.build index 3c7930e58..61acce93b 100644 --- a/wrapping/java/openjp2/meson.build +++ b/wrapping/java/openjp2/meson.build @@ -10,9 +10,6 @@ # Java module should not have a SONAME: # set_property(['TARGET', 'openjpegjni', 'PROPERTY', 'NO_SONAME', '1']) # FIXME (need to use old API): - if get_option('build_mj2') - # target_link_libraries(['openjpegjni', 'openmj2']) - endif # target_link_libraries(['openjpegjni', png_libname, tiff_libname, lcms_libname, z_libname]) if host_system == 'linux' # target_link_libraries(['openjpegjni', 'm'])