pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
screenfetch: Cherry-pick upstream improvements for NetBSD
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Tue Jul 19 00:34:04 2016 +0200
Changeset: 37464553a493e49680ec0c04962d03ee8c0506e8
Modified Files:
screenfetch/distinfo
Added Files:
screenfetch/patches/patch-screenfetch-dev
Log Message:
screenfetch: Cherry-pick upstream improvements for NetBSD
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=37464553a493e49680ec0c04962d03ee8c0506e8
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
screenfetch/distinfo | 1 +
screenfetch/patches/patch-screenfetch-dev | 37 +++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
diffs:
diff --git a/screenfetch/distinfo b/screenfetch/distinfo
index ae0dbdf..e548f96 100644
--- a/screenfetch/distinfo
+++ b/screenfetch/distinfo
@@ -4,3 +4,4 @@ SHA1 (screenFetch-3.7.0.tar.gz) = 5a3702504e154335e372df56e4cb621840dc5506
RMD160 (screenFetch-3.7.0.tar.gz) = f3be9d4d8fb044cb592f9c41af4ceb5eb9c6a9a4
SHA512 (screenFetch-3.7.0.tar.gz) = 9a6e89ef2cd48f12b22230c7aff356ac2ece8dc7437034a51a66f8026e5ca4a630af43511a60b21e9fc9f89af9e2493b8cfa3a06294e74c3d611ae3bb0db922d
Size (screenFetch-3.7.0.tar.gz) = 60223 bytes
+SHA1 (patch-screenfetch-dev) = 08d9508aa79e37d2776a557e9fa185bb5242256a
diff --git a/screenfetch/patches/patch-screenfetch-dev b/screenfetch/patches/patch-screenfetch-dev
new file mode 100644
index 0000000..2218f81
--- /dev/null
+++ b/screenfetch/patches/patch-screenfetch-dev
@@ -0,0 +1,37 @@
+$NetBSD$
+
+Cherry-pick upstream improvements for NetBSD.
+"NetBSD: add package count, fix shell and cpu detection #300"
+
+-- https://patch-diff.githubusercontent.com/raw/KittyKatt/screenFetch/pull/300.patch
+
+--- screenfetch-dev.orig 2016-07-18 21:56:20.367098431 +0000
++++ screenfetch-dev
+@@ -877,6 +877,9 @@ detectpkgs () {
+ pkgs=$(if TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 PACKAGESITE=file:///nonexistent pkg info pkg >/dev/null 2>&1; then
+ pkg info | wc -l | awk '{print $1}'; else pkg_info | wc -l | awk '{sub(" ", "");print $1}'; fi)
+ ;;
++ 'NetBSD')
++ pkgs=$(pkg_info | wc -l | tr -d ' ')
++ ;;
+ 'Cygwin')
+ cygfix=2
+ pkgs=$(($(cygcheck -cd | wc -l) - ${cygfix}))
+@@ -928,7 +931,7 @@ detectcpu () {
+ cpu="$cpu @ ${cpu_mhz}MHz"
+ fi
+ else
+- cpu=$(awk 'BEGIN{FS=":"} /model name/ { print $2; exit }' /proc/cpuinfo | sed 's/ @/\n/' | head -1)
++ cpu=$(awk 'BEGIN{FS=":"} /model name/ { print $2; exit }' /proc/cpuinfo | awk 'BEGIN{FS=" @"; OFS="\n"} { print $1; exit }')
+ cpun=$(grep "physical id" /proc/cpuinfo | sort | uniq | wc -l)
+ if [ -z "$cpu" ]; then
+ cpu=$(awk 'BEGIN{FS=":"} /Hardware/ { print $2; exit }' /proc/cpuinfo)
+@@ -1169,7 +1172,7 @@ detectshell () {
+ else
+ if [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" ]]; then
+ shell_type=$(ps -p $PPID -o cmd --no-heading)
+- elif [[ "${distro}" == "Mac OS X" || "${distro}" == "FreeBSD" || "${distro}" == "OpenBSD" ]]; then
++ elif [[ "${distro}" == "Mac OS X" || "${distro}" == "FreeBSD" || "${distro}" == "OpenBSD" || "${distro}" == "NetBSD" ]]; then
+ shell_type=$(ps -p $PPID -o args | tail -1)
+ else
+ shell_type=$(ps -p $(ps -p $PPID | awk '$1 !~ /PID/ {print $1}') | awk 'FNR>1 {print $1}')
Home |
Main Index |
Thread Index |
Old Index