Clone from "lat9nq/ext-linux-bin/gcc-13"

This commit is contained in:
ascpixi 2024-03-05 01:54:12 +01:00
commit 4fc2d28840
46 changed files with 421 additions and 0 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "hidapi/hidapi"]
path = hidapi/hidapi
url = https://github.com/libusb/hidapi.git

4
README.md Normal file
View file

@ -0,0 +1,4 @@
# ext-linux-bin
Repository of binaries for the linux-fresh container.

Binary file not shown.

Binary file not shown.

BIN
appimage/exec-x86_64.so Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

23
binutils/build.sh Normal file
View file

@ -0,0 +1,23 @@
#!/bin/bash
set -e
# This script is meant to make it easy to build GNU binutils using a Docker container.
THIS=$(readlink -e $0)
USER_ID=`id -u`
GROUP_ID=`id -g`
VERSION=2.40
UBUNTU=focal
PKG=binutils-${VERSION}
OUT=$PKG-$UBUNTU
wget -nc https://ftp.gnu.org/gnu/binutils/$PKG.tar.xz
tar xf $PKG.tar.xz
mkdir -p $OUT | true
docker run -v $(pwd):/src -w /src -u root -t yuzuemu/build-environments:linux-fresh /bin/bash /src/docker.sh $VERSION $UBUNTU
cp -v $THIS $OUT
tar cv $OUT | xz -T0 -c | split --bytes=90MB - $OUT.tar.xz.

16
binutils/docker.sh Normal file
View file

@ -0,0 +1,16 @@
#!/bin/bash
set -e
THIS=$(readlink -e $0)
VERSION=$1
UBUNTU=$2
OUT=/src/binutils-$VERSION-$UBUNTU
mkdir build
cd build
/src/binutils-$VERSION/configure
make -j$(nproc)
make -j$(nproc) install DESTDIR=$OUT
cp $THIS $OUT

BIN
boost/boost-1_79_0.tar.xz Normal file

Binary file not shown.

BIN
boost/boost-1_81_0.tar.xz Normal file

Binary file not shown.

BIN
boost/boost_1_75_0.tar.xz Normal file

Binary file not shown.

18
boost/build.sh Normal file
View file

@ -0,0 +1,18 @@
#!/bin/bash
set -e
# This script is meant to make it easy to build a package using a Docker container.
# Run this from the same directory as source directory
THIS=$(readlink -e $0)
USER_ID=`id -u`
GROUP_ID=`id -g`
VERSION=1_81_0
PKG_NAME=boost
mkdir -p $PKG_NAME-$VERSION
docker run -v $(pwd):/src -w /src -u root -t yuzuemu/build-environments:linux-fresh /bin/bash -ex /src/docker.sh $PKG_NAME $VERSION
cp -v $THIS $PKG_NAME-$VERSION/
tar cv $PKG_NAME-$VERSION | xz -T0 -c > $PKG_NAME-$VERSION.tar.xz

12
boost/docker.sh Normal file
View file

@ -0,0 +1,12 @@
#!/bin/bash
set -e
THIS=$(readlink -e $0)
PKG_NAME=$1
VERSION=$2
cd /src/${PKG_NAME}_${VERSION}
/bin/bash /src/${PKG_NAME}_${VERSION}/bootstrap.sh
./b2 --prefix=/src/${PKG_NAME}-${VERSION}/usr/local install
cp $THIS /src/${PKG_NAME}-${VERSION}

25
gcc/build_gcc.sh Normal file
View file

@ -0,0 +1,25 @@
#!/bin/bash
set -e
# This script is meant to make it easy to build GCC using a Docker container.
THIS=$(readlink -e $0)
USER_ID=`id -u`
GROUP_ID=`id -g`
VERSION=13.1.0
if [ ! -d gcc ]; then
git clone --depth 1 -b "releases/gcc-$VERSION" git://gcc.gnu.org/git/gcc.git
else
cd gcc
sudo git clean -fxd
git restore :/
cd ..
fi
mkdir -p gcc-$VERSION | true
docker run -v $(pwd):/src -w /src -u root -t yuzuemu/build-environments:linux-fresh /bin/bash /src/docker.sh $VERSION
cp -v $THIS gcc-$VERSION/
tar cv gcc-$VERSION | xz -T0 -c | split --bytes=95MB - gcc-$VERSION.tar.xz.

