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.master
parent
f1104d9009
commit
f347c24acc
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue