zstd: Install pkg-config file
This commit is contained in:
@@ -4,19 +4,21 @@ _realname=zstd
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.3.8
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Zstandard - Fast real-time compression algorithm (mingw-w64)"
|
||||
arch=('any')
|
||||
url='https://facebook.github.io/zstd/'
|
||||
license=('BSD')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/facebook/${_realname}/archive/v${pkgver}.tar.gz")
|
||||
sha256sums=('90d902a1282cc4e197a8023b6d6e8d331c1fd1dfe60f7f8e4ee9da40da886dc3')
|
||||
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/facebook/${_realname}/archive/v${pkgver}.tar.gz"
|
||||
install-pkgconfig.patch)
|
||||
sha256sums=('90d902a1282cc4e197a8023b6d6e8d331c1fd1dfe60f7f8e4ee9da40da886dc3'
|
||||
'9a8864dd11ad6f1eaf1e11ee19adfdbc4e023f20b14b429b8af2b387ffffdef4')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
patch -p1 -i ${srcdir}/install-pkgconfig.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
@@ -50,4 +52,8 @@ package() {
|
||||
cd "${srcdir}"/${_realname}-${pkgver}
|
||||
install -D -m644 "LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
|
||||
for pcfile in "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/*.pc; do
|
||||
sed -s "s|$(cygpath -m ${MINGW_PREFIX})|${MINGW_PREFIX}|g" -i "${pcfile}"
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
11
mingw-w64-zstd/install-pkgconfig.patch
Normal file
11
mingw-w64-zstd/install-pkgconfig.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- zstd-1.3.8/build/cmake/lib/CMakeLists.txt.orig 2019-03-11 10:23:49.374227000 +0300
|
||||
+++ zstd-1.3.8/build/cmake/lib/CMakeLists.txt 2019-03-11 10:24:14.334270800 +0300
|
||||
@@ -165,7 +165,7 @@
|
||||
OUTPUT_NAME ${STATIC_LIBRARY_BASE_NAME})
|
||||
endif ()
|
||||
|
||||
-if (UNIX)
|
||||
+if (NOT MSVC)
|
||||
# pkg-config
|
||||
set(PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
set(LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
@@ -1,24 +0,0 @@
|
||||
diff -Naur zstd-1.1.2-orig/Makefile zstd-1.1.2/Makefile
|
||||
--- zstd-1.1.2-orig/Makefile 2016-12-14 21:53:47.000000000 +0800
|
||||
+++ zstd-1.1.2/Makefile 2016-12-26 20:24:50.755892300 +0800
|
||||
@@ -61,7 +61,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# make install is validated only for Linux, OSX, Hurd and some BSD targets
|
||||
#------------------------------------------------------------------------------
|
||||
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD))
|
||||
+ifneq (,$(filter $(shell uname -o),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD Msys))
|
||||
HOST_OS = POSIX
|
||||
.PHONY: install uninstall travis-install clangtest gpptest armtest usan asan uasan
|
||||
|
||||
diff -Naur zstd-1.1.2-orig/programs/Makefile zstd-1.1.2/programs/Makefile
|
||||
--- zstd-1.1.2-orig/programs/Makefile 2016-12-14 21:53:47.000000000 +0800
|
||||
+++ zstd-1.1.2/programs/Makefile 2016-12-26 20:25:33.603688900 +0800
|
||||
@@ -153,7 +153,7 @@
|
||||
#----------------------------------------------------------------------------------
|
||||
#make install is validated only for Linux, OSX, kFreeBSD, Hurd and some BSD targets
|
||||
#----------------------------------------------------------------------------------
|
||||
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD DragonFly NetBSD))
|
||||
+ifneq (,$(filter $(shell uname -o),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD DragonFly NetBSD Msys))
|
||||
install: zstd
|
||||
@echo Installing binaries
|
||||
@install -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
|
||||
@@ -1,21 +0,0 @@
|
||||
diff -Naur zstd-1.1.2-orig/contrib/pzstd/Makefile zstd-1.1.2/contrib/pzstd/Makefile
|
||||
--- zstd-1.1.2-orig/contrib/pzstd/Makefile 2016-12-14 21:53:47.000000000 +0800
|
||||
+++ zstd-1.1.2/contrib/pzstd/Makefile 2016-12-26 23:01:06.288232100 +0800
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
# CFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS are for the users to override
|
||||
CFLAGS ?= -O3 -Wall -Wextra
|
||||
-CXXFLAGS ?= -O3 -Wall -Wextra -pedantic -std=c++11
|
||||
+CXXFLAGS ?= -O3 -Wall -Wextra -pedantic
|
||||
CPPFLAGS ?=
|
||||
LDFLAGS ?=
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
PZSTD_CPPFLAGS = $(PZSTD_INC)
|
||||
PZSTD_CCXXFLAGS =
|
||||
PZSTD_CFLAGS = $(PZSTD_CCXXFLAGS)
|
||||
-PZSTD_CXXFLAGS = $(PZSTD_CCXXFLAGS)
|
||||
+PZSTD_CXXFLAGS = $(PZSTD_CCXXFLAGS) -std=c++11
|
||||
PZSTD_LDFLAGS =
|
||||
EXTRA_FLAGS =
|
||||
ALL_CFLAGS = $(EXTRA_FLAGS) $(CPPFLAGS) $(PZSTD_CPPFLAGS) $(CFLAGS) $(PZSTD_CFLAGS)
|
||||
Reference in New Issue
Block a user