diff options
author | oaken-source <oaken-source@parabola.nu> | 2019-10-29 23:14:43 +0100 |
---|---|---|
committer | oaken-source <oaken-source@parabola.nu> | 2019-10-29 23:15:37 +0100 |
commit | 749d4e3726e11e9dbf047004e707692a47e318e1 (patch) | |
tree | a6912640c6d8aa0f9f8901a58b3b980452e7b441 /libre/openexr/PKGBUILD | |
parent | da2e383a052e31b751119f4563d2542d2c76d978 (diff) | |
download | abslibre-749d4e3726e11e9dbf047004e707692a47e318e1.tar.gz abslibre-749d4e3726e11e9dbf047004e707692a47e318e1.tar.bz2 abslibre-749d4e3726e11e9dbf047004e707692a47e318e1.zip |
libre/openexr: re-added and updated to 2.4.0
Diffstat (limited to 'libre/openexr/PKGBUILD')
-rw-r--r-- | libre/openexr/PKGBUILD | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/libre/openexr/PKGBUILD b/libre/openexr/PKGBUILD new file mode 100644 index 000000000..3f01fc834 --- /dev/null +++ b/libre/openexr/PKGBUILD @@ -0,0 +1,103 @@ +# Maintainer (Arch): Tobias Powalowski <tpowa@archlinux.org> +# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info> +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +pkgname=openexr +pkgver=2.4.0 +pkgrel=5 +pkgrel+=.par2 +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') +makedepends+=('unoconv' 'libepoxy') +conflicts=('ilmbase') +replaces=('ilmbase') +source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.gz") +sha256sums=('94624fc929b5f34acbbccf8bd111ed9b5c6c4ef7112ac71862eb837f00442582') +mksource=($pkgname-$pkgver.tar.gz::"https://github.com/openexr/openexr/archive/v$pkgver.tar.gz" + "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR/doc/InterpretingDeepPixels.docx" + "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR/doc/MultiViewOpenEXR.odt" + "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR/doc/OpenEXRFileLayout.odt" + "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR/doc/ReadingAndWritingImageFiles.odt" + "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR/doc/TechnicalIntroduction.odt" + "https://github.com/${pkgname}/${pkgname}/raw/master/OpenEXR_Viewers/doc/OpenEXRViewers.odt") +mksha256sums=('4904c5ea7914a58f60a5e2fbc397be67e7a25c380d7d07c1c31a3eefff1c92f1' + '208147fafb904114e7afa5f632d583be741db765fd341e6ad21b8455a2175436' + '38c46075f7efe02e231d32753966ffa463f2a3c4673dd8ea71dd47560c403db0' + '854942160870b4c442dc249e10d8f540aa554bd793ce40576bda430f90b7f995' + 'a4fdf678244f6c37e5ae126a9385a2e154b824b67e1746ed10bc17907c6b45ba' + 'fab77bb2afb3d580387249807300fa26c70eaf46ca23a0036165bafee607dc4e' + '27467ce4cad8a84cb63b2da2d58454834eac8830c2516cbe8846f32324517a92') +noextract=(InterpretingDeepPixels.docx + MultiViewOpenEXR.odt + OpenEXRFileLayout.odt + ReadingAndWritingImageFiles.odt + TechnicalIntroduction.odt + OpenEXRViewers.odt) + +mksource() { + cd $pkgname-$pkgver + + # remove documentation with embedded nonfree fonts + rm -v OpenEXR/doc/{InterpretingDeepPixels,MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction,TheoryDeepPixels}.pdf + rm -v OpenEXR_Viewers/doc/OpenEXRViewers.pdf + + # add source documentation + install -m644 -v "$srcdir/"{InterpretingDeepPixels.docx,{MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction}.odt} OpenEXR/doc + install -m644 -v "$srcdir/"OpenEXRViewers.odt OpenEXR_Viewers/doc + + # convert source documentation to pdf format and clean source code + pushd OpenEXR/doc + unoconv -v -f pdf {InterpretingDeepPixels.docx,{MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction}.odt} + popd + pushd OpenEXR_Viewers/doc + unoconv -v -f pdf OpenEXRViewers.odt + popd + + rm -rv "${srcdir}/"{_rels,Configurations2,customXml,docProps,META-INF,ObjBFFFDCA{1,3,4,5,7},Object\ 1,ObjectReplacements,Pictures,Thumbnails,word} +} + +prepare() { + cd $pkgname-$pkgver + + # remove TheoryDeepPixels.pdf reference + sed -i '\|TheoryDeepPixels[.]pdf|d + ' "OpenEXR/doc/CMakeLists.txt" + +# 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}" + install -m644 "$srcdir/$pkgname-$pkgver/OpenEXR/doc/"{InterpretingDeepPixels.docx,{MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction}.odt} "${pkgdir}/usr/share/doc/OpenEXR" + +# 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 +} |