Unverified Commit dfbd88a7 authored by Theodore Ni's avatar Theodore Ni Committed by GitHub
Browse files

Merge pull request #200202 from kyren/aseprite-update

aseprite-unfree: 1.2.16.3 -> 1.2.40 and drop the free version 
parents 39ab45da 7c2a4592
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -151,6 +151,8 @@

- The `go-ethereum` package has been updated to v1.12.0. This drops support for proof-of-work. Its GraphQL API now encodes all numeric values as hex strings and the GraphQL UI is updated to version 2.0. The default database has changed from `leveldb` to `pebble` but `leveldb` can be forced with the --db.engine=leveldb flag. The `checkpoint-admin` command was [removed along with trusted checkpoints](https://github.com/ethereum/go-ethereum/pull/27147).

- The `aseprite-unfree` package has been upgraded from 1.2.16.3 to 1.2.40. The free version of aseprite has been dropped because it is EOL and the package attribute now points to the unfree version. A maintained fork of the last free version of Aseprite, named 'LibreSprite', is available in the `libresprite` package.

- The default `kops` version is now 1.27.0 and support for 1.24 and older has been dropped.

- `pharo` has been updated to latest stable (PharoVM 10.0.5), which is compatible with the latest stable and oldstable images (Pharo 10 and 11). The VM in question is the 64bit Spur. The 32bit version has been dropped due to lack of maintenance. The Cog VM has been deleted because it is severily outdated. Finally, the `pharo-launcher` package has been deleted because it was not compatible with the newer VM, and due to lack of maintenance.
+0 −8
Original line number Diff line number Diff line
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()
+17 −31
Original line number Diff line number Diff line
{ stdenv, lib, callPackage, fetchFromGitHub, fetchpatch, cmake, ninja, pkg-config
{ stdenv, lib, callPackage, fetchFromGitHub, cmake, ninja, pkg-config
, curl, freetype, giflib, libjpeg, libpng, libwebp, pixman, tinyxml, zlib
, harfbuzzFull, glib, fontconfig, pcre
, libX11, libXext, libXcursor, libXxf86vm, libGL
, unfree ? false
, libX11, libXext, libXcursor, libXxf86vm, libGL, libXi
, cmark
}:

@@ -15,46 +14,35 @@ let
in
stdenv.mkDerivation rec {
  pname = "aseprite";
  version = if unfree then "1.2.16.3" else "1.1.7";
  version = "1.2.40";

  src = fetchFromGitHub {
    owner = "aseprite";
    repo = "aseprite";
    rev = "v${version}";
    fetchSubmodules = true;
    sha256 = if unfree
      then "16yn7y9xdc5jd50cq7bmsm320gv23pp71lr8hg2nmynzc8ibyda8"
      else "0gd49lns2bpzbkwax5jf9x1xmg1j8ij997kcxr2596cwiswnw4di";
    hash = "sha256-KUdJA6HTAKrLT8xrwFikVDbc5RODysclcsEyQekMRZo=";
  };

  nativeBuildInputs = [
    cmake pkg-config
  ] ++ lib.optionals unfree [ ninja ];
    cmake pkg-config ninja
  ];

  buildInputs = [
    curl freetype giflib libjpeg libpng libwebp pixman tinyxml zlib
    libX11 libXext libXcursor libXxf86vm
  ] ++ lib.optionals unfree [
    cmark
    harfbuzzFull glib fontconfig pcre
    skia libGL
    skia libGL libXi
  ];

  patches = if !unfree then [
    ./allegro-glibc-2.30.patch
  ] else [
    (fetchpatch {
      url = "https://github.com/lfont/aseprite/commit/f1ebc47012d3fed52306ed5922787b4b98cc0a7b.patch";
      sha256 = "03xg7x6b9iv7z18vzlqxhcfphmx4v3qhs9f5rgf38ppyklca5jyw";
    })
    (fetchpatch {
      url = "https://github.com/orivej/aseprite/commit/ea87e65b357ad0bd65467af5529183b5a48a8c17.patch";
      sha256 = "1vwn8ivap1pzdh444sdvvkndp55iz146nhmd80xbm8cyzn3qmg91";
    })
  patches = [
    ./shared-libwebp.patch
    ./shared-skia-deps.patch
  ];

  postPatch = ''
    sed -i src/config.h -e "s-\\(#define VERSION\\) .*-\\1 \"$version\"-"
    sed -i src/ver/CMakeLists.txt -e "s-set(VERSION \".*\")-set(VERSION \"$version\")-"
  '';

  cmakeFlags = [
@@ -68,20 +56,19 @@ stdenv.mkDerivation rec {
    "-DUSE_SHARED_PIXMAN=ON"
    "-DUSE_SHARED_TINYXML=ON"
    "-DUSE_SHARED_ZLIB=ON"
    "-DWITH_DESKTOP_INTEGRATION=ON"
    "-DWITH_WEBP_SUPPORT=ON"
  ] ++ lib.optionals unfree [
    "-DUSE_SHARED_CMARK=ON"
    "-DUSE_SHARED_HARFBUZZ=ON"
    # Aseprite needs internal freetype headers.
    "-DUSE_SHARED_FREETYPE=OFF"
    "-DUSE_SHARED_WEBP=ON"
    # Disable libarchive programs.
    "-DENABLE_CAT=OFF"
    "-DENABLE_CPIO=OFF"
    "-DENABLE_TAR=OFF"
    # UI backend.
    "-DLAF_WITH_EXAMPLES=OFF"
    "-DLAF_OS_BACKEND=skia"
    "-DENABLE_DESKTOP_INTEGRATION=ON"
    "-DSKIA_DIR=${skia}"
    "-DSKIA_LIBRARY_DIR=${skia}/out/Release"
  ];

  postInstall = ''
@@ -101,7 +88,7 @@ stdenv.mkDerivation rec {
  meta = with lib; {
    homepage = "https://www.aseprite.org/";
    description = "Animated sprite editor & pixel art tool";
    license = if unfree then licenses.unfree else licenses.gpl2;
    license = licenses.unfree;
    longDescription =
      ''Aseprite is a program to create animated sprites. Its main features are:

@@ -115,8 +102,7 @@ stdenv.mkDerivation rec {
          - Multiple editors support.
          - Pixel-art specific tools like filled Contour, Polygon, Shading mode, etc.
          - Onion skinning.
      '' + lib.optionalString unfree
      ''

        This version is not redistributable: https://dev.aseprite.org/2016/09/01/new-source-code-license/
        Consider supporting the developer: https://aseprite.org/#buy
      '';
+47 −0
Original line number Diff line number Diff line
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af077f6..fed17ff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,7 @@ option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
 option(USE_SHARED_PIXMAN  "Use your installed copy of pixman" off)
 option(USE_SHARED_FREETYPE "Use shared FreeType library" off)
 option(USE_SHARED_HARFBUZZ "Use shared HarfBuzz library" off)
+option(USE_SHARED_WEBP    "Use your installed copy of webp" off)
 option(ENABLE_ASEPRITE_EXE "Compile main Aseprite executable" on)
 option(ENABLE_MEMLEAK      "Enable memory-leaks detector (only for developers)" off)
 option(ENABLE_NEWS         "Enable the news in Home tab" on)
@@ -328,14 +351,17 @@ add_subdirectory(laf)
 # libwebp
 if(ENABLE_WEBP)
   # Use libwebp from Skia
-  if(LAF_BACKEND STREQUAL "skia")
+  if(USE_SHARED_WEBP)
+    find_library(WEBP_LIBRARY NAMES webp)
+    find_library(WEBPDEMUX_LIBRARY NAMES webpdemux)
+    find_library(WEBPMUX_LIBRARY NAMES webpmux)
+    set(WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY} ${WEBPMUX_LIBRARY})
+    find_path(WEBP_INCLUDE_DIRS NAMES decode.h PATH_SUFFIXES webp)
+  else()
     find_library(WEBP_LIBRARIES webp
       NAMES libwebp # required for Windows
       PATHS "${SKIA_LIBRARY_DIR}" NO_DEFAULT_PATH)
     set(WEBP_INCLUDE_DIR "${SKIA_DIR}/third_party/externals/libwebp/src")
-  else()
-    set(WEBP_LIBRARIES webp webpdemux libwebpmux)
-    set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
   endif()
   include_directories(${WEBP_INCLUDE_DIR})
 endif()
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index 4839d4097c..e8c3e83cbc 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -32,7 +32,7 @@ if(NOT USE_SHARED_GIFLIB)
   add_subdirectory(giflib)
 endif()
 
-if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia")
+if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia" AND NOT USE_SHARED_WEBP)
   set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.")
   add_subdirectory(libwebp)
 endif()
 No newline at end of file
+21 −0
Original line number Diff line number Diff line
--- src/laf/cmake/FindSkia.cmake.orig	2022-01-08 02:15:13.417619266 +0100
+++ src/laf/cmake/FindSkia.cmake	2022-01-08 02:15:43.603960491 +0100
@@ -32,14 +32,18 @@
 # SkShaper module + freetype + harfbuzz
 find_library(SKSHAPER_LIBRARY skshaper PATH "${SKIA_LIBRARY_DIR}")
 
+if(NOT USE_SHARED_FREETYPE)
 set(FREETYPE_FOUND ON)
 find_library(FREETYPE_LIBRARY freetype2 PATH "${SKIA_LIBRARY_DIR}" NO_DEFAULT_PATH)
 set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
 set(FREETYPE_INCLUDE_DIRS "${SKIA_DIR}/third_party/externals/freetype/include")
+endif()
 
+if(NOT USE_SHARED_HARFBUZZ)
 find_library(HARFBUZZ_LIBRARY harfbuzz PATH "${SKIA_LIBRARY_DIR}" NO_DEFAULT_PATH)
 set(HARFBUZZ_LIBRARIES ${HARFBUZZ_LIBRARY})
 set(HARFBUZZ_INCLUDE_DIRS "${SKIA_DIR}/third_party/externals/harfbuzz/src")
+endif()
 
 set(SKIA_LIBRARIES
   ${SKIA_LIBRARY}
 No newline at end of file
Loading