160
gcc/deploy-linux.sh Normal file
View file

@ -0,0 +1,160 @@
#!/bin/bash
# [DEPLOY_QT=1] deploy-linux.sh <executable>
# (Simplified) bash re-implementation of [linuxdeploy](https://github.com/linuxdeploy).
# Reads [executable] and copies required libraries to [AppDir]/usr/lib
# Copies the desktop and svg icon to [AppDir]
# Respects the AppImage excludelist
#
# Unlike linuxdeploy, this does not:
# - Copy any icon other than svg (too lazy to add that without a test case)
# - Do any verification on the desktop file
# - Run any linuxdeploy plugins
# - *Probably other things I didn't know linuxdeploy can do*
#
# It notably also does not copy unneeded libraries, unlike linuxdeploy. On a desktop system, this
# can help reduce the end AppImage's size, although in a production system this script proved
# unhelpful.
#~ set -x
export _PREFIX="/usr"
export _LIB_DIRS="lib64 lib"
export _QT_PLUGIN_PATH="${_PREFIX}/lib64/qt5/plugins"
export _EXCLUDES="ld-linux.so.2 ld-linux-x86-64.so.2 libanl.so.1 libBrokenLocale.so.1 libcidn.so.1 \
libc.so.6 libdl.so.2 libm.so.6 libmvec.so.1 libnss_compat.so.2 libnss_dns.so.2 libnss_files.so.2 \
libnss_hesiod.so.2 libnss_nisplus.so.2 libnss_nis.so.2 libpthread.so.0 libresolv.so.2 librt.so.1 \
libthread_db.so.1 libutil.so.1 libstdc++.so.6 libGL.so.1 libEGL.so.1 libGLdispatch.so.0 \
libGLX.so.0 libOpenGL.so.0 libdrm.so.2 libglapi.so.0 libgbm.so.1 libxcb.so.1 libX11.so.6 \
libasound.so.2 libfontconfig.so.1 libthai.so.0 libfreetype.so.6 libharfbuzz.so.0 libcom_err.so.2 \
libexpat.so.1 libgcc_s.so.1 libgpg-error.so.0 libICE.so.6 libp11-kit.so.0 libSM.so.6 \
libusb-1.0.so.0 libuuid.so.1 libz.so.1 libpangoft2-1.0.so.0 libpangocairo-1.0.so.0 \
libpango-1.0.so.0 libgpg-error.so.0 libjack.so.0 libxcb-dri3.so.0 libxcb-dri2.so.0 \
libfribidi.so.0 libgmp.so.10"
export _EXECUTABLE="$1"
# Get possible system library paths
export _SYSTEM_PATHS=$(echo -n $PATH | tr ":" " ")
export _SEARCH_PATHS=
for i in ${_LIB_DIRS}; do
for j in ${_SYSTEM_PATHS}; do
_TRY_PATH="$(readlink -e "$j/../$i" || true)"
if [[ -n "${_TRY_PATH}" ]]; then
_SEARCH_PATHS="${_SEARCH_PATHS} ${_TRY_PATH}"
fi
done
done
_SEARCH_PATHS="${_SEARCH_PATHS} $(patchelf --print-rpath $_EXECUTABLE | tr ':' ' ')"
# Get a list of only unique ones
_SEARCH_PATHS=$(echo -n "${_SEARCH_PATHS}" | sed 's/ /\n/g' | sort -u)
# find_library [library]
# Finds the full path of partial name [library] in _SEARCH_PATHS
# This is a time-consuming function.
_NOT_FOUND=""
function find_library {
local _PATH=""
for i in ${_SEARCH_PATHS}; do
_PATH=$(find $i -regex ".*$(echo -n $1 | tr '+' '.')" -print -quit)
if [ "$_PATH" != "" ]; then
break
fi
done
if [ "$_PATH" != "" ]; then
echo -n $(readlink -e $_PATH)
fi
}
# get_dep_names [object]
# Returns a space-separated list of all required libraries needed by [object].
function get_dep_names {
echo -n $(patchelf --print-needed $1)
}
# get_deps [object] [library_path]
# Finds and installs all libraries required by [object] to [library_path].
# This is a recursive function that also depends on find_library.
function get_deps {
local _DEST=$2
for i in $(get_dep_names $1); do
_EXCL=`echo "$_EXCLUDES" | tr ' ' '\n' | grep $i`
if [ "$_EXCL" != "" ]; then
#>&2 echo "$i is on the exclude list... skipping"
continue
fi
if [ -f $_DEST/$i ]; then
continue
fi
local _LIB=$(find_library $i)
if [ -z $_LIB ]; then
echo -n "$i:"
continue
fi
>&2 cp -v $_LIB $_DEST/$i &
get_deps $_LIB $_DEST
done
}
export -f get_deps
export -f get_dep_names
export -f find_library
_ERROR=0
if [ -z "$_EXECUTABLE" ]; then
_ERROR=1
fi
if [ "$_ERROR" -eq 1 ]; then
>&2 echo "usage: $0 <executable> [AppDir]"
exit 1
fi
LIB_DIR="$(readlink -m $(dirname $_EXECUTABLE)/../lib)"
mkdir -p $LIB_DIR
_NOT_FOUND=$(get_deps $_EXECUTABLE $LIB_DIR)
if [ "${DEPLOY_QT}" == "1" ]; then
# Find Qt path from search paths
for i in ${_SEARCH_PATHS}; do
_QT_CORE_LIB=$(find ${i} -type f -regex '.*/libQt5Core\.so.*' | head -n 1)
if [ -n "${_QT_CORE_LIB}" ]; then
_QT_PATH=$(dirname ${_QT_CORE_LIB})/../
break
fi
done
_QT_PLUGIN_PATH=$(readlink -e $(find ${_QT_PATH} -type d -regex '.*/plugins/platforms' | head -n 1)/../)
mkdir -p ${LIB_DIR}/../plugins/platforms
cp -nv "${_QT_PLUGIN_PATH}/platforms/libqxcb.so" ${LIB_DIR}/../plugins/platforms/
# Find any remaining libraries needed for Qt libraries
_NOT_FOUND+=$(get_deps ${LIB_DIR}/../plugins/platforms/libqxcb.so $LIB_DIR)
for i in audio bearer imageformats mediaservice platforminputcontexts platformthemes xcbglintegrations; do
mkdir -p ${LIB_DIR}/../plugins/${i}
cp -rnv ${_QT_PLUGIN_PATH}/${i}/*.so ${LIB_DIR}/../plugins/${i}
find ${LIB_DIR}/../plugins/ -type f -regex '.*\.so' -exec patchelf --set-rpath '$ORIGIN/../../lib:$ORIGIN' {} ';'
# Find any remaining libraries needed for Qt libraries
_NOT_FOUND+=$(find ${LIB_DIR}/../plugins/${i} -type f -exec bash -c "get_deps {} $LIB_DIR" ';')
done
_QT_CONF=${LIB_DIR}/../bin/qt.conf
echo "[Paths]" > ${_QT_CONF}
echo "Prefix = ../" >> ${_QT_CONF}
echo "Plugins = plugins" >> ${_QT_CONF}
echo "Imports = qml" >> ${_QT_CONF}
echo "Qml2Imports = qml" >> ${_QT_CONF}
fi
# Fix rpath of libraries and executable so they can find the packaged libraries
find ${LIB_DIR} -type f -exec patchelf --set-rpath '$ORIGIN' {} ';'
patchelf --set-rpath '$ORIGIN/../lib' $_EXECUTABLE
_APPDIR=$2
cd ${_APPDIR}
cp -nvs $(find -type f -regex '.*/icons/.*\.svg' || head -n 1) ./
cp -nvs $(find -type f -regex '.*/applications/.*\.desktop' || head -n 1) ./
if [ "${_NOT_FOUND}" != "" ]; then
>&2 echo "WARNING: failed to find the following libraries:"
>&2 echo "$(echo -n $_NOT_FOUND | tr ':' '\n' | sort -u)"
fi

