update: add local-overlay

This commit is contained in:
Yingjie Wang 2024-11-05 09:39:28 -05:00
parent 1df22c6512
commit bb1e578721
16 changed files with 568 additions and 0 deletions

View File

@ -0,0 +1,3 @@
AUX hypridle-0.1.4-fix-CFLAGS-CXXFLAGS.patch 901 BLAKE2B 8dd15b2a06beb5e10760f0ab84f8becf22722e8b8990c19e58d51a6865e10d68592e1d9041146a746d6deeb9d03dc2567056017f18c9623046c25153a9e13299 SHA512 8e7d1db099b4872e52bcf676db8b92a1f4d27ff79a7d340ef77f691c6c5305d2f98c28fe71f7b0f3c82bb63ef13115f76b43dc3eba769791e845e631cf9a27f8
DIST hypridle-0.1.4.gh.tar.gz 13948 BLAKE2B 450e2505fe8c245fd120fb22662e96648c8267a2878a9e9421ae06a8f2831b7f03f3e1ec23416c37e392e3b295cfb7d0cf8a61f7f611f62dea7affa6c3aadd06 SHA512 203dd5ff6c588fb1858d660baba71ede9d2c353abd63a5273fbc4befff8b77d416d802138881bce11605b248b05145e66847b5aa5395e9c150aaf07e67c8bcd8
EBUILD hypridle-0.1.4.ebuild 717 BLAKE2B 0be274204f4cd8da6cc787baa42f12b9867b9dd114dbf7d19c0ef56b9c70fc22bd6826ac96fd7abf8eacebb282124f046cc9a8d7e1276f385095062e054668fc SHA512 ce4e07b92c7b480ccc9da005fc5b9004856997ad39be27bee4a117e8cd565a1230adbc893b9387a04ddfdee338756fe9688972212520165cb47f26f64f62f2d2

View File

@ -0,0 +1,29 @@
From e2b3acf133c104574724f705f9f07007ec8bbe3b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gon=C3=A7alo=20Negrier=20Duarte?=
<gonegrier.duarte@gmail.com>
Date: Wed, 21 Feb 2024 15:29:01 +0000
Subject: [PATCH] Removed added CFLAGS/CXXFLAGS by CMakeLists.txt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
---
CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d60b42..bb37060 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,6 @@ if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Configuring hypridle in Debug with CMake")
add_compile_definitions(HYPRLAND_DEBUG)
else()
- add_compile_options(-O3)
message(STATUS "Configuring hypridle in Release with CMake")
endif()
--
2.43.2

View File

@ -0,0 +1,39 @@
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Hyprland's idle daemon"
HOMEPAGE="https://github.com/hyprwm/hypridle"
if [[ "${PV}" = *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/hyprwm/${PN^}.git"
else
SRC_URI="https://github.com/hyprwm/${PN^}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
KEYWORDS="~amd64"
fi
LICENSE="BSD"
SLOT="0"
RDEPEND="
dev-cpp/sdbus-c++:0/2
>=dev-libs/hyprlang-0.4.0
dev-libs/wayland
"
DEPEND="
${RDEPEND}
dev-libs/wayland-protocols
"
BDEPEND="
dev-util/wayland-scanner
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}/hypridle-0.1.4-fix-CFLAGS-CXXFLAGS.patch"
)

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>gonegrier.duarte@gmail.com</email>
<name>Gonçalo Negrier Duarte</name>
</maintainer>
<upstream>
<changelog>https://github.com/hyprwm/hypridle/releases</changelog>
<doc>https://wiki.hyprland.org/Hypr-Ecosystem/hypridle/</doc>
<bugs-to>https://github.com/hyprwm/hypridle/issues</bugs-to>
<remote-id type="github">hyprwm/hypridle</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1 @@
masters = gentoo

View File

