Commit a438efc8 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Add autobuild skeleton

parent 9e66c018
stage/
autobuild-parabuild-bootstrap/
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
llbase = "*"
certifi = "*"
autobuild = {git = "https://git.alchemyviewer.org/alchemy/autobuild.git"}
[requires]
python_version = "2.7"
<?xml version="1.0" ?>
<llsd>
<map>
<key>package_description</key>
<map>
<key>canonical_repo</key>
<string>https://git.alchemyviewer.org/alchemy/thirdparty/3p-libepoxy</string>
<key>copyright</key>
<string>Copyright © 2013-2014 Intel Corporation</string>
<key>description</key>
<string>Epoxy is a library for handling OpenGL function pointer management for you.</string>
<key>license</key>
<string>MIT</string>
<key>license_file</key>
<string>LICENSES/libepoxy.txt</string>
<key>name</key>
<string>libepoxy</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>-c</string>
<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>LICENSES/libepoxy.txt</string>
<string>include/epoxy/*.h</string>
</array>
<key>name</key>
<string>common</string>
</map>
<key>darwin</key>
<map>
<key>configurations</key>
<map>
<key>Release</key>
<map>
<key>build</key>
<map>
</map>
<key>default</key>
<boolean>true</boolean>
<key>name</key>
<string>Release</string>
</map>
</map>
<key>manifest</key>
<array>
<string>lib/debug/*.dylib</string>
<string>lib/release/*.dylib</string>
</array>
<key>name</key>
<string>darwin</string>
</map>
<key>linux</key>
<map>
<key>configurations</key>
<map>
<key>Release</key>
<map>
<key>build</key>
<map>
</map>
<key>default</key>
<boolean>true</boolean>
<key>name</key>
<string>Release</string>
</map>
</map>
<key>manifest</key>
<array>
<string>lib/debug/*.so*</string>
<string>lib/debug/*.a</string>
<string>lib/release/*.so*</string>
<string>lib/release/*.a</string>
</array>
<key>name</key>
<string>linux</string>
</map>
<key>windows</key>
<map>
<key>configurations</key>
<map>
<key>Release</key>
<map>
<key>build</key>
<map>
</map>
<key>default</key>
<boolean>true</boolean>
<key>name</key>
<string>Release</string>
</map>
</map>
<key>manifest</key>
<array>
<string>lib/debug/*</string>
<string>lib/release/*</string>
</array>
<key>name</key>
<string>windows</string>
</map>
</map>
<key>source_directory</key>
<string>libepoxy</string>
<key>version_file</key>
<string>VERSION.txt</string>
</map>
<key>type</key>
<string>autobuild</string>
<key>version</key>
<string>1.3</string>
</map>
</llsd>
#!/usr/bin/env bash
cd "$(dirname "$0")"
# turn on verbose debugging output for parabuild logs.
exec 4>&1; export BASH_XTRACEFD=4; set -x
# make errors fatal
set -e
# complain about unset env variables
set -u
if [ -z "$AUTOBUILD" ] ; then
exit 1
fi
if [ "$OSTYPE" = "cygwin" ] ; then
autobuild="$(cygpath -u $AUTOBUILD)"
else
autobuild="$AUTOBUILD"
fi
top="$(pwd)"
stage="$(pwd)/stage"
mkdir -p $stage
# Load autobuild provided shell functions and variables
source_environment_tempfile="$stage/source_environment.sh"
"$autobuild" source_environment > "$source_environment_tempfile"
. "$source_environment_tempfile"
EPOXY_VERSION="1.5.4"
EPOXY_SOURCE_DIR="libepoxy"
VERSION_HEADER_FILE="$stage/include/epoxy/config.h"
build=${AUTOBUILD_BUILD_ID:=0}
# Create the staging folders
mkdir -p "$stage/lib"/{debug,release,relwithdebinfo}
mkdir -p "$stage/include/epoxy"
mkdir -p "$stage/LICENSES"
pushd "$EPOXY_SOURCE_DIR"
case "$AUTOBUILD_PLATFORM" in
# ------------------------ windows, windows64 ------------------------
windows*)
load_vsvars
if [ "$AUTOBUILD_ADDRSIZE" = 32 ]
then
archflags=""
else
archflags="/arch:AVX"
fi
meson build "_build" --prefix="${stage}"
mkdir -p "_build"
pushd "_build"
ninja
ninja install
popd
;;
"darwin")
;;
linux*)
;;
esac
mkdir -p "$stage/LICENSES"
cp COPYING "$stage/LICENSES/libepoxy.txt"
popd
# version will be (e.g.) "1.4.0"
version=`sed -n -E 's/#define PACKAGE_VERSION "([0-9])[.]([0-9])[.]([0-9]).*/\1.\2.\3/p' "${VERSION_HEADER_FILE}"`
# shortver will be (e.g.) "230": eliminate all '.' chars
#since the libs do not use micro in their filenames, chop off shortver at minor
short="$(echo $version | cut -d"." -f1-2)"
shortver="${short//.}"
echo "${version}.${build}" > "${stage}/VERSION.txt"
Supports Markdown
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