diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2018-04-22 12:18:31 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2018-04-22 12:20:15 +0300 |
commit | f347c24acc14e080dc2801561edca0d525a90257 (patch) | |
tree | 0030ec7530b6b3d4e9e2fc50970f7f91408597c9 | |
parent | f1104d900978900addad731dfec4e0e6e5765fbe (diff) | |
download | guix-f347c24acc14e080dc2801561edca0d525a90257.tar guix-f347c24acc14e080dc2801561edca0d525a90257.tar.gz |
gnu: freeimage: Use bundled libjxr.
* gnu/packages/image.scm (freeimage)[source]: Don't delete bundled
LibJXR directory.
[arguments]: Modify make-flags to not include external jxrlib.
[inputs]: Remove libjxr.
* gnu/packages/patches/freeimage-unbundle.patch: Modify to not unbundle
libjxr.
-rw-r--r-- | gnu/packages/image.scm | 8 | ||||
-rw-r--r-- | gnu/packages/patches/freeimage-unbundle.patch | 18 |
2 files changed, 8 insertions, 18 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index e27b9223dd..7ed18cf1a6 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -724,7 +724,8 @@ supplies a generic doubly-linked list and some string functions.") (for-each (lambda (dir) (delete-file-recursively (string-append "Source/" dir))) - '("LibJPEG" "LibJXR" "LibOpenJPEG" "LibPNG" "LibRawLite" + '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite" + ;; "LibJXR" "LibWebP" "OpenEXR" "ZLib")))) (patches (search-patches "freeimage-unbundle.patch" "freeimage-CVE-2015-0852.patch" @@ -760,14 +761,15 @@ supplies a generic doubly-linked list and some string functions.") ;; We need '-fpermissive' for Source/FreeImage.h. ;; libjxr doesn't have a pkg-config file. (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden -fpermissive " - "-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib")) + ;"-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib" + )) #:tests? #f)) ; no check target (native-inputs `(("pkg-config" ,pkg-config) ("unzip" ,unzip))) (inputs `(("libjpeg" ,libjpeg) - ("libjxr" ,libjxr) + ;("libjxr" ,libjxr) ("libpng" ,libpng) ("libraw" ,libraw) ("libtiff" ,libtiff) diff --git a/gnu/packages/patches/freeimage-unbundle.patch b/gnu/packages/patches/freeimage-unbundle.patch index 2727d9fbda..ca907d3276 100644 --- a/gnu/packages/patches/freeimage-unbundle.patch +++ b/gnu/packages/patches/freeimage-unbundle.patch @@ -25,7 +25,7 @@ diff -rupN FreeImage/gensrclist.sh FreeImage-new/gensrclist.sh #!/bin/sh -DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/OpenEXR/IexMath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Source/LibWebP Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib" -+DIRLIST=". Source Source/Metadata Source/FreeImageToolkit" ++DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib" echo "VER_MAJOR = 3" > Makefile.srcs echo "VER_MINOR = 17.0" >> Makefile.srcs @@ -90,8 +90,8 @@ diff -rupN FreeImage/Makefile.gnu FreeImage-new/Makefile.gnu -# LibJXR -CXXFLAGS += -D__ANSI__ -CXXFLAGS += $(INCLUDE) -+override CFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) -+override LDFLAGS += -ljpeg -ljpegxr -ljxrglue $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ++override CFLAGS += $(INCLUDE) -D__ANSI__ $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ++override LDFLAGS += -ljpeg $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) - CFLAGS += -fPIC @@ -215,18 +215,6 @@ diff -rupN FreeImage/Source/FreeImage/PluginJPEG.cpp FreeImage-new/Source/FreeIm } #include "FreeImage.h" -diff -rupN FreeImage/Source/FreeImage/PluginJXR.cpp FreeImage-new/Source/FreeImage/PluginJXR.cpp ---- FreeImage/Source/FreeImage/PluginJXR.cpp 2015-03-02 02:07:08.000000000 +0100 -+++ FreeImage-new/Source/FreeImage/PluginJXR.cpp 2015-09-05 02:13:52.043353343 +0200 -@@ -23,7 +23,7 @@ - #include "Utilities.h" - #include "../Metadata/FreeImageTag.h" - --#include "../LibJXR/jxrgluelib/JXRGlue.h" -+#include <JXRGlue.h> - - // ========================================================== - // Plugin Interface diff -rupN FreeImage/Source/FreeImage/PluginPNG.cpp FreeImage-new/Source/FreeImage/PluginPNG.cpp --- FreeImage/Source/FreeImage/PluginPNG.cpp 2015-03-10 20:16:12.000000000 +0100 +++ FreeImage-new/Source/FreeImage/PluginPNG.cpp 2015-09-05 02:13:52.044353363 +0200 |