about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-09-03 09:03:25 +0100
committerGitHub <noreply@github.com>2017-09-03 09:03:25 +0100
commit89e1245c65d593ee45372307f9470d9f897b9818 (patch)
tree1ce686149b382a11b7a63b0b6ad6940fc2a8e08d /pkgs/applications
parent6ecf46334bb1c14ed6affeaf7ac1e3e61460579a (diff)
parent1398d5555cd77c35dfc301d8de5a6e8412f71849 (diff)
downloadnixlib-89e1245c65d593ee45372307f9470d9f897b9818.tar
nixlib-89e1245c65d593ee45372307f9470d9f897b9818.tar.gz
nixlib-89e1245c65d593ee45372307f9470d9f897b9818.tar.bz2
nixlib-89e1245c65d593ee45372307f9470d9f897b9818.tar.lz
nixlib-89e1245c65d593ee45372307f9470d9f897b9818.tar.xz
nixlib-89e1245c65d593ee45372307f9470d9f897b9818.tar.zst
nixlib-89e1245c65d593ee45372307f9470d9f897b9818.zip
Merge pull request #28917 from disassembler/photivo
photivo: fixes build with gcc6
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/graphics/photivo/default.nix1
-rw-r--r--pkgs/applications/graphics/photivo/gcc6.patch13
2 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/photivo/default.nix b/pkgs/applications/graphics/photivo/default.nix
index 69bc36dea61c..0d1adcff6e83 100644
--- a/pkgs/applications/graphics/photivo/default.nix
+++ b/pkgs/applications/graphics/photivo/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
       name = "lensfun-0.3.patch";
       sha256 = "0ys45x4r4bjjlx0zpd5d56rgjz7k8gxili4r4k8zx3zfka4a3zwv";
     })
+    ./gcc6.patch
   ];
 
   postPatch = '' # kinda icky
diff --git a/pkgs/applications/graphics/photivo/gcc6.patch b/pkgs/applications/graphics/photivo/gcc6.patch
new file mode 100644
index 000000000000..e2eb795fc8e2
--- /dev/null
+++ b/pkgs/applications/graphics/photivo/gcc6.patch
@@ -0,0 +1,13 @@
+diff --git c/Sources/ptImage.cpp i/Sources/ptImage.cpp
+index 9c95093..623c157 100755
+--- c/Sources/ptImage.cpp
++++ i/Sources/ptImage.cpp
+@@ -5291,7 +5291,7 @@ ptImage* ptImage::Box(const uint16_t MaxRadius, float* Mask) {
+         NewRow = NewRow < 0? -NewRow : NewRow > Height1? Height1_2-NewRow : NewRow ;

+         NewRow *= m_Width;

+         for(j = -IntRadius; j <= IntRadius; j++) {

+-          if (Dist[abs(i)][abs(j)] < Radius) {

++          if (Dist[int16_t(abs(i))][int16_t(abs(j))] < Radius) {

+             NewCol = Col+j;

+             NewCol = NewCol < 0? -NewCol : NewCol > Width1? Width1_2-NewCol : NewCol ;

+