@ -0,0 +1,11 @@
AUX config.json 197 BLAKE2B 7857d382a02a15fbc86018cd61e759927be2c009b0eefa10d282772f236680f54bd90169e0b404e98857657b7f16ef537be78d5e7ec18a498c48d3d490bffead SHA512 9b2b6663bddadc249221aa81669d26a44102926caa8ce6c683c0f1bb65466f1b5449f821b73468e6da57515d5367e9bea829cfb08ddb4c3b48e1f178c4c88677
AUX qq.sh 340 BLAKE2B f06daf0857721e55b2c3ed2a5538b5582acf4cff41b336a89b972abe4ceb1626b7c9cf51889ea731e00219fcee7da9a9d8c68375eaf7a84c71b5a13a8c11bd4f SHA512 4553c2cc6c6d0f7921237476ad3376c992571eb90f692dd339fb628bd1352746f6e46df61bf5d00f24099bafbfbee4074702be6e77577c44b448d38e3ee82c8b
AUX start.sh 5065 BLAKE2B de4dd4684820dfb35069408659612cc009c5fe6b6a397ddc2cf59f350341c286828f727d10edf3115e4ba7d5c1da7890e08c62c8a5da93b750fe8de5d0beb3b8 SHA512 bc66e6592b10cc805b747cead85b26650fc47e10cb3e08f38272631b22c29b817c468cbbcd31a52139b75427fb48b171b4ad14969da939e1d6703943c6555397
AUX vercmp.sh 1492 BLAKE2B ac4ae2aeef54225cfbf31e50345b1bfd9b71310fe24ff9025956801589db258c215a5120115d19044d941c5f63814d7f7a5ddfb638d8af98cdbfbd3aa83569e7 SHA512 e2843a84c6f66918a8de60ef83d07a14881b072e7eed2e374e16542d8079e088974a65cea336cba3e5a41d72c5824de381bdce26d54ca21509196ab5f2befd76
AUX xdg-open.sh 206 BLAKE2B 1ed3d1f9c659fffc3476fa0cd28030f8646be0ff2d1d97968433f6eb0fe88dd7717c2fb137c8fd6c93686e4c652cc74434d8aceb69ccba594a205e241d7ea93e SHA512 b12a65aa3cbd5da758e47bbc9a98930c009a9aeeffc12a6329aabd9dc0a9b206dfec9af8950122e912be311985fe7d2daa6dae815ccabdd00ecdbfbc2760a143
DIST LiteLoaderQQNT-1.2.1.zip 32390 BLAKE2B ab626bba9fdff7566657b22bcbc1ac32e9ea3878eea461aeb58c0ba27e92e3111479c2a72c9d08d2067e43497f854a1a30090da18f5941eb6a0b705bce0d6639 SHA512 a0a179942f3b6ee8ed1c8388f6a5234e2f84b3340c94ddc91b497dd7f12cc9cac80ae250c62e21bdaab9e52cfecaa6c78b13b6849ddc5ff7db65efe852d753d0
DIST QQ_3.2.12_240808_amd64_01.deb 152276798 BLAKE2B fa70a6e198203df87546115de7ae07b2479f3992848c5b361797330f7c3d5757ff8a1ff2bdb16b72e74a60cb8db5e41ab20cf56ec653a86ea58fb43604256544 SHA512 ad4657fd72ba13f804db24336cc07636454afd9fc97dac1a9d575a8500227f996879386e2257e290139bc7ba9e2f56e305b4969ca9c9ee5dbd7efd0302ed7ca9
DIST QQ_3.2.12_240808_arm64_01.deb 152230448 BLAKE2B 0a4ad45efd111aac457723124a934fe6b80701bb8a4c9363f959abf4d5e2b7fcc4dfcc8c82ddfa324992bc1bc4561168d6597cc5217d998257561d6f9a0386e8 SHA512 22fb0f590f8a4be148750fde203fd42647557998caa8516b165094020ee3f670f967d9d313d47fdbbf449f497cbe23f612355b6afae9cfde7df02c52e64ef0ca
DIST QQ_3.2.12_240808_loongarch64_01.deb 144876648 BLAKE2B 2813becfcd657f093925d53e94137c16a8e0037e02e354cb11c98e2c978a89643dcc9a7794961f7edcdf15a4509880564dbe85463f7bfbe3e3c45e9362b87af9 SHA512 19192fb5d4b1de95fe677195db92fcf70fea0daa286697faf558305f44ecb980a3f44f29cc7b9d846ef76a4dd4b06a2e5ecc2c1c2e21c1603188d3a7e79292ce
EBUILD tencent-qq-3.2.12_p240808.ebuild 4928 BLAKE2B 4167fa15062f201a109c67d07aaab6074631564f15e6ff1e42094fb14e3875cd272f9b31e19cfbf42a0d5b5cef70807e8d06d29ad1dddbb7eacea6d37dc3d955 SHA512 17b14aa95d165e8a05920eb363a0da831567bcffb178f04df9d9a22f135b3b9fe7aad309b1c7d2ef56286d63e40ab96b2c7a0c6357034a4315875cc46ea0922e
MISC metadata.xml 877 BLAKE2B ccb294dfc292e53c35bfc5c8669c0edcf41d24050ce9fb097a73d874687717de009048e0bf6d6bc1c5194afc05d274b9d70e8f4d5a3787fceb45fceab1bbf4d0 SHA512 520778cfee8e5977f4a766a1dfff82ed9fed287567ad96de11a9dbb49d4fae571001cb46bc714669172ebca8441cf51a6ec0b778215bb4709a57ace72c6a70f8

