diff --git a/lz4/trunk/PKGBUILD b/lz4/trunk/PKGBUILD index 779934b1e4a..456090d303d 100644 --- a/lz4/trunk/PKGBUILD +++ b/lz4/trunk/PKGBUILD @@ -12,8 +12,15 @@ license=('GPL2') makedepends=('git') checkdepends=('diffutils') depends=('glibc') -source=("git+https://github.com/lz4/lz4.git#tag=v$pkgver") -md5sums=('SKIP') +source=("git+https://github.com/lz4/lz4.git#tag=v$pkgver" + "fix-static.patch") +md5sums=('SKIP' 'SKIP') +options=('!staticlibs') + +prepare() { + cd "${srcdir}/${pkgname}" + patch -p1 < "${srcdir}/fix-static.patch" +} build() { # do not use the main makefile, it calls sub make with -e diff --git a/lz4/trunk/fix-static.patch b/lz4/trunk/fix-static.patch new file mode 100644 index 00000000000..a79f2dd0daf --- /dev/null +++ b/lz4/trunk/fix-static.patch @@ -0,0 +1,21 @@ +diff --git a/lib/Makefile b/lib/Makefile +index c6fd7b8..c09fc37 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -42,7 +42,7 @@ LIBVER_MINOR := $(shell echo $(LIBVER_MINOR_SCRIPT)) + LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT)) + LIBVER := $(shell echo $(LIBVER_SCRIPT)) + +-BUILD_STATIC:= yes ++BUILD_STATIC:=yes + + CPPFLAGS+= -DXXH_NAMESPACE=LZ4_ + CFLAGS ?= -O3 +@@ -157,6 +157,7 @@ endif + @$(INSTALL_DATA) lz4.h $(DESTDIR)$(INCLUDEDIR)/lz4.h + @$(INSTALL_DATA) lz4hc.h $(DESTDIR)$(INCLUDEDIR)/lz4hc.h + @$(INSTALL_DATA) lz4frame.h $(DESTDIR)$(INCLUDEDIR)/lz4frame.h ++ @$(INSTALL_DATA) lz4frame_static.h $(DESTDIR)$(INCLUDEDIR)/lz4frame_static.h + @echo lz4 static and shared libraries installed + + uninstall: