Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package jasper for openSUSE:Factory checked in at 2022-02-13 00:15:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jasper (Old) and /work/SRC/openSUSE:Factory/.jasper.new.1956 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jasper" Sun Feb 13 00:15:36 2022 rev:14 rq:953963 version:3.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/jasper/jasper.changes 2022-02-07 23:39:57.365678501 +0100 +++ /work/SRC/openSUSE:Factory/.jasper.new.1956/jasper.changes 2022-02-13 00:16:19.324273696 +0100 @@ -1,0 +2,7 @@ +Sat Feb 12 21:16:30 UTC 2022 - Michael Vetter <[email protected]> + +- Update to 3.0.1: + * Fix some build/portability issues (e.g., #317, #318). +- Drop jasper-cmake-warnings.patch: contained in upstream release + +------------------------------------------------------------------- Old: ---- jasper-cmake-warnings.patch version-3.0.0.tar.gz New: ---- version-3.0.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jasper.spec ++++++ --- /var/tmp/diff_new_pack.X6ohs7/_old 2022-02-13 00:16:19.928275407 +0100 +++ /var/tmp/diff_new_pack.X6ohs7/_new 2022-02-13 00:16:19.928275407 +0100 @@ -20,7 +20,7 @@ %global __builddir obs_build Name: jasper -Version: 3.0.0 +Version: 3.0.1 Release: 0 Summary: An Implementation of the JPEG-2000 Standard, Part 1 License: JasPer-2.0 @@ -28,8 +28,6 @@ URL: https://jasper-software.github.io/jasper Source: https://github.com/jasper-software/jasper/archive/version-%{version}.tar.gz Source1: baselibs.conf -# PATCH-FIX-UPSTREAM [email protected] -- Fix cmake warning. Upstream commits fd08e177 and df22a3c8c -Patch0: jasper-cmake-warnings.patch BuildRequires: Mesa-libGL-devel BuildRequires: cmake BuildRequires: doxygen @@ -66,7 +64,6 @@ %prep %setup -q -n %{name}-version-%{version} -%patch0 -p1 %build export CFLAGS="%{optflags} -Wall -std=c99 -D_BSD_SOURCE" ++++++ version-3.0.0.tar.gz -> version-3.0.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jasper-version-3.0.0/CMakeLists.txt new/jasper-version-3.0.1/CMakeLists.txt --- old/jasper-version-3.0.0/CMakeLists.txt 2022-02-06 00:24:56.000000000 +0100 +++ new/jasper-version-3.0.1/CMakeLists.txt 2022-02-12 21:49:32.000000000 +0100 @@ -10,7 +10,7 @@ # The major, minor, and micro version numbers of the project. set(JAS_VERSION_MAJOR 3) set(JAS_VERSION_MINOR 0) -set(JAS_VERSION_PATCH 0) +set(JAS_VERSION_PATCH 1) # The shared library versioning information. # Guidelines on how to change this information can be found below. @@ -47,8 +47,13 @@ message("Shared library ABI version: ${JAS_SO_VERSION}") message("Shared library build version: ${JAS_SO_NAME}") +message("CMAKE_VERSION: ${CMAKE_VERSION}") + project(JasPer VERSION ${JAS_VERSION} LANGUAGES C) +message("CMAKE_C_COMPILER_ID: ${CMAKE_C_COMPILER_ID}") +message("CMAKE_C_COMPILER_VERISON: ${CMAKE_C_COMPILER_VERSION}") + ################################################################################ # Include modules and set policies. ################################################################################ @@ -78,6 +83,13 @@ include(JasGetStdcVersion) include(JasCheckType) +# Save some typing below. +function(add_c_compile_options args) + foreach(arg IN LISTS ARGV) + add_compile_options($<$<COMPILE_LANGUAGE:C>:${arg}>) + endforeach() +endfunction() + ################################################################################ # Define options. ################################################################################ @@ -151,7 +163,7 @@ # WARNING: Do not do this unless you know what you are doing. if(FALSE) add_compile_definitions("JAS_NO_SET_MAX_ALIGN_T") - add_compile_definitions("max_align_t=__INSERT_APPROPRIATE_TYPE_HERE__"") + add_compile_definitions("max_align_t=__INSERT_APPROPRIATE_TYPE_HERE__") endif() # To override the default setting of ssize_t, something like what @@ -159,7 +171,7 @@ # WARNING: Do not do this unless you know what you are doing. if(FALSE) add_compile_definitions("JAS_NO_SET_SSIZE_T") - add_compile_definitions("ssize_t=__INSERT_APPROPRIATE_TYPE_HERE__"") + add_compile_definitions("ssize_t=__INSERT_APPROPRIATE_TYPE_HERE__") endif() # WARNING: THE FOLLOWING OPTION SHOULD ONLY BE ENABLED BY THE JASPER SOFTWARE @@ -169,10 +181,19 @@ "DO NOT ENABLE FOR SECURITY REASONS! (For internal use by JasPer development team only" OFF) +option(JAS_ENABLE_CXX "Enable C++ code (for testing)." OFF) + ################################################################################ # ################################################################################ +if(JAS_ENABLE_CXX) + message("Enabling C++") + enable_language(CXX) + message("CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}") + message("CMAKE_CXX_COMPILER_VERISON: ${CMAKE_CXX_COMPILER_VERSION}") +endif() + set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE) # It is strongly recommended that the JasPer software be built using a @@ -279,57 +300,57 @@ JAS_GCC_WARN_NO_STRINGOP_OVERFLOW) check_c_compiler_flag("-Wno-tautological-constant-out-of-range-compare" JAS_CLANG_WARN_NO_OUT_OF_RANGE_COMPARE) - add_compile_options(-Wall) + add_c_compile_options(-Wall) # Note: Use CMAKE_C_FLAGS (instead of add_compile_options) so that the # flags are also used for compile checks. - #add_compile_options(-pedantic) + #add_c_compile_options(-pedantic) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic") - add_compile_options(-W) - add_compile_options(-Wno-sign-compare) - add_compile_options(-Wformat) - add_compile_options(-Wmissing-prototypes) - add_compile_options(-Wstrict-prototypes) - add_compile_options(-Wno-type-limits) + add_c_compile_options(-W) + add_c_compile_options(-Wno-sign-compare) + add_c_compile_options(-Wformat) + add_c_compile_options(-Wmissing-prototypes) + add_c_compile_options(-Wstrict-prototypes) + add_c_compile_options(-Wno-type-limits) if (JAS_CLANG_WARN_NO_OUT_OF_RANGE_COMPARE) - add_compile_options(-Wno-tautological-constant-out-of-range-compare) + add_c_compile_options(-Wno-tautological-constant-out-of-range-compare) endif() if(JAS_GCC_WARN_NO_STRINGOP_TRUNCATION) - add_compile_options(-Wno-stringop-truncation) + add_c_compile_options(-Wno-stringop-truncation) endif() if(JAS_GCC_WARN_NO_STRINGOP_OVERFLOW) # Note: Sometimes spurious warnings that have nothing to do with # string are generated. - add_compile_options(-Wno-stringop-overflow) + add_c_compile_options(-Wno-stringop-overflow) endif() - add_compile_options(-Wmissing-declarations) + add_c_compile_options(-Wmissing-declarations) if(CMAKE_C_COMPILER_ID STREQUAL "Clang") - add_compile_options(-Wno-unused-command-line-argument) + add_c_compile_options(-Wno-unused-command-line-argument) endif() if(JAS_STRICT) # Treat all compiler warnings as errors. # Note: Use CMAKE_C_FLAGS (instead of add_compile_options) so that the # flags are also used for compile checks. - #add_compile_options(-pedantic-errors) + #add_c_compile_options(-pedantic-errors) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic-errors") - #add_compile_options(-Werror) + #add_c_compile_options(-Werror) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") endif() elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC") # possibly lossy conversion - add_compile_options(/wd4244) + add_c_compile_options(/wd4244) # different const qualifiers - add_compile_options(/wd4090) + add_c_compile_options(/wd4090) # signed/unsigned mismatch - add_compile_options(/wd4018) + add_c_compile_options(/wd4018) # function may be unsafe (e.g., sprintf, strncat) - add_compile_options(/wd4996) + add_c_compile_options(/wd4996) # allow some kinds of narrowing conversions - add_compile_options(/wd4267) + add_c_compile_options(/wd4267) if(JAS_STRICT) # Treat all compiler warnings as errors. - add_compile_options(/WX) + add_c_compile_options(/WX) endif() endif() @@ -343,9 +364,9 @@ check_c_compiler_flag("-Wl,--gc-sections" HAVE_GC_SECTIONS) if(HAVE_FUNCTION_SECTIONS AND HAVE_DATA_SECTIONS AND HAVE_GC_SECTIONS) - add_compile_options(-ffunction-sections) - add_compile_options(-fdata-sections) - add_compile_options(-Wl,--gc-sections) + add_c_compile_options(-ffunction-sections) + add_c_compile_options(-fdata-sections) + add_c_compile_options(-Wl,--gc-sections) endif() endif() endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jasper-version-3.0.0/NEWS.txt new/jasper-version-3.0.1/NEWS.txt --- old/jasper-version-3.0.0/NEWS.txt 2022-02-06 00:24:56.000000000 +0100 +++ new/jasper-version-3.0.1/NEWS.txt 2022-02-12 21:49:32.000000000 +0100 @@ -1,3 +1,8 @@ +3.0.1 (2022-02-12) +================== + +* Fix some build/portability issues (e.g., #317, #318). + 3.0.0 (2022-02-05) ================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jasper-version-3.0.0/build/build new/jasper-version-3.0.1/build/build --- old/jasper-version-3.0.0/build/build 2022-02-06 00:24:56.000000000 +0100 +++ new/jasper-version-3.0.1/build/build 2022-02-12 21:49:32.000000000 +0100 @@ -105,6 +105,7 @@ enable_strict=1 cmake_generator= enable_32bit=0 +enable_cxx=0 while [ $# -gt 0 ]; do option="$1" @@ -209,14 +210,26 @@ shift 1 enable_msan=1 ;; + --no-msan) + shift 1 + enable_msan=0 + ;; --ubsan) shift 1 enable_ubsan=1 ;; + --no-ubsan) + shift 1 + enable_ubsan=0 + ;; --tsan) shift 1 enable_tsan=1 ;; + --no-tsan) + shift 1 + enable_tsan=0 + ;; --release) shift 1 build_type=release @@ -292,6 +305,14 @@ shift 1 enable_32bit=1 ;; + --cxx) + shift 1 + enable_cxx=1 + ;; + --no-cxx) + shift 1 + enable_cxx=0 + ;; --help) usage ;; @@ -431,6 +452,11 @@ configure_opts+=("-DJAS_ENABLE_32BIT=true") fi +if [ "$enable_cxx" -ne 0 ]; then + configure_opts+=("-DJAS_ENABLE_CXX=true") +else + configure_opts+=("-DJAS_ENABLE_CXX=false") +fi configure_opts+=("-DJAS_ENABLE_DANGEROUS_INTERNAL_TESTING_MODE=true") if [ "$enable_doc" -ne 0 ]; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jasper-version-3.0.0/build/build_all new/jasper-version-3.0.1/build/build_all --- old/jasper-version-3.0.0/build/build_all 2022-02-06 00:24:56.000000000 +0100 +++ new/jasper-version-3.0.1/build/build_all 2022-02-12 21:49:32.000000000 +0100 @@ -17,6 +17,185 @@ (cd "$dir" && find . -type f -printf "%M %010s %P\n" | sort -k3) } +set_build_config() +{ + [ $# -eq 1 ] || return 1 + + build_name="" + base_dir="" + command=() + + local id="$1" + case "$id" in + + ############################################################ + # Debug Builds + ############################################################ + + static_debug_mt0|static_debug_mt1) + local multithread + multithread=0 + case "$id" in + *mt1) + multithread=1;; + esac + build_name="static debug ASan+LSan+UBSan mt=$multithread" + base_dir="$build_dir/test_static_debug-$multithread" + command=("$build_program") + command+=("${global_options[@]}") + command+=(--build-dir "$base_dir/build") + command+=(--install-dir "$base_dir/install") + command+=(--static) + command+=(--debug) + command+=(--ubsan) + command+=("${asan_option[@]}") + command+=("${lsan_option[@]}") + command+=("${test_option[@]}") + command+=(--install) + command+=(--no-documentation) + command+=(--no-use-jas-init) + if [ "$multithread" -ne 0 ]; then + command+=(--multithread) + else + command+=(--no-multithread) + fi + ;; + + static_debug_ji_mt0|static_debug_ji_mt1) + local multithread + multithread=0 + case "$id" in + *mt1) + multithread=1;; + esac + build_name="static debug jas_init ASan+LSan+UBSan mt=$multithread" + base_dir="$build_dir/test_static_debug-ji-$multithread" + command=("$build_program") + command+=("${global_options[@]}") + command+=(--build-dir "$base_dir/build") + command+=(--install-dir "$base_dir/install") + command+=(--static) + command+=(--debug) + command+=(--ubsan) + command+=("${asan_option[@]}") + command+=("${lsan_option[@]}") + command+=("${test_option[@]}") + command+=(--install) + command+=(--no-documentation) + command+=(--use-jas-init) + if [ "$multithread" -ne 0 ]; then + command+=(--multithread) + else + command+=(--no-multithread) + fi + ;; + + tsan) + build_name="multithread static debug TSan+UBSan" + base_dir="$build_dir/test_static_debug_tsan" + command=("$build_program") + command+=("${global_options[@]}") + command+=(--build-dir "$base_dir/build") + command+=(--install-dir "$base_dir/install") + command+=(--prefer-pthread) + command+=(--static) + command+=(--debug) + command+=(--ubsan) + command+=(--tsan) + command+=("${test_option[@]}") + command+=(--install) + command+=(--no-documentation) + command+=(--multithread) + command+=(--no-use-jas-init) + ;; + + ############################################################ + # Release Builds + ############################################################ + + # release without run-time tests + static_release|shared_release) + local shared + if [ "$id" = shared_release ]; then + shared=1 + else + shared=0 + fi + build_name="release shared=$shared" + base_dir="$build_dir/release-$shared" + command=("$build_program") + command+=("${global_options[@]}") + command+=(--build-dir "$base_dir/build") + command+=(--install-dir "$base_dir/install") + command+=(--shared) + command+=(--release) + command+=(--multithread) + command+=(--documentation) + command+=(--no-test) + command+=(--no-cxx) + command+=(--install) + ;; + + static_release_mt0|static_release_mt1) + local multithread + multithread=0 + case "$id" in + *mt1) + multithread=1;; + esac + build_name="static release mt=$multithread" + base_dir="$build_dir/static_release-$multithread" + command=("$build_program") + command+=("${global_options[@]}") + command+=(--build-dir "$base_dir/build") + command+=(--install-dir "$base_dir/install") + command+=(--static) + command+=(--release) + command+=(--documentation) + command+=("${test_option[@]}") + command+=(--install) + if [ "$multithread" -ne 0 ]; then + command+=(--multithread) + else + command+=(--no-multithread) + fi + ;; + + shared_release_mt0|shared_release_mt1) + local multithread + multithread=0 + case "$id" in + *mt1) + multithread=1;; + esac + build_name="shared release mt=$multithread" + base_dir="$build_dir/shared_release-$multithread" + command=("$build_program") + command+=("${global_options[@]}") + command+=(--build-dir "$base_dir/build") + command+=(--install-dir "$base_dir/install") + command+=(--shared) + command+=(--release) + command+=(--documentation) + command+=("${test_option[@]}") + command+=(--install) + command+=(--no-use-jas-init) + if [ "$multithread" -ne 0 ]; then + command+=(--multithread) + else + command+=(--no-multithread) + fi + ;; + + ############################################################ + ############################################################ + + *) + return 1;; + + esac +} + usage() { echo "bad usage: $@" @@ -108,6 +287,20 @@ esac fi +# TODO: Fix this later. +ubuntu_clang_hack=0 +# If invoked by GitHub Actions CI... +if [ -n "$RUNNER_OS" ]; then + if [ "$os" = linux ]; then + # Assume that the OS being Linux means Ubuntu. + case "$CC" in + clang*) + ubuntu_clang_hack=1 + ;; + esac + fi +fi + ################################################################################ cat <<- EOF @@ -117,18 +310,25 @@ EOF global_options=() + for ((i=0; i < "$verbose"; ++i)); do global_options+=(--verbose) done + if [ "$strict" -ge 1 ]; then global_options+=(--strict) else global_options+=(--no-strict) fi + if [ "$crostini" -ne 0 ]; then global_options+=(--crostini) fi + +global_options+=(--cxx) + global_options+=(--debug-level "$debug_level") + lsan_option=(--lsan) asan_option=(--asan) case "$os" in @@ -139,6 +339,7 @@ asan_option=() ;; esac + if [ "$enable_test" -ne 0 ]; then test_option=(--test) else @@ -147,197 +348,93 @@ ################################################################################ -#if [ "$os" = windows ]; then - cat <<- EOF - ================================================================================ - File System Mount Information - ================================================================================ - EOF - mount || panic "mount failed" -#fi +cat <<- EOF +================================================================================ +File System Mount Information +================================================================================ +EOF +mount || panic "mount failed" ################################################################################ -for multithread in 0 1; do +tests=() - cat <<- EOF - ================================================================================ - BUILD: Static Library Debug Build Using jas_init (ASan, LSan, UBSan) - (Multithread $multithread) - ================================================================================ - EOF - base_dir="$build_dir/test_static_debug-ji-$multithread" - command=("$build_program") - command+=("${global_options[@]}") - command+=(--build-dir "$base_dir/build") - command+=(--install-dir "$base_dir/install") - command+=(--static) - command+=(--debug) - command+=(--ubsan) - command+=("${asan_option[@]}") - command+=("${lsan_option[@]}") - command+=("${test_option[@]}") - command+=(--install) - command+=(--no-documentation) - command+=(--use-jas-init) - if [ "$multithread" -ne 0 ]; then - command+=(--multithread) - else - command+=(--no-multithread) - fi - echo "RUNNING: ${command[@]}" - if [ "$enable" -ne 0 ]; then - "${command[@]}" || panic - echo "build directory:" - list_directory "$base_dir/build" || panic - echo "install directory:" - list_directory "$base_dir/install" || panic - fi +# debug builds +if [ "$ubuntu_clang_hack" -eq 0 ]; then + tests+=(static_debug_mt0) + tests+=(static_debug_mt1) + tests+=(static_debug_ji_mt0) + tests+=(static_debug_ji_mt1) + tests+=(tsan) +fi -done +# release builds +tests+=(shared_release_mt0) +tests+=(shared_release_mt1) +if [ "$ubuntu_clang_hack" -eq 0 ]; then + tests+=(static_release_mt0) + tests+=(static_release_mt1) +fi +tests+=(static_release) +tests+=(shared_release) -################################################################################ +failed_tests=() +passed_tests=() -for multithread in 0 1; do +for id in "${tests[@]}"; do + + set_build_config "$id" + if [ $? -ne 0 ]; then + failed_tests+=("id") + continue + fi cat <<- EOF ================================================================================ - BUILD: Static Library Debug Build (ASan, LSan, UBSan) - (Multithread $multithread) + BUILD: ${build_name} ================================================================================ EOF - base_dir="$build_dir/test_static_debug-$multithread" - command=("$build_program") - command+=("${global_options[@]}") - command+=(--build-dir "$base_dir/build") - command+=(--install-dir "$base_dir/install") - command+=(--static) - command+=(--debug) - command+=(--ubsan) - command+=("${asan_option[@]}") - command+=("${lsan_option[@]}") - command+=("${test_option[@]}") - command+=(--install) - command+=(--no-documentation) - command+=(--no-use-jas-init) - if [ "$multithread" -ne 0 ]; then - command+=(--multithread) - else - command+=(--no-multithread) - fi + echo "RUNNING: ${command[@]}" if [ "$enable" -ne 0 ]; then - "${command[@]}" || panic + "${command[@]}" + if [ $? -ne 0 ]; then + failed_tests+=("$id") + continue + fi echo "build directory:" list_directory "$base_dir/build" || panic echo "install directory:" list_directory "$base_dir/install" || panic + passed_tests+=("$id") fi done -################################################################################ - cat <<- EOF ================================================================================ -BUILD: Multi-Thread Static Library Debug Build (TSan, UBSan) +SUMMARY ================================================================================ EOF -base_dir="$build_dir/test_static_debug_tsan" -command=("$build_program") -command+=("${global_options[@]}") -command+=(--build-dir "$base_dir/build") -command+=(--install-dir "$base_dir/install") -command+=(--prefer-pthread) -command+=(--static) -command+=(--debug) -command+=(--ubsan) -command+=(--tsan) -command+=("${test_option[@]}") -command+=(--install) -command+=(--no-documentation) -command+=(--multithread) -command+=(--no-use-jas-init) -echo "RUNNING: ${command[@]}" -if [ "$enable" -ne 0 ]; then - "${command[@]}" || panic - echo "build directory:" - list_directory "$base_dir/build" || panic - echo "install directory:" - list_directory "$base_dir/install" || panic -fi - -################################################################################ - -for multithread in 0 1; do - - cat <<- EOF - ================================================================================ - BUILD: Shared Library Release Build - (Multithread $multithread) - ================================================================================ - EOF - base_dir="$build_dir/shared_release-$multithread" - command=("$build_program") - command+=("${global_options[@]}") - command+=(--build-dir "$base_dir/build") - command+=(--install-dir "$base_dir/install") - command+=(--shared) - command+=(--release) - command+=(--documentation) - command+=("${test_option[@]}") - command+=(--install) - command+=(--no-use-jas-init) - if [ "$multithread" -ne 0 ]; then - command+=(--multithread) - else - command+=(--no-multithread) - fi - echo "RUNNING: ${command[@]}" - if [ "$enable" -ne 0 ]; then - "${command[@]}" || panic - echo "build directory:" - list_directory "$base_dir/build" || panic - echo "install directory:" - list_directory "$base_dir/install" || panic - fi - -done -################################################################################ +echo "Total number of tests: ${#tests[@]}" -for multithread in 0 1; do +if [ "${#passed_tests[@]}" -gt 0 ]; then + echo "The following tests passed:" + for test in "${passed_tests[@]}"; do + echo " $test" + done +fi - cat <<- EOF - ================================================================================ - BUILD: Static Library Release Build - (Multithread $multithread) - ================================================================================ - EOF - base_dir="$build_dir/static_release-$multithread" - command=("$build_program") - command+=("${global_options[@]}") - command+=(--build-dir "$base_dir/build") - command+=(--install-dir "$base_dir/install") - command+=(--static) - command+=(--release) - command+=(--documentation) - command+=("${test_option[@]}") - command+=(--install) - if [ "$multithread" -ne 0 ]; then - command+=(--multithread) - else - command+=(--no-multithread) - fi - echo "RUNNING: ${command[@]}" - if [ "$enable" -ne 0 ]; then - "${command[@]}" || panic - echo "build directory:" - list_directory "$base_dir/build" || panic - echo "install directory:" - list_directory "$base_dir/install" || panic - fi +if [ "${#failed_tests[@]}" -gt 0 ]; then + echo "ERROR: One or more tests failed." + echo "The following tests failed:" + for test in "${failed_tests[@]}"; do + echo " $test" + done + exit 1 +fi -done +exit 0 ################################################################################ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jasper-version-3.0.0/build/cmake/modules/Sanitizers.cmake new/jasper-version-3.0.1/build/cmake/modules/Sanitizers.cmake --- old/jasper-version-3.0.0/build/cmake/modules/Sanitizers.cmake 2022-02-06 00:24:56.000000000 +0100 +++ new/jasper-version-3.0.1/build/cmake/modules/Sanitizers.cmake 2022-02-12 21:49:32.000000000 +0100 @@ -28,6 +28,7 @@ if(JAS_HAVE_FSANITIZE_MEMORY) message("Enabling Memory Sanitizer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=memory") set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -fsanitize=memory") endif() endif() @@ -39,12 +40,14 @@ if(JAS_HAVE_FSANITIZE_ADDRESS) message("Enabling Address Sanitizer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -fsanitize=address") endif() elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC") if(JAS_HAVE_MSVC_FSANITIZE_ADDRESS) message("Enabling Address Sanitizer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address") set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} /fsanitize=address") endif() endif() @@ -56,6 +59,7 @@ if(JAS_HAVE_FSANITIZE_LEAK) message("Enabling Leak Sanitizer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=leak") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=leak") set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -fsanitize=leak") endif() endif() @@ -67,6 +71,7 @@ if(JAS_HAVE_FSANITIZE_UNDEFINED) message("Enabling Undefined-Behavior Sanitizer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -fsanitize=undefined") endif() endif() @@ -78,6 +83,7 @@ if(JAS_HAVE_FSANITIZE_THREAD) message("Enabling Thread Sanitizer") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread") set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -fsanitize=thread") endif() endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jasper-version-3.0.0/build/github/make_main_gh_page new/jasper-version-3.0.1/build/github/make_main_gh_page --- old/jasper-version-3.0.0/build/github/make_main_gh_page 2022-02-06 00:24:56.000000000 +0100 +++ new/jasper-version-3.0.1/build/github/make_main_gh_page 2022-02-12 21:49:32.000000000 +0100 @@ -35,6 +35,15 @@ esac } +get_realpath() +{ + if [ $# -ne 1 ]; then + return 1 + fi + local path="$1" + python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$path" +} + ################################################################################ # Usage information. ################################################################################ @@ -47,7 +56,11 @@ Options ======= + -v + Enable verbose mode. + -d \$in_dir + Set input directory to \$in_dir. Examples ======== @@ -61,9 +74,10 @@ # Parse command line. ################################################################################ +verbose=0 in_dir= -while getopts d:o:h option; do +while getopts d:o:hv option; do case $option in d) in_dir="$OPTARG";; @@ -87,13 +101,16 @@ base=$(basename "$path") || panic case "$base" in version-*.*.*-*) - other_list+=("$base") + #other_list+=("$base") + other_list=("$base" "${other_list[@]}") ;; version-*) - official_list+=("$base") + #official_list+=("$base") + official_list=("$base" "${official_list[@]}") ;; *) - other_list+=("$base") + #other_list+=("$base") + other_list=("$base" "${other_list[@]}") ;; esac fi @@ -133,7 +150,17 @@ panic "printf failed" printf "<ul>\n" -version="latest official release (does not include pre-releases)" +buffer=$(get_realpath "$in_dir/latest") || \ + panic "cannot get realpath" +buffer=$(basename "$buffer") || \ + panic "cannot get basename" +latest_version=$(dir_to_version "$buffer") || \ + panic "cannot get latest version" +if [ "$verbose" -ge 1 ]; then + eecho "latest version: $latest_version" +fi + +version="latest release (i.e., $latest_version)" url="latest/html/index.html" printf " <li><a href=$dquote$url$dquote>$version</a>\n" || \ panic "printf failed" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jasper-version-3.0.0/src/app/CMakeLists.txt new/jasper-version-3.0.1/src/app/CMakeLists.txt --- old/jasper-version-3.0.0/src/app/CMakeLists.txt 2022-02-06 00:24:56.000000000 +0100 +++ new/jasper-version-3.0.1/src/app/CMakeLists.txt 2022-02-12 21:49:32.000000000 +0100 @@ -60,6 +60,14 @@ ${MATH_LIBRARY} ${THREAD_LIBRARY}) set(private_programs "${private_programs}" test_1) +if(JAS_ENABLE_CXX) + # The test_2 program. + add_executable(test_2 test_2.cpp) + target_link_libraries(test_2 libjasper ${JAS_LIBJPEG_TARGET} + ${THREAD_LIBRARY}) + set(private_programs "${private_programs}" test_2) +endif() + if(JAS_ENABLE_FUZZER) add_executable(fuzz fuzz.c) target_link_libraries(fuzz libjasper ${JAS_LIBJPEG_TARGET} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jasper-version-3.0.0/src/app/test_2.cpp new/jasper-version-3.0.1/src/app/test_2.cpp --- old/jasper-version-3.0.0/src/app/test_2.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/jasper-version-3.0.1/src/app/test_2.cpp 2022-02-12 21:49:32.000000000 +0100 @@ -0,0 +1,21 @@ +#include <iostream> +#include <jasper/jasper.h> + +class jasper_library +{ +public: + jasper_library() + { + jas_conf_clear(); + jas_init_library(); + } + ~jasper_library() + { + jas_cleanup_library(); + } +}; + +int main() +{ + jasper_library lib; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jasper-version-3.0.0/src/libjasper/base/jas_stream.c new/jasper-version-3.0.1/src/libjasper/base/jas_stream.c --- old/jasper-version-3.0.0/src/libjasper/base/jas_stream.c 2022-02-06 00:24:56.000000000 +0100 +++ new/jasper-version-3.0.1/src/libjasper/base/jas_stream.c 2022-02-12 21:49:32.000000000 +0100 @@ -102,7 +102,7 @@ #include <unistd.h> #endif -#if defined(WIN32) || defined(JAS_HAVE_IO_H) +#if defined(_WIN32) || defined(JAS_HAVE_IO_H) #include <io.h> #endif @@ -533,7 +533,7 @@ /* Parse the mode string. */ stream->openmode_ = jas_strtoopenmode(mode); -#if defined(WIN32) || defined(JAS_HAVE_IO_H) +#if defined(_WIN32) || defined(JAS_HAVE_IO_H) /* Argh!!! Someone ought to banish text mode (i.e., O_TEXT) to the greatest depths of purgatory! */ /* Ensure that the file descriptor is in binary mode, if the caller diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jasper-version-3.0.0/src/libjasper/include/jasper/jas_log.h new/jasper-version-3.0.1/src/libjasper/include/jasper/jas_log.h --- old/jasper-version-3.0.0/src/libjasper/include/jasper/jas_log.h 2022-02-06 00:24:56.000000000 +0100 +++ new/jasper-version-3.0.1/src/libjasper/include/jasper/jas_log.h 2022-02-12 21:49:32.000000000 +0100 @@ -119,11 +119,11 @@ /*! @brief Create an instance of a logtype. */ -static inline jas_logtype_t jas_logtype_init(int class, int priority) +static inline jas_logtype_t jas_logtype_init(int clas, int priority) { - assert(class >= 0 && class < JAS_LOGTYPE_NUM_CLASSES); + assert(clas >= 0 && clas < JAS_LOGTYPE_NUM_CLASSES); assert(priority >= 0 && priority <= JAS_LOGTYPE_MAX_PRIORITY); - return (class & 0xf) | (priority << 4); + return (clas & 0xf) | (priority << 4); } /*!
