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

32 lines
925 B
Bash

# Template file for 'namecoin'
pkgname=namecoin
version=0.18.1
revision=5
wrksrc="${pkgname}-core-nc${version}"
build_style=gnu-configure
configure_args="--with-incompatible-bdb --disable-static
--enable-hardening --with-boost=${XBPS_CROSS_BASE}/usr"
hostmakedepends="pkg-config yasm automake libtool which"
makedepends="libevent-devel db-devel protobuf-devel boost-devel
miniupnpc-devel qrencode-devel"
short_desc="Distributed key/value database"
maintainer="ananteris <ananteris@protonmail.ch>"
license="MIT"
homepage="https://namecoin.org"
distfiles="https://github.com/namecoin/namecoin-core/archive/nc${version}.tar.gz"
checksum=7117a0a0b8f48d49e4abf3577660f8a4eb9a4dea753281d19d9470725fc75d8e
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
LDFLAGS+=" -latomic"
fi
pre_configure() {
./autogen.sh
sed -i src/compat.h -e "s;<sys/fcntl.h>;<fcntl.h>;"
}
post_install() {
vlicense COPYING
}