void-packages/srcpkgs/ORBit2/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

60 lines
2.3 KiB
Bash

# Template file for 'ORBit2'
pkgname=ORBit2
version=2.14.19
revision=8
build_style=gnu-configure
configure_args="--disable-static"
hostmakedepends="pkg-config"
makedepends="libglib-devel libIDL-devel"
short_desc="Thin/fast CORBA ORB"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.0-or-later"
homepage="http://projects.gnome.org/ORBit2/"
distfiles="http://ftp.acc.umu.se/pub/gnome/sources/${pkgname}/2.14/${pkgname}-${version}.tar.bz2"
checksum=55c900a905482992730f575f3eef34d50bda717c197c97c08fa5a6eafd857550
disable_parallel_build=yes
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" ORBit2"
make_build_args+=" IDL_COMPILER=/usr/bin/orbit-idl-2"
configure_args+=" ac_cv_alignof_CORBA_boolean=${ac_cv_alignof_CORBA_boolean=1}"
configure_args+=" ac_cv_alignof_CORBA_char=${ac_cv_alignof_CORBA_char=1}"
configure_args+=" ac_cv_alignof_CORBA_double=${ac_cv_alignof_CORBA_double=8}"
configure_args+=" ac_cv_alignof_CORBA_float=${ac_cv_alignof_CORBA_float=4}"
configure_args+=" ac_cv_alignof_CORBA_long=${ac_cv_alignof_CORBA_long=4}"
configure_args+=" ac_cv_alignof_CORBA_long_double=${ac_cv_alignof_CORBA_long_double=8}"
configure_args+=" ac_cv_alignof_CORBA_long_long=${ac_cv_alignof_CORBA_long_long=8}"
configure_args+=" ac_cv_alignof_CORBA_octet=${ac_cv_alignof_CORBA_octet=1}"
configure_args+=" ac_cv_alignof_CORBA_short=${ac_cv_alignof_CORBA_short=2}"
configure_args+=" ac_cv_alignof_CORBA_struct=${ac_cv_alignof_CORBA_struct=1}"
configure_args+=" ac_cv_alignof_CORBA_wchar=${ac_cv_alignof_CORBA_wchar=2}"
case "${XBPS_TARGET_MACHINE}" in
x86_64*|aarch64*|ppc64*) configure_args+=" ac_cv_alignof_CORBA_pointer=${ac_cv_alignof_CORBA_pointer=8}";;
*) configure_args+=" ac_cv_alignof_CORBA_pointer=${ac_cv_alignof_CORBA_pointer=4}";;
esac
fi
post_install() {
rm -f ${DESTDIR}/usr/lib/*.a
}
libORBit2_package() {
short_desc+=" - Runtime library"
pkg_install() {
vmove "usr/lib/*.so.*"
vmove "usr/lib/orbit-2.0/*.so*"
}
}
ORBit2-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin/orbit2-config
vmove usr/lib/*.so
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/share/idl
vmove usr/share/aclocal
vmove usr/share/gtk-doc
}
}