```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 ```
41 lines
1.4 KiB
Bash
41 lines
1.4 KiB
Bash
# Template file for 'occt'
|
|
pkgname=occt
|
|
reverts=7.5.0_1
|
|
version=7.4.0p1
|
|
revision=3
|
|
_gittag="V${version//./_}"
|
|
wrksrc=occt-${_gittag}
|
|
build_style=cmake
|
|
configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
|
|
-DINSTALL_SAMPLES=ON"
|
|
makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
|
|
tcl-devel tk-devel"
|
|
short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
|
|
maintainer="Piraty <piraty1@inbox.ru>"
|
|
license="custom:LGPL-2.1-only-with-exceptions"
|
|
homepage="https://www.opencascade.com"
|
|
# distfile: use git instead of official tarball, which requires registration
|
|
# see https://www.opencascade.com/content/packaging-again-debian
|
|
distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
|
|
checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
|
|
conflicts="oce>=0"
|
|
|
|
post_install() {
|
|
rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
|
|
vlicense OCCT_LGPL_EXCEPTION.txt
|
|
rm ${DESTDIR}/usr/bin/custom*.sh
|
|
|
|
vmkdir /etc/profile.d
|
|
vinstall ${FILESDIR}/opencascade.sh 644 /etc/profile.d
|
|
}
|
|
|
|
occt-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.so"
|
|
vmove "usr/lib/cmake"
|
|
vmove "usr/share/opencascade/samples"
|
|
}
|
|
}
|