summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bf335b3f6d6e9e04c59ba6d80bc7df667598e324 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Maintainer: Campbell Barton <ideasman42@gmail.com>
export GIT_LFS_SKIP_SMUDGE=1
_pkgname=opentoonz
_version=git
pkgver=1.1.3.1250
pkgname=${_pkgname}-${_version}
pkgrel=1
pkgdesc="2D Animation software."
arch=('i686' 'x86_64')

url="https://github.com/${_pkgname}/${_pkgname}"
license=('BSD')
groups=()
depends=(
    'boost' 'boost-libs'
    'qt5-base' 'qt5-svg' 'qt5-script' 'qt5-tools' 'qt5-multimedia'
    'lz4' 'libusb' 'lzo' 'libjpeg-turbo'
    'glew' 'freeglut' 'sdl2' 'freetype2'
    'blas' 'cblas' 'superlu' 'libmypaint')
# note: ideally we could avoid git-lfs since we don't need any files it provides
makedepends=('cmake' 'make' 'git' 'git-lfs')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("git+${url}.git"
)
noextract=()
md5sums=(
'SKIP'
) #autofill using updpkgsums

pkgver() {
  # Uses: opentoonz_version.git_commit_count
  cd $_pkgname
  # extract:
  #
  #     const char *applicationFullName = "OpenToonz 1.0.3";
  ver=$(cat toonz/sources/toonz/main.cpp | \
        grep -e "const char \*applicationFullName.*OpenToon" | \
        cut -d'"' -f 2 | \
        cut -d' ' -f 2)

  git_count=$(git rev-list --all --count)

  echo $ver.$git_count
}


build() {
  # make libtiff
  cd $_pkgname/thirdparty/tiff-4.0.3
  ./configure --with-pic --disable-jbig && make $MAKEFLAGS
  cd -

  cmake -H$_pkgname/toonz/sources \
        -B$_pkgname-build \
        -DCMAKE_BUILD_TYPE:STRING=Release \
        -DCMAKE_INSTALL_PREFIX:PATH=/opt/opentoonz

  cd $_pkgname-build
  make $MAKEFLAGS
}

package() {
  cd $_pkgname-build
  make DESTDIR="$pkgdir/" install
}