From 3569dc72c5eb972abd285e75079feed1d0536f2e Mon Sep 17 00:00:00 2001 From: mrceresa Date: Mar 11 2010 09:12:35 +0000 Subject: Initial import of CharLS in branch F-12 --- diff --git a/.cvsignore b/.cvsignore index e69de29..8f57b64 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +CharLS-1.0_beta.zip diff --git a/CharLS.spec b/CharLS.spec new file mode 100644 index 0000000..244f4bf --- /dev/null +++ b/CharLS.spec @@ -0,0 +1,96 @@ +Name: CharLS +Version: 1.0 +Release: 0.1.b%{?dist} +Summary: An optimized implementation of the JPEG-LS standard +Group: Development/Libraries +License: BSD +URL: http://charls.codeplex.com/ +# CharLS uses an interactive download link that asks you to accept the +# (BSD-like) license before obtaining the source code. +# You can find the download link at http://charls.codeplex.com/ +Source0: CharLS-1.0_beta.zip +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: libcharls_cmake_install.patch + +BuildRequires: cmake >= 2.6.0 +BuildRequires: dos2unix + +%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. + +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 +loss less JPEG than to JPEG 2000, but interestingly the two different techniques +result in vastly different performance characteristics. + +%prep +%setup -c -q + +rm CharLS.vcproj +rm CharLS.sln + +%patch0 + +dos2unix *.h +dos2unix *.c* +dos2unix *.txt + + +%build +%cmake -DBUILD_SHARED_LIBS:BOOL=ON\ + -Dcharls_BUILD_SHARED_LIBS:BOOL=ON\ + -DCMAKE_BUILD_TYPE:STRING="Release"\ + -DCMAKE_VERBOSE_MAKEFILE=ON\ + -DBUILD_TESTING=ON . + +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + + +%clean +rm -rf $RPM_BUILD_ROOT + +%check +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. +ctest . + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc License.txt +%{_libdir}/*.so.* + + +%package devel +Summary: Libraries and headers for CharLS +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel + +CharLS Library Header Files and Link Libraries + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/%{name}/ +%{_includedir}/%{name}/* +%{_libdir}/*.so + +%changelog +* Wed Feb 17 2010 Mario Ceresa mrceresa@gmail.com CharLS 1.0-0.1.b +- +- Changed name schema to comply with pre-release packages +* Wed Feb 17 2010 Mario Ceresa mrceresa@gmail.com CharLS 1.0b-1 +- Initial RPM Release diff --git a/import.log b/import.log new file mode 100644 index 0000000..99e788e --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +CharLS-1_0-0_1_b_fc12:F-12:CharLS-1.0-0.1.b.fc12.src.rpm:1268298705 diff --git a/libcharls_cmake_install.patch b/libcharls_cmake_install.patch new file mode 100644 index 0000000..f7c78d0 --- /dev/null +++ b/libcharls_cmake_install.patch @@ -0,0 +1,52 @@ +--- CMakeLists.txt 2009-09-07 12:07:00.000000000 +0200 ++++ CMakeLists2.txt 2010-02-19 16:46:28.000000000 +0100 +@@ -1,6 +1,11 @@ + project(charls) + cmake_minimum_required(VERSION 2.6) +- ++ ++SET(CHARLS_LIB_MAJOR_VERSION 1) ++SET(CHARLS_LIB_MINOR_VERSION 0) ++ ++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" "stdafx.h" "util.h" ++) + + # When user specify build type do not override settings: + IF(NOT CMAKE_BUILD_TYPE) +@@ -12,14 +17,29 @@ + + 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 +- stdafx.cpp +- ) ++ ++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/test.cpp test/time.cpp) +-target_link_libraries (charlstest CharLS) ++target_link_libraries (charlstest CharLS) + + include(CTest) +-add_test(charlstest charlstest) +\ No newline at end of file ++add_test(charlstest charlstest) ++ ++# 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}) ++ ++ diff --git a/sources b/sources index e69de29..e2e2934 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +b364b6b56f474327ad186d8e6b8f740d CharLS-1.0_beta.zip