summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-01-29 22:27:31 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-29 22:48:58 +0100
commitaf605afb278f2b5fb0ea34be1c656fbcdea082e9 (patch)
tree704db0004a72bd0fc4befcd1f5304d8084cef6d5
parent34902f18ce6da2b7c5e40f71a1dd6d3ab5b9d9b3 (diff)
downloadserenity-af605afb278f2b5fb0ea34be1c656fbcdea082e9.zip
Ports: Update neofetch to 7.1.0
-rw-r--r--Ports/AvailablePorts.md2
-rwxr-xr-xPorts/neofetch/package.sh3
-rw-r--r--Ports/neofetch/patches/add-serenity-support.patch133
-rw-r--r--Ports/neofetch/patches/fix-shebang.patch4
4 files changed, 62 insertions, 80 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md
index ed5f790e93..619e2b61a0 100644
--- a/Ports/AvailablePorts.md
+++ b/Ports/AvailablePorts.md
@@ -44,7 +44,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`nano`](nano/) | GNU nano | 4.5 | https://www.nano-editor.org/ |
| [`nasm`](nasm/) | Netwide Assembler (NASM) | 2.14.02 | https://www.nasm.us/ |
| [`ncurses`](ncurses/) | ncurses | 6.2 | https://invisible-island.net/ncurses/announce.html |
-| [`neofetch`](neofetch/) | neofetch | 7.0.0 | https://github.com/dylanaraps/neofetch |
+| [`neofetch`](neofetch/) | neofetch | 7.1.0 | https://github.com/dylanaraps/neofetch |
| [`nesalizer`](nesalizer/) | Nesalizer | | https://github.com/SerenityOS/nesalizer |
| [`ninja`](ninja/) | Ninja | 1.8.2 | https://ninja-build.org/ |
| [`nyancat`](nyancat/) | Nyancat | | https://github.com/klange/nyancat |
diff --git a/Ports/neofetch/package.sh b/Ports/neofetch/package.sh
index 6666289616..3ad678dda6 100755
--- a/Ports/neofetch/package.sh
+++ b/Ports/neofetch/package.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env -S bash ../.port_include.sh
+
port=neofetch
-version=7.0.0
+version=7.1.0
useconfigure=false
depends="bash jq"
files="https://github.com/dylanaraps/neofetch/archive/${version}.tar.gz neofetch-${version}.tar.gz"
diff --git a/Ports/neofetch/patches/add-serenity-support.patch b/Ports/neofetch/patches/add-serenity-support.patch
index 238b409e6e..d009767afd 100644
--- a/Ports/neofetch/patches/add-serenity-support.patch
+++ b/Ports/neofetch/patches/add-serenity-support.patch
@@ -1,24 +1,23 @@
---- neofetch-7.0.0/neofetch 2020-03-08 10:23:36.000000000 +0000
-+++ neofetch-7.0.0/neofetch 2020-07-12 00:42:11.171106931 +0100
-@@ -775,7 +775,7 @@
- # PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix, Raspbian,
- # Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan, Regata,
- # Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific, Septor,
--# SharkLinux, Siduction, Slackware, SliTaz, SmartOS, Solus,
-+# SerenityOS, SharkLinux, Siduction, Slackware, SliTaz, SmartOS, Solus,
- # Source_Mage, Sparky, Star, SteamOS, SunOS, openSUSE_Leap,
- # openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, Trisquel,
- # Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio, Ubuntu,
-@@ -923,6 +923,8 @@
- : Windows
- ;;
-
-+ SerenityOS): SerenityOS ;;
-+
- *)
- printf '%s\n' "Unknown OS detected: '$kernel_name', aborting..." >&2
- printf '%s\n' "Open an issue on GitHub to add support for your OS." >&2
-@@ -1142,6 +1144,10 @@
+--- neofetch-7.1.0/neofetch 2021-01-29 22:24:13.954000000 +0100
++++ neofetch-7.1.0/neofetch 2021-01-29 22:25:14.498712940 +0100
+@@ -794,7 +794,7 @@
+ # popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
+ # Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
+ # Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
+-# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
++# Septor, SereneLinux, SerenityOS, SharkLinux, Siduction, Slackware, SliTaz,
+ # SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
+ # openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
+ # Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
+@@ -929,6 +929,7 @@
+ AIX) os=AIX ;;
+ IRIX*) os=IRIX ;;
+ FreeMiNT) os=FreeMiNT ;;
++ SerenityOS) os=SerenityOS ;;
+
+ Linux|GNU*)
+ os=Linux
+@@ -1185,6 +1186,10 @@
FreeMiNT)
distro=FreeMiNT
;;
@@ -29,7 +28,7 @@
esac
distro=${distro//Enterprise Server}
-@@ -1306,7 +1312,7 @@
+@@ -1356,7 +1361,7 @@
get_kernel() {
# Since these OS are integrated systems, it's better to skip this function altogether
@@ -38,7 +37,7 @@
# Haiku uses 'uname -v' and not - 'uname -r'.
[[ $os == Haiku ]] && {
-@@ -1327,17 +1333,17 @@
+@@ -1377,17 +1382,17 @@
esac
# Hide kernel info if it's identical to the distro info.
@@ -62,28 +61,16 @@
if [[ -r /proc/uptime ]]; then
s=$(< /proc/uptime)
s=${s/.*}
-@@ -1396,7 +1402,10 @@
-
- uptime=${d:+$d, }${h:+$h, }$m
- uptime=${uptime%', '}
-- uptime=${uptime:-$seconds secs}
-+ # s/$seconds/$s
-+ # Note: this was fixed upstream already but not released yet
-+ # https://github.com/dylanaraps/neofetch/commit/e960c5168654211a8429e8089ba160e3cc89dc37
-+ uptime=${uptime:-$s secs}
-
- # Make the output of uptime smaller.
- case $uptime_shorthand in
-@@ -1577,6 +1586,8 @@
+@@ -1628,6 +1633,8 @@
off) shell="${SHELL##*/} " ;;
esac
-+ [[ $os == SerenityOS ]] && shell="SerenityOS Shell"
++ [[ "$os" == SerenityOS ]] && shell="SerenityOS Shell"
+
[[ $shell_version != on ]] && return
case ${shell_name:=${SHELL##*/}} in
-@@ -2030,13 +2041,13 @@
+@@ -2096,13 +2103,13 @@
speed_dir="/sys/devices/system/cpu/cpu0/cpufreq"
# Select the right temperature file.
@@ -104,7 +91,7 @@
# Get CPU speed.
if [[ -d "$speed_dir" ]]; then
-@@ -2201,6 +2212,13 @@
+@@ -2268,6 +2275,13 @@
cpu="$(awk -F':' '/CPU:/ {printf $2}' /kern/cpuinfo)"
speed="$(awk -F '[:.M]' '/Clocking:/ {printf $2}' /kern/cpuinfo)"
;;
@@ -118,7 +105,7 @@
esac
# Remove un-needed patterns from cpu output.
-@@ -2585,6 +2603,15 @@
+@@ -2646,6 +2660,15 @@
mem_used="$((mem_used / 1024))"
;;
@@ -134,46 +121,40 @@
esac
[[ "$memory_percent" == "on" ]] && ((mem_perc=mem_used * 100 / mem_total))
-@@ -3027,6 +3054,13 @@
- theme="${theme/ '[Plasma]'}"
- fi
- fi
-+
+@@ -2980,6 +3003,13 @@
+ # Fix weird output when the function is run multiple times.
+ unset gtk2_theme gtk3_theme theme path
+
+ if [[ "$os" == "SerenityOS" ]]; then
+ theme=$(ini /etc/WindowServer/WindowServer.ini Theme Name)
+ if [ -z "$theme" ]; then
+ theme="Default"
+ fi
+ fi
- }
-
- get_theme() {
-@@ -3035,6 +3069,7 @@
- gconf="gtk_theme"
- xfconf="/Net/ThemeName"
- kde="Name"
-+ serenity=
-
- get_style
- }
-@@ -3045,6 +3080,7 @@
- gconf="icon_theme"
++
+ if [[ "$DISPLAY" && $os != "Mac OS X" && $os != "macOS" ]]; then
+ # Get DE if user has disabled the function.
+ ((de_run != 1)) && get_de
+@@ -3130,8 +3160,7 @@
xfconf="/Net/IconThemeName"
kde="Theme"
-+ serenity=
- get_style
- icons="$theme"
-@@ -3074,6 +3110,8 @@
+- get_style
+- icons="$theme"
++ icons=
+ }
+
+ get_font() {
+@@ -3158,6 +3187,8 @@
*) term="${TERM_PROGRAM/\.app}" ;;
esac
-+ [[ $os == SerenityOS ]] && term="SerenityOS Terminal"
++ [[ "$os" == SerenityOS ]] && term="SerenityOS Terminal"
+
# Most likely TosWin2 on FreeMiNT - quick check
[[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && term="TosWin2"
[[ "$SSH_CONNECTION" ]] && term="$SSH_TTY"
-@@ -3637,10 +3675,10 @@
+@@ -3722,10 +3753,10 @@
}
get_public_ip() {
@@ -188,7 +169,7 @@
if [[ -z "$public_ip" ]] && type -p drill >/dev/null; then
public_ip="$(drill myip.opendns.com @resolver1.opendns.com | \
-@@ -3785,13 +3823,13 @@
+@@ -3871,13 +3902,13 @@
}
print_ascii() {
@@ -209,7 +190,7 @@
# Set locale to get correct padding.
LC_ALL="$sys_locale"
-@@ -4549,8 +4587,8 @@
+@@ -4650,8 +4681,8 @@
padding=${xrdb/*internalBorder:}
padding=${padding/$'\n'*}
@@ -220,16 +201,16 @@
;;
esac
}
-@@ -4834,7 +4872,7 @@
- PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix, Raspbian,
- Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan, Regata,
- Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific, Septor,
-- SharkLinux, Siduction, Slackware, SliTaz, SmartOS, Solus,
-+ SerenityOS, SharkLinux, Siduction, Slackware, SliTaz, SmartOS, Solus,
- Source_Mage, Sparky, Star, SteamOS, SunOS, openSUSE_Leap,
- openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, Trisquel,
- Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio, Ubuntu,
-@@ -9097,6 +9135,34 @@
+@@ -4936,7 +4967,7 @@
+ Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
+ Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
+ Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
+- Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
++ Septor, SereneLinux, SerenityOS, SharkLinux, Siduction, Slackware, SliTaz,
+ SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
+ openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
+ Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
+@@ -9513,6 +9544,34 @@
EOF
;;
diff --git a/Ports/neofetch/patches/fix-shebang.patch b/Ports/neofetch/patches/fix-shebang.patch
index 9fe36cd60a..0ebe205ace 100644
--- a/Ports/neofetch/patches/fix-shebang.patch
+++ b/Ports/neofetch/patches/fix-shebang.patch
@@ -1,5 +1,5 @@
---- neofetch-7.0.0/neofetch 2020-04-27 15:12:00.884771680 +0100
-+++ neofetch-7.0.0/neofetch 2020-04-27 18:57:54.263417418 +0100
+--- neofetch-7.1.0/neofetch 2021-01-29 21:35:11.839000000 +0100
++++ neofetch-7.1.0/neofetch 2021-01-29 21:35:21.531205189 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash