void-packages/srcpkgs/cbang/template
Đoàn Trần Công Danh c987560802 srcpkgs/c*: 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

53 lines
1.6 KiB
Bash

# Template file for 'cbang'
pkgname=cbang
version=1.6.0
revision=3
build_style=scons
make_build_args="sharedlib=1 staticlib=1"
make_install_args="${make_build_args}"
hostmakedepends="pkg-config"
makedepends="boost-devel bzip2-devel expat-devel leveldb-devel libevent-devel
openssl-devel libyaml-devel re2-devel snappy-devel sqlite-devel zlib-devel"
short_desc="C! (a.k.a. C-Bang) collection of C++ utility libraries"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-only"
homepage="https://github.com/CauldronDevelopmentLLC/cbang"
distfiles="https://github.com/CauldronDevelopmentLLC/cbang/archive/${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=8aa5efacf419b712b5bd0172c9d56301bdcbd477cb590ceec25c3595a192e9c0
pre_build() {
make_build_args+=" prefix=$DESTDIR/usr"
}
do_check() {
cd tests
touch iostreamTests/{C,Dec}ompressTest/disable
scons ${makejobs} CC=$CC CXX=$CXX CCFLAGS="$CFLAGS" \
cc=$CC cxx=$CXX ccflags="$CFLAGS" \
CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \
cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \
RANLIB="$RANLIB" ranlib="$RANLIB" \
prefix=/usr destdir=${DESTDIR} DESTDIR=${DESTDIR}
./testHarness
}
pre_install() {
make_install_args+=" prefix=$DESTDIR/usr"
}
post_install() {
# Create missing symbolic links for the shared library
ln -sf libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so.0.0
ln -sf libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so.0
ln -sf libcbang0.so.0.0.1 ${DESTDIR}/usr/lib/libcbang.so
}
cbang-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version_revision} ${makedepends}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}