void-packages/srcpkgs/CoinMP/template
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: convert patches to -Np1
```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
```
2021-06-20 13:17:29 +07:00

37 lines
1.1 KiB
Bash

# Template file for 'CoinMP'
pkgname=CoinMP
version=1.8.4
revision=1
build_style=gnu-configure
hostmakedepends="doxygen graphviz pkg-config"
short_desc="Library that supports most of Coin CLP, CBC and CGL"
maintainer="Orphaned <orphan@voidlinux.org>"
license="CPL-1.0"
homepage="https://projects.coin-or.org/CoinMP"
distfiles="http://www.coin-or.org/download/source/${pkgname}/${pkgname}-${version}.tgz"
checksum=3459fb0ccbdd39342744684338984ac4cc153fb0434f4cae8cf74bd67490a38d
post_configure() {
# remove erroneous cross base prefix from include paths
find -name Makefile -exec sed -i "{}" -e "s;-I${XBPS_CROSS_BASE};-I;g" \;
}
post_install() {
# move wrong ${DESTDIR}/${DESTDIR}/usr/share/coin/doc/CoinMP
vmkdir usr/share/coin/doc/CoinMP
mv ${DESTDIR}/${DESTDIR}/usr/share/coin/doc/CoinMP/* \
${DESTDIR}/usr/share/coin/doc/CoinMP
vlicense LICENSE
}
CoinMP-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/*.so
vmove usr/share/coin/doc
}
}