#!/bin/bash # # qemu-xtensa.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # qemu-xtensa.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # default settings PACKAGE="qemu-xtensa" PACKAGE_EXT="gz" VERSION=${VERSION:=9.0.0} VDATE=${VDATE:=20240606} BUILD=${BUILD:=1} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc elif [ -f ../../source/runtime/slackbuildrc ]; then . ../../source/runtime/slackbuildrc fi check_required SRC="esp-develop-$VERSION-$VDATE.tar.$PACKAGE_EXT" URL="https://github.com/espressif/qemu/archive/refs/tags/$SRC" get_source $SRC $URL unpack_source $SRC qemu-esp-develop-$VERSION-$VDATE CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ --docdir=/usr/doc/$PACKAGE-$VERSION \ --target-list=xtensa-softmmu \ --enable-gcrypt \ --enable-debug \ --enable-sanitizers \ --disable-strip \ --disable-user \ --disable-capstone \ --disable-vnc \ --disable-sdl \ --disable-gtk ninja -C build DESTDIR=$PKG ninja -C build install # Remove all duplicates with the regular qemu package. ( cd $PKG/usr/bin rm -f elf2dmp qemu-edid qemu-ga qemu-img qemu-io qemu-keymap qemu-nbd rm -f qemu-pr-helper qemu-storage-daemon mv qemu-system-xtensa qemu-system-esp-xtensa ) rm -f $PKG/usr/include/qemu-plugin.h rm -rf $PKG/usr/libexec rm -rf $PKG/usr/share # Add docs to the proper location mkdir -p $DOCS cp -a COPYING* LICENSE MAINTAINERS README.rst $DOCS fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi