aseprite: 1.3.7 -> 1.3.13

+74 -64
+34 -32
pkgs/by-name/as/aseprite/package.nix
··· 33 33 34 34 clangStdenv.mkDerivation (finalAttrs: { 35 35 pname = "aseprite"; 36 - version = "1.3.7"; 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 + ]; 37 57 38 - src = fetchFromGitHub { 39 - owner = "aseprite"; 40 - repo = "aseprite"; 41 - rev = "v" + finalAttrs.version; 42 - fetchSubmodules = true; 43 - hash = "sha256-75kYJXmyags0cW2D5Ksq1uUrFSCAkFOdmn7Ya/6jLXc="; 44 - }; 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 + ''; 45 65 46 66 nativeBuildInputs = [ 47 67 cmake ··· 75 95 ]; 76 96 77 97 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 98 ./shared-fmt.patch 86 99 ./shared-libwebp.patch 87 100 ./shared-skia-deps.patch 88 101 ]; 89 102 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 - ''; 103 + postPatch = '' 104 + substituteInPlace src/ver/CMakeLists.txt \ 105 + --replace-fail '"1.x-dev"' '"${finalAttrs.version}"' 106 + ''; 105 107 106 108 cmakeFlags = [ 107 109 "-DENABLE_DESKTOP_INTEGRATION=ON" ··· 116 118 "-DUSE_SHARED_LIBPNG=ON" 117 119 "-DUSE_SHARED_LIBWEBP=ON" 118 120 "-DUSE_SHARED_PIXMAN=ON" 119 - "-DUSE_SHARED_TINYXML=ON" 121 + "-DUSE_SHARED_TINYXML=OFF" 120 122 "-DUSE_SHARED_WEBP=ON" 121 123 "-DUSE_SHARED_ZLIB=ON" 122 124 # Disable libarchive programs. ··· 124 126 "-DENABLE_CPIO=OFF" 125 127 "-DENABLE_TAR=OFF" 126 128 # UI backend. 127 - "-DLAF_OS_BACKEND=skia" 129 + "-DLAF_BACKEND=skia" 128 130 "-DLAF_WITH_EXAMPLES=OFF" 129 131 "-DSKIA_DIR=${skia-aseprite}" 130 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 @@ 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() 4 6 5 7 option(USE_SHARED_CMARK "Use your installed copy of cmark" off) 6 8 option(USE_SHARED_CURL "Use your installed copy of curl" off) ··· 8 10 option(USE_SHARED_GIFLIB "Use your installed copy of giflib" off) 9 11 option(USE_SHARED_JPEGLIB "Use your installed copy of jpeglib" off) 10 12 option(USE_SHARED_ZLIB "Use your installed copy of zlib" off) 11 - @@ -165,6 +165,7 @@ 13 + @@ -185,6 +186,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_PROFILE "${CMAKE_BINARY_DIR}/bin") 12 14 set(SOURCE_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data) 13 15 set(CMARK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/cmark) 14 16 set(CURL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/curl) ··· 16 18 set(GIFLIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/giflib) 17 19 set(LIBJPEG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/jpeg) 18 20 set(LIBPNG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libpng) 19 - @@ -204,6 +205,15 @@ 21 + @@ -225,6 +227,16 @@ if(NOT USE_SHARED_CURL) 20 22 set(CURL_STATICLIB ON BOOL) 21 23 endif() 22 24 25 + +# fmt 23 26 +if(USE_SHARED_FMT) 24 27 + find_package(FMT REQUIRED) 25 28 + set(FMT_LIBRARIES fmt::fmt) ··· 32 35 # zlib 33 36 if(USE_SHARED_ZLIB) 34 37 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} 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} 39 44 json11 40 45 archive_static 41 46 - fmt ··· 43 48 tinyexpr 44 49 qoi) 45 50 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 @@ 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() 50 56 51 57 target_link_libraries(dio-lib 52 58 ${ZLIB_LIBRARIES} ··· 55 61 flic-lib 56 62 laf-base 57 63 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 @@ 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") 61 69 endif() 62 70 63 71 add_subdirectory(simpleini)
+16 -16
pkgs/by-name/as/aseprite/shared-libwebp.patch
··· 1 1 diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index af077f6..fed17ff 100644 2 + index 87aed2f28f9c..498472ec2a60 100644 3 3 --- a/CMakeLists.txt 4 4 +++ b/CMakeLists.txt 5 - @@ -58,6 +58,7 @@ option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off) 5 + @@ -76,6 +76,7 @@ option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off) 6 6 option(USE_SHARED_PIXMAN "Use your installed copy of pixman" off) 7 7 option(USE_SHARED_FREETYPE "Use shared FreeType library" off) 8 8 option(USE_SHARED_HARFBUZZ "Use shared HarfBuzz library" off) ··· 10 10 option(ENABLE_ASEPRITE_EXE "Compile main Aseprite executable" on) 11 11 option(ENABLE_MEMLEAK "Enable memory-leaks detector (only for developers)" off) 12 12 option(ENABLE_NEWS "Enable the news in Home tab" on) 13 - @@ -328,14 +351,17 @@ add_subdirectory(laf) 13 + @@ -380,7 +381,20 @@ add_subdirectory(laf) 14 14 # libwebp 15 15 if(ENABLE_WEBP) 16 16 # Use libwebp from Skia ··· 21 21 + find_library(WEBPMUX_LIBRARY NAMES webpmux) 22 22 + set(WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY} ${WEBPMUX_LIBRARY}) 23 23 + find_path(WEBP_INCLUDE_DIRS NAMES decode.h PATH_SUFFIXES webp) 24 - + else() 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") 25 32 find_library(WEBP_LIBRARIES webp 26 33 NAMES libwebp # required for Windows 27 34 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 35 diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt 36 - index 4839d4097c..e8c3e83cbc 100644 36 + index 1973b134b9f8..f15dba5a7968 100644 37 37 --- a/third_party/CMakeLists.txt 38 38 +++ b/third_party/CMakeLists.txt 39 - @@ -32,7 +32,7 @@ if(NOT USE_SHARED_GIFLIB) 39 + @@ -33,7 +33,7 @@ if(NOT USE_SHARED_GIFLIB) 40 40 add_subdirectory(giflib) 41 41 endif() 42 - 42 + 43 43 -if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia") 44 44 +if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia" AND NOT USE_SHARED_WEBP) 45 45 set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.") 46 - add_subdirectory(libwebp) 47 - endif() 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.")