summaryrefslogtreecommitdiffstats
path: root/trinity-base
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2023-12-31 15:38:17 +0300
committerTDE Gitea <gitea@mirror.git.trinitydesktop.org>2024-02-04 11:31:46 +0000
commitab3895a75a3e62ea72cb233767ab8f56fc235450 (patch)
treeddece76fba262ed8a1f5a785d4d18c51ccfe5943 /trinity-base
parent7f54fac9829df99f96852907325eaebe7cae7f14 (diff)
downloadtde-packaging-gentoo-ab3895a75a3e62ea72cb233767ab8f56fc235450.tar.gz
tde-packaging-gentoo-ab3895a75a3e62ea72cb233767ab8f56fc235450.zip
trinity-base/tdebase-starttde: modify PATH for Gentoo
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'trinity-base')
-rw-r--r--trinity-base/tdebase-starttde/files/tdebase-starttde-14-gentoo.patch90
-rw-r--r--trinity-base/tdebase-starttde/tdebase-starttde-14.1.0-r1.ebuild (renamed from trinity-base/tdebase-starttde/tdebase-starttde-14.1.0.ebuild)2
-rw-r--r--trinity-base/tdebase-starttde/tdebase-starttde-14.1.1-r1.ebuild (renamed from trinity-base/tdebase-starttde/tdebase-starttde-14.1.1.ebuild)2
-rw-r--r--trinity-base/tdebase-starttde/tdebase-starttde-9999.ebuild2
4 files changed, 96 insertions, 0 deletions
diff --git a/trinity-base/tdebase-starttde/files/tdebase-starttde-14-gentoo.patch b/trinity-base/tdebase-starttde/files/tdebase-starttde-14-gentoo.patch
new file mode 100644
index 00000000..0b53033c
--- /dev/null
+++ b/trinity-base/tdebase-starttde/files/tdebase-starttde-14-gentoo.patch
@@ -0,0 +1,90 @@
+diff --git a/starttde b/starttde
+index 66360e228..512bff7d5 100755
+--- a/starttde
++++ b/starttde
+@@ -3,18 +3,6 @@
+ # DEFAULT TRINITY STARTUP SCRIPT
+ #
+
+-# This block might not be appropriate for all systems.
+-# It should work for command line logins but graphical
+-# login managers might already source these files.
+-# Multiple sourcing is not a problem when the files are only
+-# containers for environment variables and such.
+-if [ -r /etc/xprofile ]; then
+- . /etc/xprofile
+-fi
+-if [ -r $HOME/.xprofile ]; then
+- . $HOME/.xprofile
+-fi
+-
+ # Some functions to parse and check path correctly ...
+ # Usage: is_in_path PATH /usr/bin
+ is_in_path() {
+@@ -68,6 +56,31 @@ remove_from_path() {
+ eval export $var=${NPATH#:}
+ }
+
++# Gentoo: In Gentoo $TDE_DIR/bin is in PATH by default, but it's located after /usr/bin,
++# so to avoid running kf5 apps instead of TDE's one make sure it goes first
++
++TDE_BIN_DIR="$(dirname -- "$0")"
++if ! is_before_in_path PATH "$TDE_BIN_DIR" "/usr/bin"; then
++ remove_from_path PATH "$TDE_BIN_DIR"
++ place_before_in_path PATH "$TDE_BIN_DIR" "/usr/bin"
++fi
++unset TDE_BIN_DIR
++
++# Gentoo: to avoid messing PATH that user might have set we moved .xprofile
++# import here rather from the very begining of the script
++#
++# This block might not be appropriate for all systems.
++# It should work for command line logins but graphical
++# login managers might already source these files.
++# Multiple sourcing is not a problem when the files are only
++# containers for environment variables and such.
++if [ -r /etc/xprofile ]; then
++ . /etc/xprofile
++fi
++if [ -r $HOME/.xprofile ]; then
++ . $HOME/.xprofile
++fi
++
+ # Portable alternative to the file operator -nt (among shells)
+ is_newer() {
+ if test -n "$(find $1 -prune -newer $2 -print)"
+@@ -205,19 +218,21 @@ fi
+
+ # Modify the following environment variables only as necessary.
+
+- if ! is_in_path PATH "$TDEDIR/games" ; then
+- # Respect the traditional path order. Don't blindly place $TDEDIR/games
+- # first in the path. Only place $TDEDIR/games before /usr/games. If packagers
+- # are adding $TDEDIR/games elsewhere, then they need to ensure the traditional
+- # search patch is respected.
+- # Is there a way we can check that $TDEDIR/games is always placed only just before
+- # /usr/games in the search path?
+- if is_in_path PATH "/usr/games"; then
+- place_before_in_path PATH "$TDEDIR/games" "/usr/games"
+- else
+- export PATH=$TDEDIR/games:$PATH
+- fi
+- fi
++# Gentoo: there is no */games/bin directories in gentoo
++#
++# if ! is_in_path PATH "$TDEDIR/games" ; then
++# # Respect the traditional path order. Don't blindly place $TDEDIR/games
++# # first in the path. Only place $TDEDIR/games before /usr/games. If packagers
++# # are adding $TDEDIR/games elsewhere, then they need to ensure the traditional
++# # search patch is respected.
++# # Is there a way we can check that $TDEDIR/games is always placed only just before
++# # /usr/games in the search path?
++# if is_in_path PATH "/usr/games"; then
++# place_before_in_path PATH "$TDEDIR/games" "/usr/games"
++# else
++# export PATH=$TDEDIR/games:$PATH
++# fi
++# fi
+
+ if ! is_in_path PATH "$TDEDIR/bin" ; then
+ # Respect the traditional path order. Don't blindly place $TDEDIR/bin
diff --git a/trinity-base/tdebase-starttde/tdebase-starttde-14.1.0.ebuild b/trinity-base/tdebase-starttde/tdebase-starttde-14.1.0-r1.ebuild
index 512a478c..8215e74a 100644
--- a/trinity-base/tdebase-starttde/tdebase-starttde-14.1.0.ebuild
+++ b/trinity-base/tdebase-starttde/tdebase-starttde-14.1.0-r1.ebuild
@@ -29,6 +29,8 @@ RDEPEND="x11-apps/xmessage
~trinity-base/ksplashml-${PV}
~trinity-base/tdeinit-${PV}"
+PATCHES=( "${FILESDIR}/${PN}-14-gentoo.patch" )
+
src_prepare() {
trinity-base-2_src_prepare
}
diff --git a/trinity-base/tdebase-starttde/tdebase-starttde-14.1.1.ebuild b/trinity-base/tdebase-starttde/tdebase-starttde-14.1.1-r1.ebuild
index 512a478c..8215e74a 100644
--- a/trinity-base/tdebase-starttde/tdebase-starttde-14.1.1.ebuild
+++ b/trinity-base/tdebase-starttde/tdebase-starttde-14.1.1-r1.ebuild
@@ -29,6 +29,8 @@ RDEPEND="x11-apps/xmessage
~trinity-base/ksplashml-${PV}
~trinity-base/tdeinit-${PV}"
+PATCHES=( "${FILESDIR}/${PN}-14-gentoo.patch" )
+
src_prepare() {
trinity-base-2_src_prepare
}
diff --git a/trinity-base/tdebase-starttde/tdebase-starttde-9999.ebuild b/trinity-base/tdebase-starttde/tdebase-starttde-9999.ebuild
index 2ddc9dd7..0be7001e 100644
--- a/trinity-base/tdebase-starttde/tdebase-starttde-9999.ebuild
+++ b/trinity-base/tdebase-starttde/tdebase-starttde-9999.ebuild
@@ -29,6 +29,8 @@ RDEPEND="x11-apps/xmessage
~trinity-base/ksplashml-${PV}
~trinity-base/tdeinit-${PV}"
+PATCHES=( "${FILESDIR}/${PN}-14-gentoo.patch" )
+
src_prepare() {
trinity-base-2_src_prepare
}