[arch-commits] Commit in openexr/repos (staging-x86_64 staging-x86_64/PKGBUILD)
Felix Yan
felixonmars at archlinux.org
Sat Oct 26 05:39:46 UTC 2019
Date: Saturday, October 26, 2019 @ 05:39:44
Author: felixonmars
Revision: 365799
archrelease: copy trunk to staging-x86_64
Added:
openexr/repos/staging-x86_64/
openexr/repos/staging-x86_64/PKGBUILD
(from rev 365798, openexr/trunk/PKGBUILD)
----------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Copied: openexr/repos/staging-x86_64/PKGBUILD (from rev 365798, openexr/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2019-10-26 05:39:44 UTC (rev 365799)
@@ -0,0 +1,51 @@
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+
+pkgname=openexr
+pkgver=2.4.0
+pkgrel=5
+pkgdesc="An high dynamic-range image file format library"
+url="https://www.openexr.com/"
+arch=('x86_64')
+license=('BSD')
+depends=('zlib')
+makedepends=('cmake' 'fltk' 'python' 'boost' 'freeglut' 'python-numpy' 'chrpath')
+optdepends=('fltk: for exrdisplay' 'boost-libs: python support' 'python: python support')
+conflicts=('ilmbase')
+replaces=('ilmbase')
+source=($pkgname-$pkgver.tar.gz::"https://github.com/openexr/openexr/archive/v$pkgver.tar.gz")
+md5sums=('9e4d69cf2a12c6fb19b98af7c5e0eaee')
+
+prepare() {
+ cd $pkgname-$pkgver
+
+# Take DESTDIR into account when creating symlinks
+ sed -e 's|chdir ${CMAKE_INSTALL_FULL_LIBDIR}|chdir \\$ENV\\{DESTDIR\\}${CMAKE_INSTALL_FULL_LIBDIR}|' \
+ -i OpenEXR/config/LibraryDefine.cmake -i IlmBase/config/LibraryDefine.cmake
+
+# Fix linking python modules to boost_python
+ sed -e 's|${libname} ${extraDeps}|${libname} ${extraDeps} Boost::${PYILMBASE_BOOST_PY3_COMPONENT}|' -i PyIlmBase/config/ModuleDefine.cmake
+}
+
+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}"
+
+# Fix pc include path
+ sed -e 's|=include|=${prefix}/include|g' -e 's|=lib|=${prefix}/lib|g' \
+ -i "$pkgdir"/usr/lib/pkgconfig/OpenEXR.pc -i "$pkgdir"/usr/lib/pkgconfig/IlmBase.pc
+
+# Install python modules
+ _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
+ install -Dm755 python3*/*.so -t "$pkgdir"/$_pythonpath
+ chrpath -d "$pkgdir"/$_pythonpath/*.so # Remove insecure RPATH
+}
More information about the arch-commits
mailing list