Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/screenfetch/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile 11 Nov 2017 08:07:20 -0000 1.2
+++ Makefile 30 Jul 2018 18:13:27 -0000
@@ -1,31 +1,33 @@
# $OpenBSD: Makefile,v 1.2 2017/11/11 08:07:20 bentley Exp $
COMMENT = display system information in the terminal for screenshots
+CATEGORIES = sysutils misc
-V = 3.8.0
-PKGNAME = screenfetch-$V
-REVISION = 0
+V = 3.8.0
+PKGNAME = screenfetch-${V}
+REVISION = 1
GH_ACCOUNT = KittyKatt
GH_PROJECT = screenFetch
-GH_TAGNAME = v$V
+GH_TAGNAME = v${V}
-CATEGORIES = sysutils
+MAINTAINER = Charlene Wendling <julianaito@posteo.jp>
# GPLv3+
PERMIT_PACKAGE_CDROM = Yes
-RUN_DEPENDS = graphics/scrot \
- net/curl \
- shells/bash
+RUN_DEPENDS = graphics/scrot \
+ net/curl \
+ shells/bash
-NO_BUILD = Yes
-NO_TEST = Yes
+NO_BUILD = Yes
+NO_TEST = Yes
-PKG_ARCH = *
+PKG_ARCH = *
+# Upstream has no Makefile.
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/screenfetch-dev ${PREFIX}/bin/screenfetch
- ${INSTALL_SCRIPT} ${WRKSRC}/screenfetch.1 ${PREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/screenfetch.1 ${PREFIX}/man/man1
.include <bsd.port.mk>
Index: patches/patch-screenfetch-dev
===================================================================
RCS file: /cvs/ports/sysutils/screenfetch/patches/patch-screenfetch-dev,v
retrieving revision 1.1
diff -u -p -r1.1 patch-screenfetch-dev
--- patches/patch-screenfetch-dev 11 Nov 2017 08:07:20 -0000 1.1
+++ patches/patch-screenfetch-dev 30 Jul 2018 18:13:27 -0000
@@ -1,10 +1,32 @@
$OpenBSD: patch-screenfetch-dev,v 1.1 2017/11/11 08:07:20 bentley Exp $
-Fix RAM output.
-From upstream 77613487a23fd5a12b70945cf8075c2773553643.
+Fix "awk: cannot open /proc/fb"
+From upstream dc72b5932e86ba9c4e36110408690abeb2004070
+Fix "unary operator expected" when no GPU is detected
+From upstream 8346a75068323692243805fa702d02ec7538f3b9
+Fix RAM output
+From upstream 77613487a23fd5a12b70945cf8075c2773553643
Index: screenfetch-dev
--- screenfetch-dev.orig
+++ screenfetch-dev
-@@ -1421,7 +1421,7 @@ detectmem () {
+@@ -1332,13 +1332,15 @@ detectgpu () {
+ # Detect Intel GPU #works in dash
+ # Run it only on Intel Processors if GPU is unknown
+ DetectIntelGPU() {
+- gpu=$(awk '{print $2}' /proc/fb)
++ if [ -r /proc/fb ]; then
++ gpu=$(awk '{print $2}' /proc/fb)
++ fi
+
+ case $gpu in
+ *intel*) gpu=intel ;;
+ esac
+
+- if [ $gpu = intel ]; then
++ if [ "$gpu" = "intel" ]; then
+ #Detect CPU
+ local CPU=$(uname -p | awk '{print $3}')
+ CPU=${CPU#*'-'}; #Detect CPU number
+@@ -1421,7 +1423,7 @@ detectmem () {
usedmem=$(($used_mem / 1024^2 ))
elif [ "$distro" == "OpenBSD" ]; then
totalmem=$(($(sysctl -n hw.physmem) / 1024 / 1024))
Hi,
I'm proposing several changes to this port:
Makefile:
* cleaned extra tabs after '='
* use INSTALL_MAN instead of INSTALL_SCRIPT for the manpage
* added myself as MAINTAINER, currently it's "orphaned"
* incremented REVISION
* added braces for variables
patches, already in upstream's master branch but not in a release:
* fixed "awk: cannot open /proc/fb" [1]
* fixed "unary operator expected" when no GPU is detected [2]
Testing:
It has been successfully tested using proot, but you'll need to
copy /var/run/dmesg.boot in your chroot to check the output of the
program, as it uses this file for OS detection.
Comments and OK are welcome!
Charlène.
[1]
https://github.com/KittyKatt/screenFetch/commit/dc72b5932e86ba9c4e36110408690abeb2004070
[2]
https://github.com/KittyKatt/screenFetch/commit/8346a75068323692243805fa702d02ec7538f3b9
No comments:
Post a Comment