diff options
author | xiota | 2023-11-05 15:39:34 -0800 |
---|---|---|
committer | xiota | 2023-11-05 15:39:34 -0800 |
commit | 501b38cd1d7ecdf3bc1b07a4aa7b04a9c3b9b92c (patch) | |
tree | 4a2cb0e86e31b5e1149a69aa72c6075a7e1a40c7 | |
parent | 007c9c2ed82dd90d53ba805dc8a5580be348c90a (diff) | |
download | aur-501b38cd1d7ecdf3bc1b07a4aa7b04a9c3b9b92c.tar.gz |
metapackage
-rw-r--r-- | .SRCINFO | 55 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | fix-ffmpeg-build-for-tgcalls.patch | 57 | ||||
-rw-r--r-- | remove-ad.patch | 41 |
5 files changed, 16 insertions, 208 deletions
@@ -1,55 +1,8 @@ pkgbase = 64gram-desktop-no-ad - pkgdesc = Unofficial desktop version of Telegram messaging app (removed ad) - pkgver = 1.0.34 + pkgdesc = metapackage - migrate to 64gram-desktop + pkgver = 1.1.1 pkgrel = 1 - url = https://github.com/qwq233/64gram-aur - arch = x86_64 - license = GPL3 - makedepends = cmake - makedepends = git - makedepends = ninja - makedepends = python - makedepends = range-v3 - makedepends = tl-expected - makedepends = microsoft-gsl - makedepends = extra-cmake-modules - makedepends = gtk3 - makedepends = webkit2gtk - makedepends = abseil-cpp - depends = hunspell - depends = ffmpeg - depends = hicolor-icon-theme - depends = lz4 - depends = minizip - depends = openal - depends = qt6-5compat - depends = qt6-imageformats - depends = qt6-svg - depends = qt6-wayland - depends = xxhash - depends = libdbusmenu-qt5 - depends = kwayland - depends = glibmm - depends = rnnoise - depends = pipewire - depends = libxtst - depends = libxrandr - depends = jemalloc - depends = libtg_owt - depends = xz - depends = qt6-base - optdepends = gtk3: GTK environment integration - optdepends = webkit2gtk: embedded browser features - optdepends = ttf-opensans: default Open Sans font family - optdepends = xdg-desktop-portal: desktop integration - provides = 64gram-desktop-no-ad - conflicts = telegram-desktop - conflicts = tdesktop-x64 - conflicts = 64gram-desktop - replaces = tdesktop-x64 - source = https://github.com/TDesktop-x64/tdesktop/releases/download/v1.0.34/64Gram-1.0.34-full.tar.gz - source = remove-ad.patch - sha512sums = 8d11ff44d9b8a384180dab7cc4b03b58fba84819b092eb5044d32c27078c885d59b2e0c052336c33cd6c7c8bf40fec547e6724b8bb888efccbc46b481b44b27f - sha512sums = de0662d33062a8c169003095f73ce69f352c21873620841fd53c075ec18990d643fe0a88536aa3f5b9cca2d52a69c01d3e2ce0b279549f0c0ceb0a907e7e3ff7 + arch = any pkgname = 64gram-desktop-no-ad + depends = 64gram-desktop diff --git a/.gitignore b/.gitignore index 547c794ae1cc..018a3de08144 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -64Gram-*-full.tar.gz -64gram-desktop-*.pkg.tar.zst -src/ -pkg/ +* +!PKGBUILD +!.SRCINFO +!.gitignore @@ -1,59 +1,12 @@ -# Maintainer: qwq233 <qwq233@qwq2333.top> -pkgname=64gram-desktop-no-ad -_pkgname=64Gram -pkgver=1.0.34 -pkgrel=1 -pkgdesc='Unofficial desktop version of Telegram messaging app (removed ad)' -arch=('x86_64') -url="https://github.com/qwq233/64gram-aur" -license=('GPL3') -depends=('hunspell' 'ffmpeg' 'hicolor-icon-theme' 'lz4' 'minizip' 'openal' 'qt6-5compat' - 'qt6-imageformats' 'qt6-svg' 'qt6-wayland' 'xxhash' 'libdbusmenu-qt5' 'kwayland' - 'glibmm' 'rnnoise' 'pipewire' 'libxtst' 'libxrandr' 'jemalloc' 'libtg_owt' - 'xz' 'qt6-base') -makedepends=('cmake' 'git' 'ninja' 'python' 'range-v3' 'tl-expected' 'microsoft-gsl' - 'extra-cmake-modules' 'gtk3' 'webkit2gtk' 'abseil-cpp') -optdepends=('gtk3: GTK environment integration' - 'webkit2gtk: embedded browser features' - 'ttf-opensans: default Open Sans font family' - 'xdg-desktop-portal: desktop integration') -provides=("64gram-desktop-no-ad") -conflicts=("telegram-desktop" "tdesktop-x64" "64gram-desktop") -replaces=("tdesktop-x64") -source=("https://github.com/TDesktop-x64/tdesktop/releases/download/v$pkgver/64Gram-$pkgver-full.tar.gz" - "remove-ad.patch") - -sha512sums=('8d11ff44d9b8a384180dab7cc4b03b58fba84819b092eb5044d32c27078c885d59b2e0c052336c33cd6c7c8bf40fec547e6724b8bb888efccbc46b481b44b27f' - 'de0662d33062a8c169003095f73ce69f352c21873620841fd53c075ec18990d643fe0a88536aa3f5b9cca2d52a69c01d3e2ce0b279549f0c0ceb0a907e7e3ff7') - -prepare() { - echo -e "Please enter the API ID and API HASH\nYou can get one from https://my.telegram.org/apps" - echo -n "API ID: " - read _API_ID - echo -n -e "API HASH: " - read _API_HASH - - cd $_pkgname-$pkgver-full - patch -p1 < ../remove-ad.patch - - cmake . \ - -B build \ - -G Ninja \ - -DCMAKE_INSTALL_PREFIX="/usr" \ - -DCMAKE_BUILD_TYPE=Release \ - -DTDESKTOP_API_ID=$_API_ID \ - -DTDESKTOP_API_HASH=$_API_HASH \ - -DDESKTOP_APP_DISABLE_AUTOUPDATE=ON - python -c 'with open("build/build.ninja","+r") as f:t=f.read();t=t.replace("LINK_LIBRARIES =","LINK_LIBRARIES = /usr/lib/liblzma.so.5");f.seek(0,0);f.write(t);f.truncate();' +# Maintainer: -} - -build() { - cd $_pkgname-$pkgver-full - ninja -C build -} +_newpkg='64gram-desktop' +pkgname='64gram-desktop-no-ad' +pkgver=1.1.1 +pkgrel=1 +pkgdesc="metapackage - migrate to $_newpkg" +arch=('any') package() { - cd $_pkgname-$pkgver-full - DESTDIR=$pkgdir ninja -C build install + depends=("$_newpkg") } diff --git a/fix-ffmpeg-build-for-tgcalls.patch b/fix-ffmpeg-build-for-tgcalls.patch deleted file mode 100644 index 866a56b67a2b..000000000000 --- a/fix-ffmpeg-build-for-tgcalls.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --color --unified --recursive --text --color tgcalls-orig/tgcalls/group/AudioStreamingPartInternal.cpp tgcalls/tgcalls/group/AudioStreamingPartInternal.cpp ---- tgcalls-orig/tgcalls/group/AudioStreamingPartInternal.cpp 2022-03-12 21:25:28.361577625 +0800 -+++ tgcalls/tgcalls/group/AudioStreamingPartInternal.cpp 2022-03-12 21:27:38.658250834 +0800 -@@ -103,7 +103,9 @@ - int ret = 0;
-
- _frame = av_frame_alloc();
--
-+#if LIBAVFORMAT_VERSION_MAJOR >= 59
-+ const
-+#endif
- AVInputFormat *inputFormat = av_find_input_format(container.c_str());
- if (!inputFormat) {
- _didReadToEnd = true;
-@@ -144,7 +146,7 @@ -
- _streamId = i;
-
-- _durationInMilliseconds = (int)((inStream->duration + inStream->first_dts) * 1000 / 48000);
-+ _durationInMilliseconds = (int)(inStream->duration * av_q2d(inStream->time_base) * 1000);
-
- if (inStream->metadata) {
- AVDictionaryEntry *entry = av_dict_get(inStream->metadata, "TG_META", nullptr, 0);
-diff --color --unified --recursive --text --color tgcalls-orig/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp tgcalls/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp ---- tgcalls-orig/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp 2022-03-12 21:25:28.361577625 +0800 -+++ tgcalls/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp 2022-03-12 21:26:59.081582180 +0800 -@@ -32,7 +32,7 @@ - AudioStreamingPartPersistentDecoderState(AVCodecParameters const *codecParameters, AVRational timeBase) :
- _codecParameters(codecParameters),
- _timeBase(timeBase) {
-- AVCodec *codec = avcodec_find_decoder(codecParameters->codec_id);
-+ const AVCodec *codec = avcodec_find_decoder(codecParameters->codec_id);
- if (codec) {
- _codecContext = avcodec_alloc_context3(codec);
- int ret = avcodec_parameters_to_context(_codecContext, codecParameters);
-diff --color --unified --recursive --text --color tgcalls-orig/tgcalls/group/VideoStreamingPart.cpp tgcalls/tgcalls/group/VideoStreamingPart.cpp ---- tgcalls-orig/tgcalls/group/VideoStreamingPart.cpp 2022-03-12 21:25:28.361577625 +0800 -+++ tgcalls/tgcalls/group/VideoStreamingPart.cpp 2022-03-12 21:26:34.978247636 +0800 -@@ -280,6 +280,9 @@ -
- int ret = 0;
-
-+#if LIBAVFORMAT_VERSION_MAJOR >= 59
-+ const
-+#endif
- AVInputFormat *inputFormat = av_find_input_format(container.c_str());
- if (!inputFormat) {
- _didReadToEnd = true;
-@@ -323,7 +326,7 @@ - }
-
- if (videoCodecParameters && videoStream) {
-- AVCodec *codec = avcodec_find_decoder(videoCodecParameters->codec_id);
-+ const AVCodec *codec = avcodec_find_decoder(videoCodecParameters->codec_id);
- if (codec) {
- _codecContext = avcodec_alloc_context3(codec);
- ret = avcodec_parameters_to_context(_codecContext, videoCodecParameters);
diff --git a/remove-ad.patch b/remove-ad.patch deleted file mode 100644 index 78ab5dd5b4de..000000000000 --- a/remove-ad.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --color --unified --recursive --text 64Gram-1.0.23-full/Telegram/SourceFiles/data/data_sponsored_messages.cpp 64Gram-1.0.23-full-target/Telegram/SourceFiles/data/data_sponsored_messages.cpp ---- 64Gram-1.0.23-full/Telegram/SourceFiles/data/data_sponsored_messages.cpp 2022-03-09 07:28:56.767215500 +0800 -+++ 64Gram-1.0.23-full-target/Telegram/SourceFiles/data/data_sponsored_messages.cpp 2022-03-12 21:00:46.424836547 +0800 -@@ -86,36 +86,7 @@ - }
-
- void SponsoredMessages::request(not_null<History*> history) {
-- if (!canHaveFor(history) || history->peer->isMegagroup()) {
-- return;
-- }
-- auto &request = _requests[history];
-- if (request.requestId || TooEarlyForRequest(request.lastReceived)) {
-- return;
-- }
-- {
-- const auto it = _data.find(history);
-- if (it != end(_data)) {
-- auto &list = it->second;
-- // Don't rebuild currently displayed messages.
-- const auto proj = [](const Entry &e) {
-- return e.item != nullptr;
-- };
-- if (ranges::any_of(list.entries, proj)) {
-- return;
-- }
-- }
-- }
-- const auto channel = history->peer->asChannel();
-- Assert(channel != nullptr);
-- request.requestId = _session->api().request(
-- MTPchannels_GetSponsoredMessages(
-- channel->inputChannel)
-- ).done([=](const MTPmessages_sponsoredMessages &result) {
-- parse(history, result);
-- }).fail([=] {
-- _requests.remove(history);
-- }).send();
-+ return;
- }
-
- void SponsoredMessages::parse(
|