Fredrik Fornwall
9 years ago
2 changed files with 52 additions and 0 deletions
@ -0,0 +1,41 @@ |
|||||
|
diff -u -r ../zopfli-zopfli-1.0.1/Makefile ./Makefile
|
||||
|
--- ../zopfli-zopfli-1.0.1/Makefile 2015-08-22 10:36:46.000000000 -0400
|
||||
|
+++ ./Makefile 2016-01-09 20:43:38.611197626 -0500
|
||||
|
@@ -1,9 +1,3 @@
|
||||
|
-CC = gcc
|
||||
|
-CXX = g++
|
||||
|
-
|
||||
|
-CFLAGS = -W -Wall -Wextra -ansi -pedantic -lm -O2
|
||||
|
-CXXFLAGS = -W -Wall -Wextra -ansi -pedantic -O2
|
||||
|
-
|
||||
|
ZOPFLILIB_SRC = src/zopfli/blocksplitter.c src/zopfli/cache.c\ |
||||
|
src/zopfli/deflate.c src/zopfli/gzip_container.c\ |
||||
|
src/zopfli/hash.c src/zopfli/katajainen.c\ |
||||
|
@@ -20,22 +14,22 @@
|
||||
|
|
||||
|
# Zopfli binary |
||||
|
zopfli: |
||||
|
- $(CC) $(ZOPFLILIB_SRC) $(ZOPFLIBIN_SRC) $(CFLAGS) -o zopfli
|
||||
|
+ $(CC) $(ZOPFLILIB_SRC) $(ZOPFLIBIN_SRC) $(CFLAGS) -o zopfli -lm
|
||||
|
|
||||
|
# Zopfli shared library |
||||
|
-libzopfli:
|
||||
|
+install:
|
||||
|
$(CC) $(ZOPFLILIB_SRC) $(CFLAGS) -fPIC -c |
||||
|
- $(CC) $(ZOPFLILIB_OBJ) $(CFLAGS) -shared -Wl,-soname,libzopfli.so.1 -o libzopfli.so.1.0.1
|
||||
|
+ $(CC) $(ZOPFLILIB_OBJ) $(CFLAGS) -shared -Wl,-soname,libzopfli.so.1 -o @TERMUX_PREFIX@/lib/libzopfli.so -lm
|
||||
|
|
||||
|
# ZopfliPNG binary |
||||
|
zopflipng: |
||||
|
$(CC) $(ZOPFLILIB_SRC) $(CFLAGS) -c |
||||
|
- $(CXX) $(ZOPFLILIB_OBJ) $(LODEPNG_SRC) $(ZOPFLIPNGLIB_SRC) $(ZOPFLIPNGBIN_SRC) $(CFLAGS) -o zopflipng
|
||||
|
+ $(CXX) $(ZOPFLILIB_OBJ) $(LODEPNG_SRC) $(ZOPFLIPNGLIB_SRC) $(ZOPFLIPNGBIN_SRC) $(CFLAGS) -o zopflipng -lm
|
||||
|
|
||||
|
# ZopfliPNG shared library |
||||
|
libzopflipng: |
||||
|
$(CC) $(ZOPFLILIB_SRC) $(CFLAGS) -fPIC -c |
||||
|
- $(CXX) $(ZOPFLILIB_OBJ) $(LODEPNG_SRC) $(ZOPFLIPNGLIB_SRC) $(CFLAGS) -fPIC --shared -Wl,-soname,libzopflipng.so.1 -o libzopflipng.so.1.0.0
|
||||
|
+ $(CXX) $(ZOPFLILIB_OBJ) $(LODEPNG_SRC) $(ZOPFLIPNGLIB_SRC) $(CFLAGS) -fPIC --shared -Wl,-soname,libzopflipng.so.1 -o libzopflipng.so -lm
|
||||
|
|
||||
|
# Remove all libraries and binaries |
||||
|
clean: |
@ -0,0 +1,11 @@ |
|||||
|
TERMUX_PKG_HOMEPAGE=https://github.com/google/zopfli |
||||
|
TERMUX_PKG_DESCRIPTION="New zlib compatible compressor library" |
||||
|
TERMUX_PKG_VERSION=1.0.1 |
||||
|
TERMUX_PKG_SRCURL=https://github.com/google/zopfli/archive/zopfli-${TERMUX_PKG_VERSION}.tar.gz |
||||
|
TERMUX_PKG_FOLDERNAME=zopfli-zopfli-${TERMUX_PKG_VERSION} |
||||
|
TERMUX_PKG_BUILD_IN_SRC=yes |
||||
|
|
||||
|
termux_step_post_make_install () { |
||||
|
mkdir -p $TERMUX_PREFIX/include/zopfli/ |
||||
|
cp $TERMUX_PKG_SRCDIR/src/zopfli/*h $TERMUX_PREFIX/include/zopfli/ |
||||
|
} |
Loading…
Reference in new issue