[UPDATE] sysutils/neofetch to 6.0.0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[UPDATE] sysutils/neofetch to 6.0.0

Stephen Gregoratto
Neofetch has been updated to version 6.0.0. I've bumped the port number
and removed the patches, as they were pulled from upstream.

Index: sysutils/neofetch/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/neofetch/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- sysutils/neofetch/Makefile 4 Sep 2018 20:41:42 -0000 1.3
+++ sysutils/neofetch/Makefile 9 Jan 2019 07:22:09 -0000
@@ -2,11 +2,11 @@
 
 COMMENT = system information tool written in bash
 CATEGORIES = sysutils misc
-REVISION = 1
+REVISION = 0
 
 GH_ACCOUNT = dylanaraps
 GH_PROJECT = neofetch
-GH_TAGNAME = 5.0.0
+GH_TAGNAME = 6.0.0
 
 MAINTAINER = Charlene Wendling <[hidden email]>
 
Index: sysutils/neofetch/distinfo
===================================================================
RCS file: /cvs/ports/sysutils/neofetch/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- sysutils/neofetch/distinfo 18 Jul 2018 09:28:55 -0000 1.1.1.1
+++ sysutils/neofetch/distinfo 9 Jan 2019 07:22:09 -0000
@@ -1,2 +1,2 @@
-SHA256 (neofetch-5.0.0.tar.gz) = Kk9IU7+DuIoDeZTbxTqQyL1XCPXuszkvVtTknEnZlbM=
-SIZE (neofetch-5.0.0.tar.gz) = 110526
+SHA256 (neofetch-6.0.0.tar.gz) = Jkp2iVYbtJj5fxAjGVm92PfIc2cbrC/7Zg3ppYY7HHY=
+SIZE (neofetch-6.0.0.tar.gz) = 115538
Index: sysutils/neofetch/patches/patch-neofetch
===================================================================
RCS file: sysutils/neofetch/patches/patch-neofetch
diff -N sysutils/neofetch/patches/patch-neofetch
--- sysutils/neofetch/patches/patch-neofetch 4 Sep 2018 20:41:42 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,96 +0,0 @@
-$OpenBSD: patch-neofetch,v 1.2 2018/09/04 20:41:42 bcallah Exp $
-
-Battery fixes. Add support for amphour and charging status.
-From upstream 71df4ffd3b20abaf21c260c5a109793d579dfa11
-
-Fix WM detection, add disk and vmm(4) support
-From upstream e07f545c26a47151236af3a3bc73acae62d87922
-
-Index: neofetch
---- neofetch.orig
-+++ neofetch
-@@ -1137,6 +1137,7 @@ get_model() {
-
-     case "$model" in
-         "Standard PC"*) model="KVM/QEMU (${model})" ;;
-+        "OpenBSD"*)     model="vmm (${model})" ;;
-     esac
- }
-
-@@ -1474,8 +1475,13 @@ get_wm() {
-     # If function was run, stop here.
-     ((wm_run == 1)) && return
-
-+    case "$uname" in
-+        *"OpenBSD"*)    ps_flags=(x -c) ;;
-+        *)              ps_flags=(-e) ;;
-+    esac
-+
-     if [[ "$WAYLAND_DISPLAY" ]]; then
--        wm="$(ps -e | grep -m 1 -o -F \
-+        wm="$(ps "${ps_flags[@]}" | grep -m 1 -o -F \
-                            -e "arcan" \
-                            -e "asc" \
-                            -e "clayland" \
-@@ -1512,11 +1518,11 @@ get_wm() {
-
-         # Window Maker does not set _NET_WM_NAME
-         [[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker"
--
-         # Fallback for non-EWMH WMs.
-         [[ -z "$wm" ]] && \
--            wm="$(ps -e | grep -m 1 -o -F \
-+            wm="$(ps "${ps_flags[@]}" | grep -m 1 -o -F \
-                                -e "catwm" \
-+                               -e "fvwm" \
-                                -e "dwm" \
-                                -e "2bwm" \
-                                -e "monsterwm" \
-@@ -3084,9 +3090,20 @@ get_disk() {
-
-     # Create an array called 'disks' where each element is a separate line from
-     # df's output. We then unset the first element which removes the column titles.
--    IFS=$'\n' read -d "" -ra disks <<< "$(df "${df_flags[@]}" "${disk_show[@]:-/}")"
--    unset "disks[0]"
--
-+    if [[ "$uname" == "OpenBSD" ]]; then
-+        # On OpenBSD you can't use df against a /dev/... unless being root or
-+        # in the 'operator' group. Making a separate disks array creation.
-+        df_flags=(-h)
-+        # building an AWK regexp
-+        disk_re="${disk_show[*]:-/}"
-+        disk_re="${disk_re// /\|}"
-+        disk_re="^(${disk_re//\//\\\/})\$"
-+        IFS=$'\n' read -d "" -ra disks <<< "$(df "${df_flags[@]}" | \
-+            awk -v disk_re="$disk_re" '(NR > 1) && ($1 ~ disk_re || $6 ~ disk_re)')"
-+    else
-+        IFS=$'\n' read -d "" -ra disks <<< "$(df "${df_flags[@]}" "${disk_show[@]:-/}")"
-+        unset "disks[0]"
-+    fi
-     # Stop here if 'df' fails to print disk info.
-     [[ -z "${disks[*]}" ]] && {
-         err "Disk: df failed to print the disks, make sure the disk_show array is set properly."
-@@ -3179,12 +3196,19 @@ get_battery() {
-                 ;;
-
-                 "OpenBSD"* | "Bitrig"*)
--                    battery0full="$(sysctl -n hw.sensors.acpibat0.watthour0)"
--                    battery0full="${battery0full/ Wh*}"
-+                    battery0full="$(sysctl -n   hw.sensors.acpibat0.watthour0\
-+                                                hw.sensors.acpibat0.amphour0)"
-+                    battery0full="${battery0full%% *}"
-
--                    battery0now="$(sysctl -n hw.sensors.acpibat0.watthour3)"
--                    battery0now="${battery0now/ Wh*}"
-+                    battery0now="$(sysctl -n    hw.sensors.acpibat0.watthour3\
-+                                                hw.sensors.acpibat0.amphour3)"
-+                    battery0now="${battery0now%% *}"
-
-+                    state="$(sysctl -n hw.sensors.acpibat0.raw0)"
-+                    state="${state##? (battery }"
-+                    state="${state%)*}"
-+
-+                    [[ "${state}" == "charging" ]] && battery_state="charging"
-                     [[ "$battery0full" ]] && \
-                     battery="$((100 * ${battery0now/\.} / ${battery0full/\.}))%"
-                 ;;