zstd: Update to 1.4.5

This commit is contained in:
Alexey Pavlov
2020-05-30 00:13:11 +03:00
parent bb7d780202
commit 5df34322e8
4 changed files with 16 additions and 47 deletions

View File

@@ -2,26 +2,22 @@
pkgbase=zstd
pkgname=('zstd' 'libzstd' 'libzstd-devel')
pkgver=1.4.4
pkgrel=2
pkgver=1.4.5
pkgrel=1
pkgdesc="Zstandard - Fast real-time compression algorithm"
arch=('i686' 'x86_64')
url='https://facebook.github.io/zstd/'
license=('BSD')
makedepends=('gcc' 'make' 'cmake')
source=(${pkgbase}-${pkgver}.tar.gz::"https://github.com/facebook/${pkgname}/archive/v${pkgver}.tar.gz"
'fix-core-count-detection.patch'
'define-posix-c-source.patch')
sha256sums=('a364f5162c7d1a455cc915e8e3cf5f4bd8b75d09bc0f53965b0c9ca1383c52c8'
'71f7c97fbc19554ce225a7e72ba658cf855e8492b980843581af13ffad8c52ca'
'7ca0ca31df6099774ba2bba1b6f3cb7e376ae71c9e5775fb8602836231864416')
'zstd-1.4.5-fix-install-shared-library.patch')
sha256sums=('734d1f565c42f691f8420c8d06783ad818060fc390dee43ae0a89f86d0a4f8c2'
'31e071e5e7e75dcecfd1eafd07a0b6bb5cfbcdc5b5c172478b73c1915d2cdc06')
options=(!libtool)
prepare() {
cd "${srcdir}/${pkgbase}-${pkgver}"
patch -p1 -i ${srcdir}/fix-core-count-detection.patch
patch -p1 -i ${srcdir}/define-posix-c-source.patch
patch -p1 -i ${srcdir}/zstd-1.4.5-fix-install-shared-library.patch
}
build() {

View File

@@ -1,26 +0,0 @@
--- zstd-1.4.4/programs/platform.h.orig 2020-01-06 07:28:37.141195500 +0100
+++ zstd-1.4.4/programs/platform.h 2020-01-06 07:28:47.173254300 +0100
@@ -90,7 +90,7 @@
&& ( defined(__unix__) || defined(__unix) \
|| defined(__midipix__) || defined(__VMS) || defined(__HAIKU__) )
-# if defined(__linux__) || defined(__linux)
+# if defined(__linux__) || defined(__linux) || defined(__CYGWIN__)
# ifndef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 200809L /* feature test macro : https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html */
# endif
@@ -114,11 +114,11 @@
************************************************/
#if (defined(__linux__) && (PLATFORM_POSIX_VERSION > 1)) \
|| (PLATFORM_POSIX_VERSION >= 200112L) \
- || defined(__DJGPP__) \
- || defined(__MSYS__)
+ || defined(__DJGPP__)
# include <unistd.h> /* isatty */
+# include <stdio.h> /* fileno */
# define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
-#elif defined(MSDOS) || defined(OS2) || defined(__CYGWIN__)
+#elif defined(MSDOS) || defined(OS2)
# include <io.h> /* _isatty */
# define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
#elif defined(WIN32) || defined(_WIN32)

View File

@@ -1,11 +0,0 @@
--- zstd-1.4.4/programs/util.c.orig 2020-01-06 06:41:47.793486500 +0100
+++ zstd-1.4.4/programs/util.c 2020-01-06 06:41:57.234481400 +0100
@@ -621,7 +621,7 @@
return numPhysicalCores;
}
-#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__CYGWIN__)
/* Use POSIX sysconf
* see: man 3 sysconf */

View File

@@ -0,0 +1,10 @@
--- zstd-1.4.5/build/cmake/lib/CMakeLists.txt.orig 2020-05-25 11:23:42.926850300 +0300
+++ zstd-1.4.5/build/cmake/lib/CMakeLists.txt 2020-05-25 11:25:39.595943300 +0300
@@ -163,6 +163,7 @@
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
# uninstall target