summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/aseprite
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2020-02-18 06:05:09 +0000
committerOrivej Desh <orivej@gmx.fr>2020-02-18 06:07:24 +0000
commit0ded378b10a17d2e7525bcd2002e89e10ecd7967 (patch)
tree0ac55dbfc42b8fed2981da944c5cd017dcfa72c1 /pkgs/applications/editors/aseprite
parent0b91dad9ee106d565f8c32816a339743234b775e (diff)
aseprite: fix build with glibc 2.30
Otherwise it fails with: In file included from /build/source/src/allegro/include/allegro/base.h:41, from /build/source/src/allegro/include/allegro.h:25, from /build/source/src/./she/alleg4/alleg_surface.h:11, from /build/source/src/she/alleg4/alleg_surface.cpp:11: /build/source/src/allegro/include/allegro/alcompat.h:44:22: error: conflicting declaration of C function 'fixed fadd(fixed, fixed)' 44 | AL_ALIAS(fixed fadd(fixed x, fixed y), fixadd(x, y)) | ^~~~ /build/source/src/allegro/include/allegro/internal/alconfig.h:164:49: note: in definition of macro 'AL_ALIAS' 164 | static __attribute__((unused)) __inline__ DECL \ | ^~~~ In file included from /nix/store/y57skwl8a5vbkrjrc30ygdw9vr1p6n19-gcc-9.2.0/include/c++/9.2.0/cmath:45, from /nix/store/y57skwl8a5vbkrjrc30ygdw9vr1p6n19-gcc-9.2.0/include/c++/9.2.0/math.h:36, from /build/source/src/./base/base.h:13, from /build/source/src/./config.h:40, from /build/source/src/she/alleg4/alleg_surface.cpp:8: /nix/store/2v6pi2wj3lcsc3j48n7flx9mgqyii1lv-glibc-2.30-dev/include/bits/mathcalls-narrow.h:24:20: note: previous declaration 'float fadd(double, double)' 24 | __MATHCALL_NARROW (__MATHCALL_NAME (add), __MATHCALL_REDIR_NAME (add), 2); | ^~~~~~~~~~~~~~~
Diffstat (limited to 'pkgs/applications/editors/aseprite')
-rw-r--r--pkgs/applications/editors/aseprite/allegro-glibc-2.30.patch8
-rw-r--r--pkgs/applications/editors/aseprite/default.nix4
2 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/applications/editors/aseprite/allegro-glibc-2.30.patch b/pkgs/applications/editors/aseprite/allegro-glibc-2.30.patch
new file mode 100644
index 000000000000..94c70da276c9
--- /dev/null
+++ b/pkgs/applications/editors/aseprite/allegro-glibc-2.30.patch
@@ -0,0 +1,8 @@
+diff --git a/src/she/CMakeLists.txt b/src/she/CMakeLists.txt
+index 4909ff1..02fa145 100644
+--- a/src/she/CMakeLists.txt
++++ b/src/she/CMakeLists.txt
+@@ -23,2 +23,3 @@ if(USE_ALLEG4_BACKEND)
+ add_definitions(-DUSE_MOUSE_POLLER)
++ add_definitions(-DALLEGRO_NO_FIX_ALIASES)
+ endif()
diff --git a/pkgs/applications/editors/aseprite/default.nix b/pkgs/applications/editors/aseprite/default.nix
index 170fde7b9caf..fb744ef59550 100644
--- a/pkgs/applications/editors/aseprite/default.nix
+++ b/pkgs/applications/editors/aseprite/default.nix
@@ -36,7 +36,9 @@ stdenv.mkDerivation rec {
skia libGL
];
- patches = lib.optionals unfree [
+ patches = if !unfree then [
+ ./allegro-glibc-2.30.patch
+ ] else [
(fetchpatch {
url = "https://github.com/lfont/aseprite/commit/f1ebc47012d3fed52306ed5922787b4b98cc0a7b.patch";
sha256 = "03xg7x6b9iv7z18vzlqxhcfphmx4v3qhs9f5rgf38ppyklca5jyw";