opentoonz: Init at 1.4.0

gstqt5
Scott Worley 2020-05-21 14:57:10 -07:00 committed by Chuck
parent 7b39d85fc7
commit 4085661911
4 changed files with 92 additions and 0 deletions

View File

@ -0,0 +1,51 @@
{ boost, cmake, fetchFromGitHub, freeglut, freetype, glew, libjpeg, libmypaint
, libpng, libtiff, libusb1, lz4, lzma, lzo, openblas, pkgconfig, qtbase
, qtmultimedia, qtscript, stdenv, superlu, wrapQtAppsHook, }:
let source = import ./source.nix { inherit fetchFromGitHub; };
in stdenv.mkDerivation rec {
inherit (source) src;
pname = "opentoonz";
version = source.versions.opentoonz;
nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ];
buildInputs = [
boost
freeglut
freetype
glew
libjpeg
libmypaint
libpng
libtiff
libusb1
lz4
lzma
lzo
openblas
qtbase
qtmultimedia
qtscript
superlu
];
postUnpack = "sourceRoot=$sourceRoot/toonz";
cmakeDir = "../sources";
cmakeFlags = [
"-DTIFF_INCLUDE_DIR=${libtiff.dev}/include"
"-DTIFF_LIBRARY=${libtiff.out}/lib/libtiff.so"
];
postInstall = ''
sed -i '/cp -r .*stuff/a\ chmod -R u+w $HOME/.config/OpenToonz/stuff' $out/bin/opentoonz
'';
meta = {
description = "Full-featured 2D animation creation software";
homepage = "https://opentoonz.github.io/";
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ chkno ];
};
}

View File

@ -0,0 +1,21 @@
# Per https://github.com/opentoonz/opentoonz/blob/master/doc/how_to_build_linux.md ,
# opentoonz requires its own modified version of libtiff. We still build it as
# a separate package
# 1. For visibility for tools like vulnix, and
# 2. To avoid a diamond-dependency problem with qt linking the normal libtiff
# and opentoonz linking qt and this modified libtiff, we build a qt against
# this modified libtiff as well.
{ fetchFromGitHub, libtiff }:
let source = import ./source.nix { inherit fetchFromGitHub; };
in libtiff.overrideAttrs (old: {
inherit (source) src;
version = source.versions.libtiff + "-opentoonz";
postUnpack = (old.postUnpack or "") + ''
sourceRoot="$sourceRoot/thirdparty/tiff-${source.versions.libtiff}"
'';
# opentoonz uses internal libtiff headers
postInstall = (old.postInstall or "") + ''
cp libtiff/{tif_config,tif_dir,tiffiop}.h $dev/include
'';
})

View File

@ -0,0 +1,16 @@
# opentoonz's source archive contains both opentoonz's source and a modified
# version of libtiff that opentoonz requires.
{ fetchFromGitHub, }: rec {
versions = {
opentoonz = "1.4.0";
libtiff = "4.0.3";
};
src = fetchFromGitHub {
owner = "opentoonz";
repo = "opentoonz";
rev = "v${versions.opentoonz}";
sha256 = "0vgclx2yydsm5i2smff3fj8m750nhf35wfhva37kywgws01s189b";
};
}

View File

@ -21227,6 +21227,10 @@ in
opentimestamps-client = python3Packages.callPackage ../tools/misc/opentimestamps-client {};
opentoonz = (qt5.overrideScope' (_: _: {
libtiff = callPackage ../applications/graphics/opentoonz/libtiff.nix { };
})).callPackage ../applications/graphics/opentoonz { };
opentx = libsForQt5.callPackage ../applications/misc/opentx { };
opera = callPackage ../applications/networking/browsers/opera {};