diff --git a/jbig/Makefile.patch b/jbig/Makefile.patch new file mode 100644 index 000000000..2867dbd55 --- /dev/null +++ b/jbig/Makefile.patch @@ -0,0 +1,11 @@ +--- Makefile 2014-03-27 14:47:15.000000000 -0400 ++++ Makefile 2015-11-06 14:14:48.000000000 -0500 +@@ -4,7 +4,7 @@ + CC = gcc + + # Options for the compiler: A high optimization level is suggested +-CFLAGS = -O2 -W -Wno-unused-result ++CFLAGS = -O2 -W -fPIC + # CFLAGS = -O -g -W -Wall -Wno-unused-result -ansi -pedantic # -DDEBUG + + export CC CFLAGS diff --git a/jbig/build.sh b/jbig/build.sh new file mode 100644 index 000000000..c9e588560 --- /dev/null +++ b/jbig/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Patch (support old gcc) +sed -i.bak 's/-Wno-unused-result//g' Makefile + +# Build +make lib + +# Install +mkdir -p "${PREFIX}/lib" "${PREFIX}/include" +cp libjbig/*.a "${PREFIX}/lib" +cp libjbig/*.h "${PREFIX}/include" diff --git a/jbig/meta.yaml b/jbig/meta.yaml new file mode 100644 index 000000000..1ec765004 --- /dev/null +++ b/jbig/meta.yaml @@ -0,0 +1,16 @@ +package: + name: jbig + version: "2.1" + +source: + fn: jbigkit-2.1.tar.gz + url: https://www.cl.cam.ac.uk/~mgk25/jbigkit/download/jbigkit-2.1.tar.gz + md5: ebcf09bed9f14d7fa188d3bd57349522 + + patches: + - Makefile.patch # Remove -Wno-unused-result (for compatibility with old gcc), + # and add -fPIC (to allow shared libraries to use this build). + +about: + home: https://www.cl.cam.ac.uk/~mgk25/jbigkit + license: GPL-2