-
-
Save BobAarons/b5129854a7b940e98bc28fd0d9edab6b to your computer and use it in GitHub Desktop.
chatterino2-7tv-git updated for qt6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: zneix <zneix@zneix.eu> | |
pkgname=chatterino2-7tv-git | |
_pkgname=chatterino7 | |
pkgver=7.5.0.beta.1.r0.gdb4456f3 | |
pkgrel=1 | |
pkgdesc='A fork of Chatterino2 with built-in support for 7tv emotes' | |
arch=('any') | |
url=https://github.com/SevenTV/chatterino7 | |
license=('MIT') | |
depends=('qt6-base' 'qt6-tools' 'boost-libs' 'openssl' 'qt6-imageformats' 'qtkeychain-qt6' 'qt6-5compat' 'qt6-svg') | |
makedepends=('git' 'boost' 'cmake') | |
optdepends=('streamlink: For piping streams to video players' | |
'pulseaudio: For audio output') | |
provides=('chatterino') | |
conflicts=('chatterino2-git' 'chatterino2-appimage' 'chatterino2-nightly-appimage') | |
install=$pkgname.install | |
source=("git+https://github.com/SevenTV/chatterino7" | |
"git+https://github.com/Chatterino/libcommuni#branch=chatterino-cmake" | |
"git+https://github.com/pajlada/settings" | |
"git+https://github.com/pajlada/signals" | |
"git+https://github.com/pajlada/serialize" | |
"git+https://github.com/Tencent/rapidjson" | |
"git+https://github.com/zaphoyd/websocketpp" | |
"git+https://github.com/arsenm/sanitizers-cmake" | |
"git+https://github.com/Neargye/magic_enum" | |
"git+https://github.com/mackron/miniaudio" | |
"git+https://github.com/Chatterino/crash-handler") | |
sha256sums=('SKIP' | |
'SKIP' | |
'SKIP' | |
'SKIP' | |
'SKIP' | |
'SKIP' | |
'SKIP' | |
'SKIP' | |
'SKIP' | |
'SKIP' | |
'SKIP') | |
# We temporarily disable LTO since we get an ICE when compiling with gcc since this commit https://github.com/Chatterino/chatterino2/commit/ed20e71db4c957d3b2a8ce9350b847f4c805cb83 | |
options=('!lto') | |
pkgver() { | |
cd "$srcdir/$_pkgname" | |
( set -o pipefail | |
git describe --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || | |
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | |
) | |
} | |
prepare () { | |
cd "$srcdir/$_pkgname" | |
git submodule init | |
git config submodule.cmake/sanitizers-cmake.url "$srcdir/sanitizers-cmake" | |
git config submodule.lib/libcommuni.url "$srcdir/libcommuni" | |
git config submodule.lib/settings.url "$srcdir/settings" | |
git config submodule.lib/signals.url "$srcdir/signals" | |
git config submodule.lib/serialize.url "$srcdir/serialize" | |
git config submodule.lib/rapidjson.url "$srcdir/rapidjson" | |
git config submodule.lib/websocketpp.url "$srcdir/websocketpp" | |
git config submodule.lib/miniaudio.url "$srcdir/miniaudio" | |
git config submodule.lib/magicenum.url "$srcdir/magicenum" | |
git config submodule.tools/crash-handler.url "$srcdir/crash-handler" | |
git -c protocol.file.allow=always submodule update | |
} | |
build() { | |
cd "$srcdir/$_pkgname" | |
mkdir -p build | |
cd build | |
declare -a flags | |
if [[ $CXXFLAGS == *"-flto"* ]]; then | |
flags+=("-DCHATTERINO_LTO=ON") | |
fi | |
cmake \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DUSE_SYSTEM_QTKEYCHAIN=ON \ | |
-DUSE_PRECOMPILED_HEADERS=OFF \ | |
-DBUILD_WITH_QT6=ON \ | |
-DCHATTERINO_UPDATER=OFF \ | |
"${flags[@]}" \ | |
.. | |
cmake --build . | |
} | |
package() { | |
cd "$srcdir/$_pkgname" | |
if [ -f "build/bin/chatterino" ] && [ -x "build/bin/chatterino" ]; then | |
echo "Getting chatterino binary from bin folder" | |
install -Dm755 "build/bin/chatterino" "$pkgdir/usr/bin/chatterino" | |
else | |
echo "Getting chatterino binary from NON-BIN folder" | |
# System ccache is enabled, causing the binary file to not fall into the bin folder | |
# Temporary solution until we have figured out a way to stabilize the ccache output | |
install -Dm755 "build/chatterino" "$pkgdir/usr/bin/chatterino" | |
fi | |
install -Dm644 "resources/com.chatterino.chatterino.desktop" "$pkgdir/usr/share/applications/com.chatterino.chatterino.desktop" | |
install -Dm644 "resources/icon.png" "$pkgdir/usr/share/pixmaps/com.chatterino.chatterino.png" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment