summaryrefslogtreecommitdiff
path: root/libre/openexr/PKGBUILD
blob: 9fecd883c63f18ab4de540136334165002d88c2b (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
# Maintainer (Arch): Tobias Powalowski <tpowa@archlinux.org>
# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: grizzlyuser <grizzlyuser@protonmail.com>

# parabola changes and rationale
# * removed documentation with embedded non-free fonts


pkgname=openexr
pkgver=2.5.1
pkgrel=1
pkgrel+=.parabola1
pkgdesc="An high dynamic-range image file format library"
pkgdesc+=", without embedded nonfree fonts in the documentation"
url="https://www.openexr.com/"
arch=('x86_64')
arch+=('i686' 'armv7h')
license=('BSD3')
depends=('zlib')
makedepends=('cmake' 'fltk' 'python' 'boost' 'freeglut' 'python-numpy' 'chrpath')
optdepends=('fltk: for exrdisplay' 'boost-libs: python support' 'python: python support')
optdepends+=('libreoffice-still: for reading documentation')
conflicts=('ilmbase')
replaces=('ilmbase')
options=(!debug)
source=($pkgname-$pkgver.tar.gz::"https://github.com/openexr/openexr/archive/v$pkgver.tar.gz"
        install-odt-docs-not-pdf.patch)
sha256sums=('11f806bf256453e39fc33bd1cf1fa576a54f144cedcdd3e6935a177e5a89d02e'
            'fd0cc640265605b6a25db3dd901641be3adebfa2b748e6b559cffcba1e5ceb94')

prepare() {
  cd $pkgname-$pkgver

  # remove documentation with embedded non-free fonts
  find . -name *.pdf -exec rm -v '{}' \;
  patch -p1 < "$srcdir"/install-odt-docs-not-pdf.patch
}

build() {
  mkdir -p build

  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd build
  make DESTDIR="${pkgdir}" install
  install -D -m644 "$srcdir"/$pkgname-$pkgver/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"

# Install missing python module
  _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
  install -Dm755 python3*/imathnumpy.so -t "$pkgdir"/$_pythonpath 
}