```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 ```
49 lines
1.3 KiB
Bash
49 lines
1.3 KiB
Bash
# Template file for 'coin3'
|
|
pkgname=coin3
|
|
version=4.0.0
|
|
revision=2
|
|
wrksrc="coin-Coin-${version}"
|
|
build_style=cmake
|
|
configure_args="-DCMAKE_INSTALL_INCLUDEDIR=include/Coin3
|
|
-DCOIN_BUILD_TESTS=OFF -DCOIN_BUILD_DOCUMENTATION=ON"
|
|
hostmakedepends="doxygen graphviz"
|
|
makedepends="boost-devel glu-devel"
|
|
short_desc="High-level 3D graphics toolkit"
|
|
maintainer="yopito <pierre.bourgin@free.fr>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://coin3d.github.io/"
|
|
distfiles="https://github.com/coin3d/coin/archive/Coin-${version}.tar.gz"
|
|
checksum=b00d2a8e9d962397cf9bf0d9baa81bcecfbd16eef675a98c792f5cf49eb6e805
|
|
|
|
CFLAGS=-DNDEBUG
|
|
CXXFLAGS=-DNDEBUG
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
# bypass runtime test (quote hashing is fine with gcc 9.3)
|
|
configure_args+=" -DHAVE_HASH_QUOTING_EXITCODE=0"
|
|
configure_args+=" -DHAVE_HASH_QUOTING_EXITCODE__TRYRUN_OUTPUT=''"
|
|
fi
|
|
|
|
post_install() {
|
|
# coin-config is superseeded by cmake support
|
|
rm $DESTDIR/usr/bin/coin-config
|
|
vlicense COPYING
|
|
}
|
|
|
|
coin3-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/cmake
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|
|
|
|
coin3-doc_package() {
|
|
short_desc+=" - documentation"
|
|
pkg_install() {
|
|
vmove usr/share/doc
|
|
}
|
|
}
|