From 9828987f48078b8d57dd4f612edd79f9265c1b1d Mon Sep 17 00:00:00 2001 From: openKylinBot Date: Mon, 25 Apr 2022 22:03:04 +0800 Subject: [PATCH] Import Debian changes 2.0.0+dfsg-ok1 charls (2.0.0+dfsg-ok1) yangtze; urgency=medium * Build for openKylin. --- debian/changelog | 5 +++ debian/compat | 1 + debian/control | 46 +++++++++++++++++++++++++ debian/copyright | 48 +++++++++++++++++++++++++++ debian/libcharls2.symbols | 10 ++++++ debian/patches/add_visibility.patch | 16 +++++++++ debian/patches/noexplicitstd.patch | 16 +++++++++ debian/patches/series | 3 ++ debian/patches/stl_symbols_hack.patch | 27 +++++++++++++++ debian/rules | 36 ++++++++++++++++++++ debian/source/format | 1 + debian/watch | 4 +++ 12 files changed, 213 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/libcharls2.symbols create mode 100644 debian/patches/add_visibility.patch create mode 100644 debian/patches/noexplicitstd.patch create mode 100644 debian/patches/series create mode 100644 debian/patches/stl_symbols_hack.patch create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..cc7a224 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +charls (2.0.0+dfsg-ok1) yangtze; urgency=medium + + * Build for openKylin. + + -- openKylinBot Mon, 25 Apr 2022 22:03:04 +0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..21de4df --- /dev/null +++ b/debian/control @@ -0,0 +1,46 @@ +Source: charls +Maintainer: Debian Med Packaging Team +Uploaders: Andreas Tille +Section: science +Priority: optional +Build-Depends: debhelper (>= 11~), + cmake +Standards-Version: 4.2.1 +Vcs-Browser: https://salsa.debian.org/med-team/charls +Vcs-Git: https://salsa.debian.org/med-team/charls.git +Homepage: https://github.com/team-charls/charls + +Package: libcharls-dev +Architecture: any +Multi-Arch: same +Section: libdevel +Depends: libcharls2 (= ${binary:Version}), + ${misc:Depends} +Description: Implementation of the JPEG-LS standard (development libraries) + CharLS is an optimized implementation of the JPEG-LS standard for lossless and + near-lossless image compression + . + JPEG-LS (ISO-14495-1/ITU-T.87) is a standard derived from the Hewlett Packard + LOCO algorithm. JPEG LS has low complexity (meaning fast compression) and high + compression ratios, similar to JPEG 2000. JPEG-LS is more similar to the old + Lossless JPEG than to JPEG 2000, but interestingly the two different techniques + result in vastly different performance characteristics. + . + This package contains the development files. + +Package: libcharls2 +Architecture: any +Multi-Arch: same +Section: libs +Depends: ${shlibs:Depends}, + ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Description: Implementation of the JPEG-LS standard + CharLS is an optimized implementation of the JPEG-LS standard for lossless and + near-lossless image compression + . + JPEG-LS (ISO-14495-1/ITU-T.87) is a standard derived from the Hewlett Packard + LOCO algorithm. JPEG LS has low complexity (meaning fast compression) and high + compression ratios, similar to JPEG 2000. JPEG-LS is more similar to the old + Lossless JPEG than to JPEG 2000, but interestingly the two different techniques + result in vastly different performance characteristics. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..5eef290 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,48 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: CharLS +Upstream-Contact: Jan de Vaan +Source: https://github.com/team-charls/charls/releases +Files-Excluded: */test/conformance + */test/jlsimage + */test/*.raw + */test/*.jls + */test/*.dcm + */test/*.ppm + */test/MR2_UNC + *.vcproj* + *.vcxproj* + +Files: * +Copyright: © Jan de Vaan 2007-2010, all rights reserved. +License: BSD-3-clause + +Files: debian/* +Copyright: © 2011-2012 Mathieu Malaterre +License: BSD-3-clause + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + * Neither the name of my employer, nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/debian/libcharls2.symbols b/debian/libcharls2.symbols new file mode 100644 index 0000000..c3cd590 --- /dev/null +++ b/debian/libcharls2.symbols @@ -0,0 +1,10 @@ +libCharLS.so.2 libcharls2 #MINVER# + JpegLsDecode@Base 2.0.0+dfsg + JpegLsDecodeRect@Base 2.0.0+dfsg + JpegLsEncode@Base 2.0.0+dfsg + JpegLsReadHeader@Base 2.0.0+dfsg + JpegLsVerifyEncode@Base 2.0.0+dfsg + _Z18JpegLsDecodeStream14ByteStreamInfoS_PK13JlsParametersPc@Base 2.0.0+dfsg + (arch-bits=64)_Z18JpegLsEncodeStream14ByteStreamInfoRmS_RK13JlsParametersPc@Base 2.0.0+dfsg + (arch-bits=32)_Z18JpegLsEncodeStream14ByteStreamInfoRjS_RK13JlsParametersPc@Base 2.0.0+dfsg + _Z22JpegLsReadHeaderStream14ByteStreamInfoP13JlsParametersPc@Base 2.0.0+dfsg diff --git a/debian/patches/add_visibility.patch b/debian/patches/add_visibility.patch new file mode 100644 index 0000000..dce19da --- /dev/null +++ b/debian/patches/add_visibility.patch @@ -0,0 +1,16 @@ +Description: Use GCC Visibility +Author: Mathieu Malaterre +Forwarded: no +Last-Update: 2019-01-03 + +--- charls-2.0.0+dfsg.orig/src/charls.h ++++ charls-2.0.0+dfsg/src/charls.h +@@ -15,7 +15,7 @@ + + // Non-windows (static linking) + #if !defined(CHARLS_IMEXPORT) && !defined(_WIN32) +-# define CHARLS_IMEXPORT(returntype) returntype ++# define CHARLS_IMEXPORT(returntype) __attribute__ ((visibility ("default"))) returntype + #endif + + // Windows static linking diff --git a/debian/patches/noexplicitstd.patch b/debian/patches/noexplicitstd.patch new file mode 100644 index 0000000..09cc57b --- /dev/null +++ b/debian/patches/noexplicitstd.patch @@ -0,0 +1,16 @@ +Description: Debian buildd wants to use the default c++ standard always (not hardcoded) +Author: Mathieu Malaterre +Forwarded: no +Last-Update: 2019-01-03 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,7 +7,7 @@ if (CMAKE_COMPILER_IS_GNUCC) + # SET(CMAKE_CXX_FLAGS "-D NDEBUG -O3 -Wall -Wextra -pedantic -fvisibility=hidden -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -ftracer" ) + + # Define GNU C++ defines for both Debug and Release +- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra") ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") + + # Define specific Debug settings. + set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0d1a685 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +add_visibility.patch +stl_symbols_hack.patch +noexplicitstd.patch diff --git a/debian/patches/stl_symbols_hack.patch b/debian/patches/stl_symbols_hack.patch new file mode 100644 index 0000000..ca108ac --- /dev/null +++ b/debian/patches/stl_symbols_hack.patch @@ -0,0 +1,27 @@ +Description: Rework the symbol file to hide stl exported symbols + Also add missing header +Author: Mathieu Malaterre +Forwarded: no + +--- /dev/null ++++ b/exports.version +@@ -0,0 +1,9 @@ ++{ ++global: ++ JpegLs*; ++ extern "C++" { ++ JpegLs*; ++ }; ++local: ++ *; ++}; +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,6 +46,7 @@ set (CHARLS_LIB_MINOR_VERSION 0) + set_target_properties(CharLS PROPERTIES + VERSION ${CHARLS_LIB_MAJOR_VERSION}.${CHARLS_LIB_MINOR_VERSION} + SOVERSION ${CHARLS_LIB_MAJOR_VERSION}) ++set_property(TARGET CharLS PROPERTY LINK_FLAGS "-Wl,--version-script=../exports.version") + + install (TARGETS CharLS RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..c61b229 --- /dev/null +++ b/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f +#export DH_VERBOSE=1 + +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--version-script=../exports.version +export DEB_CFLAGS_MAINT_APPEND = -fvisibility=hidden -fvisibility-inlines-hidden +export DEB_CXXFLAGS_MAINT_APPEND = -fvisibility=hidden -fvisibility-inlines-hidden +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +CMAKE_EXTRA_FLAGS += -DCMAKE_BUILD_TYPE:STRING=None \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" + +%: + dh $@ --buildsystem=cmake + +override_dh_auto_configure: + dh_auto_configure -- $(CMAKE_EXTRA_FLAGS) + +pkg_run = libcharls2 +pkg_dev = libcharls-dev + +override_dh_install-arch: + # Runtime Package + dh_install -p$(pkg_run) usr/lib/$(DEB_HOST_MULTIARCH)/lib*.so.* + # Development Package + dh_install -p$(pkg_dev) usr/include + dh_install -p$(pkg_dev) usr/lib/$(DEB_HOST_MULTIARCH)/lib*.so +# dh_install -a +# d-shlibmove --commit \ +# --multiarch \ +# --devunversioned \ +# --movedev debian/tmp/usr/include/* usr/include \ +# debian/tmp/usr/lib/*/*.so diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..c2415db --- /dev/null +++ b/debian/watch @@ -0,0 +1,4 @@ +version=4 + +opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g,repack,compression=xz" \ + https://github.com/team-charls/charls/releases .*/archive/([\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)