ports/sysutils/screenfetch/files/patch-screenfetch-dev
Dmitry Marakasov 17b4fb8b16 - Fix LICENSE
- Add LICENSE_FILE
- Add NO_ARCH
- Switch to options helpers
- Add simple test
- Fix FreeBSD detection
- Fix screenfetch failures in some cases due to not clearly understood reason:

/usr/local/bin/screenfetch: line 4156: /dev/fd/62: Operation not supported
/usr/local/bin/screenfetch: line 4157: 3: Bad file descriptor

by importing upstream fix.

PR:		213854
Submitted by:	amdmi3
Approved by:	jgh (maintainer)
2016-11-11 19:40:49 +00:00

33 lines
865 B
Text

--- screenfetch-dev.orig 2015-07-14 12:32:02 UTC
+++ screenfetch-dev
@@ -515,6 +515,14 @@ detectdistro () {
if [ "$distro" == "Unknown" ]; then
if [ $(uname -o 2>/dev/null) ]; then
case "$(uname -o)" in
+ "FreeBSD")
+ distro="FreeBSD"
+ fake_distro="${distro}"
+ ;;
+ "DragonFly")
+ distro="DragonFlyBSD"
+ fake_distro="${distro}"
+ ;;
"Cygwin")
distro="Cygwin"
fake_distro="${distro}"
@@ -4151,11 +4159,10 @@ for i in "${display[@]}"; do
! [[ $Win_theme ]] && detectwmtheme;
else
if [[ "${display[*]}" =~ "$i" ]]; then
- if [[ "$errorSuppress" == "1" ]]; then detect${i} 2>/dev/null
- else
- exec 3> >(stderrOut)
- detect${i} 2>&3
- exec 3>&-
+ if [[ "$errorSuppress" == "1" ]]; then
+ detect${i} 2>/dev/null
+ else
+ detect${i}
fi
fi
fi