This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
--- lz4/Makefile.orig 2017-01-14 09:15:06.753551500 -0500 | ||
+++ lz4/Makefile 2017-01-14 09:18:13.485092800 -0500 | ||
@@ -83,13 +83,6 @@ | ||
@$(RM) lz4$(EXT) | ||
@echo Cleaning completed | ||
|
||
- | ||
-#----------------------------------------------------------------------------- | ||
-# make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets | ||
-#----------------------------------------------------------------------------- | ||
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS)) | ||
-HOST_OS = POSIX | ||
- | ||
.PHONY: install uninstall | ||
install uninstall: | ||
@$(MAKE) -C $(LZ4DIR) $@ | ||
@@ -141,9 +134,6 @@ | ||
$(MAKE) -C $(PRGDIR) lz4 | ||
$(MAKE) -C examples test | ||
|
||
-endif | ||
- | ||
- | ||
ifneq (,$(filter MSYS%,$(shell uname))) | ||
HOST_OS = MSYS | ||
CMAKE_PARAMS = -G"MSYS Makefiles" | ||
--- lz4/lib/Makefile.orig 2017-01-14 09:19:37.846242400 -0500 | ||
+++ lz4/lib/Makefile 2017-01-14 09:31:05.500986000 -0500 | ||
@@ -62,11 +62,18 @@ | ||
SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT) | ||
SONAME_FLAGS = -install_name $(LIBDIR)/liblz4.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER) | ||
else | ||
+ifneq (,$(filter Windows%,$(OS))) | ||
+ SHARED_EXT = dll | ||
+ SONAME_FLAGS = -Wl,--out-implib,liblz4.$(SHARED_EXT).a | ||
+ SHARED_EXT_MAJOR = $(SHARED_EXT) | ||
+ SHARED_EXT_VER = $(SHARED_EXT) | ||
+else | ||
SONAME_FLAGS = -Wl,-soname=liblz4.$(SHARED_EXT).$(LIBVER_MAJOR) | ||
SHARED_EXT = so | ||
SHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR) | ||
SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER) | ||
endif | ||
+endif | ||
|
||
LIBLZ4 = liblz4.$(SHARED_EXT_VER) | ||
|
||
@@ -92,15 +99,7 @@ | ||
$(LIBLZ4): $(SRCFILES) | ||
ifeq ($(BUILD_SHARED),yes) # can be disabled on command line | ||
@echo compiling dynamic library $(LIBVER) | ||
-ifneq (,$(filter Windows%,$(OS))) | ||
- $(Q)$(CC) $(FLAGS) -DLZ4_DLL_EXPORT=1 -shared $^ -o dll\$@.dll | ||
- dlltool -D dll\liblz4.dll -d dll\liblz4.def -l dll\liblz4.lib | ||
-else | ||
- $(Q)$(CC) $(FLAGS) -shared $^ -fPIC -fvisibility=hidden $(SONAME_FLAGS) -o $@ | ||
- @echo creating versioned links | ||
- $(Q)ln -sf $@ liblz4.$(SHARED_EXT_MAJOR) | ||
- $(Q)ln -sf $@ liblz4.$(SHARED_EXT) | ||
-endif | ||
+ @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@ | ||
endif | ||
|
||
liblz4: $(LIBLZ4) | ||
@@ -109,12 +109,6 @@ | ||
$(Q)$(RM) *.a *.$(SHARED_EXT) *.$(SHARED_EXT_MAJOR) *.$(SHARED_EXT_VER) | ||
@echo Cleaning library completed | ||
|
||
- | ||
-#----------------------------------------------------------------------------- | ||
-# make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets | ||
-#----------------------------------------------------------------------------- | ||
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS)) | ||
- | ||
.PHONY: listL120 | ||
listL120: # extract lines >= 120 characters in *.{c,h}, by Takayuki Matsuoka (note : $$, for Makefile compatibility) | ||
find . -type f -name '*.c' -o -name '*.h' | while read -r filename; do awk 'length > 120 {print FILENAME "(" FNR "): " $$0}' $$filename; done | ||
@@ -137,6 +137,8 @@ | ||
prefix ?= $(PREFIX) | ||
EXEC_PREFIX ?= $(prefix) | ||
exec_prefix ?= $(EXEC_PREFIX) | ||
+bindir ?= $(exec_prefix)/bin | ||
+BINDIR ?= $(bindir) | ||
LIBDIR ?= $(exec_prefix)/lib | ||
libdir ?= $(LIBDIR) | ||
INCLUDEDIR ?= $(prefix)/include | ||
@@ -150,17 +145,17 @@ | ||
$< >$@ | ||
|
||
install: lib liblz4.pc | ||
- $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(pkgconfigdir)/ $(DESTDIR)$(includedir)/ $(DESTDIR)$(libdir)/ | ||
+ @echo Installing binaries | ||
+ $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ $(DESTDIR)$(INCLUDEDIR)/ $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(LIBDIR)/ $(DESTDIR)$(MANDIR)/ | ||
$(Q)$(INSTALL_DATA) liblz4.pc $(DESTDIR)$(pkgconfigdir)/ | ||
@echo Installing libraries | ||
ifeq ($(BUILD_STATIC),yes) | ||
$(Q)$(INSTALL_DATA) liblz4.a $(DESTDIR)$(libdir)/liblz4.a | ||
$(Q)$(INSTALL_DATA) lz4frame_static.h $(DESTDIR)$(includedir)/lz4frame_static.h | ||
endif | ||
ifeq ($(BUILD_SHARED),yes) | ||
- $(Q)$(INSTALL_PROGRAM) liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(libdir) | ||
- $(Q)ln -sf liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(libdir)/liblz4.$(SHARED_EXT_MAJOR) | ||
- $(Q)ln -sf liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(libdir)/liblz4.$(SHARED_EXT) | ||
+ $(Q)@$(INSTALL_PROGRAM) liblz4.$(SHARED_EXT) $(DESTDIR)$(BINDIR)/liblz4.$(SHARED_EXT_VER) | ||
+ $(Q)@$(INSTALL_DATA) liblz4.$(SHARED_EXT).a $(DESTDIR)$(LIBDIR) | ||
endif | ||
@echo Installing headers in $(includedir) | ||
$(Q)$(INSTALL_DATA) lz4.h $(DESTDIR)$(includedir)/lz4.h | ||
@@ -176,5 +172,3 @@ | ||
$(Q)$(RM) $(DESTDIR)$(includedir)/lz4frame.h | ||
$(Q)$(RM) $(DESTDIR)$(includedir)/lz4frame_static.h | ||
@echo lz4 libraries successfully uninstalled | ||
- | ||
-endif | ||
--- lz4/programs/Makefile.orig 2017-01-14 09:36:56.470728300 -0500 | ||
+++ lz4/programs/Makefile 2017-01-14 09:39:49.200207500 -0500 | ||
@@ -86,7 +86,7 @@ | ||
$(CC) $(FLAGS) $^ -o $@$(EXT) | ||
|
||
lz4c: lz4 | ||
- ln -s lz4 lz4c | ||
+ ln -s lz4$(EXT) lz4c$(EXT) | ||
|
||
lz4.1: lz4.1.md | ||
cat $^ | $(MD2ROFF) $(MD2ROFF_FLAGS) | sed -n '/^\.\\\".*/!p' > $@ | ||
@@ -107,12 +107,6 @@ | ||
preview-man: clean-man man | ||
man ./lz4.1 | ||
|
||
- | ||
-#----------------------------------------------------------------------------- | ||
-# make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets | ||
-#----------------------------------------------------------------------------- | ||
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS)) | ||
- | ||
unlz4: lz4 | ||
ln -s lz4 unlz4 | ||
|
||
@@ -165,5 +159,3 @@ | ||
@$(RM) $(DESTDIR)$(MANDIR)/lz4cat.1 | ||
@$(RM) $(DESTDIR)$(MANDIR)/unlz4.1 | ||
@echo lz4 programs successfully uninstalled | ||
- | ||
-endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Maintainer: Alexey Pavlov <alexpux@gmail.com> | ||
|
||
_realname=lz4 | ||
pkgbase=mingw-w64-${_realname} | ||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" | ||
pkgver=1.8.2 | ||
pkgrel=1 | ||
pkgdesc="Very fast lossless compression algorithm (mingw-w64)" | ||
arch=('any') | ||
url="http://www.lz4.org/" | ||
license=('BSD' 'GPL2') | ||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") | ||
checkdepends=('diffutils') | ||
options=('staticlibs' 'strip') | ||
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/lz4/lz4/archive/v${pkgver}.tar.gz" | ||
"001-mingw-install-over-msys.patch") | ||
sha256sums=('0963fbe9ee90acd1d15e9f09e826eaaf8ea0312e854803caf2db0a6dd40f4464' | ||
'1099d01ea431ae38f2d9f3b836c337819dd2115b2d919d7b7998d013e82f076b') | ||
|
||
prepare() { | ||
cd ${_realname}-${pkgver} | ||
patch -bp1 -i ${srcdir}/001-mingw-install-over-msys.patch | ||
cd - | ||
|
||
[[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" | ||
cp -rf "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MINGW_CHOST}" | ||
} | ||
|
||
build() { | ||
cd "${srcdir}/build-${MINGW_CHOST}" | ||
make -C lib CC=${MINGW_PREFIX}/bin/gcc BUILD_SHARED=no | ||
make -C programs CC=${MINGW_PREFIX}/bin/gcc lz4 lz4c | ||
} | ||
|
||
check() { | ||
cd ${srcdir} | ||
msg2 "rm -f profile.lz4" | ||
rm -f profile.lz4 || true | ||
|
||
${srcdir}/build-${MINGW_CHOST}/programs/lz4 /etc/profile profile.lz4 | ||
${srcdir}/build-${MINGW_CHOST}/programs/lz4 -d profile.lz4 profile | ||
diff -q /etc/profile profile | ||
|
||
rm profile | ||
} | ||
|
||
package() { | ||
cd "${srcdir}/build-${MINGW_CHOST}" | ||
make CC=${MINGW_PREFIX}/bin/gcc DESTDIR="${pkgdir}" PREFIX=${MINGW_PREFIX} install BUILD_SHARED=no | ||
} |