packages: CharLS/CharLS-add_cmake_install_target.patch (NEW), CharLS/CharLS...

qboosh qboosh at pld-linux.org
Sat Feb 18 13:19:26 CET 2012


Author: qboosh                       Date: Sat Feb 18 12:19:26 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new; patches taken from Fedora

---- Files affected:
packages/CharLS:
   CharLS-add_cmake_install_target.patch (NONE -> 1.1)  (NEW), CharLS-add_sharedlib_soname.patch (NONE -> 1.1)  (NEW), CharLS-fix_tests.patch (NONE -> 1.1)  (NEW), CharLS.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/CharLS/CharLS-add_cmake_install_target.patch
diff -u /dev/null packages/CharLS/CharLS-add_cmake_install_target.patch:1.1
--- /dev/null	Sat Feb 18 13:19:26 2012
+++ packages/CharLS/CharLS-add_cmake_install_target.patch	Sat Feb 18 13:19:21 2012
@@ -0,0 +1,24 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8304f0d..88f0949 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -12,6 +12,11 @@ SET(CMAKE_CXX_FLAGS "-D NDEBUG -O3" )
+ ENDIF(CMAKE_COMPILER_IS_GNUCC)
+ ENDIF(NOT CMAKE_BUILD_TYPE)
+ 
++SET( charls_HEADERS "colortransform.h"  "context.h" "decoderstrategy.h"  "encoderstrategy.h"  "interface.h"
++    "losslesstraits.h"  "scan.h"    "streams.h" "config.h"          "contextrunmode.h"  "defaulttraits.h"
++    "header.h"           "lookuptable.h"  "processline.h"      "util.h" "publictypes.h"
++)
++
+ OPTION(charls_BUILD_SHARED_LIBS "Build CharLS with shared libraries." OFF)
+ SET(BUILD_SHARED_LIBS ${charls_BUILD_SHARED_LIBS})
+ 
+@@ -21,3 +26,7 @@ add_library(CharLS header.cpp  interface.cpp  jpegls.cpp  )
+ add_executable(charlstest test/main.cpp test/time.cpp test/util.cpp test/bitstreamdamage.cpp test/compliance.cpp test/performance.cpp test/dicomsamples.cpp)
+ target_link_libraries (charlstest CharLS)
+ 
++# Installs the header files into the {build_dir}/include/libcharls directory
++install(FILES ${charls_HEADERS} DESTINATION include/CharLS)
++
++

