diff options
author | Bojan Popovic <bocke@slackware-srbija.org> | 2012-12-15 15:14:50 +0100 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2012-12-15 15:15:06 +0100 |
commit | 14f0d0275fef0e42ae9dec117e60a6685696e7c8 (patch) | |
tree | d4f9253275258093a6c8c22d71cebe37c0cc89d7 /system | |
parent | 0a5e2c4d72a4c07560df1679e4a4bcf0c438fec3 (diff) | |
download | slackbuilds-14f0d0275fef0e42ae9dec117e60a6685696e7c8.tar.gz |
system/bochs: Added (cross platform x86 emulator).
(added stuff and cleanups in the slackbuild --ponce)
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/bochs/README | 7 | ||||
-rw-r--r-- | system/bochs/bochs.SlackBuild | 132 | ||||
-rw-r--r-- | system/bochs/bochs.info | 10 | ||||
-rw-r--r-- | system/bochs/slack-desc | 19 |
4 files changed, 168 insertions, 0 deletions
diff --git a/system/bochs/README b/system/bochs/README new file mode 100644 index 0000000000..90e1e95d40 --- /dev/null +++ b/system/bochs/README @@ -0,0 +1,7 @@ +Bochs is a highly portable open source IA-32 (x86) emulator written in +C++, that runs on most popular platforms. It include emulation of the +Intel x86 CPU, common I/O devices, and a custom BIOS. Bochs can be +compiled to emulate 386, 486, Pentium/Pentium II/Pentium 4 or x86-64 +including optional MMX, SSEx and 3DNow! instructions. + +wxPython is an optional dependency. diff --git a/system/bochs/bochs.SlackBuild b/system/bochs/bochs.SlackBuild new file mode 100644 index 0000000000..6ef218ff70 --- /dev/null +++ b/system/bochs/bochs.SlackBuild @@ -0,0 +1,132 @@ +#!/bin/sh + +# Slackware build script for Bochs +# Copyright 2012, Bojan Popovic, Belgrade, Serbia <bocke@slackware-srbija.org> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Modified by the slackbuilds.org project + +PRGNAM=bochs +VERSION=${VERSION:-2.6} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +DOCS="CHANGES COPYING PARAM_TREE.txt README* TESTFORM.txt TODO" + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +if [ $(which wx-config 2>/dev/null) ]; then wx="--with-wx"; else wx=""; fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --enable-idle-hack \ + --enable-cdrom \ + --enable-clgd54xx \ + --enable-disasm \ + --enable-e1000 \ + --enable-gameport \ + --enable-iodebug \ + --enable-monitor-mwait \ + --enable-ne2000 \ + --enable-plugins \ + --enable-pci \ + --enable-pcidev \ + --enable-pnic \ + --enable-readline \ + --enable-raw-serial \ + --enable-sb16=linux \ + --enable-usb \ + --enable-usb-ohci \ + --enable-usb-xhci \ + --with-nogui \ + --with-rfb \ + --with-term \ + --with-x \ + --with-x11 \ + --with-sdl \ + $wx \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# Move docs in the proper place +mkdir -p $PKG/usr/doc +mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION +rmdir $PKG/usr/share/doc +cp -a \ + $DOCS \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/bochs/bochs.info b/system/bochs/bochs.info new file mode 100644 index 0000000000..cfe42e8271 --- /dev/null +++ b/system/bochs/bochs.info @@ -0,0 +1,10 @@ +PRGNAM="bochs" +VERSION="2.6" +HOMEPAGE="http://bochs.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/bochs/bochs-2.6.tar.gz" +MD5SUM="7e25e1a4d2f7e0464e8d6381f38741d9" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Bojan Popovic" +EMAIL="bocke@slackware-srbija.org" diff --git a/system/bochs/slack-desc b/system/bochs/slack-desc new file mode 100644 index 0000000000..360484a881 --- /dev/null +++ b/system/bochs/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +bochs: bochs (cross platform x86 emulator) +bochs: +bochs: Bochs is a highly portable open source IA-32 (x86) emulator written in +bochs: C++, that runs on most popular platforms. It include emulation of the +bochs: Intel x86 CPU, common I/O devices, and a custom BIOS. Bochs can be +bochs: compiled to emulate 386, 486, Pentium/Pentium II/Pentium 4 or x86-64 +bochs: including optional MMX, SSEx and 3DNow! instructions. +bochs: +bochs: Homepage: http://bochs.sourceforge.net/ +bochs: +bochs: |