View File

@ -0,0 +1,9 @@
{
"baseVersion": "__BASE_VER__",
"currentVersion": "__CURRENT_VER__",
"previousVersion": "",
"buildVersion": "__BUILD_VER__",
"skippedVersions": [],
"inUsePkg": "",
"hasRan": false
}

View File

@ -0,0 +1,12 @@
#!/bin/bash
if [ -d ~/.config/QQ/versions ]; then
find ~/.config/QQ/versions -name sharp-lib -type d -exec rm -r {} \; 2>/dev/null
fi
# Allow users to override command-line options
if [[ -f $XDG_CONFIG_HOME/qq-flags.conf ]]; then
QQ_USER_FLAGS="$(grep -v '^#' $XDG_CONFIG_HOME/qq-flags.conf)"
fi
exec /opt/QQ/qq $QQ_USER_FLAGS "$@"

View File

@ -0,0 +1,149 @@
#!/bin/bash
QQ_HOTUPDATE_VERSION="__CURRENT_VER__"
function command_exists() {
local command="$1"
command -v "${command}" >/dev/null 2>&1
}
function show_error_dialog() {
title="linuxqq-nt-bwrap"
if command_exists kdialog; then
kdialog --error "$1" --title "$title" --icon qq
elif command_exists zenity; then
zenity --error --title "$title" --icon-name qq --text "$1"
else
all_off="$(tput sgr0)"
bold="${all_off}$(tput bold)"
blue="${bold}$(tput setaf 4)"
yellow="${bold}$(tput setaf 3)"
printf "${blue}==>${yellow} ${bold} $1${all_off}\n"
fi
}
# 进行必要文件的检查
if [ ! -e "/etc/localtime" ]; then
show_error_dialog "/etc/localtime 未找到。\n请先设置系统时区。"
exit 1
fi
USER_RUN_DIR="/run/user/$(id -u)"
XAUTHORITY="${XAUTHORITY:-$HOME/.Xauthority}"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
FONTCONFIG_HOME="${XDG_CONFIG_HOME}/fontconfig"
QQ_APP_DIR="${XDG_CONFIG_HOME}/QQ"
if [ -z "${QQ_DOWNLOAD_DIR}" ]; then
if [ -z "${XDG_DOWNLOAD_DIR}" ]; then
XDG_DOWNLOAD_DIR="$(xdg-user-dir DOWNLOAD)"
fi
QQ_DOWNLOAD_DIR="${XDG_DOWNLOAD_DIR:-$HOME/Downloads}"
fi
# 从 flags 文件中加载参数
set -euo pipefail
flags_file="${XDG_CONFIG_HOME}/qq-electron-flags.conf"
declare -a flags
if [[ -f "${flags_file}" ]]; then
mapfile -t <"${flags_file}"
fi
for line in "${MAPFILE[@]}"; do
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
flags+=("${line}")
fi
done
QQ_HOTUPDATE_DIR="${QQ_APP_DIR}/versions"
# 在「下载」目录不存在的时候,自动使用 ~/Downloads
# 避免挂载整个 home
if [ "${QQ_DOWNLOAD_DIR%*/}" == "${HOME}" ]; then
QQ_DOWNLOAD_DIR="${HOME}/Downloads"
fi
# 安装当前版本
HOTUPDATE_VERSION_DIR="${QQ_HOTUPDATE_DIR}/${QQ_HOTUPDATE_VERSION}"
install -d "${QQ_HOTUPDATE_DIR}"
if [ ! -d "${HOTUPDATE_VERSION_DIR}" ] && [ ! -L "${HOTUPDATE_VERSION_DIR}" ]; then
ln -sfd "/opt/QQ/resources/app" "${HOTUPDATE_VERSION_DIR}"
fi
# 处理旧版本
rm -rf "${QQ_HOTUPDATE_DIR}/"**".zip"
is_hotupdated_version=0 # 正在运行的版本是否经过热更新?
find "${QQ_HOTUPDATE_DIR}/"*[-_]* -maxdepth 1 -type "d,l" | while read path; do
this_version="$(basename "$path")"
if [ "$(/opt/QQ/workarounds/vercmp.sh "${this_version}" lt "${QQ_HOTUPDATE_VERSION//_/-}")" == "true" ]; then
# 这个版本小于当前版本,删除之
echo "rm $this_version"
rm -rf "$path"
else
is_hotupdated_version=1
fi
done
if [ "$is_hotupdated_version" == "0" ]; then
cp "/opt/QQ/workarounds/config.json" "${QQ_HOTUPDATE_DIR}/config.json"
fi
bwrap --new-session --cap-drop ALL --unshare-user-try --unshare-pid --unshare-cgroup-try \
--ro-bind /lib /lib \
--ro-bind /lib64 /lib64 \
--ro-bind /bin /bin \
--ro-bind /usr /usr \
--ro-bind /opt /opt \
--ro-bind /opt/QQ/workarounds/xdg-open.sh /usr/bin/xdg-open \
--ro-bind /usr/lib/snapd-xdg-open/xdg-open /snapd-xdg-open \
--ro-bind /usr/lib/flatpak-xdg-utils/xdg-open /flatpak-xdg-open \
--ro-bind /etc/machine-id /etc/machine-id \
--ro-bind /etc/ld.so.cache /etc/ld.so.cache \
--dev-bind /dev /dev \
--ro-bind /sys /sys \
--ro-bind /etc/passwd /etc/passwd \
--ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
--ro-bind-try /run/systemd/userdb /run/systemd/userdb \
--ro-bind /etc/resolv.conf /etc/resolv.conf \
--ro-bind /etc/localtime /etc/localtime \
--proc /proc \
--dev-bind /run/dbus /run/dbus \
--bind "${USER_RUN_DIR}" "${USER_RUN_DIR}" \
--ro-bind-try /etc/fonts /etc/fonts \
--dev-bind /tmp /tmp \
--bind-try "${HOME}/.pki" "${HOME}/.pki" \
--ro-bind-try "${XAUTHORITY}" "${XAUTHORITY}" \
--bind-try "${QQ_DOWNLOAD_DIR}" "${QQ_DOWNLOAD_DIR}" \
--setenv QQ_APP_DIR "${QQ_APP_DIR}" \
--bind "${QQ_APP_DIR}" "${QQ_APP_DIR}" \
--ro-bind-try "${FONTCONFIG_HOME}" "${FONTCONFIG_HOME}" \
--ro-bind-try "${HOME}/.icons" "${HOME}/.icons" \
--ro-bind-try "${HOME}/.local/share/.icons" "${HOME}/.local/share/.icons" \
--ro-bind-try "${XDG_CONFIG_HOME}/gtk-3.0" "${XDG_CONFIG_HOME}/gtk-3.0" \
--ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
--ro-bind-try /run/systemd/userdb/ /run/systemd/userdb/ \
--setenv IBUS_USE_PORTAL 1 \
--setenv QQNTIM_HOME "${QQ_APP_DIR}/QQNTim" \
--setenv LITELOADERQQNT_PROFILE "${QQ_APP_DIR}/LiteLoaderQQNT" \
/opt/QQ/qq "${flags[@]}" "$@"
# 移除无用崩溃报告和日志
# 如果需要向腾讯反馈 bug请注释掉如下几行
rm -rf ${QQ_APP_DIR}/crash_files
touch ${QQ_APP_DIR}/crash_files
if [ -d "${QQ_APP_DIR}/log" ]; then
rm -rf "${QQ_APP_DIR}/log"
fi
for nt_qq_userdata in "${QQ_APP_DIR}/nt_qq_"*; do
if [ -d "${nt_qq_userdata}/log" ]; then
rm -rf "${nt_qq_userdata}/log"
fi
if [ -d "${nt_qq_userdata}/log-cache" ]; then
rm -rf "${nt_qq_userdata}/log-cache"
fi
done
if [ -d "${QQ_APP_DIR}/Crashpad" ]; then
rm -rf "${QQ_APP_DIR}/Crashpad"
fi

View File

@ -0,0 +1,93 @@
#!/usr/bin/env bash
# Comparison expressions for semantic versions.
# only supports semver standard MAJOR.MINOR.PATCH syntax;
# pre-release or build-metadata extensions have undefined behavior.
set -o errexit
set -o pipefail
function usage() {
echo "Comparison expressions for semantic versions."
echo
echo "usage: vercmp VERSION_A OPERATOR VERSION_B"
echo
echo "OPERATORS"
echo
echo " lt - Less than"
echo " lteq - Less than or equal to"
echo " eq - Equal to"
echo " gteq - Grater than or equal to"
echo " gt - Greater than"
echo
}
if [ "$#" -ne 3 ]; then
usage
exit 1
fi
LEFT="$1"
OPERATOR="$2"
RIGHT="$3"
if [ "$LEFT" = "$RIGHT" ]; then
COMPARISON=0
else
SORTED=($(for VER in "$LEFT" "$RIGHT"; do echo "$VER"; done | sort -V))
if [ "${SORTED[0]}" = "$LEFT" ]; then
COMPARISON=-1
else
COMPARISON=1
fi
fi
OUTCOME=false
case $OPERATOR in
lt)
if [ "$COMPARISON" -eq -1 ]; then
OUTCOME=true
fi
;;
lteq)
if [ "$COMPARISON" -lt 1 ]; then
OUTCOME=true
fi
;;
eq)
if [ "$COMPARISON" -eq 0 ]; then
OUTCOME=true
fi
;;
gteq)
if [ "$COMPARISON" -gt -1 ]; then
OUTCOME=true
fi
;;
gt)
if [ "$COMPARISON" -eq 1 ]; then
OUTCOME=true
fi
;;
*)
usage
exit 1
;;
esac
VERCMP_QUIET="${VERCMP_QUIET:-false}"
if [ ! "$VERCMP_QUIET" = "true" ]; then
echo "$OUTCOME"
fi
if [ "$OUTCOME" = "true" ]; then
exit 0
else
exit 1
fi

