2006-10-20 23:15:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Build script to automatically build Chocolate Doom. This will work
|
|
|
|
# on OSX and Linux, and hopefully Cygwin as well (havent tried)
|
|
|
|
#
|
|
|
|
# To build on OSX:
|
|
|
|
# 1. Install Xcode (available on your OSX DVDs or from the Apple
|
|
|
|
# website)
|
|
|
|
# 2. Type:
|
|
|
|
# curl http://www.chocolate-doom.org/build-chocolate-doom | sh
|
|
|
|
#
|
|
|
|
# To build on Linux:
|
|
|
|
# 1. Make sure gcc is installed (depends on your distribution).
|
|
|
|
# 2. Type:
|
|
|
|
# wget -O - http://www.chocolate-doom.org/build-chocolate-doom | sh
|
|
|
|
#
|
|
|
|
|
|
|
|
CHOCOLATE_DOOM_DIR=~/chocolate-doom
|
|
|
|
PACKAGES_DIR=$CHOCOLATE_DOOM_DIR/packages
|
|
|
|
BUILD_DIR=$CHOCOLATE_DOOM_DIR/build
|
|
|
|
|
2011-11-05 15:21:56 +00:00
|
|
|
# Check if the specified string matches the glob pattern.
|
|
|
|
|
|
|
|
pattern_match() {
|
|
|
|
pattern="$1"
|
|
|
|
|
|
|
|
case "$2" in
|
|
|
|
$pattern)
|
|
|
|
true
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
false
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2006-10-20 23:15:26 +00:00
|
|
|
# Determine if a given program is in the PATH.
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
have_tool() {
|
2006-10-20 23:15:26 +00:00
|
|
|
tool=$1
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
result=1
|
2006-10-20 23:15:26 +00:00
|
|
|
SAVE_IFS=$IFS
|
|
|
|
IFS=:
|
|
|
|
|
|
|
|
for dir in $PATH; do
|
|
|
|
if [ -e $dir/$tool ]; then
|
2010-07-14 20:35:10 +00:00
|
|
|
# echo $dir/$tool
|
|
|
|
result=0
|
2006-10-20 23:15:26 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
IFS=$SAVE_IFS
|
|
|
|
|
|
|
|
return $result
|
|
|
|
}
|
|
|
|
|
|
|
|
# Download a given URL to stdout.
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
get_url() {
|
2006-10-20 23:15:26 +00:00
|
|
|
url=$1
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
if have_tool curl; then
|
2006-10-20 23:15:26 +00:00
|
|
|
curl $url
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
if have_tool wget; then
|
2006-10-20 23:15:26 +00:00
|
|
|
wget $url -O -
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
2011-06-09 20:17:53 +00:00
|
|
|
# Desperate?
|
|
|
|
|
|
|
|
for l in lynx links elinks; do
|
|
|
|
if have_tool $l; then
|
|
|
|
echo "Using $l to download $url..." >&2
|
|
|
|
$l -source $url
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "No tool available to retrieve URLs. Please install curl or wget." >&2
|
|
|
|
|
|
|
|
exit -1
|
2006-10-20 23:15:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Extract a tar.gz file.
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
extract_targz() {
|
2006-10-20 23:15:26 +00:00
|
|
|
file=$1
|
|
|
|
|
|
|
|
gunzip < $1 | tar -x
|
|
|
|
}
|
|
|
|
|
|
|
|
# Download a file to the packages directory.
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
download_file() {
|
2006-10-20 23:15:26 +00:00
|
|
|
url=$1
|
|
|
|
file=$2
|
|
|
|
|
|
|
|
if get_url $url$file > $PACKAGES_DIR/$file.part; then
|
|
|
|
mv $PACKAGES_DIR/$file.part $PACKAGES_DIR/$file
|
|
|
|
return 0
|
|
|
|
else
|
|
|
|
echo "File $file failed to download! Please try again."
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-12-09 06:38:06 +00:00
|
|
|
# fetch_from_git(git_url, checkout_dir_name)
|
|
|
|
# Check module out from Git.
|
2010-07-14 20:35:10 +00:00
|
|
|
|
2013-12-09 06:38:06 +00:00
|
|
|
fetch_from_git() {
|
|
|
|
git_url=$1
|
2010-07-14 20:35:10 +00:00
|
|
|
checkout_dir_name=$2
|
|
|
|
|
|
|
|
checkout_path="$BUILD_DIR/$checkout_dir_name"
|
|
|
|
|
|
|
|
if [ ! -e "$checkout_path" ]; then
|
|
|
|
|
2013-12-09 06:38:06 +00:00
|
|
|
if ! git clone "$git_url" "$checkout_path"; then
|
|
|
|
echo "Failed to check out $checkout_dir_name from Git"
|
2010-07-14 20:35:10 +00:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
else
|
2014-04-07 06:41:02 +00:00
|
|
|
pushd "$checkout_path"
|
2013-12-09 06:38:06 +00:00
|
|
|
git pull
|
2014-04-07 06:41:02 +00:00
|
|
|
popd
|
2010-07-14 20:35:10 +00:00
|
|
|
fi
|
|
|
|
}
|
2006-10-20 23:15:26 +00:00
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
# fetch_module(base_url, module_name, version)
|
|
|
|
# Download the specified module.
|
|
|
|
|
|
|
|
fetch_module() {
|
2006-10-20 23:15:26 +00:00
|
|
|
url=$1
|
|
|
|
module=$2
|
|
|
|
version=$3
|
|
|
|
|
|
|
|
echo =======================================================
|
|
|
|
echo Building $module version $version
|
|
|
|
echo =======================================================
|
|
|
|
echo
|
|
|
|
|
|
|
|
if [ ! -e $PACKAGES_DIR/$module-$version.tar.gz ]; then
|
|
|
|
echo Downloading tar file...
|
|
|
|
download_file $url $module-$version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo Extracting...
|
|
|
|
cd $BUILD_DIR
|
|
|
|
|
|
|
|
if ! extract_targz $PACKAGES_DIR/$module-$version.tar.gz; then
|
|
|
|
rm -f $PACKAGES_DIR/$module-$version.tar.gz
|
|
|
|
|
|
|
|
echo Archive failed to extract and is possibly corrupted.
|
|
|
|
echo Please run this script again.
|
|
|
|
exit
|
|
|
|
fi
|
2010-07-14 20:35:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# build_module(module_dir, args)
|
|
|
|
# Build the specified module.
|
|
|
|
|
|
|
|
build_module() {
|
|
|
|
module=$1
|
|
|
|
args=$2
|
2006-10-20 23:15:26 +00:00
|
|
|
|
|
|
|
echo Building module...
|
2010-07-14 20:35:10 +00:00
|
|
|
cd "$BUILD_DIR/$module"
|
2006-10-20 23:15:26 +00:00
|
|
|
(./configure --with-sdl-prefix=$SDL_PREFIX --prefix=$INSTALL_DIR $args) || exit
|
|
|
|
make || exit
|
|
|
|
|
|
|
|
# Install the package
|
|
|
|
echo $INSTALL_MESSAGE
|
|
|
|
$INSTALL_COMMAND make install || exit
|
|
|
|
|
2012-09-20 18:47:00 +00:00
|
|
|
# Remove any libtool .la files that were installed by the build - they
|
|
|
|
# aren't needed and can cause build problems with dependency ordering
|
|
|
|
# when cross-compiling to MingW.
|
|
|
|
rm -f $INSTALL_DIR/lib/*.la
|
|
|
|
|
2006-10-20 23:15:26 +00:00
|
|
|
echo Build complete.
|
|
|
|
echo
|
|
|
|
}
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
# fetch_and_build_module(base_url, module_name, version, args)
|
|
|
|
# Build a module, downloading from http:
|
|
|
|
|
|
|
|
fetch_and_build_module() {
|
|
|
|
url=$1
|
|
|
|
module=$2
|
|
|
|
version=$3
|
|
|
|
args=$4
|
|
|
|
|
|
|
|
fetch_module "$url" "$module" "$version"
|
|
|
|
build_module "$module-$version" "$args"
|
|
|
|
}
|
|
|
|
|
|
|
|
autogen_module() {
|
|
|
|
module=$1
|
|
|
|
|
|
|
|
cd "$BUILD_DIR/$module"
|
|
|
|
|
|
|
|
# This is what is normally found in the autogen.sh script. The
|
|
|
|
# commands are run here directly as some slight tweaks are needed.
|
|
|
|
|
|
|
|
mkdir autotools
|
2010-07-14 21:05:39 +00:00
|
|
|
|
|
|
|
aclocal -I "$SDL_PREFIX/share/aclocal" || exit
|
|
|
|
autoheader || exit
|
|
|
|
automake -a -c || exit
|
|
|
|
autoconf || exit
|
|
|
|
automake || exit
|
2010-07-14 20:35:10 +00:00
|
|
|
}
|
|
|
|
|
2006-10-20 23:15:26 +00:00
|
|
|
# Check if a given header file is in the standard include directory or
|
|
|
|
# SDL include directory.
|
|
|
|
|
2011-11-05 16:21:02 +00:00
|
|
|
have_header() {
|
2006-10-20 23:15:26 +00:00
|
|
|
headerfile=$1
|
|
|
|
|
2011-11-02 21:47:40 +00:00
|
|
|
echo "#include <$headerfile>" | cpp $SDL_CFLAGS $CPPFLAGS > /dev/null
|
2006-10-20 23:15:26 +00:00
|
|
|
|
|
|
|
result=$?
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
if [ $result = 0 ]; then
|
2006-10-20 23:15:26 +00:00
|
|
|
echo "Have $headerfile"
|
|
|
|
else
|
|
|
|
echo "Don't have $headerfile"
|
|
|
|
fi
|
|
|
|
|
|
|
|
return $result
|
|
|
|
}
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
usage() {
|
2011-11-02 21:47:40 +00:00
|
|
|
echo
|
2006-10-20 23:15:26 +00:00
|
|
|
echo "Usage:"
|
|
|
|
echo "$0 : Install into home directory"
|
|
|
|
echo "$0 -su : Install globally onto system using 'su'"
|
|
|
|
echo "$0 -sudo : Install globally onto system using 'sudo'"
|
2011-11-02 21:47:40 +00:00
|
|
|
echo
|
|
|
|
echo "Extra options:"
|
2013-12-09 06:38:06 +00:00
|
|
|
echo "-git : Build latest version from Git HEAD."
|
2014-04-07 06:49:51 +00:00
|
|
|
echo "-extra-libs : Build extra optional libraries that can make"
|
|
|
|
echo " Chocolate Doom even more awesome."
|
|
|
|
echo "-host=<spec> : Cross-compile for the specified target."
|
2011-11-02 21:47:40 +00:00
|
|
|
echo
|
|
|
|
|
2006-10-20 23:15:26 +00:00
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2011-11-05 15:21:56 +00:00
|
|
|
if pattern_match "* *" "$HOME"; then
|
|
|
|
echo
|
|
|
|
echo "The path to your home directory contains a space:"
|
|
|
|
echo
|
|
|
|
echo " HOME=$HOME"
|
|
|
|
echo
|
|
|
|
echo "This script will probably fail to build - reset HOME to point"
|
|
|
|
echo "somewhere else. For example, type:"
|
|
|
|
echo
|
|
|
|
echo " mkdir /home/user"
|
|
|
|
echo " HOME=/home/user"
|
|
|
|
echo
|
|
|
|
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
if ! have_tool gcc; then
|
2006-10-20 23:15:26 +00:00
|
|
|
echo "No compiler found. Please install gcc!" >&2
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
|
2011-11-05 15:57:12 +00:00
|
|
|
# Parse command line arguments:
|
2006-10-20 23:15:26 +00:00
|
|
|
|
2013-12-09 06:38:06 +00:00
|
|
|
git_build=false
|
2011-11-05 15:57:12 +00:00
|
|
|
force_build_sdl=false
|
2011-11-05 16:21:02 +00:00
|
|
|
build_libsamplerate=false
|
2014-04-07 06:41:02 +00:00
|
|
|
build_libflac=false
|
|
|
|
build_libvorbis=false
|
|
|
|
build_libpng=false
|
2011-11-05 15:57:12 +00:00
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
INSTALL_DIR=$CHOCOLATE_DOOM_DIR/install
|
|
|
|
INSTALL_COMMAND=
|
|
|
|
INSTALL_MESSAGE="Installing..."
|
2013-12-09 06:38:06 +00:00
|
|
|
GIT_CO_NAME=chocolate-doom-git
|
2011-11-02 21:47:40 +00:00
|
|
|
HOST_ARG=
|
2010-07-14 20:35:10 +00:00
|
|
|
|
|
|
|
for arg in "$@"; do
|
2011-11-02 21:47:40 +00:00
|
|
|
case "$arg" in
|
2010-07-14 20:35:10 +00:00
|
|
|
"-su")
|
|
|
|
INSTALL_DIR=/usr/local
|
|
|
|
INSTALL_COMMAND=su -c
|
|
|
|
INSTALL_MESSAGE="Type the root password:"
|
|
|
|
;;
|
|
|
|
"-sudo")
|
|
|
|
INSTALL_DIR=/usr/local
|
|
|
|
INSTALL_COMMAND=sudo
|
|
|
|
INSTALL_MESSAGE="Type your password:"
|
|
|
|
;;
|
2011-11-02 21:47:40 +00:00
|
|
|
-host=*)
|
|
|
|
HOST_ARG="-$arg"
|
2014-04-07 06:41:02 +00:00
|
|
|
# Build libraries from scratch when cross compiling:
|
|
|
|
force_build_sdl=true
|
2011-11-02 21:47:40 +00:00
|
|
|
;;
|
2014-04-07 06:41:02 +00:00
|
|
|
"-extra-libs")
|
2011-11-05 16:21:02 +00:00
|
|
|
build_libsamplerate=true
|
2014-04-07 06:41:02 +00:00
|
|
|
build_libpng=true
|
|
|
|
build_libflac=true
|
|
|
|
build_libvorbis=true
|
2011-11-05 16:21:02 +00:00
|
|
|
;;
|
2013-12-09 06:38:06 +00:00
|
|
|
"-git")
|
|
|
|
git_build=true
|
2011-11-02 21:47:40 +00:00
|
|
|
;;
|
2010-07-14 20:35:10 +00:00
|
|
|
*)
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2006-10-20 23:15:26 +00:00
|
|
|
|
|
|
|
# Make all our build directories etc
|
|
|
|
|
|
|
|
mkdir $CHOCOLATE_DOOM_DIR
|
|
|
|
mkdir $PACKAGES_DIR
|
|
|
|
mkdir $BUILD_DIR
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
MACOSX_DEPLOYMENT_TARGET=10.4
|
2010-07-14 21:05:39 +00:00
|
|
|
PATH="$INSTALL_DIR/bin:$PATH"
|
2011-11-02 21:47:40 +00:00
|
|
|
CPPFLAGS="-I$INSTALL_DIR/include -I$INSTALL_DIR/include/SDL"
|
2010-07-14 20:35:10 +00:00
|
|
|
LDFLAGS="-L$INSTALL_DIR/lib $LDFLAGS"
|
|
|
|
|
|
|
|
export MACOSX_DEPLOYMENT_TARGET
|
2011-11-02 21:47:40 +00:00
|
|
|
export CPPFLAGS
|
2010-07-14 20:35:10 +00:00
|
|
|
export LDFLAGS
|
2006-10-20 23:15:26 +00:00
|
|
|
|
|
|
|
SDL_BUILD_OPTIONS=""
|
|
|
|
|
|
|
|
if [ `uname` = "Darwin" ]; then
|
|
|
|
SDL_BUILD_OPTIONS="--disable-video-x11 $SDL_BUILD_OPTIONS"
|
2011-01-02 02:36:46 +00:00
|
|
|
CC="gcc -m32"
|
|
|
|
export CC
|
2014-04-07 06:41:02 +00:00
|
|
|
CXX="g++ -m32"
|
|
|
|
export CXX
|
2012-12-22 23:32:19 +00:00
|
|
|
LDFLAGS="-lobjc $LDFLAGS"
|
2006-10-20 23:15:26 +00:00
|
|
|
else
|
2010-07-14 20:35:10 +00:00
|
|
|
LDFLAGS="-Wl,-rpath -Wl,$INSTALL_DIR/lib $LDFLAGS"
|
2006-10-20 23:15:26 +00:00
|
|
|
fi
|
|
|
|
|
2011-11-02 21:47:40 +00:00
|
|
|
# Windows build?
|
|
|
|
|
2011-11-05 15:21:56 +00:00
|
|
|
if [ `uname` = "Cygwin" ] || pattern_match "*mingw*" "$HOST_ARG"; then
|
2011-11-02 21:47:40 +00:00
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Windows build: installing supplementary DirectX headers."
|
|
|
|
echo
|
|
|
|
|
|
|
|
if [ ! -e $PACKAGES_DIR/directx-devel.tar.gz ]; then
|
|
|
|
download_file http://www.libsdl.org/extras/win32/common/ \
|
|
|
|
directx-devel.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p $INSTALL_DIR
|
|
|
|
cd $INSTALL_DIR
|
|
|
|
extract_targz $PACKAGES_DIR/directx-devel.tar.gz
|
|
|
|
fi
|
|
|
|
|
2006-10-20 23:15:26 +00:00
|
|
|
SDL_CFLAGS=
|
|
|
|
SDL_PREFIX=`sdl-config --prefix`
|
|
|
|
|
2011-11-05 15:57:12 +00:00
|
|
|
if [ $? = 0 ] && ! $force_build_sdl; then
|
2006-10-20 23:15:26 +00:00
|
|
|
# SDL is installed on the system
|
|
|
|
|
|
|
|
SDL_CFLAGS=`sdl-config --cflags`
|
|
|
|
else
|
|
|
|
# SDL not installed; we must build it
|
|
|
|
|
|
|
|
SDL_PREFIX=$INSTALL_DIR
|
|
|
|
|
2012-02-03 16:19:46 +00:00
|
|
|
fetch_and_build_module http://www.libsdl.org/release/ SDL 1.2.15 \
|
2011-11-02 21:47:40 +00:00
|
|
|
"$SDL_BUILD_OPTIONS $HOST_ARG"
|
2006-10-20 23:15:26 +00:00
|
|
|
fi
|
|
|
|
|
2014-04-07 06:41:02 +00:00
|
|
|
# Optional libraries first:
|
|
|
|
|
|
|
|
if $build_libsamplerate; then
|
|
|
|
if $force_build_sdl || ! have_header samplerate.h; then
|
|
|
|
fetch_and_build_module http://www.chocolate-doom.org/depends/ \
|
|
|
|
libsamplerate 0.1.8 "$HOST_ARG"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if $build_libpng; then
|
|
|
|
if $force_build_sdl || ! have_header png.h; then
|
|
|
|
fetch_and_build_module http://www.chocolate-doom.org/depends/ \
|
|
|
|
libpng 1.6.10 "$HOST_ARG"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if $build_libvorbis; then
|
|
|
|
if $force_build_sdl || ! have_header vorbis/vorbisfile.h; then
|
|
|
|
fetch_and_build_module http://www.chocolate-doom.org/depends/ \
|
|
|
|
libogg 1.3.1 "$HOST_ARG"
|
|
|
|
fetch_and_build_module http://www.chocolate-doom.org/depends/ \
|
|
|
|
libvorbis 1.3.4 "$HOST_ARG"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if $build_libflac; then
|
|
|
|
if $force_build_sdl || ! have_header FLAC/stream_decoder.h; then
|
|
|
|
flac_opts="--disable-asm-optimizations" # Causes problems
|
|
|
|
|
|
|
|
fetch_and_build_module http://www.chocolate-doom.org/depends/ \
|
|
|
|
flac 1.2.1 "$HOST_ARG $flac_opts"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-11-05 16:21:02 +00:00
|
|
|
if $force_build_sdl || ! have_header SDL_net.h; then
|
2006-10-20 23:15:26 +00:00
|
|
|
|
|
|
|
# SDL_net not installed; we must build it
|
|
|
|
|
2011-11-02 21:47:40 +00:00
|
|
|
fetch_and_build_module http://www.libsdl.org/projects/SDL_net/release/ \
|
2012-12-24 23:07:59 +00:00
|
|
|
SDL_net 1.2.7 "$HOST_ARG"
|
2006-10-20 23:15:26 +00:00
|
|
|
fi
|
|
|
|
|
2011-11-05 16:21:02 +00:00
|
|
|
if $force_build_sdl || ! have_header SDL_mixer.h; then
|
2006-10-20 23:15:26 +00:00
|
|
|
|
|
|
|
# SDL_mixer not installed; we must build it
|
2011-11-05 15:57:12 +00:00
|
|
|
# Disable dependencies on external libraries for sound file formats:
|
2014-04-07 06:41:02 +00:00
|
|
|
mixer_opts="--disable-music-mod --disable-music-mp3 \
|
|
|
|
--disable-music-flac-shared --disable-music-ogg-shared"
|
2011-11-05 15:57:12 +00:00
|
|
|
|
2014-04-07 06:41:02 +00:00
|
|
|
# ...except ones we're building.
|
|
|
|
if ! $build_libflac; then
|
|
|
|
mixer_opts="$mixer_opts --disable-music-flac"
|
|
|
|
fi
|
|
|
|
if ! $build_libvorbis; then
|
|
|
|
mixer_opts="$mixer_opts --disable-music-ogg"
|
|
|
|
fi
|
2006-10-20 23:15:26 +00:00
|
|
|
|
2011-11-02 21:47:40 +00:00
|
|
|
fetch_and_build_module http://www.libsdl.org/projects/SDL_mixer/release/ \
|
2012-02-03 16:19:46 +00:00
|
|
|
SDL_mixer 1.2.12 "$HOST_ARG $mixer_opts"
|
2006-10-20 23:15:26 +00:00
|
|
|
fi
|
|
|
|
|
2010-07-14 20:35:10 +00:00
|
|
|
# Build Chocolate Doom. We can build the stable version or check out
|
2013-12-09 06:38:06 +00:00
|
|
|
# the latest code from Git.
|
2010-07-14 20:35:10 +00:00
|
|
|
|
2013-12-09 06:38:06 +00:00
|
|
|
if $git_build; then
|
|
|
|
GIT_URL=https://github.com/fragglet/chocolate-doom.git
|
|
|
|
fetch_from_git "$GIT_URL" "$GIT_CO_NAME"
|
2006-10-20 23:15:26 +00:00
|
|
|
|
2013-12-09 06:38:06 +00:00
|
|
|
autogen_module "$GIT_CO_NAME"
|
2010-07-14 20:35:10 +00:00
|
|
|
|
2013-12-09 06:38:06 +00:00
|
|
|
build_module "$GIT_CO_NAME" "$HOST_ARG"
|
2010-07-14 20:35:10 +00:00
|
|
|
else
|
2014-10-22 04:49:48 +00:00
|
|
|
# Download and build latest release.
|
2013-12-09 06:38:06 +00:00
|
|
|
fetch_and_build_module \
|
2014-10-22 04:49:48 +00:00
|
|
|
http://www.chocolate-doom.org/downloads/2.1.0/ \
|
|
|
|
chocolate-doom 2.1.0 "$HOST_ARG"
|
2010-07-14 20:35:10 +00:00
|
|
|
fi
|
2006-10-20 23:15:26 +00:00
|
|
|
|