13
gcc/docker.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
set -e
THIS=$(readlink -e $0)
mkdir gcc/build
cd gcc/build
/src/gcc/configure --enable-languages=c,c++ --disable-multilib
make -j$(nproc)
mkdir gcc-$1 | true
make -j$(nproc) install DESTDIR=/src/gcc-$1
cp $THIS /src/gcc-$1

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
gcc/gcc-13.1.0.tar.xz.aa Normal file

Binary file not shown.

BIN
gcc/gcc-13.1.0.tar.xz.ab Normal file

Binary file not shown.

BIN
gcc/gcc-13.1.0.tar.xz.ac Normal file

Binary file not shown.

BIN
gcc/gcc-13.1.0.tar.xz.ad Normal file

Binary file not shown.

37
hidapi/build_hidapi.sh Normal file
View file

@ -0,0 +1,37 @@
#!/bin/bash
# This script is meant to make it easy to rebuild packages using the
# linux-fresh yuzu-emu container.
# Run this from within the source directory
THIS=$(readlink -e $0)
USER_ID=${1}
GROUP_ID=${2}
VERSION=$(cat VERSION | sed 's/\./_/g')
BASE_NAME=$(readlink -e $(pwd) | sed 's/.*\///g')
ARCHIVE_NAME=${BASE_NAME}_${VERSION}.tar.xz
./bootstrap
mkdir build || true
cd build
../configure
make -j$(nproc)
make install DESTDIR=$(pwd)/out
cd ..
mkdir -pv ${BASE_NAME}/
mv -v build/out/usr/local/* ${BASE_NAME}/
cp -v ${THIS} ${BASE_NAME}/
tar cv ${BASE_NAME} | xz -c > ${ARCHIVE_NAME}
if [ -e ${ARCHIVE_NAME} ]; then
echo "hidapi package can be found at $(readlink -e ${ARCHIVE_NAME})"
fi

BIN
hidapi/hidapi_0_10_1.tar.xz Normal file

Binary file not shown.

19
hidapi/start_build.sh Normal file
View file

@ -0,0 +1,19 @@
#!/bin/bash
# Kicks off the build script using the linux-fresh build container.
if [ "$#" -ne 2 ]; then
echo "usage: $0 <Source directory> <Build script>"
exit
fi
UID=`id -u`
GID=`id -g`
SRC_DIR=$(readlink -e $1)
SRC_DIR_BASENAME=$(basename ${SRC_DIR})
SCRIPT=$(readlink -e $2)
SCRIPT_BASENAME=$(basename ${SCRIPT})
cp ${SCRIPT} ${SRC_DIR}
docker run -v ${SRC_DIR}:/${SRC_DIR_BASENAME} -w /${SRC_DIR_BASENAME} -u root -t yuzuemu/build-environments:linux-fresh /bin/bash /${SRC_DIR_BASENAME}/${SCRIPT_BASENAME} ${UID} ${GID}

22
icu/build_icu.sh Normal file
View file

@ -0,0 +1,22 @@
#!/bin/bash
# This script is meant to make it easy to rebuild packages using the
# linux-fresh yuzu-emu container.
# Run this from within the source directory
THIS=$(readlink -e $0)
USER_ID=${1}
GROUP_ID=${2}
VERSION=5_15_2
BASE_NAME=$(readlink -e $(pwd) | sed 's/.*\///g')
ARCHIVE_NAME=${BASE_NAME}_${VERSION}.tar.xz
NUM_CORES=$(nproc)
mkdir build || true
cd build
mkdir out || true
../configure
make -j${NUM_CORES} install DESTDIR=out

22
icu/start_build.sh Normal file
View file

@ -0,0 +1,22 @@
#!/bin/bash
# Kicks off the build script using the linux-fresh build container.
if [ "$#" -ne 2 ]; then
echo "usage: $0 <Source directory> <Build script>"
exit
fi
UID=`id -u`
GID=`id -g`
SRC_DIR=$(readlink -e $1)
SRC_DIR_BASENAME=$(basename ${SRC_DIR})
SCRIPT=$(readlink -e $2)
SCRIPT_BASENAME=$(basename ${SCRIPT})
cp ${SCRIPT} ${SRC_DIR}
docker run -v ${SRC_DIR}:/${SRC_DIR_BASENAME} -w /${SRC_DIR_BASENAME} -u root -t yuzuemu/build-environments:linux-fresh /bin/bash /${SRC_DIR_BASENAME}/${SCRIPT_BASENAME} ${UID} ${GID}
exit
SRC_DIR=${SRC_DIR}/qtwebengine
docker run -v ${SRC_DIR}:/${SRC_DIR_BASENAME} -w /${SRC_DIR_BASENAME} -u root -t yuzuemu/build-environments:linux-fresh /bin/bash /${SRC_DIR_BASENAME}/${SCRIPT_BASENAME} ${UID} ${GID}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

25
qt/build_qt.sh Normal file
View file

@ -0,0 +1,25 @@
#!/bin/bash
# This script is meant to make it easy to rebuild packages using the
# linux-fresh yuzu-emu container.
# Run this from within the source directory
THIS=$(readlink -e $0)
USER_ID=${1}
GROUP_ID=${2}
VERSION=5_15_2
BASE_NAME=$(readlink -e $(pwd) | sed 's/.*\///g')
ARCHIVE_NAME=${BASE_NAME}_${VERSION}.tar.xz
NUM_CORES=$(nproc)
mkdir build || true
cd build
mkdir out || true
../configure -opensource -confirm-license -prefix $(pwd)/out -xcb -xcb-xlib -qpa xcb -xkbcommon -gtk -icu
make -j${NUM_CORES} NINJAJOBS=-j${NUM_CORES}
make -j${NUM_CORES} install DESTDIR=out
# Don't forget to include ICU libraries, then run `patchelf --set-rpath '$ORIGIN/../lib' [library]` on all of them

BIN
qt/qt5_5_15_2.tar.xz Normal file

Binary file not shown.

22
qt/start_build.sh Normal file
View file

@ -0,0 +1,22 @@
#!/bin/bash
# Kicks off the build script using the linux-fresh build container.
if [ "$#" -ne 2 ]; then
echo "usage: $0 <Source directory> <Build script>"
exit
fi
UID=`id -u`
GID=`id -g`
SRC_DIR=$(readlink -e $1)
SRC_DIR_BASENAME=$(basename ${SRC_DIR})
SCRIPT=$(readlink -e $2)
SCRIPT_BASENAME=$(basename ${SCRIPT})
cp ${SCRIPT} ${SRC_DIR}
docker run -v ${SRC_DIR}:/${SRC_DIR_BASENAME} -w /${SRC_DIR_BASENAME} -u root -t yuzuemu/build-environments:linux-fresh /bin/bash /${SRC_DIR_BASENAME}/${SCRIPT_BASENAME} ${UID} ${GID}
exit
SRC_DIR=${SRC_DIR}/qtwebengine
docker run -v ${SRC_DIR}:/${SRC_DIR_BASENAME} -w /${SRC_DIR_BASENAME} -u root -t yuzuemu/build-environments:linux-fresh /bin/bash /${SRC_DIR_BASENAME}/${SCRIPT_BASENAME} ${UID} ${GID}