2fd8d4df94
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
54 lines
1.3 KiB
Bash
54 lines
1.3 KiB
Bash
# Template file for 'openexr'
|
|
pkgname=openexr
|
|
version=2.4.1
|
|
revision=2
|
|
build_style=cmake
|
|
build_helper="qemu"
|
|
hostmakedepends="pkg-config"
|
|
makedepends="ilmbase-devel zlib-devel"
|
|
short_desc="High dynamic-range (HDR) image file format"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://www.openexr.com/"
|
|
distfiles="https://github.com/openexr/openexr/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
|
|
checksum=3ebbe9a8e67edb4a25890b98c598e9fe23b10f96d1416d6a3ff0732e99d001c1
|
|
|
|
pre_configure() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
vsed -i IlmBase/Half/CMakeLists.txt \
|
|
IlmBase/ImathTest/CMakeLists.txt \
|
|
OpenEXR/IlmImf/CMakeLists.txt \
|
|
-e "s; COMMAND ; COMMAND qemu-${XBPS_TARGET_QEMU_MACHINE}-static ;g"
|
|
fi
|
|
}
|
|
|
|
post_install() {
|
|
local d f
|
|
|
|
vlicense LICENSE.md
|
|
|
|
# Remove files which are already in ilmbase{,-devel}
|
|
for pkg in ilmbase ilmbase-devel; do
|
|
for f in $(xbps-query -Rf $pkg|awk '{print $1}'); do
|
|
rm -f "${DESTDIR}/$f"
|
|
done
|
|
done
|
|
}
|
|
|
|
libopenexr_package() {
|
|
short_desc+=" - runtime libraries"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|
|
libopenexr-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${makedepends} libopenexr>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/cmake
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/share
|
|
}
|
|
}
|