GraphicsMagick: jp2/* Update lib jasper to 2.0.33. Code cleanly ...
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.38431.1672615810.1567.graphicsmagick-commit@lists.sourceforge.net> |
changeset ddaea7fc4a5e in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=ddaea7fc4a5e summary: jp2/* Update lib jasper to 2.0.33. Code cleanly compilles, but there is still some problem. Will be solved later. diffstat: ChangeLog | 7 + VisualMagick/tests/runtest.bat | 2 +- jp2/CMakeLists.txt | 222 +- jp2/INSTALL | 73 +- jp2/NEWS | 200 + jp2/README | 13 +- jp2/appveyor.yml | 34 + jp2/build/appveyor/build.bat | 52 + jp2/build/cmake/modules/JasOpenGL.cmake | 54 + jp2/build/cmake/modules/Sanitizers.cmake | 5 +- jp2/build/extract_release_notes | 21 + jp2/build/github/deploy_gh_pages | 326 ++ jp2/build/github/prebuild | 19 + jp2/build/jasper.pc.in | 8 +- jp2/build/make_dist | 129 + jp2/build/make_release | 154 + jp2/build/my_build | 113 + jp2/build/travis/CMakeLists.txt | 55 + jp2/build/travis/build | 209 + jp2/build/travis/prebuild | 40 + jp2/data/test/bad/00124-jasper-nullptr-jp2_cdef_destroy.jp2 | Bin jp2/data/test/bad/268_poc.jp2 | Bin jp2/data/test/bad/269.jp2 | Bin jp2/data/test/bad/271a.pgx | Bin jp2/data/test/bad/271b.pgx | 1 + jp2/data/test/bad/274.pgx | Bin jp2/data/test/bad/276.pgx | Bin jp2/data/test/bad/277.jp2 | Bin jp2/data/test/bad/281a.pgx | Bin jp2/data/test/bad/281b.pgx | Bin jp2/data/test/bad/291.jp2 | Bin jp2/data/test/bad/hoob_8.jp2 | Bin jp2/data/test/bad/poc_264.jp2 | Bin jp2/data/test/bad/poc_265.jp2 | Bin jp2/data/test/good/105-PoC1.jp2 | Bin jp2/data/test/good/109-PoC.jp2 | Bin jp2/data/test/good/120-master1.mif | Bin jp2/data/test/good/120-master2.mif | 11 + jp2/data/test/good/120-master3.mif | Bin jp2/data/test/good/120-other.mif | Bin jp2/data/test/other/278.jp2 | Bin jp2/doc/CMakeLists.txt | 38 +- jp2/doc/Doxyfile.in | 40 +- jp2/doc/html/arrowdown.png | Bin jp2/doc/html/arrowright.png | Bin jp2/doc/html/bc_s.png | Bin jp2/doc/html/bdwn.png | Bin jp2/doc/html/bmp__cod_8h_source.html | 318 -- jp2/doc/html/bmp__enc_8h_source.html | 175 - jp2/doc/html/closed.png | Bin jp2/doc/html/dir_01fa95eb1f0c9de91eda0f793bde0975.html | 126 - jp2/doc/html/dir_06c90920e3eae62b3319bb4f7e82b29e.html | 135 - jp2/doc/html/dir_0ae4d01e0214b3b16f510bdb0a43da97.html | 109 - jp2/doc/html/dir_183aa360c78c3d5d76d0e37fb3928592.html | 122 - jp2/doc/html/dir_239fa1a8a79e6f38585ef78fb6b47da0.html | 116 - jp2/doc/html/dir_253f277ccfe4e82659157434c26f3673.html | 117 - jp2/doc/html/dir_29762712327dae1c325573027ed44f50.html | 116 - jp2/doc/html/dir_2e450c83cbab4d121afe3bb6b9a1a815.html | 117 - jp2/doc/html/dir_3312c1fcef0e3604e67bd913df2806c1.html | 122 - jp2/doc/html/dir_355cf9e37591c428e55f8d720ff2e3f9.html | 132 - jp2/doc/html/dir_3a97f55f20a9bb1bb712bd1e3de7e50d.html | 122 - jp2/doc/html/dir_3e64a87ba1f1507e1e35533c04d15094.html | 117 - jp2/doc/html/dir_41a91b98527d9d10cb5af78598e9ec93.html | 194 - jp2/doc/html/dir_423062511bee2d6ca434c4712632ac70.html | 127 - jp2/doc/html/dir_43dadee5b59cae5a554d5cdab2dced57.html | 143 - jp2/doc/html/dir_4e3ad3b29458a04166c2dfc7f820c9fd.html | 146 - jp2/doc/html/dir_53055196011d2e0f89672618394e49c2.html | 121 - jp2/doc/html/dir_6cf8f22baa2cc2b15c07b55f31825bfc.html | 189 - jp2/doc/html/dir_7bdbd26f0525cfc2f0148f78f5dbffe8.html | 117 - jp2/doc/html/dir_89c853c8098ab04f353f6f7587310470.html | 121 - jp2/doc/html/dir_9b898d60e50abb0512d85471d0556212.html | 111 - jp2/doc/html/dir_9ea6cd8469528c7d7cd4b60976b7e9e9.html | 126 - jp2/doc/html/dir_a4788ab39066acc5dd80e31a17189720.html | 117 - jp2/doc/html/dir_a879a77586bbd06cafa40df29c6b4c6b.html | 140 - jp2/doc/html/dir_a8d89ff3798d339732e1396510c4b3c0.html | 114 - jp2/doc/html/dir_cb52bb4f2fb56fbea96d6b81b24d0ad7.html | 111 - jp2/doc/html/dir_d5cd1de484bb3f95af01723a0e2791b6.html | 109 - jp2/doc/html/dir_d9847df2aafba42ed7b063bd6c8fa1e0.html | 122 - jp2/doc/html/dir_df316ee5e3a6c42026ee5b61f836f0b9.html | 122 - jp2/doc/html/dir_eae9862bfeebbfa87c946295a16425e9.html | 114 - jp2/doc/html/doc.png | Bin jp2/doc/html/doxygen.css | 1449 --------- jp2/doc/html/doxygen.png | Bin jp2/doc/html/dynsections.js | 97 - jp2/doc/html/faq.html | 107 - jp2/doc/html/files.html | 160 - jp2/doc/html/files.js | 57 - jp2/doc/html/folderclosed.png | Bin jp2/doc/html/folderopen.png | Bin jp2/doc/html/getting_started.html | 108 - jp2/doc/html/getting_started.js | 5 - jp2/doc/html/index.html | 162 - jp2/doc/html/install.html | 222 - jp2/doc/html/jas__cm_8h_source.html | 371 -- jp2/doc/html/jas__debug_8h_source.html | 228 - jp2/doc/html/jas__dll_8h_source.html | 132 - jp2/doc/html/jas__fix_8h_source.html | 464 -- jp2/doc/html/jas__getopt_8h_source.html | 235 - jp2/doc/html/jas__icc_8h_source.html | 512 --- jp2/doc/html/jas__image_8h_source.html | 679 ---- jp2/doc/html/jas__init_8h_source.html | 187 - jp2/doc/html/jas__malloc_8h_source.html | 227 - jp2/doc/html/jas__math_8h_source.html | 405 -- jp2/doc/html/jas__seq_8h_source.html | 419 -- jp2/doc/html/jas__stream_8h_source.html | 572 --- jp2/doc/html/jas__string_8h_source.html | 200 - jp2/doc/html/jas__tmr_8h_source.html | 208 - jp2/doc/html/jas__tvp_8h_source.html | 255 - jp2/doc/html/jas__types_8h_source.html | 234 - jp2/doc/html/jas__version_8h_source.html | 224 - jp2/doc/html/jasper_8h_source.html | 198 - jp2/doc/html/jp2__cod_8h_source.html | 407 -- jp2/doc/html/jp2__dec_8h_source.html | 188 - jp2/doc/html/jpc__bs_8h_source.html | 334 -- jp2/doc/html/jpc__cod_8h_source.html | 181 - jp2/doc/html/jpc__cs_8h_source.html | 866 ----- jp2/doc/html/jpc__dec_8h_source.html | 803 ----- jp2/doc/html/jpc__enc_8h_source.html | 749 ---- jp2/doc/html/jpc__fix_8h_source.html | 249 - jp2/doc/html/jpc__flt_8h_source.html | 183 - jp2/doc/html/jpc__math_8h_source.html | 202 - jp2/doc/html/jpc__mct_8h_source.html | 214 - jp2/doc/html/jpc__mqcod_8h_source.html | 227 - jp2/doc/html/jpc__mqdec_8h_source.html | 374 -- jp2/doc/html/jpc__mqenc_8h_source.html | 339 -- jp2/doc/html/jpc__qmfb_8h_source.html | 217 - jp2/doc/html/jpc__t1cod_8h_source.html | 398 -- jp2/doc/html/jpc__t1dec_8h_source.html | 191 - jp2/doc/html/jpc__t1enc_8h_source.html | 196 - jp2/doc/html/jpc__t2cod_8h_source.html | 402 -- jp2/doc/html/jpc__t2dec_8h_source.html | 198 - jp2/doc/html/jpc__t2enc_8h_source.html | 209 - jp2/doc/html/jpc__tagtree_8h_source.html | 270 - jp2/doc/html/jpc__tsfb_8h_source.html | 247 - jp2/doc/html/jpc__util_8h_source.html | 180 - jp2/doc/html/jpg__cod_8h_source.html | 185 - jp2/doc/html/jpg__enc_8h_source.html | 173 - jp2/doc/html/jpg__jpeglib_8h_source.html | 179 - jp2/doc/html/jquery.js | 68 - jp2/doc/html/known_bugs.html | 104 - jp2/doc/html/mif__cod_8h_source.html | 226 - jp2/doc/html/nav_f.png | Bin jp2/doc/html/nav_g.png | Bin jp2/doc/html/nav_h.png | Bin jp2/doc/html/navtree.css | 143 - jp2/doc/html/navtree.js | 523 --- jp2/doc/html/navtreedata.js | 22 - jp2/doc/html/navtreeindex0.js | 68 - jp2/doc/html/open.png | Bin jp2/doc/html/organization.html | 103 - jp2/doc/html/pages.html | 111 - jp2/doc/html/pgx__cod_8h_source.html | 221 - jp2/doc/html/pgx__enc_8h_source.html | 172 - jp2/doc/html/pnm__cod_8h_source.html | 260 - jp2/doc/html/pnm__enc_8h_source.html | 173 - jp2/doc/html/ras__cod_8h_source.html | 267 - jp2/doc/html/ras__enc_8h_source.html | 173 - jp2/doc/html/resize.js | 97 - jp2/doc/html/search/all_0.html | 26 - jp2/doc/html/search/all_0.js | 4 - jp2/doc/html/search/all_1.html | 26 - jp2/doc/html/search/all_1.js | 4 - jp2/doc/html/search/all_2.html | 26 - jp2/doc/html/search/all_2.js | 4 - jp2/doc/html/search/all_3.html | 26 - jp2/doc/html/search/all_3.js | 4 - jp2/doc/html/search/all_4.html | 26 - jp2/doc/html/search/all_4.js | 4 - jp2/doc/html/search/all_5.html | 26 - jp2/doc/html/search/all_5.js | 4 - jp2/doc/html/search/close.png | Bin jp2/doc/html/search/mag_sel.png | Bin jp2/doc/html/search/nomatches.html | 12 - jp2/doc/html/search/pages_0.html | 26 - jp2/doc/html/search/pages_0.js | 4 - jp2/doc/html/search/pages_1.html | 26 - jp2/doc/html/search/pages_1.js | 4 - jp2/doc/html/search/pages_2.html | 26 - jp2/doc/html/search/pages_2.js | 4 - jp2/doc/html/search/pages_3.html | 26 - jp2/doc/html/search/pages_3.js | 4 - jp2/doc/html/search/pages_4.html | 26 - jp2/doc/html/search/pages_4.js | 4 - jp2/doc/html/search/pages_5.html | 26 - jp2/doc/html/search/pages_5.js | 4 - jp2/doc/html/search/search.css | 271 - jp2/doc/html/search/search.js | 791 ----- jp2/doc/html/search/search_l.png | Bin jp2/doc/html/search/search_m.png | Bin jp2/doc/html/search/search_r.png | Bin jp2/doc/html/search/searchdata.js | 18 - jp2/doc/html/splitbar.png | Bin jp2/doc/html/sync_off.png | Bin jp2/doc/html/sync_on.png | Bin jp2/doc/html/tab_a.png | Bin jp2/doc/html/tab_b.png | Bin jp2/doc/html/tab_h.png | Bin jp2/doc/html/tab_s.png | Bin jp2/doc/html/tabs.css | 60 - jp2/doc/src/bugs.dox | 2 +- jp2/doc/src/mainpage.dox.in | 7 +- jp2/doc/src/modules.dox | 11 +- jp2/jasper.def | 6 +- jp2/src/appl/CMakeLists.txt | 16 + jp2/src/appl/dummy2.c | 2 +- jp2/src/appl/fuzz.c | 106 + jp2/src/appl/imgcmp.c | 55 +- jp2/src/appl/imginfo.c | 15 +- jp2/src/appl/jasper.c | 43 +- jp2/src/appl/jiv.c | 55 +- jp2/src/libjasper/CMakeLists.txt | 172 +- jp2/src/libjasper/base/jas_cm.c | 288 +- jp2/src/libjasper/base/jas_debug.c | 15 +- jp2/src/libjasper/base/jas_getopt.c | 19 +- jp2/src/libjasper/base/jas_icc.c | 848 +++-- jp2/src/libjasper/base/jas_iccdata.c | 10 +- jp2/src/libjasper/base/jas_image.c | 520 +- jp2/src/libjasper/base/jas_init.c | 25 +- jp2/src/libjasper/base/jas_malloc.c | 12 +- jp2/src/libjasper/base/jas_seq.c | 161 +- jp2/src/libjasper/base/jas_stream.c | 470 +- jp2/src/libjasper/base/jas_string.c | 6 +- jp2/src/libjasper/base/jas_tmr.c | 7 +- jp2/src/libjasper/base/jas_tvp.c | 22 +- jp2/src/libjasper/base/jas_version.c | 14 - jp2/src/libjasper/bmp/bmp_cod.c | 6 +- jp2/src/libjasper/bmp/bmp_dec.c | 40 +- jp2/src/libjasper/bmp/bmp_enc.c | 27 +- jp2/src/libjasper/include/jasper/jas_cm.h | 102 +- jp2/src/libjasper/include/jasper/jas_compiler.h | 113 + jp2/src/libjasper/include/jasper/jas_config.h | 16 +- jp2/src/libjasper/include/jasper/jas_config.h.in | 73 +- jp2/src/libjasper/include/jasper/jas_debug.h | 15 +- jp2/src/libjasper/include/jasper/jas_dll.h | 64 + jp2/src/libjasper/include/jasper/jas_fix.h | 32 +- jp2/src/libjasper/include/jasper/jas_getopt.h | 13 +- jp2/src/libjasper/include/jasper/jas_icc.h | 68 +- jp2/src/libjasper/include/jasper/jas_image.h | 535 ++- jp2/src/libjasper/include/jasper/jas_init.h | 37 +- jp2/src/libjasper/include/jasper/jas_malloc.h | 24 +- jp2/src/libjasper/include/jasper/jas_math.h | 132 +- jp2/src/libjasper/include/jasper/jas_seq.h | 321 +- jp2/src/libjasper/include/jasper/jas_stream.h | 773 ++++- jp2/src/libjasper/include/jasper/jas_string.h | 9 +- jp2/src/libjasper/include/jasper/jas_tmr.h | 8 +- jp2/src/libjasper/include/jasper/jas_tvp.h | 23 +- jp2/src/libjasper/include/jasper/jas_types.h | 147 +- jp2/src/libjasper/include/jasper/jas_version.h | 8 +- jp2/src/libjasper/include/jasper/jasper.h | 10 +- jp2/src/libjasper/include/jasper/stdbool2.h | 16 - jp2/src/libjasper/jp2/jp2_cod.c | 316 +- jp2/src/libjasper/jp2/jp2_cod.h | 33 +- jp2/src/libjasper/jp2/jp2_dec.c | 141 +- jp2/src/libjasper/jp2/jp2_dec.h | 1 - jp2/src/libjasper/jp2/jp2_enc.c | 119 +- jp2/src/libjasper/jpc/jpc_bs.c | 16 +- jp2/src/libjasper/jpc/jpc_bs.h | 17 +- jp2/src/libjasper/jpc/jpc_cs.c | 173 +- jp2/src/libjasper/jpc/jpc_cs.h | 66 +- jp2/src/libjasper/jpc/jpc_dec.c | 736 ++- jp2/src/libjasper/jpc/jpc_dec.h | 101 +- jp2/src/libjasper/jpc/jpc_enc.c | 406 +- jp2/src/libjasper/jpc/jpc_enc.h | 29 +- jp2/src/libjasper/jpc/jpc_fix.h | 125 +- jp2/src/libjasper/jpc/jpc_flt.h | 2 - jp2/src/libjasper/jpc/jpc_math.c | 28 +- jp2/src/libjasper/jpc/jpc_math.h | 13 +- jp2/src/libjasper/jpc/jpc_mct.c | 49 +- jp2/src/libjasper/jpc/jpc_mct.h | 6 +- jp2/src/libjasper/jpc/jpc_mqcod.c | 4 +- jp2/src/libjasper/jpc/jpc_mqcod.h | 14 +- jp2/src/libjasper/jpc/jpc_mqdec.c | 83 +- jp2/src/libjasper/jpc/jpc_mqdec.h | 154 +- jp2/src/libjasper/jpc/jpc_mqenc.c | 66 +- jp2/src/libjasper/jpc/jpc_mqenc.h | 61 +- jp2/src/libjasper/jpc/jpc_qmfb.c | 1706 ++-------- jp2/src/libjasper/jpc/jpc_qmfb.h | 9 +- jp2/src/libjasper/jpc/jpc_t1cod.c | 166 +- jp2/src/libjasper/jpc/jpc_t1cod.h | 192 +- jp2/src/libjasper/jpc/jpc_t1dec.c | 690 +-- jp2/src/libjasper/jpc/jpc_t1dec.h | 2 - jp2/src/libjasper/jpc/jpc_t1enc.c | 396 +- jp2/src/libjasper/jpc/jpc_t1enc.h | 7 - jp2/src/libjasper/jpc/jpc_t2cod.c | 169 +- jp2/src/libjasper/jpc/jpc_t2cod.h | 44 +- jp2/src/libjasper/jpc/jpc_t2dec.c | 168 +- jp2/src/libjasper/jpc/jpc_t2dec.h | 4 +- jp2/src/libjasper/jpc/jpc_t2enc.c | 153 +- jp2/src/libjasper/jpc/jpc_t2enc.h | 11 +- jp2/src/libjasper/jpc/jpc_tagtree.c | 33 +- jp2/src/libjasper/jpc/jpc_tagtree.h | 6 +- jp2/src/libjasper/jpc/jpc_tsfb.c | 99 +- jp2/src/libjasper/jpc/jpc_tsfb.h | 25 +- jp2/src/libjasper/jpc/jpc_util.c | 33 +- jp2/src/libjasper/jpc/jpc_util.h | 11 +- jp2/src/libjasper/jpg/jpg_dec.c | 43 +- jp2/src/libjasper/jpg/jpg_enc.c | 46 +- jp2/src/libjasper/jpg/jpg_jpeglib.h | 2 +- jp2/src/libjasper/jpg/jpg_val.c | 25 +- jp2/src/libjasper/mif/mif_cod.c | 44 +- jp2/src/libjasper/pgx/pgx_cod.c | 2 - jp2/src/libjasper/pgx/pgx_dec.c | 47 +- jp2/src/libjasper/pgx/pgx_enc.c | 13 +- jp2/src/libjasper/pnm/pnm_cod.c | 9 +- jp2/src/libjasper/pnm/pnm_dec.c | 32 +- jp2/src/libjasper/pnm/pnm_enc.c | 24 +- jp2/src/libjasper/ras/ras_cod.c | 1 + jp2/src/libjasper/ras/ras_dec.c | 43 +- jp2/src/libjasper/ras/ras_enc.c | 15 +- jp2/test/bin/run_codec_test | 2 +- jp2/test/bin/run_test_1 | 79 +- jp2/test/bin/run_test_2 | 8 +- jp2/test/bin/run_test_3 | 2 +- jp2/test/bin/run_test_4 | 2 +- jp2/test/bin/wrapper.in | 16 +- 315 files changed, 8409 insertions(+), 31083 deletions(-) diffs (truncated from 52659 to 500 lines): diff -r fe4699f9f06c -r ddaea7fc4a5e ChangeLog --- a/ChangeLog Sun Jan 01 15:57:07 2023 -0600 +++ b/ChangeLog Mon Jan 02 00:29:01 2023 +0100 @@ -1,3 +1,10 @@ +2023-01-02 Fojtik Jaroslav <[email protected]> + + * jp2/* Update lib jasper to 2.0.33. Code cleanly compilles, but + there is still some problem. Will be solved later. + - jp2/src/lib/jasper/include/jasper/stdbool2.h No longer needed. + + 2023-01-01 Bob Friesenhahn <[email protected]> * magick/utility.c (GetMagickGeometry): Assure that width and diff -r fe4699f9f06c -r ddaea7fc4a5e VisualMagick/tests/runtest.bat --- a/VisualMagick/tests/runtest.bat Sun Jan 01 15:57:07 2023 -0600 +++ b/VisualMagick/tests/runtest.bat Mon Jan 02 00:29:01 2023 +0100 @@ -1,7 +1,7 @@ @echo off set TESTS=0 set TYPE=NONE -set exedir=..\binmt\ +set exedir=..\bin\ if exist %exedir%rwblob.exe goto _binaryexists @echo Missing rwblob in a directory %exedir% diff -r fe4699f9f06c -r ddaea7fc4a5e jp2/CMakeLists.txt --- a/jp2/CMakeLists.txt Sun Jan 01 15:57:07 2023 -0600 +++ b/jp2/CMakeLists.txt Mon Jan 02 00:29:01 2023 +0100 @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 2.8.11) -project(JasPer) +project(JasPer C) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build/cmake/modules/") @@ -8,6 +8,8 @@ # This include should be placed as early as possible. include(InSourceBuild) +include(CheckCCompilerFlag) + ################################################################################ # Version information. ################################################################################ @@ -15,14 +17,13 @@ # The major, minor, and micro version numbers of the project. set(JAS_VERSION_MAJOR 2) set(JAS_VERSION_MINOR 0) -set(JAS_VERSION_PATCH 6) +set(JAS_VERSION_PATCH 33) # The project version. set(JAS_VERSION "${JAS_VERSION_MAJOR}.${JAS_VERSION_MINOR}.${JAS_VERSION_PATCH}") -# The RPM version information. -set(JAS_RPM_RELEASE 1) +message("Software version: ${JAS_VERSION}") # The shared library versioning information, which is specified by the # following variables: JAS_SO_VERSION, JAS_SO_MINOR, and JAS_SO_RELEASE. @@ -43,10 +44,27 @@ # History of shared library versioning information: # JasPer 2.0.0: 4.0.0 +if (APPLE AND CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(MACOSX true) +else() + set(MACOSX false) +endif() + +# To fix a problem with OSX, increase JAS_SO_VERSION to 6 (instead of 5) +# when it is next increased. set(JAS_SO_VERSION 4) set(JAS_SO_MINOR 0) set(JAS_SO_RELEASE 0) +# This is a temporary hack for OSX that should be removed when JAS_SO_VERSION +# is next incremented. +if (MACOSX) +set(JAS_SO_NAME "5.${JAS_SO_MINOR}.${JAS_SO_RELEASE}") +else() set(JAS_SO_NAME "${JAS_SO_VERSION}.${JAS_SO_MINOR}.${JAS_SO_RELEASE}") +endif() + +message("Shared library ABI version: ${JAS_SO_VERSION}") +message("Shared library build version: ${JAS_SO_NAME}") ################################################################################ # Include modules and set policies. @@ -68,19 +86,44 @@ ################################################################################ option(JAS_ENABLE_SHARED "Enable building of shared library" true) +option(JAS_ENABLE_HIDDEN "Hide internal symbols" false) +option(JAS_ENABLE_32BIT "Use 32 bit integers on 64 bit CPUs" false) option(JAS_ENABLE_LIBJPEG "Enable the use of the JPEG Library" true) option(JAS_ENABLE_OPENGL "Enable the use of the OpenGL/GLUT Library" true) -option(JAS_ENABLE_STRICT "Enable pedantic error checking" false) option(JAS_ENABLE_AUTOMATIC_DEPENDENCIES "Enable automatic dependencies" true) -option(JAS_LOCAL "Enable local hacks for developers (do not enable)" false) +option(JAS_ENABLE_DOC "Enable building of the documentation" true) +option(JAS_ENABLE_PROGRAMS "Enable building of the programs" true) + +option(JAS_INCLUDE_PNM_CODEC "Include PNM codec support" true) +option(JAS_INCLUDE_BMP_CODEC "Include BMP codec support" true) +option(JAS_INCLUDE_RAS_CODEC "Include RAS codec support" true) +option(JAS_INCLUDE_JP2_CODEC "Include JP2 codec support" true) +option(JAS_INCLUDE_JPC_CODEC "Include JPC codec support" true) +option(JAS_INCLUDE_JPG_CODEC "Include JPG codec support" true) +option(JAS_INCLUDE_PGX_CODEC "Include PGX codec support" true) +option(JAS_INCLUDE_MIF_CODEC "Include MIF codec support" true) + +# WARNING: THE FOLLOWING OPTION SHOULD ONLY BE ENABLED BY THE JASPER SOFTWARE +# DEVELOPMENT TEAM. IT IS NECESSARY FOR INTERNAL TESTING PURPOSES AND POSES +# SIGNIFICANT SECURITY RISKS IF ENABLED. +option(JAS_ENABLE_DANGEROUS_INTERNAL_TESTING_MODE + "DO NOT ENABLE FOR SECURITY REASONS! (For internal use by JasPer development team only" + false) ################################################################################ # ################################################################################ -#set(CMAKE_VERBOSE_MAKEFILE on) set(CMAKE_C_STANDARD 11) +if ((CMAKE_GENERATOR MATCHES Xcode) OR + (CMAKE_GENERATOR MATCHES "Visual Studio")) + set(JAS_MULTICONFIGURATION_GENERATOR 1) +else() + set(JAS_MULTICONFIGURATION_GENERATOR 0) +endif() +message("JAS_MULTICONFIGURATION_GENERATOR ${JAS_MULTICONFIGURATION_GENERATOR}") + if (JAS_ENABLE_AUTOMATIC_DEPENDENCIES) message(WARNING "If this software is being built as a package for a Linux distribution, " @@ -90,23 +133,6 @@ set(JAS_REQUIRED "REQUIRED") endif() -if (APPLE AND CMAKE_SYSTEM_NAME MATCHES "Darwin") - set(MACOSX true) -endif() - -if (UNIX) - if (MACOSX) - set(JAS_PLATFORM "UNIX (OSX)") - else() - set(JAS_PLATFORM "UNIX (Not OSX)") - endif() -elseif (WIN32) - set(JAS_PLATFORM "Microsoft Windows") -else() - set(JAS_PLATFORM "Unknown") -endif() -message("Platform ${JAS_PLATFORM}") - if (JAS_ENABLE_SHARED AND MACOSX) set(CMAKE_MACOSX_RPATH true) endif() @@ -115,16 +141,19 @@ set(JAS_DLL 1) endif() -message("JAS_LOCAL ${JAS_LOCAL}") -message("CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}") -message("CMAKE_C_COMPILER_ID ${CMAKE_C_COMPILER_ID}") -message("CMAKE_C_COMPILER ${CMAKE_C_COMPILER}") -message("CMAKE_C_FLAGS ${CMAKE_C_FLAGS}") -if (JAS_LOCAL AND (CMAKE_BUILD_TYPE MATCHES "Debug")) - if (CMAKE_C_COMPILER_ID MATCHES "GNU" OR - CMAKE_C_COMPILER_ID MATCHES "Clang") - add_definitions("-O0") - endif() +# If a multiconfiguration generator is used, ensure that various output +# files are not placed in subdirectories (such as Debug and Release) +# as this will cause the CTest test suite to fail. +if (JAS_MULTICONFIGURATION_GENERATOR) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY .) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY .) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY .) + foreach (config ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER "${config}" config) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${config} .) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${config} .) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${config} .) + endforeach() endif() include(InstallRequiredSystemLibraries) @@ -144,46 +173,68 @@ set(CPACK_GENERATOR "TGZ") include(CPack) -if (JAS_STRICT) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused") +if (NOT MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wformat -Wmissing-prototypes -Wstrict-prototypes") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wredundant-decls") +endif() + +if (JAS_ENABLE_HIDDEN AND NOT WIN32) + # don't export internal symbols + check_c_compiler_flag("-fvisibility=hidden" JAS_HAVE_VISIBILITY) + if (JAS_HAVE_VISIBILITY) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -DJAS_HAVE_VISIBILITY") + endif() + + if (NOT (CMAKE_BUILD_TYPE MATCHES "Debug")) + # remove unused internal symbols + check_c_compiler_flag("-ffunction-sections" HAVE_FUNCTION_SECTIONS) + check_c_compiler_flag("-fdata-sections" HAVE_DATA_SECTIONS) + check_c_compiler_flag("-Wl,--gc-sections" HAVE_GC_SECTIONS) + + if (HAVE_FUNCTION_SECTIONS AND HAVE_DATA_SECTIONS AND HAVE_GC_SECTIONS) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections -Wl,--gc-sections") + endif() + endif() endif() ################################################################################ # Perform plaform checks. ################################################################################ -find_package(Doxygen) -find_package(LATEX COMPONENTS PDFLATEX) -find_program(BASH_PROGRAM bash) +include(JasOpenGL) -# On some (or maybe all?) systems, LATEX_FOUND is not set by FindLATEX. -# So, instead, rely on LATEX_PDFLATEX_FOUND. -message("PDFLATEX_COMPILER: ${PDFLATEX_COMPILER}") -if ((NOT LATEX_FOUND) AND PDFLATEX_COMPILER) - message(WARNING "Setting LATEX_FOUND to true.") - message(WARNING "Your version of CMake may be buggy.") - set(LATEX_FOUND true) -endif() -message("LATEX_FOUND ${LATEX_FOUND}") +find_program(BASH_PROGRAM bash) check_include_files(fcntl.h JAS_HAVE_FCNTL_H) check_include_files(io.h JAS_HAVE_IO_H) check_include_files(unistd.h JAS_HAVE_UNISTD_H) -check_include_files(windows.h JAS_HAVE_WINDOWS_H) check_include_files(sys/time.h JAS_HAVE_SYS_TIME_H) check_include_files(sys/types.h JAS_HAVE_SYS_TYPES_H) check_function_exists(gettimeofday JAS_HAVE_GETTIMEOFDAY) check_function_exists(getrusage JAS_HAVE_GETRUSAGE) +check_function_exists(mkostemp JAS_HAVE_MKOSTEMP) + +################################################################################ +# Check for invalid codec combinations. +################################################################################ + +if (JAS_INCLUDE_JP2_CODEC AND NOT JAS_INCLUDE_JPC_CODEC) + message(FATAL_ERROR "The JPC codec must be included in order to include the JP2 codec.") +endif() ################################################################################ # Check for the JPEG library. ################################################################################ -find_package(JPEG ${JAS_LIBJPEG_REQUIRED}) -message("JPEG library found: ${JPEG_FOUND}") +if (JAS_ENABLE_LIBJPEG) + find_package(JPEG ${JAS_LIBJPEG_REQUIRED}) + message("JPEG library found: ${JPEG_FOUND}") +else() + set(JPEG_FOUND false) +endif() if (JAS_ENABLE_LIBJPEG AND JPEG_FOUND) set(JAS_HAVE_LIBJPEG 0) message("JPEG include directory: ${JPEG_INCLUDE_DIR}") @@ -199,7 +250,6 @@ #include <jpeglib.h> int main() {} " JAS_HAVE_JPEGLIB_H) - message("JAS_HAVE_JPEGLIB_H: ${JAS_HAVE_JPEGLIB_H}") if(JAS_HAVE_JPEGLIB_H) set(JAS_HAVE_LIBJPEG 1) include_directories(${JPEG_INCLUDE_DIR}) @@ -216,61 +266,9 @@ set(JPEG_INCLUDE_DIR "") set(JPEG_LIBRARIES "") endif() -message("JAS_HAVE_LIBJPEG: ${JAS_HAVE_LIBJPEG}") - -################################################################################ -# Check for the OpenGL and GLUT libraries. -################################################################################ - -find_package(OpenGL ${JAS_REQUIRED}) -message("JAS_ENABLE_OPENGL: ${JAS_ENABLE_OPENGL}") -message("OpenGL library found: ${OPENGL_FOUND}") -if (JAS_ENABLE_OPENGL AND OPENGL_FOUND) - set(JAS_HAVE_OPENGL 0) - message("OpenGL include directory: ${OPENGL_INCLUDE_DIR}") - message("OpenGL libraries: ${OPENGL_LIBRARIES}") - find_package(GLUT ${JAS_REQUIRED}) - message("GLUT library found: ${GLUT_FOUND}") - if (GLUT_FOUND) - message("GLUT include directory: ${GLUT_INCLUDE_DIR}") - message("GLUT libraries: ${GLUT_LIBRARIES}") - set(CMAKE_REQUIRED_INCLUDES ${GLUT_INCLUDE_DIR}) - check_include_files(GL/glut.h JAS_HAVE_GL_GLUT_H) - check_include_files(glut.h JAS_HAVE_GLUT_H) - message("JAS_HAVE_GLUT_H: ${JAS_HAVE_GLUT_H}") - message("JAS_HAVE_GL_GLUT_H: ${JAS_HAVE_GL_GLUT_H}") - if (JAS_HAVE_GL_GLUT_H OR JAS_HAVE_GLUT_H) - set(JAS_HAVE_OPENGL 1) - include_directories(${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) - else() - message(WARNING "The header files GL/glut.h and glut.h both appear to be missing.") - message(WARNING "Disabling OpenGL.") - endif() - endif() - # On some systems (e.g., Fedora 21), there is a bug in the cmake code - # that detects GLUT libraries. The following ugliness is a workaround for - # this problem. - if (NOT GLUT_Xmu_LIBRARY OR NOT GLUT_Xmi_LIBRARY) - if (NOT GLUT_Xmu_LIBRARY) - set(GLUT_Xmu_LIBRARY "") - message(WARNING "Clearing bogus value for GLUT_Xmu_LIBRARY.") - message(WARNING "Your version of CMake may be buggy.") - endif() - if (NOT GLUT_Xmi_LIBRARY) - set(GLUT_Xmi_LIBRARY "") - message(WARNING "Clearing bogus value for GLUT_Xmi_LIBRARY.") - message(WARNING "Your version of CMake may be buggy.") - endif() - set(GLUT_LIBRARIES "${GLUT_glut_LIBRARY}") - endif() -else() - set(JAS_HAVE_OPENGL 0) - set(OPENGL_INCLUDE_DIR "") - set(OPENGL_LIBRARIES "") - set(GLUT_INCLUDE_DIR "") - set(GLUT_LIBRARIES "") +if (NOT JAS_HAVE_LIBJPEG) + set(JAS_INCLUDE_JPG_CODEC 0) endif() -message("JAS_HAVE_OPENGL: ${JAS_HAVE_OPENGL}") ################################################################################ # Check for the Math library. @@ -285,9 +283,7 @@ # ################################################################################ -if (JAS_MEMORY_LIMIT) - add_definitions("-DJAS_MEMORY_LIMIT=${JAS_MEMORY_LIMIT}") -endif() +add_definitions("-D_GNU_SOURCE") ################################################################################ # @@ -324,8 +320,12 @@ ################################################################################ add_subdirectory(src/libjasper) -add_subdirectory(src/appl) -add_subdirectory(doc) +if (JAS_ENABLE_PROGRAMS) + add_subdirectory(src/appl) +endif () +if (JAS_ENABLE_DOC) + add_subdirectory(doc) +endif () # The package configuation (pc) file should be installed in # ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig. diff -r fe4699f9f06c -r ddaea7fc4a5e jp2/INSTALL --- a/jp2/INSTALL Sun Jan 01 15:57:07 2023 -0600 +++ b/jp2/INSTALL Mon Jan 02 00:29:01 2023 +0100 @@ -1,11 +1,14 @@ Installation +============ The process required to install JasPer is described below. Installation on Systems Running Unix +------------------------------------ In what follows, let $SOURCE_DIR denote the top-level directory of the -JasPer software source tree and let $INSTALL_DIR denote the target +JasPer software source tree (i.e., the directory containing the files +named LICENSE and INSTALL) and let $INSTALL_DIR denote the target directory for installation. 1) Select an empty directory to use for building the software. @@ -43,10 +46,23 @@ make install +Additional Remarks: + +When building the JasPer software under Mac OSX, only the use of the +native framework for OpenGL is officially supported. If the Freeglut +library is installed on your system, you will need to ensure that the +native GLUT library (as opposed to the Freeglut library) is used by the +build process. This can be accomplished by adding an extra option to +the cmake command line that resembles the following: + + -DGLUT_glut_LIBRARY=/System/Library/Frameworks/GLUT.framework + Installation on Systems Running Microsoft Windows +------------------------------------------------- In what follows, let %SOURCE_DIR% denote the top-level directory of the -JasPer software source tree and let %INSTALL_DIR% denote the target +JasPer software source tree (i.e., the directory containing the files +named LICENSE and INSTALL) and let %INSTALL_DIR% denote the target directory for installation. 1) Select an empty directory to use for building the software. @@ -67,6 +83,7 @@ msbuild %build_dir%\INSTALL.vcxproj Cmake Options +------------- The option OPTION can be set to the value VALUE with a command-line option of the form -DOPTION=VALUE @@ -74,47 +91,51 @@ CMAKE_INSTALL_PREFIX Specify the installation directory. - Value: A directory name. + Value: A directory name. CMAKE_BUILD_TYPE Specify the build type (i.e., release or debug). Valid values: Debug or Release +JAS_ENABLE_DOC + Enable the building of the documentation (which requires LaTeX). + Valid values: true and false + JAS_ENABLE_LIBJPEG Enable the use of the JPEG library Valid values: true and false JAS_ENABLE_OPENGL - Enable the use of the OpenGL and GLUT libraries. - Valid values: true and false - -JAS_ENABLE_STRICT - Enable pedantic errors for building the code. - Valid values: true or false + Enable the use of the OpenGL and GLUT libraries. + Valid values: true and false JAS_ENABLE_SHARED - Enable the building of shared libraries. - Valid values: true or false + Enable the building of shared libraries. + Valid values: true or false + +JAS_ENABLE_HIDDEN + Hide internal symbols? Enabling this results in a smaller binary. + Valid values: true or false + +JAS_ENABLE_32BIT + Force the use of 32 bit integers? On 64 bit CPUs, JasPer + historically used 64 bit integers which consumes more memory, is + slower and has no advantages. This produces a different ABI, so + the resulting library is not compatible with other builds. + Valid values: true or false JAS_ENABLE_ASAN - Enable the Address Sanitizer. - Valid values: true or false + Enable the Address Sanitizer. + Valid values: true or false JAS_ENABLE_USAN - Enable the Undefined-Behavior Sanitizer. - Valid values: true or false + Enable the Undefined-Behavior Sanitizer. + Valid values: true or false JAS_ENABLE_LSAN - Enable the Leak Sanitizer. - Valid values: true or false + Enable the Leak Sanitizer. + Valid values: true or false JAS_ENABLE_MSAN - Enable the Memory Sanitizer. - Valid values: true or false - -JAS_MEMORY_LIMIT - DO NOT RELY ON THIS OPTION, AS IT IS LIKELY TO BE REMOVED IN THE FUTURE. - Set the maximum amount of memory that can be allocated with jas_malloc