Commit 703bff26 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Add autobuild files

parent 6d338c22
stage/
autobuild-parabuild-bootstrap/
<?xml version="1.0" ?>
<llsd>
<map>
<key>installables</key>
<map>
<key>libpng</key>
<map>
<key>copyright</key>
<string>Copyright (c) 1995-2019 The PNG Reference Library Authors</string>
<key>description</key>
<string>PNG Reference library</string>
<key>license</key>
<string>libpng</string>
<key>license_file</key>
<string>LICENSES/libpng.txt</string>
<key>name</key>
<string>libpng</string>
<key>platforms</key>
<map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>95f4fee252feb17168597f45f0f0b68d</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/libpng/linux64/debian10/libpng-1.6.37.202201824-linux64-202201824.tar.bz2</string>
</map>
<key>name</key>
<string>linux64</string>
</map>
</map>
<key>version</key>
<string>1.6.37.202201824</string>
</map>
<key>zlib</key>
<map>
<key>copyright</key>
<string>Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler</string>
<key>description</key>
<string>Zlib Data Compression Library</string>
<key>license</key>
<string>zlib</string>
<key>license_file</key>
<string>LICENSES/zlib.txt</string>
<key>name</key>
<string>zlib</string>
<key>platforms</key>
<map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>5d7866be22eaca6d38cfd0bb4e411fb0</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/zlib/linux64/debian10/zlib-1.2.11.202200500-linux64-202200500.tar.bz2</string>
</map>
<key>name</key>
<string>linux64</string>
</map>
</map>
<key>version</key>
<string>1.2.11.202200500</string>
</map>
</map>
<key>package_description</key>
<map>
<key>copyright</key>
<string>Copyright (C) 1997-2012 Sam Lantinga</string>
<key>description</key>
<string>Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.</string>
<key>license</key>
<string>lgpl</string>
<key>license_file</key>
<string>LICENSES/SDL.txt</string>
<key>name</key>
<string>SDL</string>
<key>platforms</key>
<map>
<key>common</key>
<map>
<key>build_directory</key>
<string>stage</string>
<key>configurations</key>
<map>
<key>Release</key>
<map>
<key>build</key>
<map>
<key>arguments</key>
<array>
<string>../build-cmd.sh</string>
</array>
<key>command</key>
<string>bash</string>
</map>
<key>name</key>
<string>Release</string>
</map>
</map>
<key>manifest</key>
<array>
<string>include/SDL/*</string>
<string>docs/SDL/README.Linden</string>
</array>
<key>name</key>
<string>common</string>
</map>
<key>linux</key>
<map>
<key>configurations</key>
<map>
<key>Release</key>
<map>
<key>build</key>
<map>
</map>
<key>default</key>
<string>True</string>
<key>name</key>
<string>Release</string>
</map>
</map>
<key>manifest</key>
<array>
<string>lib/release/*so*</string>
<string>lib/debug/*so*</string>
</array>
<key>name</key>
<string>linux</string>
</map>
</map>
<key>version_file</key>
<string>VERSION.txt</string>
</map>
<key>type</key>
<string>autobuild</string>
<key>version</key>
<string>1.3</string>
</map>
</llsd>
#!/bin/bash
# turn on verbose debugging output for parabuild logs.
set -x
# make errors fatal
set -e
TOP="$(dirname "$0")"
SDL_SOURCE_DIR="SDL"
SDL_VERSION=$(sed -n -e 's/^Version: //p' "$TOP/$SDL_SOURCE_DIR/SDL.spec")
if [ -z "$AUTOBUILD" ] ; then
fail
fi
if [ "$OSTYPE" = "cygwin" ] ; then
export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
fi
# load autbuild provided shell functions and variables
set +x
eval "$("$AUTOBUILD" source_environment)"
set -x
stage="$(pwd)"
ZLIB_INCLUDE="${stage}"/packages/include/zlib
PNG_INCLUDE="${stage}"/packages/include/libpng16
[ -f "$ZLIB_INCLUDE"/zlib.h ] || fail "You haven't installed the zlib package yet."
[ -f "$PNG_INCLUDE"/png.h ] || fail "You haven't installed the libpng package yet."
# Restore all .sos
restore_sos ()
{
for solib in "${stage}"/packages/lib/{debug,release}/lib*.so*.disable; do
if [ -f "$solib" ]; then
mv -f "$solib" "${solib%.disable}"
fi
done
}
case "$AUTOBUILD_PLATFORM" in
linux*)
# Linux build environment at Linden comes pre-polluted with stuff that can
# seriously damage 3rd-party builds. Environmental garbage you can expect
# includes:
#
# DISTCC_POTENTIAL_HOSTS arch root CXXFLAGS
# DISTCC_LOCATION top branch CC
# DISTCC_HOSTS build_name suffix CXX
# LSDISTCC_ARGS repo prefix CFLAGS
# cxx_version AUTOBUILD SIGN CPPFLAGS
#
# So, clear out bits that shouldn't affect our configure-directed build
# but which do nonetheless.
#
unset DISTCC_HOSTS CC CXX CFLAGS CPPFLAGS CXXFLAGS
# Default target per autobuild build --address-size
opts="${TARGET_OPTS:--m$AUTOBUILD_ADDRSIZE}"
DEBUG_COMMON_FLAGS="$opts -Og -g -fPIC -DPIC"
RELEASE_COMMON_FLAGS="$opts -O3 -g -fPIC -DPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2"
DEBUG_CFLAGS="$DEBUG_COMMON_FLAGS"
RELEASE_CFLAGS="$RELEASE_COMMON_FLAGS"
DEBUG_CXXFLAGS="$DEBUG_COMMON_FLAGS -std=c++17"
RELEASE_CXXFLAGS="$RELEASE_COMMON_FLAGS -std=c++17"
DEBUG_CPPFLAGS="-DPIC"
RELEASE_CPPFLAGS="-DPIC"
JOBS=`cat /proc/cpuinfo | grep processor | wc -l`
# Handle any deliberate platform targeting
if [ -z "${TARGET_CPPFLAGS:-}" ]; then
# Remove sysroot contamination from build environment
unset CPPFLAGS
else
# Incorporate special pre-processing flags
export CPPFLAGS="$TARGET_CPPFLAGS"
fi
# Force static linkage to libz by moving .sos out of the way
# (Libz is only packaging statics right now but keep this working.)
trap restore_sos EXIT
for solib in "${stage}"/packages/lib/{debug,release}/libz.so*; do
if [ -f "$solib" ]; then
mv -f "$solib" "$solib".disable
fi
done
pushd "$TOP/$SDL_SOURCE_DIR"
# do debug build of sdl
PATH="$stage"/bin/:"$PATH" \
CFLAGS="-I"$ZLIB_INCLUDE" -I"$PNG_INCLUDE" $DEBUG_CFLAGS" \
CXXFLAGS="-I"$ZLIB_INCLUDE" -I"$PNG_INCLUDE" $DEBUG_CXXFLAGS" \
CPPFLAGS="-I"$ZLIB_INCLUDE" -I"$PNG_INCLUDE" $DEBUG_CPPFLAGS" \
LDFLAGS="-L"$stage/packages/lib/debug" -L"$stage/lib/debug" $opts" \
./configure --with-pic \
--prefix="$stage" --libdir="$stage/lib/debug" --includedir="$stage/include"
make -j$JOBS
make install
# clean the build tree
make distclean
# do release build of sdl
PATH="$stage"/bin/:"$PATH" \
CFLAGS="-I"$ZLIB_INCLUDE" -I"$PNG_INCLUDE" $RELEASE_CFLAGS" \
CXXFLAGS="-I"$ZLIB_INCLUDE" -I"$PNG_INCLUDE" $RELEASE_CXXFLAGS" \
CPPFLAGS="-I"$ZLIB_INCLUDE" -I"$PNG_INCLUDE" $RELEASE_CPPFLAGS" \
LDFLAGS="-L"$stage/packages/lib/release" -L"$stage/lib/release" $opts" \
./configure --with-pic \
--prefix="$stage" --libdir="$stage/lib/release" --includedir="$stage/include"
make -j$JOBS
make install
# clean the build tree
make distclean
popd
;;
*)
exit -1
;;
esac
mkdir -p "$stage/LICENSES"
cp "$TOP/$SDL_SOURCE_DIR/COPYING" "$stage/LICENSES/SDL.txt"
mkdir -p "$stage"/docs/SDL/
cp -a "$TOP"/README.Linden "$stage"/docs/SDL/
echo "$SDL_VERSION" > "$stage/VERSION.txt"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment