tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
aseprite: 1.3.7 -> 1.3.13
liberodark
8 months ago
415318fe
7382d075
+74
-64
3 changed files
expand all
collapse all
unified
split
pkgs
by-name
as
aseprite
package.nix
shared-fmt.patch
shared-libwebp.patch
+34
-32
pkgs/by-name/as/aseprite/package.nix
···
33
34
clangStdenv.mkDerivation (finalAttrs: {
35
pname = "aseprite";
36
-
version = "1.3.7";
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
37
38
-
src = fetchFromGitHub {
39
-
owner = "aseprite";
40
-
repo = "aseprite";
41
-
rev = "v" + finalAttrs.version;
42
-
fetchSubmodules = true;
43
-
hash = "sha256-75kYJXmyags0cW2D5Ksq1uUrFSCAkFOdmn7Ya/6jLXc=";
44
-
};
45
46
nativeBuildInputs = [
47
cmake
···
75
];
76
77
patches = [
78
-
# https://github.com/aseprite/aseprite/issues/4486
79
-
# FIXME: remove on next release.
80
-
(fetchpatch {
81
-
name = "ENABLE_UPDATER-fix.patch";
82
-
url = "https://github.com/aseprite/aseprite/commit/8fce589.patch";
83
-
hash = "sha256-DbL6kK//gQXbsXEn/t+KTuoM7E9ocPAsVqEO+lYrka4=";
84
-
})
85
./shared-fmt.patch
86
./shared-libwebp.patch
87
./shared-skia-deps.patch
88
];
89
90
-
postPatch =
91
-
let
92
-
# Translation strings
93
-
strings = fetchFromGitHub {
94
-
owner = "aseprite";
95
-
repo = "strings";
96
-
rev = "e18a09fefbb6cd904e506183d5fbe08558a52ed4";
97
-
hash = "sha256-GyCCxbhgf0vST20EH/+KkNLrF+U9Xzgpxlao8s925PQ=";
98
-
};
99
-
in
100
-
''
101
-
sed -i src/ver/CMakeLists.txt -e "s-set(VERSION \".*\")-set(VERSION \"$version\")-"
102
-
rm -rf data/strings
103
-
cp -r ${strings} data/strings
104
-
'';
105
106
cmakeFlags = [
107
"-DENABLE_DESKTOP_INTEGRATION=ON"
···
116
"-DUSE_SHARED_LIBPNG=ON"
117
"-DUSE_SHARED_LIBWEBP=ON"
118
"-DUSE_SHARED_PIXMAN=ON"
119
-
"-DUSE_SHARED_TINYXML=ON"
120
"-DUSE_SHARED_WEBP=ON"
121
"-DUSE_SHARED_ZLIB=ON"
122
# Disable libarchive programs.
···
124
"-DENABLE_CPIO=OFF"
125
"-DENABLE_TAR=OFF"
126
# UI backend.
127
-
"-DLAF_OS_BACKEND=skia"
128
"-DLAF_WITH_EXAMPLES=OFF"
129
"-DSKIA_DIR=${skia-aseprite}"
130
"-DSKIA_LIBRARY_DIR=${skia-aseprite}/lib"
···
33
34
clangStdenv.mkDerivation (finalAttrs: {
35
pname = "aseprite";
36
+
version = "1.3.13";
37
+
38
+
srcs = [
39
+
(fetchFromGitHub {
40
+
name = "aseprite-source";
41
+
owner = "aseprite";
42
+
repo = "aseprite";
43
+
tag = "v${finalAttrs.version}";
44
+
fetchSubmodules = true;
45
+
hash = "sha256-eeB/4fQp1lbNYQj9LpNhOn7DYxaTc+BcmyvY2vPzpxk=";
46
+
})
47
+
48
+
# Translation strings
49
+
(fetchFromGitHub {
50
+
name = "aseprite-strings";
51
+
owner = "aseprite";
52
+
repo = "strings";
53
+
rev = "7b0af61dec1d98242d7eb2e9cab835d442d21235";
54
+
hash = "sha256-8OwwHCFP55pwLjk5O+a36hDZf9uX3P7cNliJM5SZdAg=";
55
+
})
56
+
];
57
58
+
# Sets the main build directory to "aseprite-source" since multiple sources are fetched.
59
+
sourceRoot = "aseprite-source";
60
+
61
+
# Translation files are copied without overwriting existing ones to preserve the potentially more up-to-date English file from the main source.
62
+
postUnpack = ''
63
+
cp --no-clobber $PWD/aseprite-strings/* ./aseprite-source/data/strings
64
+
'';
65
66
nativeBuildInputs = [
67
cmake
···
95
];
96
97
patches = [
0
0
0
0
0
0
0
98
./shared-fmt.patch
99
./shared-libwebp.patch
100
./shared-skia-deps.patch
101
];
102
103
+
postPatch = ''
104
+
substituteInPlace src/ver/CMakeLists.txt \
105
+
--replace-fail '"1.x-dev"' '"${finalAttrs.version}"'
106
+
'';
0
0
0
0
0
0
0
0
0
0
0
107
108
cmakeFlags = [
109
"-DENABLE_DESKTOP_INTEGRATION=ON"
···
118
"-DUSE_SHARED_LIBPNG=ON"
119
"-DUSE_SHARED_LIBWEBP=ON"
120
"-DUSE_SHARED_PIXMAN=ON"
121
+
"-DUSE_SHARED_TINYXML=OFF"
122
"-DUSE_SHARED_WEBP=ON"
123
"-DUSE_SHARED_ZLIB=ON"
124
# Disable libarchive programs.
···
126
"-DENABLE_CPIO=OFF"
127
"-DENABLE_TAR=OFF"
128
# UI backend.
129
+
"-DLAF_BACKEND=skia"
130
"-DLAF_WITH_EXAMPLES=OFF"
131
"-DSKIA_DIR=${skia-aseprite}"
132
"-DSKIA_LIBRARY_DIR=${skia-aseprite}/lib"
+24
-16
pkgs/by-name/as/aseprite/shared-fmt.patch
···
1
-
--- a/CMakeLists.txt 2022-01-08 00:37:08.165330523 +0100
2
-
+++ b/CMakeLists.txt 2022-01-08 00:52:41.163585173 +0100
3
-
@@ -54,6 +54,7 @@
0
0
4
5
option(USE_SHARED_CMARK "Use your installed copy of cmark" off)
6
option(USE_SHARED_CURL "Use your installed copy of curl" off)
···
8
option(USE_SHARED_GIFLIB "Use your installed copy of giflib" off)
9
option(USE_SHARED_JPEGLIB "Use your installed copy of jpeglib" off)
10
option(USE_SHARED_ZLIB "Use your installed copy of zlib" off)
11
-
@@ -165,6 +165,7 @@
12
set(SOURCE_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data)
13
set(CMARK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/cmark)
14
set(CURL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/curl)
···
16
set(GIFLIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/giflib)
17
set(LIBJPEG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/jpeg)
18
set(LIBPNG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libpng)
19
-
@@ -204,6 +205,15 @@
20
set(CURL_STATICLIB ON BOOL)
21
endif()
22
0
23
+if(USE_SHARED_FMT)
24
+ find_package(FMT REQUIRED)
25
+ set(FMT_LIBRARIES fmt::fmt)
···
32
# zlib
33
if(USE_SHARED_ZLIB)
34
find_package(ZLIB REQUIRED)
35
-
--- a/src/app/CMakeLists.txt 2022-01-08 00:37:07.378671200 +0100
36
-
+++ b/src/app/CMakeLists.txt 2022-01-08 00:53:13.669969512 +0100
37
-
@@ -741,7 +741,7 @@ target_link_libraries(app-lib
38
-
${HARFBUZZ_LIBRARIES}
0
0
39
json11
40
archive_static
41
- fmt
···
43
tinyexpr
44
qoi)
45
46
-
if(ENABLE_PSD)
47
-
--- a/src/dio/CMakeLists.txt 2022-01-08 00:41:50.712726972 +0100
48
-
+++ b/src/dio/CMakeLists.txt 2022-01-08 00:53:39.936408022 +0100
49
-
@@ -10,7 +10,7 @@
0
50
51
target_link_libraries(dio-lib
52
${ZLIB_LIBRARIES}
···
55
flic-lib
56
laf-base
57
fixmath-lib
58
-
--- a/third_party/CMakeLists.txt 2022-01-08 00:37:08.165330523 +0100
59
-
+++ b/third_party/CMakeLists.txt 2022-01-08 00:54:30.455969136 +0100
60
-
@@ -106,7 +106,10 @@
0
0
61
endif()
62
63
add_subdirectory(simpleini)
···
1
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+
index b1bd0189b..3fb7abffb 100644
3
+
--- a/CMakeLists.txt
4
+
+++ b/CMakeLists.txt
5
+
@@ -66,6 +66,7 @@ enable_testing()
6
7
option(USE_SHARED_CMARK "Use your installed copy of cmark" off)
8
option(USE_SHARED_CURL "Use your installed copy of curl" off)
···
10
option(USE_SHARED_GIFLIB "Use your installed copy of giflib" off)
11
option(USE_SHARED_JPEGLIB "Use your installed copy of jpeglib" off)
12
option(USE_SHARED_ZLIB "Use your installed copy of zlib" off)
13
+
@@ -185,6 +186,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_PROFILE "${CMAKE_BINARY_DIR}/bin")
14
set(SOURCE_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data)
15
set(CMARK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/cmark)
16
set(CURL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/curl)
···
18
set(GIFLIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/giflib)
19
set(LIBJPEG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/jpeg)
20
set(LIBPNG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libpng)
21
+
@@ -225,6 +227,16 @@ if(NOT USE_SHARED_CURL)
22
set(CURL_STATICLIB ON BOOL)
23
endif()
24
25
+
+# fmt
26
+if(USE_SHARED_FMT)
27
+ find_package(FMT REQUIRED)
28
+ set(FMT_LIBRARIES fmt::fmt)
···
35
# zlib
36
if(USE_SHARED_ZLIB)
37
find_package(ZLIB REQUIRED)
38
+
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
39
+
index 9c67c0268..b19a3e412 100644
40
+
--- a/src/app/CMakeLists.txt
41
+
+++ b/src/app/CMakeLists.txt
42
+
@@ -754,7 +754,7 @@ target_link_libraries(app-lib
43
+
${ZLIB_LIBRARIES}
44
json11
45
archive_static
46
- fmt
···
48
tinyexpr
49
qoi)
50
51
+
diff --git a/src/dio/CMakeLists.txt b/src/dio/CMakeLists.txt
52
+
index 55cb24de5..b253dca0b 100644
53
+
--- a/src/dio/CMakeLists.txt
54
+
+++ b/src/dio/CMakeLists.txt
55
+
@@ -16,7 +16,7 @@ endif()
56
57
target_link_libraries(dio-lib
58
${ZLIB_LIBRARIES}
···
61
flic-lib
62
laf-base
63
fixmath-lib
64
+
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
65
+
index 9d09a98c8..1973b134b 100644
66
+
--- a/third_party/CMakeLists.txt
67
+
+++ b/third_party/CMakeLists.txt
68
+
@@ -117,7 +117,10 @@ if(NOT USE_SHARED_HARFBUZZ AND NOT LAF_BACKEND STREQUAL "skia")
69
endif()
70
71
add_subdirectory(simpleini)
+16
-16
pkgs/by-name/as/aseprite/shared-libwebp.patch
···
1
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
-
index af077f6..fed17ff 100644
3
--- a/CMakeLists.txt
4
+++ b/CMakeLists.txt
5
-
@@ -58,6 +58,7 @@ option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
6
option(USE_SHARED_PIXMAN "Use your installed copy of pixman" off)
7
option(USE_SHARED_FREETYPE "Use shared FreeType library" off)
8
option(USE_SHARED_HARFBUZZ "Use shared HarfBuzz library" off)
···
10
option(ENABLE_ASEPRITE_EXE "Compile main Aseprite executable" on)
11
option(ENABLE_MEMLEAK "Enable memory-leaks detector (only for developers)" off)
12
option(ENABLE_NEWS "Enable the news in Home tab" on)
13
-
@@ -328,14 +351,17 @@ add_subdirectory(laf)
14
# libwebp
15
if(ENABLE_WEBP)
16
# Use libwebp from Skia
···
21
+ find_library(WEBPMUX_LIBRARY NAMES webpmux)
22
+ set(WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY} ${WEBPMUX_LIBRARY})
23
+ find_path(WEBP_INCLUDE_DIRS NAMES decode.h PATH_SUFFIXES webp)
24
-
+ else()
0
0
0
0
0
0
0
25
find_library(WEBP_LIBRARIES webp
26
NAMES libwebp # required for Windows
27
PATHS "${SKIA_LIBRARY_DIR}" NO_DEFAULT_PATH)
28
-
set(WEBP_INCLUDE_DIR "${SKIA_DIR}/third_party/externals/libwebp/src")
29
-
- else()
30
-
- set(WEBP_LIBRARIES webp webpdemux libwebpmux)
31
-
- set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
32
-
endif()
33
-
include_directories(${WEBP_INCLUDE_DIR})
34
-
endif()
35
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
36
-
index 4839d4097c..e8c3e83cbc 100644
37
--- a/third_party/CMakeLists.txt
38
+++ b/third_party/CMakeLists.txt
39
-
@@ -32,7 +32,7 @@ if(NOT USE_SHARED_GIFLIB)
40
add_subdirectory(giflib)
41
endif()
42
-
43
-if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia")
44
+if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia" AND NOT USE_SHARED_WEBP)
45
set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.")
46
-
add_subdirectory(libwebp)
47
-
endif()
···
1
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+
index 87aed2f28f9c..498472ec2a60 100644
3
--- a/CMakeLists.txt
4
+++ b/CMakeLists.txt
5
+
@@ -76,6 +76,7 @@ option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
6
option(USE_SHARED_PIXMAN "Use your installed copy of pixman" off)
7
option(USE_SHARED_FREETYPE "Use shared FreeType library" off)
8
option(USE_SHARED_HARFBUZZ "Use shared HarfBuzz library" off)
···
10
option(ENABLE_ASEPRITE_EXE "Compile main Aseprite executable" on)
11
option(ENABLE_MEMLEAK "Enable memory-leaks detector (only for developers)" off)
12
option(ENABLE_NEWS "Enable the news in Home tab" on)
13
+
@@ -380,7 +381,20 @@ add_subdirectory(laf)
14
# libwebp
15
if(ENABLE_WEBP)
16
# Use libwebp from Skia
···
21
+ find_library(WEBPMUX_LIBRARY NAMES webpmux)
22
+ set(WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY} ${WEBPMUX_LIBRARY})
23
+ find_path(WEBP_INCLUDE_DIRS NAMES decode.h PATH_SUFFIXES webp)
24
+
+ find_path(WEBP_INCLUDE_DIRS NAMES decode.h PATH_SUFFIXES webp)
25
+
+ find_path(WEBP_INCLUDE_DIRS NAMES decode.h PATH_SUFFIXES webp)
26
+
+ if(WEBP_LIBRARIES)
27
+
+ set(WEBP_FOUND ON)
28
+
+ else()
29
+
+ set(WEBP_FOUND OFF)
30
+
+ endif()
31
+
+ elseif(LAF_BACKEND STREQUAL "skia")
32
find_library(WEBP_LIBRARIES webp
33
NAMES libwebp # required for Windows
34
PATHS "${SKIA_LIBRARY_DIR}" NO_DEFAULT_PATH)
0
0
0
0
0
0
0
35
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
36
+
index 1973b134b9f8..f15dba5a7968 100644
37
--- a/third_party/CMakeLists.txt
38
+++ b/third_party/CMakeLists.txt
39
+
@@ -33,7 +33,7 @@ if(NOT USE_SHARED_GIFLIB)
40
add_subdirectory(giflib)
41
endif()
42
+
43
-if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia")
44
+if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia" AND NOT USE_SHARED_WEBP)
45
set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.")
46
+
set(WEBP_BUILD_ANIM_UTILS OFF CACHE BOOL "Build animation utilities.")
47
+
set(WEBP_BUILD_CWEBP OFF CACHE BOOL "Build the cwebp command line tool.")