diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-04-16 18:15:28 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-04-16 18:15:28 +0200 |
commit | 5d904d63f4d43e3f0e4be38c5f5404e029c00a22 (patch) | |
tree | b2893eceae99c967e0f49cdbfe084f6c7d4767c4 /gnu/packages/patches | |
parent | bab5f3a7f62150ae009e78d03c4b1f5b1646104c (diff) | |
parent | d0ee11b2f000c3c027fd8370bc2195266398444f (diff) | |
download | guix-5d904d63f4d43e3f0e4be38c5f5404e029c00a22.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
20 files changed, 1189 insertions, 455 deletions
diff --git a/gnu/packages/patches/4store-unset-preprocessor-directive.patch b/gnu/packages/patches/4store-unset-preprocessor-directive.patch new file mode 100644 index 0000000000..c4b1d6eda4 --- /dev/null +++ b/gnu/packages/patches/4store-unset-preprocessor-directive.patch @@ -0,0 +1,16 @@ +This patch removes the _XOPEN_SOURCE preprocessor directive as it does not seem to be needed. +Setting it removes the definition of strdup, which is used in filter-datatypes.c. + +Patch by Roel Janssen <roel@gnu.org> +*** a/src/frontend/filter-datatypes.c 1970-01-01 01:00:00.000000000 +0100 +--- b/src/frontend/filter-datatypes.c 2018-04-03 17:39:23.177905592 +0200 +*************** +*** 18,24 **** + * Copyright (C) 2006 Steve Harris for Garlik + */ + +- #define _XOPEN_SOURCE + #include <stdlib.h> + #include <string.h> + #include <math.h> +--- 18,23 ---- diff --git a/gnu/packages/patches/clang-libc-search-path.patch b/gnu/packages/patches/clang-3.5-libc-search-path.patch index 50e4480239..50e4480239 100644 --- a/gnu/packages/patches/clang-libc-search-path.patch +++ b/gnu/packages/patches/clang-3.5-libc-search-path.patch diff --git a/gnu/packages/patches/clang-6.0-libc-search-path.patch b/gnu/packages/patches/clang-6.0-libc-search-path.patch new file mode 100644 index 0000000000..a62e8063c2 --- /dev/null +++ b/gnu/packages/patches/clang-6.0-libc-search-path.patch @@ -0,0 +1,67 @@ +Clang attempts to guess file names based on the OS and distro (yes!), +but unfortunately, that doesn't work for us. + +This patch makes it easy to insert libc's $libdir so that Clang passes the +correct absolute file name of crt1.o etc. to 'ld'. It also disables all +the distro-specific stuff and removes the hard-coded FHS directory names +to make sure Clang also works on non-GuixSD systems. + +--- cfe-6.0.0.src/lib/Driver/ToolChains/Linux.cpp ++++ cfe-6.0.0.src/lib/Driver/ToolChains/Linux.cpp +@@ -207,7 +207,9 @@ + PPaths.push_back(Twine(GCCInstallation.getParentLibPath() + "/../" + + GCCInstallation.getTriple().str() + "/bin") + .str()); +- ++ // Comment out the distro-specific tweaks so that they don't bite when ++ // using Guix on a foreign distro. ++#if 0 + Distro Distro(D.getVFS()); + + if (Distro.IsAlpineLinux()) { +@@ -255,6 +257,7 @@ + + if (IsAndroid || Distro.IsOpenSUSE()) + ExtraOpts.push_back("--enable-new-dtags"); ++#endif + + // The selection of paths to try here is designed to match the patterns which + // the GCC driver itself uses, as this is part of the GCC-compatible driver. +@@ -329,14 +332,12 @@ + addPathIfExists(D, D.Dir + "/../" + OSLibDir, Paths); + } + +- addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths); +- addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths); +- addPathIfExists(D, SysRoot + "/usr/lib/" + MultiarchTriple, Paths); +- addPathIfExists(D, SysRoot + "/usr/lib/../" + OSLibDir, Paths); +- + // Try walking via the GCC triple path in case of biarch or multiarch GCC + // installations with strange symlinks. + if (GCCInstallation.isValid()) { ++ // The following code would end up adding things like ++ // "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path. ++#if 0 + addPathIfExists(D, + SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() + + "/../../" + OSLibDir, +@@ -349,6 +350,7 @@ + BiarchSibling.gccSuffix(), + Paths); + } ++#endif + + // See comments above on the multilib variant for details of why this is + // included even from outside the sysroot. +@@ -373,8 +375,9 @@ + if (StringRef(D.Dir).startswith(SysRoot)) + addPathIfExists(D, D.Dir + "/../lib", Paths); + +- addPathIfExists(D, SysRoot + "/lib", Paths); +- addPathIfExists(D, SysRoot + "/usr/lib", Paths); ++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o, ++ // and friends can be found. ++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths); + } + + bool Linux::HasNativeLLVMSupport() const { return true; } diff --git a/gnu/packages/patches/classpath-aarch64-support.patch b/gnu/packages/patches/classpath-aarch64-support.patch new file mode 100644 index 0000000000..6fdac0c4fb --- /dev/null +++ b/gnu/packages/patches/classpath-aarch64-support.patch @@ -0,0 +1,29 @@ +This is modeled after the ia64 support. Aarch64 can be either big endian +or little endian, so we add the case for both. + +--- + native/fdlibm/ieeefp.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/native/fdlibm/ieeefp.h b/native/fdlibm/ieeefp.h +index 1a9740f..73455c0 100644 +--- a/native/fdlibm/ieeefp.h ++++ b/native/fdlibm/ieeefp.h +@@ -27,6 +27,14 @@ + #endif + #endif + ++#ifdef __aarch64__ ++#ifdef __BIG_ENDIAN__ ++#define __IEEE_BIG_ENDIAN ++#else ++#define __IEEE_LITTLE_ENDIAN ++#endif ++#endif ++ + #ifdef __hppa__ + #define __IEEE_BIG_ENDIAN + #endif +-- +2.16.3 + diff --git a/gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch b/gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch deleted file mode 100644 index 7a033df413..0000000000 --- a/gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch +++ /dev/null @@ -1,205 +0,0 @@ -From 96ceffdfdcedd3ae33c46b11357aa2518e0a6152 Mon Sep 17 00:00:00 2001 -From: Petter <petter@mykolab.ch> -Date: Thu, 27 Apr 2017 18:55:10 +0200 -Subject: [PATCH] Remove non-free fonts from settings menu - ---- a/app/qml/ApplicationSettings.qml -+++ b/app/qml/ApplicationSettings.qml -@@ -409,7 +409,7 @@ - obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"TERMINUS_SCALED","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.16,"jitter":0.18,"burnIn":0.45,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}' - builtin: true - } -- ListElement{ -+ /*ListElement{ - text: "Default Scanlines" - obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"COMMODORE_PET","fontColor":"#00ff5b","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.14,"jitter":0.11,"burnIn":0.4,"staticNoise":0.05,"rasterization":1,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}' - builtin: true -@@ -433,7 +433,7 @@ - text: "IBM Dos" - obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.07,"contrast":0.85,"fontName":"IBM_DOS","fontColor":"#ffffff","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.13,"horizontalSync":0,"jitter":0.16,"burnIn":0.3,"staticNoise":0.03,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":1,"saturationColor":0,"rbgShift":0.35,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}' - builtin: true -- } -+ }*/ - ListElement{ - text: "IBM 3278" - obj_string: '{"ambientLight":0.1,"backgroundColor":"#000000","bloom":0.15,"brightness":0.5,"flickering":0,"contrast":0.85,"fontName":"IBM_3278","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0,"horizontalSync":0,"jitter":0,"burnIn":0.6,"staticNoise":0,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}' -diff --git a/app/qml/FontPixels.qml b/app/qml/FontPixels.qml -index 6ff85da..6f0d0ba 100644 ---- a/app/qml/FontPixels.qml -+++ b/app/qml/FontPixels.qml -@@ -32,7 +32,7 @@ QtObject{ - property bool lowResolutionFont: true - - property ListModel fontlist: ListModel{ -- ListElement{ -+ /*ListElement{ - name: "COMMODORE_PET" - text: "Commodore PET (1977)" - source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf" -@@ -40,7 +40,7 @@ QtObject{ - pixelSize: 8 - baseScaling: 4.0 - fontWidth: 0.8 -- } -+ }*/ - ListElement{ - name: "PROGGY_TINY" - text: "Proggy Tiny (Modern)" -@@ -68,7 +68,7 @@ QtObject{ - baseScaling: 3.0 - fontWidth: 1.0 - } -- ListElement{ -+ /*ListElement{ - name: "APPLE_II" - text: "Apple ][ (1977)" - source: "fonts/1977-apple2/PrintChar21.ttf" -@@ -76,8 +76,8 @@ QtObject{ - pixelSize: 8 - baseScaling: 4.0 - fontWidth: 0.9 -- } -- ListElement{ -+ }*/ -+ /*ListElement{ - name: "ATARI_400" - text: "Atari 400-800 (1979)" - source: "fonts/1979-atari-400-800/ATARI400800_original.TTF" -@@ -85,8 +85,8 @@ QtObject{ - pixelSize: 8 - baseScaling: 4.0 - fontWidth: 0.8 -- } -- ListElement{ -+ }*/ -+ /*ListElement{ - name: "COMMODORE_64" - text: "Commodore 64 (1982)" - source: "fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf" -@@ -94,6 +94,6 @@ QtObject{ - pixelSize: 8 - baseScaling: 4.0 - fontWidth: 0.8 -- } -+ }*/ - } - } -diff --git a/app/qml/FontScanlines.qml b/app/qml/FontScanlines.qml -index eebf00b..410d7b6 100644 ---- a/app/qml/FontScanlines.qml -+++ b/app/qml/FontScanlines.qml -@@ -32,7 +32,7 @@ QtObject{ - property bool lowResolutionFont: true - - property ListModel fontlist: ListModel{ -- ListElement{ -+ /*ListElement{ - name: "COMMODORE_PET" - text: "Commodore PET (1977)" - source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf" -@@ -40,7 +40,7 @@ QtObject{ - pixelSize: 8 - baseScaling: 4.0 - fontWidth: 0.7 -- } -+ }*/ - ListElement{ - name: "PROGGY_TINY" - text: "Proggy Tiny (Modern)" -@@ -68,7 +68,7 @@ QtObject{ - baseScaling: 3.0 - fontWidth: 1.0 - } -- ListElement{ -+ /*ListElement{ - name: "APPLE_II" - text: "Apple ][ (1977)" - source: "fonts/1977-apple2/PrintChar21.ttf" -@@ -76,8 +76,8 @@ QtObject{ - pixelSize: 8 - baseScaling: 4.0 - fontWidth: 0.8 -- } -- ListElement{ -+ }*/ -+ /*ListElement{ - name: "ATARI_400" - text: "Atari 400-800 (1979)" - source: "fonts/1979-atari-400-800/ATARI400800_original.TTF" -@@ -85,8 +85,8 @@ QtObject{ - pixelSize: 8 - baseScaling: 4.0 - fontWidth: 0.7 -- } -- ListElement{ -+ }*/ -+ /*ListElement{ - name: "COMMODORE_64" - text: "Commodore 64 (1982)" - source: "fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf" -@@ -94,6 +94,6 @@ QtObject{ - pixelSize: 8 - baseScaling: 4.0 - fontWidth: 0.7 -- } -+ }*/ - } - } -diff --git a/app/qml/Fonts.qml b/app/qml/Fonts.qml -index ad20844..882808a 100644 ---- a/app/qml/Fonts.qml -+++ b/app/qml/Fonts.qml -@@ -80,7 +80,7 @@ - fontWidth: 1.0 - lowResolutionFont: true - } -- ListElement{ -+ /*ListElement{ - name: "COMMODORE_PET_SCALED" - text: "Commodore PET (1977)" - source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf" -@@ -89,7 +89,7 @@ - baseScaling: 3.5 - fontWidth: 0.7 - lowResolutionFont: true -- } -+ }*/ - ListElement{ - name: "PROGGY_TINY_SCALED" - text: "Proggy Tiny (Modern)" -@@ -100,7 +100,7 @@ - fontWidth: 0.9 - lowResolutionFont: true - } -- ListElement{ -+ /*ListElement{ - name: "APPLE_II_SCALED" - text: "Apple ][ (1977)" - source: "fonts/1977-apple2/PrintChar21.ttf" -@@ -149,7 +149,7 @@ - baseScaling: 2.0 - fontWidth: 1.0 - lowResolutionFont: true -- } -+ }*/ - ListElement{ - name: "HERMIT" - text: "HD: Hermit (Modern)" -@@ -177,7 +177,7 @@ - fontWidth: 1.0 - lowResolutionFont: false - } -- ListElement{ -+ /*ListElement{ - name: "MONACO" - text: "HD: Monaco (Modern)" - source: "fonts/modern-monaco/monaco.ttf" -@@ -185,7 +185,7 @@ - pixelSize: 30 - fontWidth: 1.0 - lowResolutionFont: false -- } -+ }*/ - ListElement{ - name: "INCONSOLATA" - text: "HD: Inconsolata (Modern)" diff --git a/gnu/packages/patches/datamash-arm-tests.patch b/gnu/packages/patches/datamash-arm-tests.patch new file mode 100644 index 0000000000..a24c5320ad --- /dev/null +++ b/gnu/packages/patches/datamash-arm-tests.patch @@ -0,0 +1,71 @@ +See https://lists.gnu.org/archive/html/bug-datamash/2018-03/msg00003.html and +https://lists.gnu.org/archive/html/bug-datamash/2018-03/txt4DmvR7p6J9.txt + +From d446dba317aa067440d6312d955d523129949327 Mon Sep 17 00:00:00 2001 +From: Assaf Gordon <address@hidden> +Date: Thu, 22 Mar 2018 11:00:34 -0600 +Subject: [PATCH 1/2] tests: fix --format='%4000f' expected output + +Can be 1.000009... or 1.000008999, depending on representation. + +* tests/datamash-output-format.pl: Check only the first 5 digits. +--- + tests/datamash-output-format.pl | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/tests/datamash-output-format.pl b/tests/datamash-output-format.pl +index 52c68a2..ca99bb0 100755 +--- a/tests/datamash-output-format.pl ++++ b/tests/datamash-output-format.pl +@@ -98,12 +98,13 @@ my @Tests = + {OUT => "0" x 3999 . "1\n"}], + + # due to binary floating representation, some decimal point digits won't be +- # zero (e.g. 1.0000090000000000000000000000000523453254320000000...). +- # The OUT_SUBST replaces exactly 3994 digits (as expected from the format) ++ # zero (e.g. 1.0000090000000000000000000000000523453254320000000... or ++ # 1.000008999999...). ++ # The OUT_SUBST replaces exactly 3995 digits (as expected from the format) + # with an "X". + ['m2', '--format "%.4000f" sum 1', {IN_PIPE=>$in1}, +- {OUT => "1.000009X\n"}, +- {OUT_SUBST => 's/^(1\.000009)([0-9]{3994})$/\1X/'}], ++ {OUT => "1.00000X\n"}, ++ {OUT_SUBST => 's/^(1\.00000)([0-9]{3995})$/\1X/'}], + + ); + +-- +2.7.4 + + +From f4871963974a96d6e69cb80b9c2fac7ff0c1d472 Mon Sep 17 00:00:00 2001 +From: Assaf Gordon <address@hidden> +Date: Thu, 22 Mar 2018 11:18:13 -0600 +Subject: [PATCH 2/2] tests: disable --format="%a" test + +Valid output can differ (e.g. 0x8.000p-3 vs 0x1.000p+0). + +* tests/datamash-output-format.pl: Disable 'a1' test. +--- + tests/datamash-output-format.pl | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/datamash-output-format.pl b/tests/datamash-output-format.pl +index ca99bb0..5e90ae0 100755 +--- a/tests/datamash-output-format.pl ++++ b/tests/datamash-output-format.pl +@@ -90,7 +90,9 @@ my @Tests = + ['e2', '--format "%.3e" sum 1', {IN_PIPE=>$in1}, {OUT=>"1.000e+00\n"}], + + # Test Custom formats: %a +- ['a1', '--format "%0.3a" sum 1', {IN_PIPE=>$in1}, {OUT=>"0x8.000p-3\n"}], ++ # Disable the test for now. Valid output can differ (e.g. 0x8.000p-3 and ++ # 0x1.000p0 ). ++ # ['a1', '--format "%0.3a" sum 1', {IN_PIPE=>$in1}, {OUT=>"0x8.000p-3\n"}], + + + # Custom formats can use lots of memory +-- +2.7.4 + diff --git a/gnu/packages/patches/delly-use-system-libraries.patch b/gnu/packages/patches/delly-use-system-libraries.patch new file mode 100644 index 0000000000..3315c2a176 --- /dev/null +++ b/gnu/packages/patches/delly-use-system-libraries.patch @@ -0,0 +1,56 @@ +--- a/Makefile 2017-04-09 12:48:15.000000000 +0200 ++++ b/Makefile 2017-06-21 14:26:02.749282787 +0200 +@@ -9,8 +9,8 @@ + + # Flags + CXX=g++ +-CXXFLAGS += -isystem ${SEQTK_ROOT} -isystem ${BOOST_ROOT} -pedantic -W -Wall -Wno-unknown-pragmas -D__STDC_LIMIT_MACROS -fno-strict-aliasing +-LDFLAGS += -L${SEQTK_ROOT} -L${BOOST_ROOT}/stage/lib -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time ++CXXFLAGS += -pedantic -W -Wall -Wno-unknown-pragmas -D__STDC_LIMIT_MACROS -fno-strict-aliasing ++LDFLAGS += -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time + + # Additional flags for release/debug + ifeq (${PARALLEL}, 1) +@@ -23,7 +23,7 @@ + ifeq (${STATIC}, 1) + LDFLAGS += -static -static-libgcc -pthread -lhts -lz + else +- LDFLAGS += -lhts -lz -Wl,-rpath,${SEQTK_ROOT},-rpath,${BOOST_ROOT}/stage/lib ++ LDFLAGS += -lhts -lz + endif + ifeq (${DEBUG}, 1) + CXXFLAGS += -g -O0 -fno-inline -DDEBUG +@@ -41,29 +41,17 @@ + DELLYSOURCES = $(wildcard src/*.h) $(wildcard src/*.cpp) + + # Targets +-TARGETS = .htslib .bcftools .boost src/delly src/cov src/dpe ++TARGETS = src/delly src/cov src/dpe + + all: $(TARGETS) + +-.htslib: $(HTSLIBSOURCES) +- cd src/htslib && make && make lib-static && cd ../../ && touch .htslib +- +-.bcftools: $(HTSLIBSOURCES) +- cd src/bcftools && make && cd ../../ && touch .bcftools +- +-.boost: $(BOOSTSOURCES) +- cd src/modular-boost && ./bootstrap.sh --prefix=${PWD}/src/modular-boost --without-icu --with-libraries=iostreams,filesystem,system,program_options,date_time && ./b2 && ./b2 headers && cd ../../ && touch .boost +- +-src/delly: .htslib .bcftools .boost $(DELLYSOURCES) +- $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) +- +-src/cov: .htslib .bcftools .boost $(DELLYSOURCES) ++src/cov: $(DELLYSOURCES) + $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) + +-src/dpe: .htslib .bcftools .boost $(DELLYSOURCES) ++src/dpe: $(DELLYSOURCES) + $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) + + clean: + cd src/htslib && make clean + cd src/modular-boost && ./b2 --clean-all +- rm -f $(TARGETS) $(TARGETS:=.o) .htslib .boost .bcftools ++ rm -f $(TARGETS) $(TARGETS:=.o) diff --git a/gnu/packages/patches/freeimage-unbundle.patch b/gnu/packages/patches/freeimage-unbundle.patch new file mode 100644 index 0000000000..2727d9fbda --- /dev/null +++ b/gnu/packages/patches/freeimage-unbundle.patch @@ -0,0 +1,550 @@ +https://src.fedoraproject.org/cgit/rpms/freeimage.git/tree/FreeImage-3.17.0_unbundle.patch + +diff -rupN FreeImage/genfipsrclist.sh FreeImage-new/genfipsrclist.sh +--- FreeImage/genfipsrclist.sh 2015-02-20 10:52:16.000000000 +0100 ++++ FreeImage-new/genfipsrclist.sh 2015-09-05 02:13:52.041353305 +0200 +@@ -1,6 +1,6 @@ + #!/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 Wrapper/FreeImagePlus" ++DIRLIST="Wrapper/FreeImagePlus" + + + echo "VER_MAJOR = 3" > fipMakefile.srcs +@@ -19,5 +19,6 @@ echo -n "INCLUDE =" >> fipMakefile.srcs + for DIR in $DIRLIST; do + echo -n " -I$DIR" >> fipMakefile.srcs + done ++echo -n " -IDist" >> fipMakefile.srcs + echo >> fipMakefile.srcs + +diff -rupN FreeImage/gensrclist.sh FreeImage-new/gensrclist.sh +--- FreeImage/gensrclist.sh 2015-02-20 10:51:50.000000000 +0100 ++++ FreeImage-new/gensrclist.sh 2015-09-05 02:13:52.041353305 +0200 +@@ -1,6 +1,6 @@ + #!/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" + + echo "VER_MAJOR = 3" > Makefile.srcs + echo "VER_MINOR = 17.0" >> Makefile.srcs +diff -rupN FreeImage/Makefile.fip FreeImage-new/Makefile.fip +--- FreeImage/Makefile.fip 2015-03-08 18:03:56.000000000 +0100 ++++ FreeImage-new/Makefile.fip 2015-09-05 02:14:09.212684028 +0200 +@@ -17,20 +17,22 @@ MODULES = $(SRCS:.c=.o) + MODULES := $(MODULES:.cpp=.o) + CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden + # OpenJPEG +-CFLAGS += -DOPJ_STATIC ++override CFLAGS += -DOPJ_STATIC + # LibRaw +-CFLAGS += -DNO_LCMS ++override CFLAGS += -DNO_LCMS + # LibJXR +-CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__ +-CFLAGS += $(INCLUDE) ++override CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__ ++override CFLAGS += $(INCLUDE) + CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy + # LibJXR +-CXXFLAGS += -D__ANSI__ +-CXXFLAGS += $(INCLUDE) ++override CXXFLAGS += -D__ANSI__ ++override CXXFLAGS += $(INCLUDE) ++LDFLAGS ?= ++override LDFLAGS += -LDist -lfreeimage-$(VER_MAJOR).$(VER_MINOR) + + ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) +- CFLAGS += -fPIC +- CXXFLAGS += -fPIC ++ override CFLAGS += -fPIC ++ override CXXFLAGS += -fPIC + endif + + TARGET = freeimageplus +@@ -68,7 +70,7 @@ $(STATICLIB): $(MODULES) + $(AR) r $@ $(MODULES) + + $(SHAREDLIB): $(MODULES) +- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) ++ $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) + + install: + install -d $(INCDIR) $(INSTALLDIR) +diff -rupN FreeImage/Makefile.gnu FreeImage-new/Makefile.gnu +--- FreeImage/Makefile.gnu 2015-03-08 18:04:00.000000000 +0100 ++++ FreeImage-new/Makefile.gnu 2015-09-05 02:14:04.810599259 +0200 +@@ -16,21 +16,11 @@ LIBRARIES = -lstdc++ + MODULES = $(SRCS:.c=.o) + MODULES := $(MODULES:.cpp=.o) + CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden +-# OpenJPEG +-CFLAGS += -DOPJ_STATIC +-# LibRaw +-CFLAGS += -DNO_LCMS +-# LibJXR +-CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__ +-CFLAGS += $(INCLUDE) +-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy +-# 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) + + ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) +- CFLAGS += -fPIC +- CXXFLAGS += -fPIC ++ override CFLAGS += -fPIC + endif + + TARGET = freeimage +@@ -61,13 +51,13 @@ FreeImage: $(STATICLIB) $(SHAREDLIB) + $(CC) $(CFLAGS) -c $< -o $@ + + .cpp.o: +- $(CXX) $(CXXFLAGS) -c $< -o $@ ++ $(CXX) $(CFLAGS) -c $< -o $@ + + $(STATICLIB): $(MODULES) + $(AR) r $@ $(MODULES) + + $(SHAREDLIB): $(MODULES) +- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) ++ $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) + + install: + install -d $(INCDIR) $(INSTALLDIR) +diff -rupN FreeImage/Source/FreeImage/J2KHelper.cpp FreeImage-new/Source/FreeImage/J2KHelper.cpp +--- FreeImage/Source/FreeImage/J2KHelper.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/J2KHelper.cpp 2015-09-05 02:13:52.042353324 +0200 +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include <openjpeg.h> + #include "J2KHelper.h" + + // -------------------------------------------------------------------------- +diff -rupN FreeImage/Source/FreeImage/Plugin.cpp FreeImage-new/Source/FreeImage/Plugin.cpp +--- FreeImage/Source/FreeImage/Plugin.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/Plugin.cpp 2015-09-05 02:13:52.042353324 +0200 +@@ -263,7 +263,12 @@ FreeImage_Initialise(BOOL load_local_plu + s_plugins->AddNode(InitDDS); + s_plugins->AddNode(InitGIF); + s_plugins->AddNode(InitHDR); +- s_plugins->AddNode(InitG3); ++/* The G3 fax format plugin is deliberately disabled in the Fedora build of ++ FreeImage as it requires that FreeImage uses a private copy of libtiff ++ which is a no no because of security reasons. */ ++#if 0 ++ s_plugins->AddNode(InitG3); ++#endif + s_plugins->AddNode(InitSGI); + s_plugins->AddNode(InitEXR); + s_plugins->AddNode(InitJ2K); +diff -rupN FreeImage/Source/FreeImage/PluginEXR.cpp FreeImage-new/Source/FreeImage/PluginEXR.cpp +--- FreeImage/Source/FreeImage/PluginEXR.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginEXR.cpp 2015-09-05 02:13:52.042353324 +0200 +@@ -28,16 +28,16 @@ + #pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning) + #endif + +-#include "../OpenEXR/IlmImf/ImfIO.h" +-#include "../OpenEXR/Iex/Iex.h" +-#include "../OpenEXR/IlmImf/ImfOutputFile.h" +-#include "../OpenEXR/IlmImf/ImfInputFile.h" +-#include "../OpenEXR/IlmImf/ImfRgbaFile.h" +-#include "../OpenEXR/IlmImf/ImfChannelList.h" +-#include "../OpenEXR/IlmImf/ImfRgba.h" +-#include "../OpenEXR/IlmImf/ImfArray.h" +-#include "../OpenEXR/IlmImf/ImfPreviewImage.h" +-#include "../OpenEXR/Half/half.h" ++#include <OpenEXR/ImfIO.h> ++#include <OpenEXR/Iex.h> ++#include <OpenEXR/ImfOutputFile.h> ++#include <OpenEXR/ImfInputFile.h> ++#include <OpenEXR/ImfRgbaFile.h> ++#include <OpenEXR/ImfChannelList.h> ++#include <OpenEXR/ImfRgba.h> ++#include <OpenEXR/ImfArray.h> ++#include <OpenEXR/ImfPreviewImage.h> ++#include <OpenEXR/half.h> + + + // ========================================================== +diff -rupN FreeImage/Source/FreeImage/PluginJ2K.cpp FreeImage-new/Source/FreeImage/PluginJ2K.cpp +--- FreeImage/Source/FreeImage/PluginJ2K.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginJ2K.cpp 2015-09-05 02:13:52.043353343 +0200 +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include <openjpeg.h> + #include "J2KHelper.h" + + // ========================================================== +diff -rupN FreeImage/Source/FreeImage/PluginJP2.cpp FreeImage-new/Source/FreeImage/PluginJP2.cpp +--- FreeImage/Source/FreeImage/PluginJP2.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginJP2.cpp 2015-09-05 02:13:52.043353343 +0200 +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include <openjpeg.h> + #include "J2KHelper.h" + + // ========================================================== +diff -rupN FreeImage/Source/FreeImage/PluginJPEG.cpp FreeImage-new/Source/FreeImage/PluginJPEG.cpp +--- FreeImage/Source/FreeImage/PluginJPEG.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginJPEG.cpp 2015-09-05 02:13:52.043353343 +0200 +@@ -35,9 +35,9 @@ extern "C" { + #undef FAR + #include <setjmp.h> + +-#include "../LibJPEG/jinclude.h" +-#include "../LibJPEG/jpeglib.h" +-#include "../LibJPEG/jerror.h" ++#include <stdio.h> ++#include <jpeglib.h> ++#include <jerror.h> + } + + #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 +@@ -40,8 +40,8 @@ + + // ---------------------------------------------------------- + +-#include "../ZLib/zlib.h" +-#include "../LibPNG/png.h" ++#include <zlib.h> ++#include <png.h> + + // ---------------------------------------------------------- + +diff -rupN FreeImage/Source/FreeImage/PluginRAW.cpp FreeImage-new/Source/FreeImage/PluginRAW.cpp +--- FreeImage/Source/FreeImage/PluginRAW.cpp 2015-03-08 20:12:04.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginRAW.cpp 2015-09-05 02:13:52.044353363 +0200 +@@ -19,7 +19,7 @@ + // Use at your own risk! + // ========================================================== + +-#include "../LibRawLite/libraw/libraw.h" ++#include <libraw/libraw.h> + + #include "FreeImage.h" + #include "Utilities.h" +diff -rupN FreeImage/Source/FreeImage/PluginTIFF.cpp FreeImage-new/Source/FreeImage/PluginTIFF.cpp +--- FreeImage/Source/FreeImage/PluginTIFF.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginTIFF.cpp 2015-09-05 02:13:52.044353363 +0200 +@@ -37,9 +37,9 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibTIFF4/tiffiop.h" ++#include <tiffio.h> + #include "../Metadata/FreeImageTag.h" +-#include "../OpenEXR/Half/half.h" ++#include <OpenEXR/half.h> + + #include "FreeImageIO.h" + #include "PSDParser.h" +@@ -194,16 +194,6 @@ TIFFFdOpen(thandle_t handle, const char + return tif; + } + +-/** +-Open a TIFF file for reading or writing +-@param name +-@param mode +-*/ +-TIFF* +-TIFFOpen(const char* name, const char* mode) { +- return 0; +-} +- + // ---------------------------------------------------------- + // TIFF library FreeImage-specific routines. + // ---------------------------------------------------------- +diff -rupN FreeImage/Source/FreeImage/PluginWebP.cpp FreeImage-new/Source/FreeImage/PluginWebP.cpp +--- FreeImage/Source/FreeImage/PluginWebP.cpp 2015-03-02 02:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginWebP.cpp 2015-09-05 02:13:52.044353363 +0200 +@@ -24,10 +24,10 @@ + + #include "../Metadata/FreeImageTag.h" + +-#include "../LibWebP/src/webp/decode.h" +-#include "../LibWebP/src/webp/encode.h" +-#include "../LibWebP/src/enc/vp8enci.h" +-#include "../LibWebP/src/webp/mux.h" ++#include <webp/decode.h> ++#include <webp/encode.h> ++// #include "../LibWebP/src/enc/vp8enci.h" ++#include <webp/mux.h> + + // ========================================================== + // Plugin Interface +diff -rupN FreeImage/Source/FreeImage/ZLibInterface.cpp FreeImage-new/Source/FreeImage/ZLibInterface.cpp +--- FreeImage/Source/FreeImage/ZLibInterface.cpp 2015-03-02 02:07:10.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/ZLibInterface.cpp 2015-09-05 02:13:52.044353363 +0200 +@@ -19,10 +19,9 @@ + // Use at your own risk! + // ========================================================== + +-#include "../ZLib/zlib.h" ++#include <zlib.h> + #include "FreeImage.h" + #include "Utilities.h" +-#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */ + + /** + Compresses a source buffer into a target buffer, using the ZLib library. +@@ -115,7 +114,7 @@ FreeImage_ZLibGZip(BYTE *target, DWORD t + return 0; + case Z_OK: { + // patch header, setup crc and length (stolen from mod_trace_output) +- BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code ++ BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code (unix) + crc = crc32(crc, source, source_size); + memcpy(target + 4 + dest_len, &crc, 4); + memcpy(target + 8 + dest_len, &source_size, 4); +diff -rupN FreeImage/Source/FreeImage.h FreeImage-new/Source/FreeImage.h +--- FreeImage/Source/FreeImage.h 2015-03-04 02:17:54.000000000 +0100 ++++ FreeImage-new/Source/FreeImage.h 2015-09-05 02:13:52.045353382 +0200 +@@ -155,8 +155,11 @@ typedef uint8_t BYTE; + typedef uint16_t WORD; + typedef uint32_t DWORD; + typedef int32_t LONG; ++// Disable these, they conflict with the (wrong) ones of libraw ++#if 0 + typedef int64_t INT64; + typedef uint64_t UINT64; ++#endif + #else + // MS is not C99 ISO compliant + typedef long BOOL; +@@ -410,7 +413,12 @@ FI_ENUM(FREE_IMAGE_FORMAT) { + FIF_DDS = 24, + FIF_GIF = 25, + FIF_HDR = 26, +- FIF_FAXG3 = 27, ++/* The G3 fax format plugin is deliberately disabled in the Fedora build of ++ FreeImage as it requires that FreeImage uses a private copy of libtiff ++ which is a no no because of security reasons. */ ++#if 0 ++ FIF_FAXG3 = 27, ++#endif + FIF_SGI = 28, + FIF_EXR = 29, + FIF_J2K = 30, +@@ -473,6 +481,10 @@ FI_ENUM(FREE_IMAGE_DITHER) { + FID_BAYER16x16 = 6 //! Bayer ordered dispersed dot dithering (order 4 dithering matrix) + }; + ++/* The FreeImage_JPEGTransform functions are deliberately disabled in the ++ Fedora build of FreeImage as they require that FreeImage uses a private copy ++ of libjpeg which is a no no because of security reasons. */ ++#if 0 + /** Lossless JPEG transformations + Constants used in FreeImage_JPEGTransform + */ +@@ -486,6 +498,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_ROTATE_180 = 6, //! 180-degree rotation + FIJPEG_OP_ROTATE_270 = 7 //! 270-degree clockwise (or 90 ccw) + }; ++#endif + + /** Tone mapping operators. + Constants used in FreeImage_ToneMapping. +@@ -1076,7 +1089,10 @@ DLL_API const char* DLL_CALLCONV FreeIma + // -------------------------------------------------------------------------- + // JPEG lossless transformation routines + // -------------------------------------------------------------------------- +- ++/* The FreeImage_JPEGTransform functions are deliberately disabled in the +++ Fedora build of FreeImage as they require that FreeImage uses a private copy +++ of libjpeg which is a no no because of security reasons. */ ++#if 0 + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); +@@ -1085,6 +1101,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEG + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); ++#endif + + + // -------------------------------------------------------------------------- +diff -rupN FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp FreeImage-new/Source/FreeImageToolkit/JPEGTransform.cpp +--- FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp 2015-03-02 02:07:10.000000000 +0100 ++++ FreeImage-new/Source/FreeImageToolkit/JPEGTransform.cpp 2015-09-05 02:13:52.045353382 +0200 +@@ -26,10 +26,10 @@ extern "C" { + #undef FAR + #include <setjmp.h> + +-#include "../LibJPEG/jinclude.h" +-#include "../LibJPEG/jpeglib.h" +-#include "../LibJPEG/jerror.h" +-#include "../LibJPEG/transupp.h" ++#include <jinclude.h> ++#include <jpeglib.h> ++#include <jerror.h> ++#include <transupp.h> + } + + #include "FreeImage.h" +diff -rupN FreeImage/Source/Metadata/TagConversion.cpp FreeImage-new/Source/Metadata/TagConversion.cpp +--- FreeImage/Source/Metadata/TagConversion.cpp 2015-03-02 02:07:10.000000000 +0100 ++++ FreeImage-new/Source/Metadata/TagConversion.cpp 2015-09-05 02:13:52.045353382 +0200 +@@ -30,6 +30,11 @@ + + #define MAX_TEXT_EXTENT 512 + ++// These were in FreeImage.h, but are moved here to avoid conflicts (see note in FreeImage.h) ++typedef int64_t INT64; ++typedef uint64_t UINT64; ++ ++ + /** + Convert a tag to a C string + */ +diff -rupN FreeImage/Source/Metadata/XTIFF.cpp FreeImage-new/Source/Metadata/XTIFF.cpp +--- FreeImage/Source/Metadata/XTIFF.cpp 2015-03-02 02:07:10.000000000 +0100 ++++ FreeImage-new/Source/Metadata/XTIFF.cpp 2015-09-05 02:13:52.045353382 +0200 +@@ -29,13 +29,18 @@ + #pragma warning (disable : 4786) // identifier was truncated to 'number' characters + #endif + +-#include "../LibTIFF4/tiffiop.h" ++#include <tiffio.h> + + #include "FreeImage.h" + #include "Utilities.h" + #include "FreeImageTag.h" + #include "FIRational.h" + ++extern "C" ++{ ++ int _TIFFDataSize(TIFFDataType type); ++} ++ + // ---------------------------------------------------------- + // Extended TIFF Directory GEO Tag Support + // ---------------------------------------------------------- +@@ -224,6 +229,33 @@ tiff_write_geotiff_profile(TIFF *tif, FI + // TIFF EXIF tag reading & writing + // ---------------------------------------------------------- + ++static uint32 exif_tag_ids[] = { ++ EXIFTAG_EXPOSURETIME, EXIFTAG_FNUMBER, EXIFTAG_EXPOSUREPROGRAM, ++ EXIFTAG_SPECTRALSENSITIVITY, EXIFTAG_ISOSPEEDRATINGS, EXIFTAG_OECF, ++ EXIFTAG_EXIFVERSION, EXIFTAG_DATETIMEORIGINAL, EXIFTAG_DATETIMEDIGITIZED, ++ EXIFTAG_COMPONENTSCONFIGURATION, EXIFTAG_COMPRESSEDBITSPERPIXEL, ++ EXIFTAG_SHUTTERSPEEDVALUE, EXIFTAG_APERTUREVALUE, ++ EXIFTAG_BRIGHTNESSVALUE, EXIFTAG_EXPOSUREBIASVALUE, ++ EXIFTAG_MAXAPERTUREVALUE, EXIFTAG_SUBJECTDISTANCE, EXIFTAG_METERINGMODE, ++ EXIFTAG_LIGHTSOURCE, EXIFTAG_FLASH, EXIFTAG_FOCALLENGTH, ++ EXIFTAG_SUBJECTAREA, EXIFTAG_MAKERNOTE, EXIFTAG_USERCOMMENT, ++ EXIFTAG_SUBSECTIME, EXIFTAG_SUBSECTIMEORIGINAL, ++ EXIFTAG_SUBSECTIMEDIGITIZED, EXIFTAG_FLASHPIXVERSION, EXIFTAG_COLORSPACE, ++ EXIFTAG_PIXELXDIMENSION, EXIFTAG_PIXELYDIMENSION, ++ EXIFTAG_RELATEDSOUNDFILE, EXIFTAG_FLASHENERGY, ++ EXIFTAG_SPATIALFREQUENCYRESPONSE, EXIFTAG_FOCALPLANEXRESOLUTION, ++ EXIFTAG_FOCALPLANEYRESOLUTION, EXIFTAG_FOCALPLANERESOLUTIONUNIT, ++ EXIFTAG_SUBJECTLOCATION, EXIFTAG_EXPOSUREINDEX, EXIFTAG_SENSINGMETHOD, ++ EXIFTAG_FILESOURCE, EXIFTAG_SCENETYPE, EXIFTAG_CFAPATTERN, ++ EXIFTAG_CUSTOMRENDERED, EXIFTAG_EXPOSUREMODE, EXIFTAG_WHITEBALANCE, ++ EXIFTAG_DIGITALZOOMRATIO, EXIFTAG_FOCALLENGTHIN35MMFILM, ++ EXIFTAG_SCENECAPTURETYPE, EXIFTAG_GAINCONTROL, EXIFTAG_CONTRAST, ++ EXIFTAG_SATURATION, EXIFTAG_SHARPNESS, EXIFTAG_DEVICESETTINGDESCRIPTION, ++ EXIFTAG_SUBJECTDISTANCERANGE, EXIFTAG_GAINCONTROL, EXIFTAG_GAINCONTROL, ++ EXIFTAG_IMAGEUNIQUEID ++}; ++static int nExifTags = sizeof(exif_tag_ids) / sizeof(exif_tag_ids[0]); ++ + /** + Read a single Exif tag + +@@ -575,45 +607,11 @@ tiff_read_exif_tags(TIFF *tif, TagLib::M + + // loop over all Core Directory Tags + // ### uses private data, but there is no other way ++ // -> Fedora: Best we can do without private headers is to hard-code a list of known EXIF tags and read those + if(md_model == TagLib::EXIF_MAIN) { +- const TIFFDirectory *td = &tif->tif_dir; +- +- uint32 lastTag = 0; //<- used to prevent reading some tags twice (as stored in tif_fieldinfo) +- +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); +- +- if(tag_id == lastTag) { +- continue; +- } +- +- // test if tag value is set +- // (lifted directly from LibTiff _TIFFWriteDirectory) +- +- if( fld->field_bit == FIELD_CUSTOM ) { +- int is_set = FALSE; +- +- for(int ci = 0; ci < td->td_customValueCount; ci++ ) { +- is_set |= (td->td_customValues[ci].info == fld); +- } +- +- if( !is_set ) { +- continue; +- } +- +- } else if(!TIFFFieldSet(tif, fld->field_bit)) { +- continue; +- } +- +- // process *all* other tags (some will be ignored) +- +- tiff_read_exif_tag(tif, tag_id, dib, md_model); +- +- lastTag = tag_id; ++ for (int i = 0; i < nExifTags; ++i) { ++ tiff_read_exif_tag(tif, exif_tag_ids[i], dib, md_model); + } +- + } + + return TRUE; +@@ -723,10 +721,9 @@ tiff_write_exif_tags(TIFF *tif, TagLib:: + + TagLib& tag_lib = TagLib::instance(); + +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); ++ for (int fi = 0; fi < nExifTags; fi++) { ++ const uint32 tag_id = exif_tag_ids[fi]; ++ const TIFFField *fld = TIFFFieldWithTag(tif, tag_id); + + if(skip_write_field(tif, tag_id)) { + // skip tags that are already handled by the LibTIFF writing process diff --git a/gnu/packages/patches/htop-fix-process-tree.patch b/gnu/packages/patches/htop-fix-process-tree.patch deleted file mode 100644 index d8e5e2ccac..0000000000 --- a/gnu/packages/patches/htop-fix-process-tree.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 2971a187551e062ffefdab965f55377b36cd94eb Mon Sep 17 00:00:00 2001 -From: Tobias Geerinckx-Rice <me@tobias.gr> -Date: Wed, 21 Feb 2018 06:00:50 +0100 -Subject: [PATCH] Fix process tree -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This manually reverts: - - commit 584a9bceab948590dabd189d234a86e6bf4ec3f4 - Author: wangqr <wangqr@wangqr.tk> - Date: Fri Sep 1 21:27:24 2017 +0800 - - Find roots when constructing process tree, fix #587 - -which breaks the process tree (âtâ) view in at least some cases. -I will investigate further... ---- - ProcessList.c | 63 +++++++++++++++++------------------------------------------ - 1 file changed, 18 insertions(+), 45 deletions(-) - -diff --git a/ProcessList.c b/ProcessList.c -index 48b2d95..225253d 100644 ---- a/ProcessList.c -+++ b/ProcessList.c -@@ -213,51 +213,24 @@ void ProcessList_sort(ProcessList* this) { - // Restore settings - this->settings->sortKey = sortKey; - this->settings->direction = direction; -- int vsize = Vector_size(this->processes); -- // Find all processes whose parent is not visible -- int size; -- while ((size = Vector_size(this->processes))) { -- int i; -- for (i = 0; i < size; i++) { -- Process* process = (Process*)(Vector_get(this->processes, i)); -- // Immediately consume not shown processes -- if (!process->show) { -- process = (Process*)(Vector_take(this->processes, i)); -- process->indent = 0; -- Vector_add(this->processes2, process); -- ProcessList_buildTree(this, process->pid, 0, 0, direction, false); -- break; -- } -- pid_t ppid = process->tgid == process->pid ? process->ppid : process->tgid; -- // Bisect the process vector to find parent -- int l = 0, r = size; -- // If PID corresponds with PPID (e.g. "kernel_task" (PID:0, PPID:0) -- // on Mac OS X 10.11.6) cancel bisecting and regard this process as -- // root. -- if (process->pid == ppid) -- r = 0; -- while (l < r) { -- int c = (l + r) / 2; -- pid_t pid = ((Process*)(Vector_get(this->processes, c)))->pid; -- if (ppid == pid) { -- break; -- } else if (ppid < pid) { -- r = c; -- } else { -- l = c + 1; -- } -- } -- // If parent not found, then construct the tree with this root -- if (l >= r) { -- process = (Process*)(Vector_take(this->processes, i)); -- process->indent = 0; -- Vector_add(this->processes2, process); -- ProcessList_buildTree(this, process->pid, 0, 0, direction, process->showChildren); -- break; -- } -- } -- // There should be no loop in the process tree -- assert(i < size); -+ -+ // Take PID 1 as root and add to the new listing -+ int vsize = Vector_size(this->processes); -+ Process* init = (Process*) (Vector_take(this->processes, 0)); -+ if (!init) return; -+ // This assertion crashes on hardened kernels. -+ // I wonder how well tree view works on those systems. -+ // assert(init->pid == 1); -+ init->indent = 0; -+ Vector_add(this->processes2, init); -+ // Recursively empty list -+ ProcessList_buildTree(this, init->pid, 0, 0, direction, true); -+ // Add leftovers -+ while (Vector_size(this->processes)) { -+ Process* p = (Process*) (Vector_take(this->processes, 0)); -+ p->indent = 0; -+ Vector_add(this->processes2, p); -+ ProcessList_buildTree(this, p->pid, 0, 0, direction, p->showChildren); - } - assert(Vector_size(this->processes2) == vsize); (void)vsize; - assert(Vector_size(this->processes) == 0); --- -2.16.2 - diff --git a/gnu/packages/patches/hwloc-tests-without-sysfs.patch b/gnu/packages/patches/hwloc-tests-without-sysfs.patch deleted file mode 100644 index ea6ec41616..0000000000 --- a/gnu/packages/patches/hwloc-tests-without-sysfs.patch +++ /dev/null @@ -1,42 +0,0 @@ -Fix a test failure in the build environment, where /sys is missing. -From <https://github.com/bgoglin/hwloc/commit/a2cc4f2e2bf4a8bbdd61b578a62e27e7482799cf.patch>. - -From a2cc4f2e2bf4a8bbdd61b578a62e27e7482799cf Mon Sep 17 00:00:00 2001 -From: Brice Goglin <Brice.Goglin@inria.fr> -Date: Tue, 6 Feb 2018 17:13:26 +0100 -Subject: [PATCH] linux: honor the filtering cores and packages when reading - topology from cpuinfo - -Caused a make check crash in lstopo --filter all:none in chroot without sysfs. - -Thanks to Ludovic Courtes for the report. - -Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr> ---- - hwloc/topology-linux.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/hwloc/topology-linux.c b/hwloc/topology-linux.c -index 290da0d72..e1bbf94e1 100644 ---- a/hwloc/topology-linux.c -+++ b/hwloc/topology-linux.c -@@ -4101,7 +4101,8 @@ look_cpuinfo(struct hwloc_topology *topology, - } - /* create package objects */ - hwloc_debug("%u pkgs%s\n", numpkgs, missingpkg ? ", but some missing package" : ""); -- if (!missingpkg && numpkgs>0) { -+ if (!missingpkg && numpkgs>0 -+ && hwloc_filter_check_keep_object_type(topology, HWLOC_OBJ_PACKAGE)) { - for (i = 0; i < numpkgs; i++) { - struct hwloc_obj *obj = hwloc_alloc_setup_object(topology, HWLOC_OBJ_PACKAGE, Lpkg_to_Ppkg[i]); - int doneinfos = 0; -@@ -4145,7 +4146,8 @@ look_cpuinfo(struct hwloc_topology *topology, - } - /* create Core objects */ - hwloc_debug("%u cores%s\n", numcores, missingcore ? ", but some missing core" : ""); -- if (!missingcore && numcores>0) { -+ if (!missingcore && numcores>0 -+ && hwloc_filter_check_keep_object_type(topology, HWLOC_OBJ_CORE)) { - for (i = 0; i < numcores; i++) { - struct hwloc_obj *obj = hwloc_alloc_setup_object(topology, HWLOC_OBJ_CORE, Lcore_to_Pcore[i]); - obj->cpuset = hwloc_bitmap_alloc(); diff --git a/gnu/packages/patches/libgnomeui-utf8.patch b/gnu/packages/patches/libgnomeui-utf8.patch index 304d74e1e2..11622b21ee 100644 --- a/gnu/packages/patches/libgnomeui-utf8.patch +++ b/gnu/packages/patches/libgnomeui-utf8.patch @@ -8,11 +8,11 @@ make[2]: Entering directory '/tmp/guix-build-libgnomeui-2.24.5.drv-0/libgnomeui- INFO: Reading ./gnome-marshal.list... GEN gnome-marshal.h Traceback (most recent call last): - File "/gnu/store/azh1is0xknn4xphwj33iqcb5ic9qhk8l-glib-2.54.2-bin/bin/glib-mkenums", line 688, in <module> + File "/gnu/store/...-glib-2.54.2-bin/bin/glib-mkenums", line 688, in <module> process_file(fname) - File "/gnu/store/azh1is0xknn4xphwj33iqcb5ic9qhk8l-glib-2.54.2-bin/bin/glib-mkenums", line 420, in process_file + File "/gnu/store/...-glib-2.54.2-bin/bin/glib-mkenums", line 420, in process_file line = curfile.readline() - File "/gnu/store/3lkypf5wnsnvkaidhw0pv7k3yjfh1r9g-python-3.6.3/lib/python3.6/codecs.py", line 321, in decode + File "/gnu/store/...-python-3.6.3/lib/python3.6/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 1009: invalid continuation byte make[2]: *** [Makefile:1109: stamp-gnometypebuiltins.h] Error 1 diff --git a/gnu/packages/patches/libusb-for-axoloti.patch b/gnu/packages/patches/libusb-for-axoloti.patch index 2c07d767d9..76a45e801d 100644 --- a/gnu/packages/patches/libusb-for-axoloti.patch +++ b/gnu/packages/patches/libusb-for-axoloti.patch @@ -1,14 +1,14 @@ -diff -rp -u4 libusb-1.0.19-orig/libusb/descriptor.c libusb-1.0.19/libusb/descriptor.c ---- libusb-1.0.19-orig/libusb/descriptor.c 2015-05-12 00:15:19 +0200 -+++ libusb-1.0.19/libusb/descriptor.c 2015-05-12 00:17:09 +0200 -@@ -1181,9 +1181,9 @@ int API_EXPORTED libusb_get_string_descr +diff -rpu4 libusb-1.0.22.orig/libusb/descriptor.c libusb-1.0.22/libusb/descriptor.c +--- libusb-1.0.22.orig/libusb/descriptor.c 2018-03-17 08:23:37.000000000 +0100 ++++ libusb-1.0.22/libusb/descriptor.c 2018-03-29 10:36:09.968429473 +0200 +@@ -1173,9 +1173,9 @@ int API_EXPORTED libusb_get_string_descr if (tbuf[1] != LIBUSB_DT_STRING) return LIBUSB_ERROR_IO; if (tbuf[0] > r) - return LIBUSB_ERROR_IO; -+ tbuf[0] = r; ++ tbuf[0] = r; - for (di = 0, si = 2; si < tbuf[0]; si += 2) { + di = 0; + for (si = 2; si < tbuf[0]; si += 2) { if (di >= (length - 1)) - break; diff --git a/gnu/packages/patches/links-CVE-2017-11114.patch b/gnu/packages/patches/links-CVE-2017-11114.patch deleted file mode 100644 index c5ac9884b5..0000000000 --- a/gnu/packages/patches/links-CVE-2017-11114.patch +++ /dev/null @@ -1,99 +0,0 @@ -Fix CVE-2017-11114: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-11114 -http://seclists.org/fulldisclosure/2017/Jul/76 - -Patch copied from Debian: - -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870299#12 - -Origin: upstream, commit: fee5dca79a93a37024e494b985386a5fe60bc1b7 -Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870299#12 -Author: Mikulas Patocka <mikulas@twibright.com> -Date: Wed Aug 2 20:13:29 2017 +0200 -Subject: Fix read out of memory in case of corrupted UTF-8 data - ---- - charsets.c | 37 +------------------------------------ - links.h | 9 ++++----- - 2 files changed, 5 insertions(+), 41 deletions(-) - -Index: links-2.14/charsets.c -=================================================================== ---- links-2.14.orig/charsets.c -+++ links-2.14/charsets.c -@@ -215,41 +215,6 @@ static struct conv_table *get_translatio - return utf_table; - } - --unsigned short int utf8_2_uni_table[0x200] = { -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 192, 0, -- 0, 0, 256, 0, 0, 0, 320, 0, 0, 0, 384, 0, 0, 0, 448, 0, -- 0, 0, 512, 0, 0, 0, 576, 0, 0, 0, 640, 0, 0, 0, 704, 0, -- 0, 0, 768, 0, 0, 0, 832, 0, 0, 0, 896, 0, 0, 0, 960, 0, -- 0, 0, 1024, 0, 0, 0, 1088, 0, 0, 0, 1152, 0, 0, 0, 1216, 0, -- 0, 0, 1280, 0, 0, 0, 1344, 0, 0, 0, 1408, 0, 0, 0, 1472, 0, -- 0, 0, 1536, 0, 0, 0, 1600, 0, 0, 0, 1664, 0, 0, 0, 1728, 0, -- 0, 0, 1792, 0, 0, 0, 1856, 0, 0, 0, 1920, 0, 0, 0, 1984, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, --}; -- - unsigned char utf_8_1[256] = { - 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, -@@ -269,7 +234,7 @@ unsigned char utf_8_1[256] = { - 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 6, 6, - }; - --static_const unsigned min_utf_8[9] = { -+static_const unsigned min_utf_8[8] = { - 0, 0x4000000, 0x200000, 0x10000, 0x800, 0x80, 0x100, 0x1, - }; - -Index: links-2.14/links.h -=================================================================== ---- links-2.14.orig/links.h -+++ links-2.14/links.h -@@ -3906,15 +3906,14 @@ unsigned char *cp_strchr(int charset, un - void init_charset(void); - - unsigned get_utf_8(unsigned char **p); --extern unsigned short int utf8_2_uni_table[0x200]; - #define GET_UTF_8(s, c) \ - do { \ - if ((unsigned char)(s)[0] < 0x80) \ - (c) = (s)++[0]; \ -- else if (((c) = utf8_2_uni_table[((unsigned char)(s)[0] << 2) + \ -- ((unsigned char)(s)[1] >> 6) - 0x200])) \ -- (c) += (unsigned char)(s)[1] & 0x3f, (s) += 2; \ -- else \ -+ else if ((unsigned char)(s)[0] >= 0xc2 && (unsigned char)(s)[0] < 0xe0 &&\ -+ ((unsigned char)(s)[1] & 0xc0) == 0x80) { \ -+ (c) = (unsigned char)(s)[0] * 0x40 + (unsigned char)(s)[1], (c) -= 0x3080, (s) += 2;\ -+ } else \ - (c) = get_utf_8(&(s)); \ - } while (0) - #define FWD_UTF_8(s) \ diff --git a/gnu/packages/patches/lyx-2.2.3-fix-test.patch b/gnu/packages/patches/lyx-2.2.3-fix-test.patch new file mode 100644 index 0000000000..10b7d2a3a9 --- /dev/null +++ b/gnu/packages/patches/lyx-2.2.3-fix-test.patch @@ -0,0 +1,13 @@ +See https://www.lyx.org/trac/ticket/10800#comment:17 +diff --git a/src/tex2lyx/test/test-structure.lyx.lyx b/src/tex2lyx/test/test-structure.lyx.lyx +index feff755cd2..2c7f2ace5c 100644 +--- a/src/tex2lyx/test/test-structure.lyx.lyx ++++ b/src/tex2lyx/test/test-structure.lyx.lyx +@@ -212,7 +212,7 @@ This causes the + \begin_inset Flex Flex:Strong + status collapsed + +-\begin_layout Standard ++\begin_layout Plain Layout + logikalmkup + \end_layout diff --git a/gnu/packages/patches/mupdf-CVE-2018-1000051.patch b/gnu/packages/patches/mupdf-CVE-2018-1000051.patch new file mode 100644 index 0000000000..bb78c46f80 --- /dev/null +++ b/gnu/packages/patches/mupdf-CVE-2018-1000051.patch @@ -0,0 +1,88 @@ +Fix CVE-2018-1000051: + +https://bugs.ghostscript.com/show_bug.cgi?id=698873 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000051 + +Patch copied from upstream source repository: + +https://git.ghostscript.com/?p=mupdf.git;a=commit;h=321ba1de287016b0036bf4a56ce774ad11763384 + +From 321ba1de287016b0036bf4a56ce774ad11763384 Mon Sep 17 00:00:00 2001 +From: Sebastian Rasmussen <sebras@gmail.com> +Date: Tue, 19 Dec 2017 23:47:47 +0100 +Subject: [PATCH] Bug 698825: Do not drop borrowed colorspaces. + +Previously the borrowed colorspace was dropped when updating annotation +appearances, leading to use after free warnings from valgrind/ASAN. +--- + source/pdf/pdf-appearance.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c +index 70f684f4..d7a1dddd 100644 +--- a/source/pdf/pdf-appearance.c ++++ b/source/pdf/pdf-appearance.c +@@ -2170,7 +2170,6 @@ void pdf_update_free_text_annot_appearance(fz_context *ctx, pdf_document *doc, p + fz_device *dev = NULL; + font_info font_rec; + fz_text *text = NULL; +- fz_colorspace *cs = NULL; + fz_matrix page_ctm; + + pdf_page_transform(ctx, annot->page, NULL, &page_ctm); +@@ -2184,11 +2183,11 @@ void pdf_update_free_text_annot_appearance(fz_context *ctx, pdf_document *doc, p + fz_var(dlist); + fz_var(dev); + fz_var(text); +- fz_var(cs); + fz_try(ctx) + { + char *contents = pdf_to_str_buf(ctx, pdf_dict_get(ctx, obj, PDF_NAME_Contents)); + char *da = pdf_to_str_buf(ctx, pdf_dict_get(ctx, obj, PDF_NAME_DA)); ++ fz_colorspace *cs; + fz_point pos; + fz_rect rect; + +@@ -2223,7 +2222,6 @@ void pdf_update_free_text_annot_appearance(fz_context *ctx, pdf_document *doc, p + fz_drop_display_list(ctx, dlist); + font_info_fin(ctx, &font_rec); + fz_drop_text(ctx, text); +- fz_drop_colorspace(ctx, cs); + } + fz_catch(ctx) + { +@@ -2359,7 +2357,6 @@ void pdf_set_signature_appearance(fz_context *ctx, pdf_document *doc, pdf_annot + fz_device *dev = NULL; + font_info font_rec; + fz_text *text = NULL; +- fz_colorspace *cs = NULL; + fz_path *path = NULL; + fz_buffer *fzbuf = NULL; + fz_matrix page_ctm; +@@ -2375,7 +2372,6 @@ void pdf_set_signature_appearance(fz_context *ctx, pdf_document *doc, pdf_annot + fz_var(dlist); + fz_var(dev); + fz_var(text); +- fz_var(cs); + fz_var(fzbuf); + fz_try(ctx) + { +@@ -2384,6 +2380,7 @@ void pdf_set_signature_appearance(fz_context *ctx, pdf_document *doc, pdf_annot + fz_rect logo_bounds; + fz_matrix logo_tm; + fz_rect rect; ++ fz_colorspace *cs = fz_device_rgb(ctx); /* Borrowed reference */ + + pdf_to_rect(ctx, pdf_dict_get(ctx, annot->obj, PDF_NAME_Rect), &annot_rect); + rect = annot_rect; +@@ -2396,7 +2393,6 @@ void pdf_set_signature_appearance(fz_context *ctx, pdf_document *doc, pdf_annot + fz_bound_path(ctx, path, NULL, &fz_identity, &logo_bounds); + center_rect_within_rect(&logo_bounds, &rect, &logo_tm); + fz_concat(&logo_tm, &logo_tm, &page_ctm); +- cs = fz_device_rgb(ctx); /* Borrowed reference */ + fz_fill_path(ctx, dev, path, 0, &logo_tm, cs, logo_color, 1.0f, NULL); + + get_font_info(ctx, doc, dr, da, &font_rec); +-- +2.16.3 + diff --git a/gnu/packages/patches/mupdf-CVE-2018-6544.patch b/gnu/packages/patches/mupdf-CVE-2018-6544.patch new file mode 100644 index 0000000000..b2c8f849f3 --- /dev/null +++ b/gnu/packages/patches/mupdf-CVE-2018-6544.patch @@ -0,0 +1,109 @@ +Fix CVE-2018-6544: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-6544 +https://bugs.ghostscript.com/show_bug.cgi?id=698830 +https://bugs.ghostscript.com/show_bug.cgi?id=698965 + +Patches copied from upstream source repository: + +https://git.ghostscript.com/?p=mupdf.git;h=26527eef77b3e51c2258c8e40845bfbc015e405d +https://git.ghostscript.com/?p=mupdf.git;h=b03def134988da8c800adac1a38a41a1f09a1d89 + +From b03def134988da8c800adac1a38a41a1f09a1d89 Mon Sep 17 00:00:00 2001 +From: Sebastian Rasmussen <sebras@gmail.com> +Date: Thu, 1 Feb 2018 16:36:14 +0100 +Subject: [PATCH] Bug 698830: Avoid recursion when loading object streams + objects. + +If there were indirect references in the object stream dictionary and +one of those indirect references referred to an object inside the object +stream itself, mupdf would previously enter recursion only bounded by the +exception stack. After this commit the object stream is checked if it is +marked immediately after being loaded. If it is marked then we terminate +the recursion at this point, if it is not marked then mark it and +attempt to load the desired object within. We also take care to unmark +the stream object when done or upon exception. +--- + source/pdf/pdf-xref.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c +index 723b543c..ed09094c 100644 +--- a/source/pdf/pdf-xref.c ++++ b/source/pdf/pdf-xref.c +@@ -1576,6 +1576,19 @@ pdf_load_obj_stm(fz_context *ctx, pdf_document *doc, int num, pdf_lexbuf *buf, i + { + objstm = pdf_load_object(ctx, doc, num); + ++ if (pdf_obj_marked(ctx, objstm)) ++ fz_throw(ctx, FZ_ERROR_GENERIC, "recursive object stream lookup"); ++ } ++ fz_catch(ctx) ++ { ++ pdf_drop_obj(ctx, objstm); ++ fz_rethrow(ctx); ++ } ++ ++ fz_try(ctx) ++ { ++ pdf_mark_obj(ctx, objstm); ++ + count = pdf_to_int(ctx, pdf_dict_get(ctx, objstm, PDF_NAME_N)); + first = pdf_to_int(ctx, pdf_dict_get(ctx, objstm, PDF_NAME_First)); + +@@ -1655,6 +1668,7 @@ pdf_load_obj_stm(fz_context *ctx, pdf_document *doc, int num, pdf_lexbuf *buf, i + fz_drop_stream(ctx, stm); + fz_free(ctx, ofsbuf); + fz_free(ctx, numbuf); ++ pdf_unmark_obj(ctx, objstm); + pdf_drop_obj(ctx, objstm); + } + fz_catch(ctx) +-- +2.16.3 + +From 26527eef77b3e51c2258c8e40845bfbc015e405d Mon Sep 17 00:00:00 2001 +From: Sebastian Rasmussen <sebras@gmail.com> +Date: Mon, 29 Jan 2018 02:00:48 +0100 +Subject: [PATCH] Bug 698830: Don't drop unkept stream if running out of error + stack. + +Under normal conditions where fz_keep_stream() is called inside +fz_try() we may call fz_drop_stream() in fz_catch() upon exceptions. +The issue comes when fz_keep_stream() has not yet been called but is +dropped in fz_catch(). This happens in the PDF from the bug when +fz_try() runs out of exception stack, and next the code in fz_catch() +runs, dropping the caller's reference to the filter chain stream! + +The simplest way of fixing this it to always keep the filter chain +stream before fz_try() is called. That way fz_catch() may drop the +stream whether an exception has occurred or if the fz_try() ran out of +exception stack. +--- + source/pdf/pdf-stream.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/source/pdf/pdf-stream.c b/source/pdf/pdf-stream.c +index c89da5c4..c6ba7ad3 100644 +--- a/source/pdf/pdf-stream.c ++++ b/source/pdf/pdf-stream.c +@@ -303,14 +303,13 @@ pdf_open_raw_filter(fz_context *ctx, fz_stream *chain, pdf_document *doc, pdf_ob + *orig_gen = 0; + } + +- fz_var(chain); ++ chain = fz_keep_stream(ctx, chain); + + fz_try(ctx) + { + len = pdf_to_int(ctx, pdf_dict_get(ctx, stmobj, PDF_NAME_Length)); + +- /* don't close chain when we close this filter */ +- chain2 = fz_keep_stream(ctx, chain); ++ chain2 = chain; + chain = NULL; + chain = fz_open_null(ctx, chain2, len, offset); + +-- +2.16.3 + diff --git a/gnu/packages/patches/mupen64plus-video-z64-glew-correct-path.patch b/gnu/packages/patches/mupen64plus-video-z64-glew-correct-path.patch new file mode 100644 index 0000000000..c3fcfbbd0e --- /dev/null +++ b/gnu/packages/patches/mupen64plus-video-z64-glew-correct-path.patch @@ -0,0 +1,36 @@ +From 21507b3600c616bca7049004eb518cf11f45f299 Mon Sep 17 00:00:00 2001 +From: "Anthony J. Bentley" <anthony@cathet.us> +Date: Sun, 7 Jun 2015 02:41:28 -0600 +Subject: [PATCH] Correct the path to the GLEW header. + +--- + src/glshader.cpp | 2 +- + src/rgl.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/glshader.cpp b/src/glshader.cpp +index 4729945..a8947ea 100644 +--- a/src/glshader.cpp ++++ b/src/glshader.cpp +@@ -23,7 +23,7 @@ + #include <stdio.h> + #include <string.h> + #include "rgl_assert.h" +-#include <glew.h> ++#include <GL/glew.h> + #if defined(__MACOSX__) + #include <OpenGL/gl.h> + #include <OpenGL/glext.h> +diff --git a/src/rgl.h b/src/rgl.h +index c15f93f..1748406 100644 +--- a/src/rgl.h ++++ b/src/rgl.h +@@ -26,7 +26,7 @@ + #include "rgl_assert.h" + #include "rdp.h" + +-#include <glew.h> ++#include <GL/glew.h> + #if defined(__MACOSX__) + #include <OpenGL/gl.h> + #elif defined(__MACOS__) diff --git a/gnu/packages/patches/racket-fix-xform-issue.patch b/gnu/packages/patches/racket-fix-xform-issue.patch new file mode 100644 index 0000000000..0a1640ee51 --- /dev/null +++ b/gnu/packages/patches/racket-fix-xform-issue.patch @@ -0,0 +1,63 @@ +050cdb59839896b41431791f8ee0ef2564231b8f +Author: Matthew Flatt <mflatt@racket-lang.org> +AuthorDate: Tue Mar 6 09:05:08 2018 -0700 +Commit: Matthew Flatt <mflatt@racket-lang.org> +CommitDate: Tue Mar 6 09:05:08 2018 -0700 + +Parent: efb9a919fc ffi docs: clarification on `unsafe-socket->port` +Containing: master +Follows: v5.0.1 (21612) + +xform: avoid problems with `__signbitf128` + +Closes #1962 and uses the suggested patch there, among other changes. + +2 files changed, 6 insertions(+), 3 deletions(-) +racket/collects/compiler/private/xform.rkt | 2 +- +racket/src/racket/src/number.c | 7 +++++-- + +diff --git a/racket/collects/compiler/private/xform.rkt b/racket/collects/compiler/private/xform.rkt +index 28a425c057..89ae848f9c 100644 +--- a/collects/compiler/private/xform.rkt ++++ b/collects/compiler/private/xform.rkt +@@ -904,7 +904,7 @@ + + strlen cos cosl sin sinl exp expl pow powl log logl sqrt sqrtl atan2 atan2l frexp + isnan isinf fpclass signbit _signbit _fpclass __fpclassify __fpclassifyf __fpclassifyl +- _isnan __isfinited __isnanl __isnan __signbit __signbitf __signbitd __signbitl ++ _isnan __isfinited __isnanl __isnan __signbit __signbitf __signbitd __signbitl __signbitf128 + __isinff __isinfl isnanf isinff __isinfd __isnanf __isnand __isinf __isinff128 + __inline_isnanl __inline_isnan __inline_signbit __inline_signbitf __inline_signbitd __inline_signbitl + __builtin_popcount __builtin_clz __builtin_isnan __builtin_isinf __builtin_signbit +diff --git a/racket/src/racket/src/number.c b/racket/src/racket/src/number.c +index 71f42aaf3c..3bbad3ba83 100644 +--- a/src/racket/src/number.c ++++ b/src/racket/src/number.c +@@ -1796,6 +1796,7 @@ double scheme_real_to_double(Scheme_Object *r) + } + + XFORM_NONGCING static MZ_INLINE int minus_zero_p(double d) ++ XFORM_SKIP_PROC + { + #ifdef MZ_IS_NEG_ZERO + return MZ_IS_NEG_ZERO(d); +@@ -1809,7 +1810,9 @@ int scheme_minus_zero_p(double d) + return minus_zero_p(d); + } + +-static int rational_dbl_p(double f) { ++XFORM_NONGCING static int rational_dbl_p(double f) ++ XFORM_SKIP_PROC ++{ + return !(MZ_IS_NAN(f) + || MZ_IS_INFINITY(f)); + } +@@ -1955,7 +1958,7 @@ real_p(int argc, Scheme_Object *argv[]) + return (SCHEME_REALP(o) ? scheme_true : scheme_false); + } + +-static int is_rational(const Scheme_Object *o) ++XFORM_NONGCING static int is_rational(const Scheme_Object *o) + { + if (SCHEME_FLOATP(o)) + return rational_dbl_p(SCHEME_FLOAT_VAL(o)); \ No newline at end of file diff --git a/gnu/packages/patches/sharutils-CVE-2018-1000097.patch b/gnu/packages/patches/sharutils-CVE-2018-1000097.patch new file mode 100644 index 0000000000..8d58218184 --- /dev/null +++ b/gnu/packages/patches/sharutils-CVE-2018-1000097.patch @@ -0,0 +1,21 @@ +Fix CVE-2018-1000097: + +https://security-tracker.debian.org/tracker/CVE-2018-1000097 +https://nvd.nist.gov/vuln/detail/CVE-2018-1000097 + +Patch taken from upstream bug report: +https://lists.gnu.org/archive/html/bug-gnu-utils/2018-02/msg00005.html + +diff --git a/src/unshar.c b/src/unshar.c +index 80bc3a9..0fc3773 100644 +--- a/src/unshar.c ++++ b/src/unshar.c +@@ -240,7 +240,7 @@ find_archive (char const * name, FILE * file, off_t start) + off_t position = ftello (file); + + /* Read next line, fail if no more and no previous process. */ +- if (!fgets (rw_buffer, BUFSIZ, file)) ++ if (!fgets (rw_buffer, rw_base_size, file)) + { + if (!start) + error (0, 0, _("Found no shell commands in %s"), name); diff --git a/gnu/packages/patches/translate-shell-fix-curl-tests.patch b/gnu/packages/patches/translate-shell-fix-curl-tests.patch new file mode 100644 index 0000000000..33731462b8 --- /dev/null +++ b/gnu/packages/patches/translate-shell-fix-curl-tests.patch @@ -0,0 +1,60 @@ +This patch fixes Curl related tests for 'translate-shell'. + +Upstream bug URL: + +https://github.com/soimort/translate-shell/issues/221 + +From bb9f32d3145125ba664b6b05bf0a2fd34108e9d2 Mon Sep 17 00:00:00 2001 +From: Mort Yao <soi@mort.ninja> +Date: Sun, 25 Mar 2018 03:14:33 +0200 +Subject: [PATCH] TestUtils: perform curl-related tests only if NETWORK_ACCESS + is set to yes (#221) + +--- + test/TestUtils.awk | 32 +++++++++++++++++--------------- + 1 file changed, 17 insertions(+), 15 deletions(-) + +diff --git a/test/TestUtils.awk b/test/TestUtils.awk +index 08bb2e9..1c141e5 100644 +--- a/test/TestUtils.awk ++++ b/test/TestUtils.awk +@@ -30,22 +30,24 @@ BEGIN { + assertTrue(newerVersion("2", "1.9.9999")) + } + +- T("curl()", 1) +- { +- delete tokens; delete ast +- tokenize(tokens, curl("https://httpbin.org/get")) +- parseJson(ast, tokens) +- assertEqual(unparameterize(ast[0 SUBSEP "url"]), +- "https://httpbin.org/get") +- } ++ if (yn(ENVIRON["NETWORK_ACCESS"])) { # if network access enabled ++ T("curl()", 1) ++ { ++ delete tokens; delete ast ++ tokenize(tokens, curl("https://httpbin.org/get")) ++ parseJson(ast, tokens) ++ assertEqual(unparameterize(ast[0 SUBSEP "url"]), ++ "https://httpbin.org/get") ++ } + +- T("curlPost()", 1) +- { +- delete tokens; delete ast +- tokenize(tokens, curlPost("https://httpbin.org/post", "fizz=buzz")) +- parseJson(ast, tokens) +- assertEqual(unparameterize(ast[0 SUBSEP "url"]), +- "https://httpbin.org/post") ++ T("curlPost()", 1) ++ { ++ delete tokens; delete ast ++ tokenize(tokens, curlPost("https://httpbin.org/post", "fizz=buzz")) ++ parseJson(ast, tokens) ++ assertEqual(unparameterize(ast[0 SUBSEP "url"]), ++ "https://httpbin.org/post") ++ } + } + + T("dump()", 3) |