================================================================
Index: packages/CharLS/CharLS-add_sharedlib_soname.patch
diff -u /dev/null packages/CharLS/CharLS-add_sharedlib_soname.patch:1.1
--- /dev/null	Sat Feb 18 13:19:26 2012
+++ packages/CharLS/CharLS-add_sharedlib_soname.patch	Sat Feb 18 13:19:21 2012
@@ -0,0 +1,36 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 88f0949..c57ef72 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -20,8 +20,21 @@ SET( charls_HEADERS "colortransform.h"  "context.h" "decoderstrategy.h"  "encode
+ OPTION(charls_BUILD_SHARED_LIBS "Build CharLS with shared libraries." OFF)
+ SET(BUILD_SHARED_LIBS ${charls_BUILD_SHARED_LIBS})
+ 
+-add_library(CharLS header.cpp  interface.cpp  jpegls.cpp  )
++# Add soname to generated shared lib
+ 
++SET(CHARLS_LIB_MAJOR_VERSION 1)
++SET(CHARLS_LIB_MINOR_VERSION 0)
++
++IF(BUILD_SHARED_LIBS)
++       add_library(CharLS SHARED header.cpp  interface.cpp  jpegls.cpp  
++         stdafx.cpp
++         )
++       set_target_properties( CharLS PROPERTIES
++                              VERSION ${CHARLS_LIB_MAJOR_VERSION}.${CHARLS_LIB_MINOR_VERSION}
++                              SOVERSION ${CHARLS_LIB_MAJOR_VERSION}
++                              ) 
++
++ENDIF(BUILD_SHARED_LIBS)
+ 
+ add_executable(charlstest test/main.cpp test/time.cpp test/util.cpp test/bitstreamdamage.cpp test/compliance.cpp test/performance.cpp test/dicomsamples.cpp)
+ target_link_libraries (charlstest CharLS)
+@@ -29,4 +42,8 @@ target_link_libraries (charlstest CharLS)
+ # Installs the header files into the {build_dir}/include/libcharls directory
+ install(FILES ${charls_HEADERS} DESTINATION include/CharLS)
+ 
++# Installs the target file (libCharLS.so) into the {build_dir}/lib directory
++install(TARGETS CharLS LIBRARY DESTINATION lib${LIB_SUFFIX})
++
++
+ 

================================================================
Index: packages/CharLS/CharLS-fix_tests.patch
diff -u /dev/null packages/CharLS/CharLS-fix_tests.patch:1.1
--- /dev/null	Sat Feb 18 13:19:26 2012
+++ packages/CharLS/CharLS-fix_tests.patch	Sat Feb 18 13:19:21 2012
@@ -0,0 +1,13 @@
+diff --git a/defaulttraits.h b/defaulttraits.h
+index 5032f7d..734bcea 100644
+--- a/defaulttraits.h
++++ b/defaulttraits.h
+@@ -2,7 +2,7 @@
+ // (C) Jan de Vaan 2007-2010, all rights reserved. See the accompanying "License.txt" for licensed use. 
+ // 
+ 
+-
++#include "header.h"
+ #ifndef CHARLS_DEFAULTTRAITS
+ #define CHARLS_DEFAULTTRAITS
+ 

================================================================
Index: packages/CharLS/CharLS.spec
diff -u /dev/null packages/CharLS/CharLS.spec:1.1
--- /dev/null	Sat Feb 18 13:19:26 2012
+++ packages/CharLS/CharLS.spec	Sat Feb 18 13:19:21 2012
@@ -0,0 +1,95 @@
+# $Revision$, $Date$
+Summary:	An optimized implementation of the JPEG-LS standard
+Summary(pl.UTF-8):	Zoptymalizowana implementacja standardu JPEG-LS
+Name:		CharLS
+Version:	1.0
+Release:	1
+License:	BSD
+Group:		Libraries
+# to download, open this URL in fully JS-capable browser (elinks doesn't suffice)
+# and manually accept BSD(!) license
+#Source0Download: http://charls.codeplex.com/releases/view/55406
+Source0:	%{name}-source-%{version}.zip
+# Source0-md5:	4694f02fbe2c4e1897ff2188d6e3cefc
+Patch0:		%{name}-add_cmake_install_target.patch
+Patch1:		%{name}-add_sharedlib_soname.patch
+Patch2:		%{name}-fix_tests.patch
+URL:		http://charls.codeplex.com/
+BuildRequires:	cmake >= 2.6
+BuildRequires:	libstdc++-devel
+BuildRequires:	rpmbuild(macros) >= 1.566
+BuildRequires:	sed >= 4.0
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+An optimized implementation of the JPEG-LS standard for loss less and
+near loss less image compression. JPEG-LS is a low-complexity standard
+that matches JPEG 2000 compression ratios. In terms of speed, CharLS
+outperforms open source and commercial JPEG LS implementations.
+
+%description -l pl.UTF-8
+Zoptymalizowana implementacja standardu JPEG-LS bezstratnej i prawie
+bezstratnej kompresji obrazu. JPEG-LS to mało skomplikowany standard
+osiągający współczynniki kompresji standardu JPEG 2000. Pod względem
+szybkości CharLS jest wydajniejszy niż inne implementacje JPEG LS o
+otwartych źródłach, a także komercyjne.
+
+%package devel
+Summary:	Header files for CharLS library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki CharLS
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	libstdc++-devel
+
+%description devel
+Header files for CharLS library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki CharLS.
+
+%prep
+%setup -q -c
+
+%undos CMakeLists.txt defaulttraits.h
+
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+%cmake . \
+	-Dcharls_BUILD_SHARED_LIBS=ON \
+	-DBUILD_TESTING=ON
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc License.txt
+%attr(755,root,root) %{_libdir}/libCharLS.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libCharLS.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libCharLS.so
+%{_includedir}/CharLS
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2012/02/18 12:19:21  qboosh
+- new; patches taken from Fedora
================================================================


More information about the pld-cvs-commit mailing list