new package: gtk3-nocsd

This commit is contained in:
Tee KOBAYASHI 2022-04-23 07:27:20 +09:00 committed by xtkoba
parent 0ede9ccdf0
commit 27b068b397
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,10 @@
TERMUX_PKG_HOMEPAGE=https://github.com/PCMan/gtk3-nocsd
TERMUX_PKG_DESCRIPTION="A small module used to disable the client side decoration of Gtk+ 3"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3
TERMUX_PKG_SRCURL=https://github.com/PCMan/gtk3-nocsd/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=779c47d894ee3b6751ddb02b62a76757b77eb81232c4f9335564654817889570
TERMUX_PKG_BUILD_DEPENDS="gobject-introspection, gtk3"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="prefix=$TERMUX_PREFIX"

View File

@ -0,0 +1,38 @@
--- a/gtk3-nocsd.in
+++ b/gtk3-nocsd.in
@@ -20,17 +20,14 @@
# Determine if this script are installed in the system path
GTK3_NOCSD_BINARY="$(readlink -fe "$(which "$0")")"
-case "${GTK3_NOCSD_BINARY%/*}" in
- /sbin|/bin|/usr/bin|/usr/sbin|/usr/local/bin|/usr/local/sbin) IN_SYSTEM_PATH=1 ;;
- *) IN_SYSTEM_PATH=0 ;;
-esac
+IN_SYSTEM_PATH=1
# Determine if the library is in the system path. If that's the case,
# just use the plain library name, because that way loading the library
# on all architectures it's installed is supported (because the linker
# will automatically pick out the right one).
if [ $IN_SYSTEM_PATH -eq 1 ] ; then
- if LC_ALL=C LD_PRELOAD="${GTK3_NOCSD_NAME}" /bin/true 2>&1 | grep LD_PRELOAD | grep -qF "${GTK3_NOCSD_NAME}" ; then
+ if LC_ALL=C LD_PRELOAD="${GTK3_NOCSD_NAME}" @TERMUX_PREFIX@/bin/true 2>&1 | grep LD_PRELOAD | grep -qF "${GTK3_NOCSD_NAME}" ; then
IN_SYSTEM_PATH=0
else
GTK3_NOCSD="${GTK3_NOCSD_NAME}"
@@ -72,13 +69,13 @@
# Find the real program (the first one that's not symlinked to get3-nocsd)
APPNAME="$(basename "$0")"
-for APPPATH in $(which -a "$APPNAME") /bin/false; do
+for APPPATH in $(which -a "$APPNAME") @TERMUX_PREFIX@/bin/false; do
APPPATH_LINK="$(readlink -fe "$APPPATH")"
[ x"${APPPATH_LINK##*/}"x = x"gtk3-nocsd"x ] || break
done
# Provide error message at all
-if [ x"$APPNAME"x != x"false"x ] && [ x"${APPPATH}"x = x"/bin/false"x ] ; then
+if [ x"$APPNAME"x != x"false"x ] && [ x"${APPPATH}"x = x"@TERMUX_PREFIX@/bin/false"x ] ; then
APPPATH=/.gtk3-nocsd./"$APPNAME"
fi