summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Mattern2016-11-08 00:37:16 +0100
committerPeter Mattern2016-11-08 00:37:16 +0100
commit4f43449952b37e0319435774c566adee17b319f5 (patch)
treea6cfd0958a3b60937c5fd48173c7c4191399ec53
downloadaur-4f43449952b37e0319435774c566adee17b319f5.tar.gz
Initial commit
-rw-r--r--.SRCINFO22
-rw-r--r--License.txt27
-rw-r--r--PKGBUILD46
-rw-r--r--extend-headers.patch12
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..da6a2613713
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+# Generated by mksrcinfo v8
+# Mon Nov 7 23:35:31 UTC 2016
+pkgbase = charls1
+ pkgdesc = A C++ JPEG-LS library implementation. Legacy release 1.x.
+ pkgver = 1.1.0
+ pkgrel = 1
+ url = https://github.com/team-charls/charls
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = cmake
+ makedepends = dos2unix
+ provides = charls
+ conflicts = charls
+ conflicts = charls-git
+ source = charls-1.1.0.tar.gz::https://github.com/team-charls/charls/archive/1.1.0.tar.gz
+ source = extend-headers.patch
+ sha256sums = 02291d5787d8c54b20374ffec4f5157b9bb7ec307f3c1705017ea3fc0f674841
+ sha256sums = 5d7aa69e8d5798a6c92841cbc5db9ebaf49224d0137635652b47a5cd22f8e75e
+
+pkgname = charls1
+
diff --git a/License.txt b/License.txt
new file mode 100644
index 00000000000..94592b0fd06
--- /dev/null
+++ b/License.txt
@@ -0,0 +1,27 @@
+Copyright (c) 2007-2010, Jan de Vaan
+All rights reserved.
+
+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/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..4d3d34c3da8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Peter Mattern <pmattern at arcor dot de>
+
+_pkgname=charls
+pkgname="$_pkgname"1
+pkgver=1.1.0
+pkgrel=1
+pkgdesc='A C++ JPEG-LS library implementation. Legacy release 1.x.'
+arch=('i686' 'x86_64')
+url='https://github.com/team-charls/charls'
+license=('BSD')
+makedepends=('cmake' 'dos2unix')
+# Apparently the latest stable release of DCMTK, which is close to six years old but represents the
+# only and still somewhat relevant reverse dependency of this package, cannot be bothered to use
+# system CharLS at any other than the default location. Thus this package has to conflict with all
+# other CharLS releases available right now.
+provides=("$_pkgname")
+conflicts=("$_pkgname"{,-git})
+source=("$_pkgname-$pkgver.tar.gz::https://github.com/team-charls/$_pkgname/archive/$pkgver.tar.gz"
+ extend-headers.patch)
+sha256sums=('02291d5787d8c54b20374ffec4f5157b9bb7ec307f3c1705017ea3fc0f674841'
+ '5d7aa69e8d5798a6c92841cbc5db9ebaf49224d0137635652b47a5cd22f8e75e')
+
+prepare() {
+ # export additional header, again to please latest stable DCMTK release
+ patch -p1 < $srcdir/extend-headers.patch
+
+ # remove CRLF sequence
+ for i in $(find $_pkgname-$pkgver -type f -exec file {} \; | grep CRLF | sed 's/:.*$//')
+ do
+ dos2unix $i
+ done
+}
+
+build() {
+ mkdir -p build
+ cd build
+ cmake $srcdir/$_pkgname-$pkgver -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd build
+ make DESTDIR="$pkgdir" install
+ # referencing $startdir as workaround for license file missing in upstream release archive
+ install -D -m644 $startdir/License.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/extend-headers.patch b/extend-headers.patch
new file mode 100644
index 00000000000..4bc9bde207a
--- /dev/null
+++ b/extend-headers.patch
@@ -0,0 +1,12 @@
+--- a/charls-1.1.0/CMakeLists.txt 2016-05-15 22:40:58.000000000 +0200
++++ b/charls-1.1.0/CMakeLists.txt 2016-11-07 22:48:26.924423213 +0100
+@@ -41,7 +41,8 @@
+ set (charls_HEADERS
+ src/context.h src/defaulttraits.h src/jpegimagedatasegment.h src/jpegsegment.h src/lookuptable.h src/publictypes.h
+ src/colortransform.h src/contextrunmode.h src/encoderstrategy.h src/jpegmarker.h src/losslesstraits.h src/scan.h
+-src/config.h src/decoderstrategy.h src/header.h src/jpegmarkersegment.h src/jpegstreamwriter.h src/processline.h src/util.h)
++src/config.h src/decoderstrategy.h src/header.h src/jpegmarkersegment.h src/jpegstreamwriter.h src/processline.h
++src/interface.h src/util.h)
+
+ add_library(CharLS src/interface.cpp src/jpegls.cpp src/jpegmarkersegment.cpp src/header.cpp src/jpegstreamwriter.cpp)
+ set (CHARLS_LIB_MAJOR_VERSION 1)