Index: sysutils/byobu/Makefile =================================================================== --- sysutils/byobu/Makefile (revision 569231) +++ sysutils/byobu/Makefile (working copy) @@ -3,6 +3,7 @@ PORTNAME= byobu PORTVERSION= 5.133 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://launchpad.net/${PORTNAME}/trunk/${PORTVERSION}/+download/ DISTNAME= ${PORTNAME}_${PORTVERSION}.orig @@ -50,7 +51,5 @@ -e "s@/usr/bin/python@${PYTHON_CMD}@" ${REINPLACE_CMD} -e 's,@sysconfdir@/profile.d,$$(datadir)/@PACKAGE@,' \ ${WRKSRC}/etc/profile.d/Makefile.am - ${FIND} ${WRKSRC}/usr/lib/byobu -type f -maxdepth 1 | ${XARGS} \ - ${REINPLACE_CMD} -e 's:/proc:/compat/linux/proc:g' .include Index: sysutils/byobu/files/patch-usr_lib_byobu_cpu__count =================================================================== --- sysutils/byobu/files/patch-usr_lib_byobu_cpu__count (nonexistent) +++ sysutils/byobu/files/patch-usr_lib_byobu_cpu__count (working copy) @@ -0,0 +1,18 @@ +--- usr/lib/byobu/cpu_count.orig 2016-04-07 22:05:52 UTC ++++ usr/lib/byobu/cpu_count +@@ -24,9 +24,11 @@ __cpu_count_detail() { + } + + __cpu_count() { +- local c +- c=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /proc/cpuinfo) ++ if [ $(uname) = "FreeBSD" ]; then ++ c=$(sysctl -n hw.ncpu) ++ else ++ local c ++ c=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /proc/cpuinfo) ++ fi + [ "$c" = "1" ] || printf "%sx" "$c" + } +- +-# vi: syntax=sh ts=4 noexpandtab Property changes on: sysutils/byobu/files/patch-usr_lib_byobu_cpu__count ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sysutils/byobu/files/patch-usr_lib_byobu_cpu__freq =================================================================== --- sysutils/byobu/files/patch-usr_lib_byobu_cpu__freq (nonexistent) +++ sysutils/byobu/files/patch-usr_lib_byobu_cpu__freq (working copy) @@ -0,0 +1,21 @@ +--- usr/lib/byobu/cpu_freq.orig 2016-04-07 22:05:52 UTC ++++ usr/lib/byobu/cpu_freq +@@ -25,7 +25,11 @@ __cpu_freq_detail() { + + __cpu_freq() { + local hz freq count +- if [ -r "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq" ]; then ++ if [ $(uname) = "FreeBSD" ]; then ++ hz=$(sysctl -n machdep.tsc_freq) ++ fpdiv $hz "1000000000" 1 ++ freq="$_RET" ++ elif [ -r "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq" ]; then + read hz < /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq + fpdiv $hz "1000000" 1 # 1Ghz + freq="$_RET" +@@ -45,5 +49,3 @@ __cpu_freq() { + [ -n "$freq" ] || return + color b c W; printf "%s" "$freq"; color -; color c W; printf "%s" "$ICON_GHz"; color -- + } +- +-# vi: syntax=sh ts=4 noexpandtab Property changes on: sysutils/byobu/files/patch-usr_lib_byobu_cpu__freq ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sysutils/byobu/files/patch-usr_lib_byobu_disk =================================================================== --- sysutils/byobu/files/patch-usr_lib_byobu_disk (revision 569231) +++ sysutils/byobu/files/patch-usr_lib_byobu_disk (working copy) @@ -1,25 +1,34 @@ ---- usr/lib/byobu/disk.orig 2016-04-07 22:05:52 UTC +--- usr/lib/byobu/disk.orig 2020-02-09 16:40:29 UTC +++ usr/lib/byobu/disk -@@ -20,7 +20,7 @@ +@@ -20,7 +20,11 @@ # along with this program. If not, see . __disk_detail() { - df -h -P -+ df -h ++ if [ $(uname) = "FreeBSD" ]; then ++ df -h ++ else ++ df -h -P ++ fi } __disk() { -@@ -28,11 +28,11 @@ __disk() { - # Default to /, but let users override - [ -z "$MONITORED_DISK" ] && MP="/" || MP="$MONITORED_DISK" - case $MP in -- /dev/*) MP=$(awk '$1 == m { print $2; exit(0); }' "m=$MP" /proc/mounts);; -+ /dev/*) MP=$(awk '$1 == m { print $2; exit(0); }' "m=$MP" /compat/linux/proc/mounts);; +@@ -32,7 +36,11 @@ __disk() { esac # this could be done faster with 'stat --file-system --format' # but then we'd have to do blocks -> human units ourselves - out=$({ df -h -P "$MP" 2>/dev/null || df -h "$MP"; } | awk 'END { printf("%s %s", $2, $5); }') -+ out=$({ df -h "$MP" 2>/dev/null || df -h "$MP"; } | awk 'END { printf("%s %s", $2, $5); }') ++ if [ $(uname) = "FreeBSD" ]; then ++ out=$({ df -h "$MP" 2>/dev/null || df -h "$MP"; } | awk 'END { printf("%s %s", $2, $5); }') ++ else ++ out=$({ df -h -P "$MP" 2>/dev/null || df -h "$MP"; } | awk 'END { printf("%s %s", $2, $5); }') ++ fi set -- ${out} size=${1}; pct=${2}; unit=${size#${size%?}} # get the unit (last char) +@@ -48,5 +56,3 @@ __disk() { + color b m W; printf "%s" "$size"; color -; color m W; printf "%s" "$unit"; color -; + color b m W; printf "%s" "$pct"; color -; color m W; printf "%s" "$PCT"; color --; + } +- +-# vi: syntax=sh ts=4 noexpandtab Index: sysutils/byobu/files/patch-usr_lib_byobu_load__average =================================================================== --- sysutils/byobu/files/patch-usr_lib_byobu_load__average (nonexistent) +++ sysutils/byobu/files/patch-usr_lib_byobu_load__average (working copy) @@ -0,0 +1,16 @@ +--- usr/lib/byobu/load_average.orig 2016-04-07 22:05:52 UTC ++++ usr/lib/byobu/load_average +@@ -26,11 +26,11 @@ __load_average_detail() { + __load_average() { + if [ -r "/proc/loadavg" ]; then + read one five fifteen other < /proc/loadavg ++ elif [ $(uname) = "FreeBSD" ]; then ++ one=$(uptime | sed -En 's:.*averages\: ([[:digit:]]+\.[[:digit:]]+),.*:\1:p') + else + one=$(uptime | sed -e "s/.*://" | awk '{print $1}') + fi + [ -n "$one" ] || return + color Y k; printf "$one"; color -- + } +- +-# vi: syntax=sh ts=4 noexpandtab Property changes on: sysutils/byobu/files/patch-usr_lib_byobu_load__average ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sysutils/byobu/files/patch-usr_lib_byobu_memory =================================================================== --- sysutils/byobu/files/patch-usr_lib_byobu_memory (revision 569231) +++ sysutils/byobu/files/patch-usr_lib_byobu_memory (working copy) @@ -1,11 +1,80 @@ ---- usr/lib/byobu/memory.orig 2019-08-23 17:23:09 UTC +--- usr/lib/byobu/memory.orig 2016-09-15 19:22:48 UTC +++ usr/lib/byobu/memory -@@ -52,7 +52,7 @@ __memory() { - buffers_plus_cached=$(($buffers+$cached)) - # "free output" buffers and cache (output from 'free') - fo_buffers=$(($kb_main_used - $buffers_plus_cached)) +@@ -26,16 +26,35 @@ __memory_detail() { + __memory() { + local free="" total="" buffers="" cached="" + local kb_main_used=0 buffers_plus_cached=0 fo_buffers=0 fo_cached=0 +- if [ -r /proc/meminfo ]; then +- while read tok val unit; do +- case "$tok" in +- MemTotal:) total=${val};; +- MemFree:) free=${val};; +- Buffers:) buffers=${val};; +- Cached:) cached=${val};; +- esac +- [ -n "${free}" -a -n "${total}" -a -n "${buffers}" -a -n "${cached}" ] && break; +- done < /proc/meminfo ++ ++ if [ $(uname) = "Linux" ]; then ++ if [ -r /proc/meminfo ]; then ++ while read tok val unit; do ++ case "$tok" in ++ MemTotal:) total=${val};; ++ MemFree:) free=${val};; ++ Buffers:) buffers=${val};; ++ Cached:) cached=${val};; ++ esac ++ [ -n "${free}" -a -n "${total}" -a -n "${buffers}" -a -n "${cached}" ] && break; ++ done < /proc/meminfo ++ fi ++ elif [ $(uname) = "FreeBSD" ]; then ++ # FreeBSD support ++ mem_phys=$(sysctl -n hw.physmem) ++ page_size=$(sysctl -n hw.pagesize) ++ mem_inactive=$(($(sysctl -n vm.stats.vm.v_inactive_count)*$page_size)) ++ mem_cache=$(($(sysctl -n vm.stats.vm.v_cache_count)*$page_size)) ++ mem_free=$(($(sysctl -n vm.stats.vm.v_free_count)*$page_size)) ++ ++ mem_avail=$(($mem_inactive+$mem_cache+$mem_free)) ++ mem_used=$(($mem_phys-$mem_avail)) ++ ++ total=$(($mem_phys/1024)) ++ free=$(($mem_avail/1024)) ++ ++ buffers=0 ++ cached=0 + elif eval $BYOBU_TEST vm_stat >/dev/null 2>&1; then + # MacOS support + # calculation borrowed from http://apple.stackexchange.com/a/48195/18857 +@@ -44,16 +63,18 @@ __memory() { + speculative_blocks=$(vm_stat | grep speculative | awk '{ print $3 }' | sed -e 's/\.//') + free=$((($free_blocks+speculative_blocks)*4)) + inactive=$(($inactive_blocks*4)) +- total=$((($free+$inactive))) ++ total=$(($free+$inactive)) + buffers=0 + cached=0 + fi +- kb_main_used=$(($total-$free)) +- buffers_plus_cached=$(($buffers+$cached)) +- # "free output" buffers and cache (output from 'free') +- fo_buffers=$(($kb_main_used - $buffers_plus_cached)) - fpdiv $((100*${fo_buffers})) "${total}" 0; -+ fpdiv $((100*${kb_main_used})) "${total}" 0; - usage=${_RET} +- usage=${_RET} ++ ++ kb_main_used=$(($total-$free)) ++ buffers_plus_cached=$(($buffers+$cached)) ++ # "free output" buffers and cache (output from 'free') ++ fo_buffers=$(($kb_main_used - $buffers_plus_cached)) ++ fpdiv $((100*${fo_buffers})) "${total}" 0; ++ usage=${_RET} ++ if [ $total -ge 1048576 ]; then fpdiv "$total" 1048567 1 + total=${_RET} +@@ -74,5 +95,3 @@ __memory() { + [ -n "$total" ] || return + color b g W; printf "%s" "$total"; color -; color g W; printf "%s" "$unit"; color -; color b g "$fg"; printf "%s" "$usage"; color -; color g "$fg"; printf "%s" "$PCT"; color -- + } +- +-# vi: syntax=sh ts=4 noexpandtab Index: sysutils/byobu/files/patch-usr_lib_byobu_uptime =================================================================== --- sysutils/byobu/files/patch-usr_lib_byobu_uptime (nonexistent) +++ sysutils/byobu/files/patch-usr_lib_byobu_uptime (working copy) @@ -0,0 +1,18 @@ +--- usr/lib/byobu/uptime.orig 2016-05-31 14:48:13 UTC ++++ usr/lib/byobu/uptime +@@ -30,6 +30,9 @@ __uptime() { + if [ -r /proc/uptime ]; then + read u idle < /proc/uptime + u=${u%.*} ++ elif [ $(uname) = "FreeBSD" ]; then ++ u=$(sysctl -n kern.boottime | sed -En 's:.*sec = ([[:digit:]]+),.*:\1:p') ++ u=$(($(date +%s) - $u)) + elif [ -x /usr/sbin/sysctl ]; then + # MacOS support + u=$(/usr/sbin/sysctl -n kern.boottime | cut -f4 -d' ' | cut -d',' -f1) +@@ -52,5 +55,3 @@ __uptime() { + [ -n "$str" ] || return + color w b; printf "%s" "${str}"; color -- + } +- +-# vi: syntax=sh ts=4 noexpandtab Property changes on: sysutils/byobu/files/patch-usr_lib_byobu_uptime ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sysutils/byobu/files/patch-usr_lib_byobu_users =================================================================== --- sysutils/byobu/files/patch-usr_lib_byobu_users (nonexistent) +++ sysutils/byobu/files/patch-usr_lib_byobu_users (working copy) @@ -0,0 +1,8 @@ +--- usr/lib/byobu/users.orig 2019-06-01 20:40:30 UTC ++++ usr/lib/byobu/users +@@ -40,5 +40,3 @@ __users() { + rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/users"* + fi + } +- +-# vi: syntax=sh ts=4 noexpandtab Property changes on: sysutils/byobu/files/patch-usr_lib_byobu_users ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: sysutils/byobu/pkg-message =================================================================== --- sysutils/byobu/pkg-message (revision 569231) +++ sysutils/byobu/pkg-message (nonexistent) @@ -1,16 +0,0 @@ -[ -{ type: install - message: <