summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorPrzemyslaw Skibinski <inikep@gmail.com>2016-11-03 12:12:51 (GMT)
committerPrzemyslaw Skibinski <inikep@gmail.com>2016-11-03 12:12:51 (GMT)
commitb768da8ad801d1b30c0fe24d0b6e48c3e6545771 (patch)
tree0e138c0edf714f44dab445ff0188a3b682a67077 /contrib
parent3eb143fffa0a557726658d8164e76239dea9245c (diff)
parent59adfd82d6c00c005a88ef5bdd405204d71d5729 (diff)
downloadlz4-b768da8ad801d1b30c0fe24d0b6e48c3e6545771.zip
lz4-b768da8ad801d1b30c0fe24d0b6e48c3e6545771.tar.gz
lz4-b768da8ad801d1b30c0fe24d0b6e48c3e6545771.tar.bz2
Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cmake_unofficial/.gitignore7
-rw-r--r--contrib/cmake_unofficial/CMakeLists.txt110
-rw-r--r--contrib/debian/changelog10
-rw-r--r--contrib/debian/compat1
-rw-r--r--contrib/debian/control23
-rw-r--r--contrib/debian/copyright9
-rw-r--r--contrib/debian/dirs1
-rw-r--r--contrib/debian/docs0
-rw-r--r--contrib/debian/liblz4-dev.install2
-rw-r--r--contrib/debian/liblz4.install2
-rwxr-xr-xcontrib/debian/rules8
11 files changed, 173 insertions, 0 deletions
diff --git a/contrib/cmake_unofficial/.gitignore b/contrib/cmake_unofficial/.gitignore
new file mode 100644
index 0000000..0f81929
--- /dev/null
+++ b/contrib/cmake_unofficial/.gitignore
@@ -0,0 +1,7 @@
+# cmake artefact
+
+CMakeCache.txt
+CMakeFiles
+*.cmake
+Makefile
+liblz4.pc
diff --git a/contrib/cmake_unofficial/CMakeLists.txt b/contrib/cmake_unofficial/CMakeLists.txt
new file mode 100644
index 0000000..6edec98
--- /dev/null
+++ b/contrib/cmake_unofficial/CMakeLists.txt
@@ -0,0 +1,110 @@
+PROJECT(LZ4 C)
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LZ4 compression library")
+set(CPACK_PACKAGE_VERSION_MAJOR 1)
+set(CPACK_PACKAGE_VERSION_MINOR 7)
+set(CPACK_PACKAGE_VERSION_PATCH 2)
+set(VERSION_STRING " \"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\" ")
+include(CPack)
+
+cmake_minimum_required (VERSION 2.6)
+INCLUDE (CheckTypeSize)
+check_type_size("void *" SIZEOF_VOID_P)
+IF(SIZEOF_VOID_P STREQUAL "8")
+ set (CMAKE_SYSTEM_PROCESSOR "64bit")
+ MESSAGE( STATUS "64 bit architecture detected size of void * is " ${SIZEOF_VOID_P})
+ENDIF()
+
+option(BUILD_TOOLS "Build the command line tools" ON)
+option(BUILD_LIBS "Build the libraries in addition to the tools" ON)
+option(LINK_TOOLS_WITH_LIB "Link the command line tools with the (shared) library" OFF)
+
+IF(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
+ CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ SET(GNU_COMPATIBLE_COMPILER 1)
+ENDIF()
+
+
+set(LZ4_DIR ../../lib/)
+set(PRG_DIR ../../programs/)
+set(LZ4_SRCS_LIB ${LZ4_DIR}lz4.c ${LZ4_DIR}lz4hc.c ${LZ4_DIR}lz4.h ${LZ4_DIR}lz4hc.h ${LZ4_DIR}lz4frame.c ${LZ4_DIR}lz4frame.h ${LZ4_DIR}xxhash.c)
+set(LZ4_SRCS ${LZ4_DIR}lz4frame.c ${LZ4_DIR}xxhash.c ${PRG_DIR}bench.c ${PRG_DIR}lz4cli.c ${PRG_DIR}lz4io.c)
+
+if(BUILD_TOOLS AND NOT (LINK_TOOLS_WITH_LIB AND BUILD_LIBS))
+ set(LZ4_SRCS ${LZ4_SRCS} ${LZ4_SRCS_LIB})
+endif()
+
+if(BUILD_TOOLS)
+ add_executable(lz4 ${LZ4_SRCS})
+ install(TARGETS lz4 RUNTIME DESTINATION "bin/")
+endif()
+
+if(BUILD_LIBS)
+
+
+ SET(LIBS_TARGETS "")
+ IF(WIN32)
+ add_library(liblz4 STATIC ${LZ4_SRCS_LIB})
+ SET(LIBS_TARGETS liblz4)
+ ELSE(WIN32)
+ add_library(liblz4 SHARED ${LZ4_SRCS_LIB})
+ add_library(liblz4_static STATIC ${LZ4_SRCS_LIB})
+ SET_TARGET_PROPERTIES(liblz4_static PROPERTIES OUTPUT_NAME lz4)
+ SET(LIBS_TARGETS liblz4 liblz4_static)
+ ENDIF(WIN32)
+
+ set_target_properties(liblz4 PROPERTIES
+ OUTPUT_NAME lz4
+ SOVERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
+ )
+
+ install(TARGETS ${LIBS_TARGETS}
+ RUNTIME DESTINATION lib #on Windows: cmake considers dlls as runtime component
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
+
+ install(FILES
+ ${LZ4_DIR}/lz4.h
+ ${LZ4_DIR}/lz4hc.h
+ ${LZ4_DIR}/lz4frame.h
+ DESTINATION include
+ )
+
+ set(PREFIX ${CMAKE_INSTALL_PREFIX})
+ set(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
+ set(INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include)
+ string(SUBSTRING ${CPACK_PACKAGE_VERSION_PATCH} 1 -1 VERSION)
+ configure_file(${LZ4_DIR}/liblz4.pc.in liblz4.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblz4.pc
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig"
+ )
+
+ if(BUILD_TOOLS AND LINK_TOOLS_WITH_LIB)
+ target_link_libraries(lz4 liblz4)
+ endif()
+endif()
+
+
+#warnings
+
+if(MSVC)
+ ADD_DEFINITIONS("-W4")
+endif()
+if(GNU_COMPATIBLE_COMPILER)
+ ADD_DEFINITIONS("-Wall")
+endif()
+if(CMAKE_COMPILER_IS_GNUCXX)
+ ADD_DEFINITIONS("-Wextra")
+ ADD_DEFINITIONS("-Wundef")
+ ADD_DEFINITIONS("-Wshadow")
+ ADD_DEFINITIONS("-Wcast-align")
+ ADD_DEFINITIONS("-Wstrict-prototypes")
+endif(CMAKE_COMPILER_IS_GNUCXX)
+if(GNU_COMPATIBLE_COMPILER)
+ # we need gnu99 instead of c99 on Linux and Solaris
+ # to get C99 and POSIX definitions
+ # an alternative with cmake >= 3.1/3.2 is the C_STANDARD property
+ ADD_DEFINITIONS("-std=gnu99")
+endif()
+ADD_DEFINITIONS("-DLZ4_VERSION=\"${CPACK_PACKAGE_VERSION_PATCH}\"")
+INCLUDE_DIRECTORIES (${LZ4_DIR})
diff --git a/contrib/debian/changelog b/contrib/debian/changelog
new file mode 100644
index 0000000..87ac016
--- /dev/null
+++ b/contrib/debian/changelog
@@ -0,0 +1,10 @@
+liblz4 (1.7.2) unstable; urgency=low
+
+ * Changed : moved to versioning; package, cli and library have same version number
+ * Improved: Small decompression speed boost (+4%)
+ * Improved: Performance on ARMv6 and ARMv7
+ * Added : Debianization, by Evgeniy Polyakov
+ * Makefile: Generates object files (*.o) for faster (re)compilation on low power systems
+ * Fix : cli : crash on some invalid inputs
+
+ -- Yann Collet <Cyan4973@github.com> Sun, 28 Jun 2015 01:00:00 +0000
diff --git a/contrib/debian/compat b/contrib/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/contrib/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/contrib/debian/control b/contrib/debian/control
new file mode 100644
index 0000000..ac3b460
--- /dev/null
+++ b/contrib/debian/control
@@ -0,0 +1,23 @@
+Source: liblz4
+Section: devel
+Priority: optional
+Maintainer: Evgeniy Polyakov <zbr@ioremap.net>
+Build-Depends:
+ cmake (>= 2.6),
+ debhelper (>= 7.0.50~),
+ cdbs
+Standards-Version: 3.8.0
+Homepage: http://www.lz4.org/
+Vcs-Git: git://github.com/lz4/lz4.git
+Vcs-Browser: https://github.com/lz4/lz4
+
+Package: liblz4
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Extremely Fast Compression algorithm http://www.lz4.org
+
+Package: liblz4-dev
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Extremely Fast Compression algorithm http://www.lz4.org
+ Development files.
diff --git a/contrib/debian/copyright b/contrib/debian/copyright
new file mode 100644
index 0000000..18a7f48
--- /dev/null
+++ b/contrib/debian/copyright
@@ -0,0 +1,9 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: liblz4
+Upstream-Contact: Yann Collet <Cyan4973@github.com>
+Source: https://github.com/lz4/lz4
+
+Files: *
+Copyright: (C) 2011+ Yann Collet
+License: GPL-2+
+ The full text of license: https://github.com/Cyan4973/lz4/blob/master/lib/LICENSE
diff --git a/contrib/debian/dirs b/contrib/debian/dirs
new file mode 100644
index 0000000..e772481
--- /dev/null
+++ b/contrib/debian/dirs
@@ -0,0 +1 @@
+usr/bin
diff --git a/contrib/debian/docs b/contrib/debian/docs
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/contrib/debian/docs
diff --git a/contrib/debian/liblz4-dev.install b/contrib/debian/liblz4-dev.install
new file mode 100644
index 0000000..3a02909
--- /dev/null
+++ b/contrib/debian/liblz4-dev.install
@@ -0,0 +1,2 @@
+usr/include/lz4*
+usr/lib/liblz4.so
diff --git a/contrib/debian/liblz4.install b/contrib/debian/liblz4.install
new file mode 100644
index 0000000..e444956
--- /dev/null
+++ b/contrib/debian/liblz4.install
@@ -0,0 +1,2 @@
+usr/lib/liblz4.so.*
+usr/bin/*
diff --git a/contrib/debian/rules b/contrib/debian/rules
new file mode 100755
index 0000000..748e68d
--- /dev/null
+++ b/contrib/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/cmake.mk
+
+
+DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_BUILD_TYPE=RelWithDebInfo ../cmake_unofficial
+