Merge pull request #1846 from thypon/binfmt-support
New package: binfmt-support-2.1.5
This commit is contained in:
commit
18bc877509
|
@ -40,3 +40,6 @@ unset -v systemd_services
|
|||
|
||||
# xbps-triggers: mkdirs
|
||||
unset -v make_dirs
|
||||
|
||||
# xbps-triggers: binfmts
|
||||
unset -v binfmts
|
||||
|
|
|
@ -117,6 +117,13 @@ _EOF
|
|||
echo "export make_dirs=\"${make_dirs}\"" >> $tmpf
|
||||
fi
|
||||
#
|
||||
# Handle binfmts trigger
|
||||
#
|
||||
if [ -n "${binfmts}" ]; then
|
||||
_add_trigger binfmts
|
||||
echo "export binfmts=\"${binfmts}\"" >> $tmpf
|
||||
fi
|
||||
#
|
||||
# Handle systemd services.
|
||||
#
|
||||
if [ -n "$build_option_systemd" ]; then
|
||||
|
|
2
srcpkgs/binfmt-support/files/binfmt-support/finish
Normal file
2
srcpkgs/binfmt-support/files/binfmt-support/finish
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec update-binfmts --disable
|
3
srcpkgs/binfmt-support/files/binfmt-support/run
Normal file
3
srcpkgs/binfmt-support/files/binfmt-support/run
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
update-binfmts --enable
|
||||
exec chpst -b binfmt-support pause
|
18
srcpkgs/binfmt-support/template
Normal file
18
srcpkgs/binfmt-support/template
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Template file for 'binfmt-support'
|
||||
pkgname=binfmt-support
|
||||
version=2.1.5
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
hostmakedepends="pkg-config"
|
||||
makedepends="libpipeline-devel"
|
||||
short_desc="Register interpreters for various binary formats"
|
||||
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
|
||||
license="GPL-3"
|
||||
homepage="http://packages.debian.org/en/sid/binfmt-support"
|
||||
distfiles="${DEBIAN_SITE}/main/b/binfmt-support/binfmt-support_$version.orig.tar.gz"
|
||||
checksum=4896f6bf86b0d918025bb88718f89923a4cf8c25f37c07cd76ebb75c52f9e8eb
|
||||
|
||||
post_install() {
|
||||
rm -r ${DESTDIR}/etc/init
|
||||
vsv binfmt-support
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'qemu-user-static'
|
||||
pkgname=qemu-user-static
|
||||
version=2.2.1
|
||||
revision=1
|
||||
revision=2
|
||||
wrksrc="qemu-${version}"
|
||||
hostmakedepends="pkg-config automake python"
|
||||
makedepends="libglib-devel pixman-devel libuuid-devel"
|
||||
|
@ -12,6 +12,72 @@ license="GPL-2, LGPL-2.1"
|
|||
distfiles="http://wiki.qemu.org/download/qemu-${version}.tar.bz2"
|
||||
checksum=4617154c6ef744b83e10b744e392ad111dd351d435d6563ce24d8da75b1335a0
|
||||
|
||||
_fmts="aarch64 alpha arm armeb cris i386 m68k microblaze mips mipsel mips64 mips64el ppc ppc64 ppc64abi32 ppc64le s390x sh4 sh4eb sparc sparc32plus sparc64 x86_64"
|
||||
|
||||
_aarch64_magic='\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7'
|
||||
_aarch64_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_alpha_magic='\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90'
|
||||
_alpha_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
|
||||
_arm_magic='\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00'
|
||||
_arm_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
|
||||
_armeb_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28'
|
||||
_armeb_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_cris_magic='\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x4c\x00'
|
||||
_cris_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
|
||||
_i386_magic='\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00'
|
||||
_i386_mask='\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
|
||||
_m68k_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04'
|
||||
_m68k_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_microblaze_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xba\xab'
|
||||
_microblaze_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_mips_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08'
|
||||
_mips_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_mipsel_magic='\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00'
|
||||
_mipsel_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
|
||||
_mips64_magic='\x7f\x45\x4c\x46\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08'
|
||||
_mips64_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_mips64el_magic='\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00'
|
||||
_mips64el_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
|
||||
_ppc_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14'
|
||||
_ppc_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_ppc64_magic='\x7f\x45\x4c\x46\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15'
|
||||
_ppc64_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_ppc64abi32_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15'
|
||||
_ppc64abi32_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_s390x_magic='\x7f\x45\x4c\x46\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16'
|
||||
_s390x_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_sh4_magic='\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00'
|
||||
_sh4_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
|
||||
_sh4eb_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a'
|
||||
_sh4eb_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_sparc_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02'
|
||||
_sparc_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_sparc32plus_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x12'
|
||||
_sparc32plus_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_sparc64_magic='\x7f\x45\x4c\x46\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2b'
|
||||
_sparc64_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
|
||||
_x86_64_magic='\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00'
|
||||
_x86_64_mask='\xff\xff\xff\xff\xff\xfe\xfe\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
|
||||
_ppc64le_magic='\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15\x00'
|
||||
_ppc64le_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\x00'
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
x86_64*|i386*) _omit="i386|x86_64" ;;
|
||||
armv*|aarch64*) _omit="arm|aarch64" ;;
|
||||
mips*) _omit="${XBPS_TARGET_MACHINE%-*}" ;;
|
||||
*) _omit="${XBPS_TARGET_MACHINE%-*}" ;;
|
||||
esac
|
||||
|
||||
for _fmt in $_fmts; do
|
||||
eval "case $_fmt in $_omit) magic= ;; *) magic=\"\$_${_fmt}_magic\" mask=\"\$_${_fmt}_mask\" ;; esac"
|
||||
if [ -n "$magic" ]; then
|
||||
binfmts+="/usr/bin/qemu-$_fmt-static --magic '$magic' --mask '$mask' --offset 0 --credential yes
|
||||
"
|
||||
fi
|
||||
done
|
||||
|
||||
binfmts="${binfmts%?}"
|
||||
|
||||
do_configure() {
|
||||
./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec \
|
||||
--disable-kvm --disable-vnc-png --disable-vnc-tls \
|
||||
|
@ -30,5 +96,5 @@ do_install() {
|
|||
done
|
||||
for f in ${DESTDIR}/usr/bin/*; do
|
||||
mv ${f} ${f}-static
|
||||
done
|
||||
done
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'wine'
|
||||
pkgname=wine
|
||||
version=1.7.45
|
||||
revision=4
|
||||
revision=5
|
||||
build_style=gnu-configure
|
||||
configure_args="--without-gstreamer"
|
||||
short_desc="Run Microsoft Windows applications"
|
||||
|
@ -27,6 +27,8 @@ makedepends="gettext-devel lcms2-devel zlib-devel ncurses-devel
|
|||
depends="libXi libXinerama libXcomposite libXcursor libOSMesa
|
||||
desktop-file-utils hicolor-icon-theme liberation-fonts-ttf"
|
||||
|
||||
binfmts="/usr/bin/wine --magic MZ"
|
||||
|
||||
build_options="staging d3d9"
|
||||
desc_option_staging="Enable wine-staging patchset"
|
||||
desc_option_d3d9="Enable d3d9 state tracker patchset"
|
||||
|
|
58
srcpkgs/xbps-triggers/files/binfmts
Executable file
58
srcpkgs/xbps-triggers/files/binfmts
Executable file
|
@ -0,0 +1,58 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# binfmts trigger.
|
||||
#
|
||||
# Binaries can be specified like:
|
||||
# binfmts="<path> [<args> ...]"
|
||||
#
|
||||
# Arguments: $ACTION = [run/targets]
|
||||
# $TARGET = [post-install/pre-remove]
|
||||
# $PKGNAME
|
||||
# $VERSION
|
||||
# $UPDATE = [yes/no]
|
||||
#
|
||||
ACTION="$1"
|
||||
TARGET="$2"
|
||||
PKGNAME="$3"
|
||||
VERSION="$4"
|
||||
UPDATE="$5"
|
||||
|
||||
export PATH="usr/bin:usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
|
||||
case "$ACTION" in
|
||||
targets)
|
||||
echo "post-install pre-remove"
|
||||
;;
|
||||
run)
|
||||
[ -x /usr/bin/update-binfmts ] || exit 0
|
||||
[ -z "${binfmts}" ] && exit 0
|
||||
|
||||
case "$TARGET" in
|
||||
post-install)
|
||||
echo "${binfmts}" | while read line; do
|
||||
set -- ${line}
|
||||
_bin="$1"; shift; _args="$@"; _bname="$(basename ${_bin})"
|
||||
update-binfmts --package ${PKGNAME} --install ${_bname} ${_bin} ${_args}
|
||||
done
|
||||
;;
|
||||
pre-remove)
|
||||
echo "${binfmts}" | while read line; do
|
||||
set -- ${line}
|
||||
_bin="$1"; shift; _args="$@"; _bname="$(basename ${_bin})"
|
||||
if [ -f /var/lib/binfmts/${_bname} ]; then
|
||||
update-binfmts --package ${PKGNAME} --remove ${_bname} ${_bin}
|
||||
fi
|
||||
done
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
# end
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'xbps-triggers'
|
||||
pkgname=xbps-triggers
|
||||
version=0.99
|
||||
version=0.100
|
||||
revision=1
|
||||
noarch=yes
|
||||
bootstrap=yes
|
||||
|
|
Loading…
Reference in New Issue
Block a user