summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cf383c5cb0ad7c3c3680802f3ed75e6eee661807 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Maintainer: Tércio Martins <echo dGVyY2lvd2VuZGVsQGdtYWlsLmNvbQo= | base64 -d>
# Contributor: Luca Weiss <luca (at) z3ntu (dot) xyz>
# Contributor: Özgür Sarıer <echo b3pndXJzYXJpZXIxMDExNjAxMTE1QGdtYWlsLmNvbQo= | base64 -d>
# Contributor: liberodark

_google_breakpad_commit=9474c3f
_google_mock_commit=17945db
_google_test_commit=50d6fc3
_openfx_commit=c70de42
_SequenceParsing_commit=6441ec7
_tinydir_commit=3aae922

pkgname=natron
_pkgname=Natron
pkgver=2.3.15_pre5
_pkgver=2.3.15-pre5
pkgrel=1
pkgdesc='Open source compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.'
arch=('i686' 'pentium4' 'x86_64')
url='https://github.com/NatronGitHub/Natron'
license=('GPL')
depends=('boost-libs' 'cairo' 'openfx-arena' 'openfx-gmic' 'openfx-io' 'openfx-misc' 'python2-pyside')
makedepends=('boost' 'expat' 'glfw-x11' 'openmp')
optdepends=('natron-plugins')
source=("$_pkgname-$_pkgver.tar.gz::https://github.com/NatronGitHub/Natron/archive/v$_pkgver.tar.gz"
        "google-breakpad-$_google_breakpad_commit.tar.gz::https://github.com/NatronGitHub/google-breakpad/tarball/$_google_breakpad_commit"
        "google-mock-$_google_mock_commit.tar.gz::https://github.com/NatronGitHub/google-mock/tarball/$_google_mock_commit"
        "google-test-$_google_test_commit.tar.gz::https://github.com/NatronGitHub/google-test/tarball/$_google_test_commit"
        "openfx-$_openfx_commit.tar.gz::https://github.com/NatronGitHub/openfx/tarball/$_openfx_commit"
        "SequenceParsing-$_SequenceParsing_commit.tar.gz::https://github.com/NatronGitHub/SequenceParsing/tarball/$_SequenceParsing_commit"
        "tinydir-$_tinydir_commit.tar.gz::https://github.com/NatronGitHub/tinydir/tarball/$_tinydir_commit"
        "OpenColorIO-Configs-$_pkgname-v${pkgver%.*}.tar.gz::https://github.com/NatronGitHub/OpenColorIO-Configs/archive/$_pkgname-v${pkgver%.*}.tar.gz"
        "config.pri")
sha512sums=('4cab3a8307126a8a15e46416adf0dd77702419b58530a0afc94f21e1ad328fdf2dda20a5f197c6e33acac27f359398564d894c4c02cd8ab213499deb759d0f9d'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            '0c63a5f52aa7b8d32ed068a1f9f1092082f70e9a95b916b33213d899fd9dd4e487af3baa4d6bfbd9eb4d5051e6efef15155e3a22897f8ec32330d0825df643be'
            '48017b7b9cd1854064b9ddffecedef89a4d38070f9a7d2cd506aad481a8061c5cffe5e5c84fc9b0ac5216fc99e093481db367e91ce52cb2a8a66223c4209402a')

prepare() {
  cd "$srcdir/$_pkgname-$_pkgver"
  
  if [ -d OpenColorIO-Configs ]; then
    rm -rf OpenColorIO-Configs
  fi
  
  mv "$srcdir/OpenColorIO-Configs-Natron-v${pkgver%.*}" \
     "$srcdir/$_pkgname-$_pkgver/OpenColorIO-Configs"

  rm -rf OpenColorIO-Configs/aces*
  rm -rf OpenColorIO-Configs/spi*

  tar -xzf "$srcdir/google-breakpad-$_google_breakpad_commit.tar.gz" --strip 1 \
      -C   "$srcdir/$_pkgname-$_pkgver/libs/google-breakpad/"
  tar -xzf "$srcdir/openfx-$_openfx_commit.tar.gz" --strip 1 \
      -C   "$srcdir/$_pkgname-$_pkgver/libs/OpenFX/"
  tar -xzf "$srcdir/SequenceParsing-$_SequenceParsing_commit.tar.gz" --strip 1 \
      -C   "$srcdir/$_pkgname-$_pkgver/libs/SequenceParsing/"
  tar -xzf "$srcdir/tinydir-$_tinydir_commit.tar.gz" --strip 1 \
      -C   "$srcdir/$_pkgname-$_pkgver/libs/SequenceParsing/tinydir/"
  tar -xzf "$srcdir/google-mock-$_google_mock_commit.tar.gz" --strip 1 \
      -C   "$srcdir/$_pkgname-$_pkgver/Tests/google-mock/"
  tar -xzf "$srcdir/google-test-$_google_test_commit.tar.gz" --strip 1 \
      -C   "$srcdir/$_pkgname-$_pkgver/Tests/google-test/"

  mv "$srcdir/config.pri" \
     "$srcdir/$_pkgname-$_pkgver/config.pri"
}

build() {
  cd "$srcdir/$_pkgname-$_pkgver"

  [[ -d build ]] && rm -r build; mkdir build; cd build

  qmake-qt4 -r "$srcdir/$_pkgname-$_pkgver/Project.pro" \
               PREFIX=/usr \
               BUILD_USER_NAME="Arch_Linux" \
               CONFIG+=custombuild \
               CONFIG+=openmp \
               DEFINES+=QT_NO_DEBUG_OUTPUT \
               QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
               QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
               QMAKE_LFLAGS_RELEASE="${LDFLAGS}"

  make
}

package() {
  cd "$srcdir/$_pkgname-$_pkgver/build"
  make INSTALL_ROOT="$pkgdir" install
  
  install -d "$pkgdir/usr/share/Natron/Plugins/"
  cp -r "$srcdir/$_pkgname-$_pkgver/Gui/Resources/PyPlugs" \
        "$pkgdir/usr/share/Natron/Plugins/"

  install -d "$pkgdir/etc/profile.d"
  echo -e "export FONTCONFIG_PATH=/etc/fonts\n" > $pkgdir/etc/profile.d/$pkgname.sh
  echo -e "setenv FONTCONFIG_PATH /etc/fonts\n" > $pkgdir/etc/profile.d/$pkgname.csh
}