diff options
author | Xenhat Hex | 2023-06-20 15:09:25 -0400 |
---|---|---|
committer | Xenhat Hex | 2023-06-20 15:09:25 -0400 |
commit | 66fa8173639944d8b6867ba9089424f0b975efdd (patch) | |
tree | bbb1cb667fc31c0b1cb060f5ee22ba39563dada6 | |
parent | cea44c95d37bd1ed1649db7e538139173a78a509 (diff) | |
download | aur-66fa8173639944d8b6867ba9089424f0b975efdd.tar.gz |
Updage PKGBUILD for new upstream code
-rw-r--r-- | .SRCINFO | 8 | ||||
-rwxr-xr-x | PKGBUILD | 205 |
2 files changed, 102 insertions, 111 deletions
@@ -1,7 +1,7 @@ pkgbase = alchemy-next-viewer-git - pkgver = 6.11.50933.b7b3c99172 - pkgrel = 2 pkgdesc = A Second Life client with focus on performance and code correctness. + pkgver = 7.0.53076.e5bd8f85cf + pkgrel = 1 url = https://www.alchemyviewer.org install = alchemy.install arch = x86_64 @@ -11,9 +11,7 @@ pkgbase = alchemy-next-viewer-git makedepends = python-pip makedepends = git makedepends = xz - depends = dbus-glib depends = glu - depends = gtk3 depends = libgl depends = libiconv depends = libidn @@ -28,6 +26,8 @@ pkgbase = alchemy-next-viewer-git depends = vlc depends = xdg-desktop-portal depends = zlib + depends = dbus-glib + depends = systemd-libs optdepends = alsa-lib: ALSA support optdepends = freealut: OpenAL support optdepends = gamemode: Gamemode support @@ -4,8 +4,8 @@ # # shellcheck disable=2034,3030,2154 pkgname=alchemy-next-viewer-git -pkgver=6.11.50933.b7b3c99172 -pkgrel=2 +pkgver=7.0.53076.e5bd8f85cf +pkgrel=1 pkgdesc="A Second Life client with focus on performance and code correctness." arch=('x86_64') license=('LGPL') @@ -36,126 +36,118 @@ _distname="Alchemy-Config-Simple" # template start; name=systemd-git; version=1.0; _distdir="${_distname}-${pkgver}" -depends+=(systemd-libs) +depends+=(dbus-glib systemd-libs) conflicts+=("alchemy-next-viewer-nosystemd-git") pkgver() { cd "${pkgname}" || exit 1 ( - set -o pipefail - vwr_version=$(cat indra/newview/VIEWER_VERSION.txt) - rev=$(git rev-list --count HEAD) - short=$(git rev-parse --short HEAD) - printf "%s.%s.%s" "${vwr_version}" "${rev}" "${short}" - ) + set -o pipefail + vwr_version=$(cat indra/newview/VIEWER_VERSION.txt) + rev=$(git rev-list --count HEAD) + short=$(git rev-parse --short HEAD) + printf "%s.%s.%s" "${vwr_version}" "${rev}" "${short}" +) } -prepare() { - cd "${pkgname}" || exit 1 - export USE_VENV=1 # template start; name=prepare; version=1.0; -if [[ -n "$USE_VENV" ]]; then - virtualenv ".venv" -p python3 - . ".venv/bin/activate" -fi - -echo "Installing build toolchain..." -pip3 install --break-system-packages certifi -pip3 install --break-system-packages llbase -pip3 install --break-system-packages autobuild -pip3 install --break-system-packages cmake ninja +prepare() { + cd ${srcdir} || exit + echo "Creating virtual environment in $PWD" + virtualenv ".venv" -p python3 + source "${srcdir}/.venv/bin/activate" -# vi: set ai softtabstop=2 shiftwidth=2 tabstop=2 expandtab ft=sh : -# template end; + echo "Installing build toolchain..." + pip3 install --upgrade certifi --quiet + pip3 install --upgrade llbase --quiet + pip3 install --no-cache --upgrade autobuild --quiet + pip3 install --upgrade cmake ninja } +# template end; +# template start; name=build; version=1.0; build() { cd "${pkgname}" || exit 1 - export USE_VENV=1 -# template start; name=build; version=1.0; -if command -v schedtool >/dev/null 2>&1; then - # Set current shell and all descendents as SCHED_BATCH, see schedtool(8) - schedtool -B $$ - prefix_cmd='schedtool -B -n20 -e ' -fi - if [[ -n "$USE_VENV" ]]; then - . ".venv/bin/activate" - fi - build_jobs=$(nproc) - if [[ -z "$NO_SMART_JOB_COUNT" ]]; then - if [[ ${build_jobs} -gt 1 ]]; then - jobs=1 - # The viewer requires an average of 2GB of memory per core to link - # Note: Behaviour change compared to the previous versions: - # This script will no longer try to allocate build memory into swap - # This is bad practice, and swap should be reserved to evict process - # memory from physical ram to make place for the current workset. - # This script will now try to check if swap is present and sufficent - # for the current used memory to be stored in swap before allocating, - # and will fallback to conservative allocation if swap is not available - gigperlinkprocess=2 - mempercorekb=$((gigperlinkprocess * 1048576)) - requiredmemorykb=$(($(nproc) * mempercorekb)) - free_output="$(free --kilo --total | tail -n+2 | tr -s ' ')" - physical_output=$(grep "Mem:" <<<"$free_output") - #total_output=$(grep Total: <<< "$free_output") - usedmemorykbphysical=$(cut -d ' ' -f 3 <<<"$physical_output") - totalmemorykbphysical=$(cut -d ' ' -f 2 <<<"$physical_output") - swap_output=$(grep Swap: <<<"$free_output") - # Determine available swap space - availableswapkb=0 - if [[ -n "$swap_output" ]]; then - availableswapkb=$(cut -d ' ' -f 4 <<<"$swap_output") - fi - availablememorykbphysical=$(cut -d ' ' -f 7 <<<"$free_output") - echo "Total memory: $totalmemorykbphysical (includes swap)" - echo "Available memory: $availablememorykbphysical" - echo "Required memory: $requiredmemorykb" - echo "Available physical memory on this system: $((availablememorykbphysical / 1024 / 1024)) GB" - echo "Estimated required memory to build with all cores: $((requiredmemorykb / 1024 / 1024)) GB" - if [[ ${requiredmemorykb} -gt ${availablememorykbphysical} ]]; then - echo "Warning: Not enough available physical memory to build with all cores" - if [[ ${usedmemorykbphysical} -lt ${availableswapkb} ]]; then - # use all physical ram as swap will do its job - echo "There is enough free swap to store the currently used memory" - jobs=$(((totalmemorykbphysical / 1024 / 1024) / gigperlinkprocess)) - else - # Not enough swap to hold ram contents, calculate manually - echo "Allocating build jobs according to available physical memory ("$((availablememorykbphysical / 1024 / 1024))"/"$((requiredmemorykb / 1024 / 1024))"GB)..." - # FIXME: Goes one iteration beyond what it should - while [[ $((jobs * mempercorekb)) -lt ${availablememorykbphysical} ]]; do - jobs=$((jobs + 1)) - echo -e "${jobs} jobs would consume $(((jobs * mempercorekb) / 1024 / 1024))GB" - done - # Back off one job count. Not sure why I have to do this but - # the loop is doing one extra iteration. - jobs=$((jobs - 1)) - fi - build_jobs=${jobs} - echo "Computed job count: ${build_jobs}" - fi - fi - fi - export AUTOBUILD_CPU_COUNT=$build_jobs - AL_CMAKE_CONFIG=( - -DLL_TESTS:BOOL=ON - -DDISABLE_FATAL_WARNINGS=ON - -DUSE_LTO:BOOL=OFF - -DVIEWER_CHANNEL="Alchemy Test" - ) - echo "BUILDENV: ${BUILDENV[*]}" - if [[ " ${BUILDENV[*]} " =~ ' ccache ' ]] && command -v ccache; then - echo "------ Will Use CCACHE ------" - CMAKE_CXX_COMPILER_LAUNCHER="$(which ccache)" - export CMAKE_CXX_COMPILER_LAUNCHER + source "${srcdir}/.venv/bin/activate" + if command -v schedtool >/dev/null 2>&1; then + # Set current shell and all descendents as SCHED_BATCH, see schedtool(8) + schedtool -B $$ + prefix_cmd='schedtool -B -n20 -e ' fi - $prefix_cmd autobuild configure -A 64 -c ReleaseOS -- "${AL_CMAKE_CONFIG[@]}" - echo "Building with ${AUTOBUILD_CPU_COUNT} jobs (adjusted)" - $prefix_cmd autobuild build -A64 -c ReleaseOS --no-configure + build_jobs=$(nproc) + if [[ -z "$NO_SMART_JOB_COUNT" ]]; then + if [[ ${build_jobs} -gt 1 ]]; then + jobs=1 + # The viewer requires an average of 2GB of memory per core to link + # Note: Behaviour change compared to the previous versions: + # This script will no longer try to allocate build memory into swap + # This is bad practice, and swap should be reserved to evict process + # memory from physical ram to make place for the current workset. + # This script will now try to check if swap is present and sufficent + # for the current used memory to be stored in swap before allocating, + # and will fallback to conservative allocation if swap is not available + gigperlinkprocess=2 + mempercorekb=$((gigperlinkprocess * 1048576)) + requiredmemorykb=$(($(nproc) * mempercorekb)) + free_output="$(free --kilo --total | tail -n+2 | tr -s ' ')" + physical_output=$(grep "Mem:" <<<"$free_output") + #total_output=$(grep Total: <<< "$free_output") + usedmemorykbphysical=$(cut -d ' ' -f 3 <<<"$physical_output") + totalmemorykbphysical=$(cut -d ' ' -f 2 <<<"$physical_output") + swap_output=$(grep Swap: <<<"$free_output") + # Determine available swap space + availableswapkb=0 + if [[ -n "$swap_output" ]]; then + availableswapkb=$(cut -d ' ' -f 4 <<<"$swap_output") + fi + availablememorykbphysical=$(cut -d ' ' -f 7 <<<"$free_output") + echo "Total memory: $totalmemorykbphysical (includes swap)" + echo "Available memory: $availablememorykbphysical" + echo "Required memory: $requiredmemorykb" + echo "Available physical memory on this system: $((availablememorykbphysical / 1024 / 1024)) GB" + echo "Estimated required memory to build with all cores: $((requiredmemorykb / 1024 / 1024)) GB" + if [[ ${requiredmemorykb} -gt ${availablememorykbphysical} ]]; then + echo "Warning: Not enough available physical memory to build with all cores" + if [[ ${usedmemorykbphysical} -lt ${availableswapkb} ]]; then + # use all physical ram as swap will do its job + echo "There is enough free swap to store the currently used memory" + jobs=$(((totalmemorykbphysical / 1024 / 1024) / gigperlinkprocess)) + else + # Not enough swap to hold ram contents, calculate manually + echo "Allocating build jobs according to available physical memory ("$((availablememorykbphysical / 1024 / 1024))"/"$((requiredmemorykb / 1024 / 1024))"GB)..." + # FIXME: Goes one iteration beyond what it should + while [[ $((jobs * mempercorekb)) -lt ${availablememorykbphysical} ]]; do + jobs=$((jobs + 1)) + echo -e "${jobs} jobs would consume $(((jobs * mempercorekb) / 1024 / 1024))GB" + done + # Back off one job count. Not sure why I have to do this but + # the loop is doing one extra iteration. + jobs=$((jobs - 1)) + fi + build_jobs=${jobs} + echo "Computed job count: ${build_jobs}" + fi + fi + fi + export AUTOBUILD_CPU_COUNT=$build_jobs + AL_CMAKE_CONFIG=( + -DLL_TESTS:BOOL=ON + -DDISABLE_FATAL_WARNINGS=ON + -DUSE_LTO:BOOL=OFF + -DVIEWER_CHANNEL="Alchemy Test" + ) + echo "BUILDENV: ${BUILDENV[*]}" + if [[ " ${BUILDENV[*]} " =~ ' ccache ' ]] && command -v ccache; then + echo "------ Will Use CCACHE ------" + CMAKE_CXX_COMPILER_LAUNCHER="$(which ccache)" + export CMAKE_CXX_COMPILER_LAUNCHER + fi + $prefix_cmd autobuild configure -A 64 -c ReleaseOS -- "${AL_CMAKE_CONFIG[@]}" + echo "Building with ${AUTOBUILD_CPU_COUNT} jobs (adjusted)" + $prefix_cmd autobuild build -A64 -c ReleaseOS --no-configure + } -# vi: set ai softtabstop=2 shiftwidth=2 tabstop=2 expandtab ft=sh : # template end; -} package() { mkdir -p "${pkgdir}/opt" @@ -165,6 +157,5 @@ package() { sed -i 's;alchemy-viewer\.desktop;'"${pkgname}\.desktop"';' "${pkgname}/build-linux-64/newview/packaged/etc/refresh_desktop_app_entry.sh" mv "${pkgname}/build-linux-64/newview/packaged" "${pkgdir}/opt/${pkgname}" } -# vi: set ai softtabstop=2 shiftwidth=2 tabstop=2 expandtab ft=bash : # template end; |