View File

@ -0,0 +1,10 @@
#!/bin/bash
URI_TO_OPEN="$1"
if ! [ "${URI_TO_OPEN:0:8}" == "jsbridge" ]; then
if [ "${URI_TO_OPEN:0:4}" == "http" ]; then
/snapd-xdg-open "$URI_TO_OPEN"
else
/flatpak-xdg-open "$URI_TO_OPEN"
fi
fi

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE
pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>git@xen0n.name</email>
<name>WANG Xuerui</name>
</maintainer>
<maintainer type="person">
<email>ston.jia@qq.com</email>
<name>ston</name>
</maintainer>
<use>
<flag name="bwrap">Use sys-apps/bubblewrap to prevent
private information leakage</flag>
<flag name="system-vips">Use media-libs/vips instead of
shipped libs.</flag>
<flag name="gnome">Supporting screenshot when using
GNOME</flag>
<flag name="appindicator">Build in support for
notifications using the libindicate or libappindicator
plugin</flag>
<flag name="liteloader">Add liteloader support</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,156 @@
# Copyright 2019-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit unpacker xdg
MY_PV=${PV/_p/_}
_I="Linux"
_ArchExt="_01"
_QQDownSite="https://dldir1.qq.com/qqfile/qq/QQNT"
_QQFileName="QQ"
_QQFileSuffix=".deb"
_LiteLoader_PV="1.2.1"
DESCRIPTION="The new version of the official linux-qq"
HOMEPAGE="https://im.qq.com/linuxqq/index.shtml"
SRC_URI="
amd64? ( ${_QQDownSite}/$_I/${_QQFileName}_${MY_PV}_amd64${_ArchExt}${_QQFileSuffix} )
arm64? ( ${_QQDownSite}/$_I/${_QQFileName}_${MY_PV}_arm64${_ArchExt}${_QQFileSuffix} )
loong? ( ${_QQDownSite}/$_I/${_QQFileName}_${MY_PV}_loongarch64${_ArchExt}${_QQFileSuffix} )
liteloader? (
https://github.com/LiteLoaderQQNT/LiteLoaderQQNT/releases/download/${_LiteLoader_PV}/LiteLoaderQQNT.zip \
-> LiteLoaderQQNT-${_LiteLoader_PV}.zip
)
"
S=${WORKDIR}
LICENSE="Tencent"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
IUSE="+bwrap system-vips gnome appindicator liteloader"
RESTRICT="strip mirror"
RDEPEND="
x11-libs/gtk+:3
x11-libs/libnotify
dev-libs/nss
appindicator? ( dev-libs/libayatana-appindicator )
x11-libs/libXScrnSaver
x11-libs/libXcomposite
x11-libs/libXdamage
x11-libs/libXtst
x11-misc/xdg-utils
app-accessibility/at-spi2-core:2
app-crypt/libsecret
virtual/krb5
sys-apps/keyutils
system-vips? (
dev-libs/glib
>=media-libs/vips-8.15.2[-pdf]
)
bwrap? (
sys-apps/bubblewrap
x11-misc/snapd-xdg-open
x11-misc/flatpak-xdg-utils
)
gnome? ( dev-libs/gjs )
media-libs/openslide
loong? (
virtual/loong-ow-compat
)
"
BDEPEND="liteloader? ( app-arch/unzip )"
src_unpack() {
:
if use liteloader; then
unpack LiteLoaderQQNT-${_LiteLoader_PV}.zip
fi
}
src_install() {
dodir /
cd "${D}" || die
if [ "${ARCH}" = "loong" ]; then
unpacker "${DISTDIR}/${_QQFileName}_${MY_PV}_loongarch64${_QQFileSuffix}"
else
unpacker "${DISTDIR}/${_QQFileName}_${MY_PV}_${ARCH}${_ArchExt}${_QQFileSuffix}"
fi
if use system-vips; then
rm -r "${D}"/opt/QQ/resources/app/sharp-lib || die
fi
if use bwrap; then
exeinto /opt/QQ
doexe "${FILESDIR}"/start.sh
sed -i 's!/opt/QQ/qq!/opt/QQ/start.sh!' "${D}"/usr/share/applications/qq.desktop || die
insinto /opt/QQ/workarounds
doins "${FILESDIR}"/{config.json,xdg-open.sh,vercmp.sh}
fperms +x /opt/QQ/workarounds/{xdg-open.sh,vercmp.sh}
local _base_pkgver=${PV/_p/-} || die
local _update_pkgver=${_base_pkgver} || die
local cur_ver=${_update_pkgver:-${base_ver}} || die
local build_ver=${cur_ver#*-} || die
sed -i "s|__BASE_VER__|${base_ver}|g;s|__CURRENT_VER__|${cur_ver}|g;s|__BUILD_VER__|${build_ver}|g" \
"${D}"/opt/QQ/workarounds/config.json \
"${D}"/opt/QQ/start.sh || die
else
sed -i 's!/opt/QQ/qq!/usr/bin/qq!' "${D}"/usr/share/applications/qq.desktop || die
fi
if use bwrap; then
dosym -r /opt/QQ/start.sh /usr/bin/qq
elif use system-vips; then
newbin "$FILESDIR/qq.sh" qq
else
dosym -r /opt/QQ/qq /usr/bin/qq
fi
# https://bugs.gentoo.org/898912
if use appindicator; then
dosym ../../usr/lib64/libayatana-appindicator3.so /opt/QQ/libappindicator3.so
fi
sed -i 's!/usr/share/icons/hicolor/512x512/apps/qq.png!qq!' "${D}"/usr/share/applications/qq.desktop || die
gzip -d "${D}"/usr/share/doc/linuxqq/changelog.gz || die
dodoc "${D}"/usr/share/doc/linuxqq/changelog
rm -rf "${D}"/usr/share/doc/linuxqq/ || die
if use liteloader; then
insinto /opt/LiteLoader
doins -r "${WORKDIR}"/*
dosym -r /opt/LiteLoader/src/preload.js /opt/QQ/resources/app/application/preload.js
sed -i "1 i require(\"/opt/LiteLoader\");" "${D}"/opt/QQ/resources/app/app_launcher/index.js || die
fi
}
pkg_postinst() {
xdg_pkg_postinst
if use bwrap; then
elog "-EN-----------------------------------------------------------------"
elog "If you want to download files in QQ"
elog "Please set the QQ download path to ~/Download"
elog "If you have enabled LiteLoaderQQNT support, relevant plugins can be "
elog "downloaded from https://liteloaderqqnt.github.io/, "
elog "For instance, after downloading the 「轻量工具箱」 and unzipping it, "
elog "download it to the directory ~/.config/QQ/LiteLoaderQQNT/plugins/lite_tools_v4/, "
elog "and the changes will take effect after a restart."
elog "--------------------------------------------------------------------"
elog "-ZH-----------------------------------------------------------------"
elog "如果要在 QQ 中下载文件,请先在「设置」->「存储管理」中把下载文件夹"
elog "更改为系统的“下载”/“Downloads”文件夹。"
elog "如果您启用了 LiteLoaderQQNT 支持,"
elog "可以从 https://liteloaderqqnt.github.io/ 下载相关插件,"
elog "例如:「轻量工具箱」下载后"
elog "解压到 ~/.config/QQ/LiteLoaderQQNT/plugins/“lite_tools_v4”/ 目录下,重启后生效。"
elog "--------------------------------------------------------------------"
fi
}

View File

@ -0,0 +1 @@
local-overlay

View File

@ -0,0 +1,11 @@
# created by eselect-repo
[guru]
location = /var/db/repos/guru
sync-type = git
sync-uri = https://github.com/gentoo-mirror/guru.git
[gentoo-zh]
location = /var/db/repos/gentoo-zh
sync-type = git
sync-uri = https://github.com/gentoo-mirror/gentoo-zh.git

View File

@ -0,0 +1,5 @@
[local-overlay]
location = /var/db/repos/local-overlay
masters = gentoo
auto-sync = no