void-packages/srcpkgs/socat/template
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

36 lines
953 B
Bash

# Template file for 'socat'
pkgname=socat
version=1.7.4.1
revision=2
build_style=gnu-configure
configure_args="--disable-libwrap --enable-fips
ac_cv_have_z_modifier=yes"
makedepends="readline-devel openssl-devel"
short_desc="Relay for bidirectional data transfer between two independent channels"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://www.dest-unreach.org/socat/"
distfiles="http://www.dest-unreach.org/socat/download/socat-${version}.tar.bz2"
checksum=3faca25614e89123dff5045680549ecef519d02e331aaf3c4f5a8f6837c675e9
case "$XBPS_TARGET_MACHINE" in
*-musl) CFLAGS="-D_LINUX_IF_ETHER_H";;
esac
case "$XBPS_TARGET_MACHINE" in
ppc*)
configure_args+="
sc_cv_sys_crdly_shift=12
sc_cv_sys_tabdly_shift=10
sc_cv_sys_csize_shift=8"
;;
*)
configure_args+="
sc_cv_sys_crdly_shift=9
sc_cv_sys_tabdly_shift=11
sc_cv_sys_csize_shift=4"
;;
esac
configure_args+=" ac_cv_ispeed_offset=13"