From b883122752be54a8d5739ab53d8cd4df05577c66 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 15 Oct 2013 13:17:39 +0000 Subject: USe SVN snapshot because of the wine specific improvements --- dosbox/build/dosbox.SlackBuild | 95 +++++++++++++++++++++++++++++++++++------- 1 file changed, 79 insertions(+), 16 deletions(-) (limited to 'dosbox') diff --git a/dosbox/build/dosbox.SlackBuild b/dosbox/build/dosbox.SlackBuild index f5195f92..0383bf03 100755 --- a/dosbox/build/dosbox.SlackBuild +++ b/dosbox/build/dosbox.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright 2006-2010 Eric Hameleers, Eindhoven, NL +# Copyright 2005, 2006, 2007, 2009, 2010, 2012, 2013 Eric Hameleers, Eindhoven, NL # # Permission to use, copy, modify, and distribute this software for # any purpose with or without fee is hereby granted, provided that @@ -45,6 +45,10 @@ # * Update. # 0.74-1: 03/jun/2010 by Eric Hameleers # * Update. +# r3779-1: 13/apr/2012 by Eric Hameleers +# * Use a SVN snapshot for the Wine-specific changes this contains. +# r3833-1: 15/oct/2013 by Eric Hameleers +# * Newer SVN snapshot. # # Run 'sh dosbox.SlackBuild' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -55,7 +59,7 @@ # Set initial variables: PRGNAM=dosbox -VERSION=${VERSION:-"0.74"} +VERSION=${VERSION:-"r3833"} BUILD=${BUILD:-1} TAG=${TAG:-alien} @@ -71,19 +75,65 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} SOURCE="${SRCDIR}/${PRGNAM}-${VERSION}.tar.gz" -SRCURL="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz" +#SRCURL="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz" +SRCURL="" + +# Use the src_checkout() function if no downloadable tarball exists. +# This function checks out sources from SVN/CVS and creates a tarball of them. +src_checkout() { + # Param #1 : index in the SOURCE[] array. + # Param #2 : full path to where SOURCE[$1] tarball should be created. + # Determine the tarball extension: + PEXT=$(echo "${2}" | sed -r -e 's/.*[^.].(tar.xz|tar.gz|tar.bz2|tgz).*/\1/') + case "$PEXT" in + "tar.xz") TARCOMP="J" ;; + "tar.gz") TARCOMP="z" ;; + "tgz") TARCOMP="z" ;; + "tar.bz2") TARCOMP="j" ;; + *) echo "Archive can only have extension 'tar.xz', '.tar.gz' '.tar.bz2' or '.tgz'" ; exit 1 ;; + esac + # Determine the directory name to create for the archive root: + PBASE=$(basename ${2} .${PEXT}) + # Determine the directory where we create our checkout: + CODIR=$(dirname ${2}) + case ${1} in + 0) # This example assumes a SVN checkout: + if [ "$(echo ${VERSION}|cut -c1)" == 'r' ]; then # revision instead of date + REV=$(echo ${VERSION} | cut -c2-) + else + REV="{${VERSION}}" + fi + RETDIR=$(pwd) + mkdir -p $CODIR/${PRGNAM}_temp_checkout_$$ \ + && cd $CODIR/${PRGNAM}_temp_checkout_$$ + mkdir ${PBASE} \ + && cd ${PBASE} \ + && svn checkout --revision $REV https://dosbox.svn.sourceforge.net/svnroot/dosbox/dosbox/trunk . \ + && find . -type d -name '.svn' -depth | xargs rm -rf \ + && chown -R root:root . \ + && cd .. \ + && tar -${TARCOMP}cf ${2} ${PBASE} + cd $RETDIR + rm -rf $CODIR/${PRGNAM}_temp_checkout_$$ || true + ;; + *) # Do nothing + ;; + esac +} ## ## --- with a little luck, you won't have to edit below this point --- ## ## # Automatically determine the architecture we're building on: +MARCH=$( uname -m ) if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) export ARCH=i486 ;; - arm*) export ARCH=arm ;; + case "$MARCH" in + i?86) export ARCH=i486 ;; + armv7hl) export ARCH=$MARCH ;; + arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$( uname -m ) ;; + *) export ARCH=$MARCH ;; esac fi @@ -94,6 +144,9 @@ case "$ARCH" in x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" ;; + armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" + SLKLDFLAGS=""; LIBDIRSUFFIX="" + ;; *) SLKCFLAGS="-O2" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; @@ -121,19 +174,25 @@ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log # Source file availability: if ! [ -f ${SOURCE} ]; then + echo "Source '$(basename ${SOURCE})' not available yet..." + # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT + [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename ${SOURCE})" + if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi if ! [ "x${SRCURL}" == "x" ]; then - # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT - [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" - echo "Source '$(basename ${SOURCE})' not available yet..." echo "Will download file to $(dirname $SOURCE)" - wget -nv -T 30 -O "${SOURCE}" "${SRCURL}" || true + wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then - echo "Downloading '$(basename ${SOURCE})' failed... aborting the build." + echo "Fail to download '$(basename ${SOURCE})'. Aborting the build." mv -f "${SOURCE}" "${SOURCE}".FAIL exit 1 fi else - echo "File '$(basename ${SOURCE})' not available... aborting the build." + # Try if we have a SVN/CVS download routine for ${SOURCE} + echo "Will checkout sources to $(dirname $SOURCE)" + src_checkout 0 "${SOURCE}" 2>&1 > $OUTPUT/checkout-$(basename ${SOURCE}).log + fi + if [ ! -f "${SOURCE}" -o ! -s "${SOURCE}" ]; then + echo "File '$(basename ${SOURCE})' not available. Aborting the build." exit 1 fi fi @@ -163,9 +222,13 @@ chown -R root:root . chmod -R u+w,go+r-w,a+X-s . echo Building ... -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -LDFLAGS="$SLKLDFLAGS" \ + +export CFLAGS="$SLKCFLAGS" +export CXXFLAGS="$SLKCFLAGS" +export LDFLAGS="$SLKLDFLAGS" + +[ ! -x configure ] && ./autogen.sh + ./configure \ --prefix=/usr \ --localstatedir=/var \ -- cgit v1.2.3