From nobody Tue Jul 12 07:56:37 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7B7FF17FACEC; Tue, 12 Jul 2022 07:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LhtPK34bYz3FyK; Tue, 12 Jul 2022 07:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657612597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gkBhC70lBbiJF3ZbOAysSsZDfd4y5SUINcfUEd3TWrQ=; b=Xaz9oqk/ZH07rOJxoeTrGtA2gghHbFxUWF8hSQySlR6GeEiuNJk9Cv6MvREfCtlYeWadws VHJKFG/aUwEcJWf7Nd6Cv5fhm7bG2eMmPvfi7evqw5xIRm9uZhy512T6s1ndBx6gU7tfmJ aSrRqXNu9cVs6We1DkORuuSWl/zxiG+yYq9RnnnSFFElDl1tiERtxqL2JLvPf7aRuDk7+d VFANYYBWVTGd4x8JNAyDpVrlFD1g2qWKur4c0CbQvsddqNjAcM1eoWU+D6ofCkG8KZLIlP 7+/w98MsSKyFgS6ykEJVCzXZTcTE9rdtqa3MPGsZmdEy1ONFLWU5HWq7m4FSvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LhtPK25lNzcDR; Tue, 12 Jul 2022 07:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26C7ubAG080967; Tue, 12 Jul 2022 07:56:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26C7ubhY080966; Tue, 12 Jul 2022 07:56:37 GMT (envelope-from git) Date: Tue, 12 Jul 2022 07:56:37 GMT Message-Id: <202207120756.26C7ubhY080966@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: f116f3b18afa - main - misc/clifm: update CliFM to version 1.6 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f116f3b18afa48e39386d926479b10dfbf3c842a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657612597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gkBhC70lBbiJF3ZbOAysSsZDfd4y5SUINcfUEd3TWrQ=; b=wSB44Ld8zF4nXZSqCO6ozC9a6A+HxZD6awoV+dWfAdXQkU/aXre/b/K7V/Y2BgBDBPnu8k dvUzYyOR/eyJdl/ZvwDodM8c7lGWzhMG4Bp7zo9L/RIPHfcp/+dO/yKYBppkxKxoSczRcJ qX5V4U9jNjBiaHWZBT3eBYGfiS7TmeLmPZu/XLIJqgYVXUrOd9lq2/FoD4/veBBPFUDoT5 PS2dOdqxoEjk/pp/lMeT+z3QN00b9aUrTaCH89s6iS8S0LpMcEODVVfLaVUaX6whsFaaFH slNPkcUNvUASg2Spdx03tZxT08e7ngi56AMrfpJUZO+2q14yfS8GzCrVe/Mz8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657612597; a=rsa-sha256; cv=none; b=kdPMyVt0FPyxS1dIuBS/2GG0VovGdCNQxIs8/G0emhda9uRJf3GoiODIR6t0MNo6Uj5Fkl vyneHYmGczIrkZgzLiKgvMS8f02E8WZREGysx33qqrrou2r9Ubjp8A2eYCI70KdrWqrdHe FxVZmcUoMnPSovRppKtyimdF06m5CRWMsiMmTzcgiOmJWnlclU8fiEjqbA+MbhYqmBXaii es2HKR0VBVCuQspdChChenk8TwGxw1wStFUPAvHlj2detK8JPQdng6C+aPMy+MZggZetZV JWJNIivq7IDDObsDKHcp3EeSx11gGH3J69fE/GfpzjKOdRr1jl9bgDEuG8kehQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=f116f3b18afa48e39386d926479b10dfbf3c842a commit f116f3b18afa48e39386d926479b10dfbf3c842a Author: Alexey Dokuchaev AuthorDate: 2022-07-12 07:55:40 +0000 Commit: Alexey Dokuchaev CommitDate: 2022-07-12 07:55:40 +0000 misc/clifm: update CliFM to version 1.6 - Port one GNU-oriented shell script to use FreeBSD native utilities (mostly) - Fix -Wformat warnings on i386 (unfortunately, had to keep existing format specifiers because they are part of the translated strings and throw some ugly typecasts instead) Reported by: portscout --- misc/clifm/Makefile | 11 ++++- misc/clifm/distinfo | 6 +-- misc/clifm/files/patch-Makefile | 13 +++--- misc/clifm/files/patch-plugins_fdups.sh | 74 +++++++++++++++++++++++++++++++++ misc/clifm/files/patch-src_jump.c | 16 +++++++ misc/clifm/files/patch-src_properties.c | 32 ++++++++++++++ misc/clifm/pkg-plist | 13 ++++++ 7 files changed, 152 insertions(+), 13 deletions(-) diff --git a/misc/clifm/Makefile b/misc/clifm/Makefile index 22726e28433f..56279fd03a19 100644 --- a/misc/clifm/Makefile +++ b/misc/clifm/Makefile @@ -1,7 +1,7 @@ # Created by: Alexey Dokuchaev PORTNAME= clifm -PORTVERSION= 1.5.1 +PORTVERSION= 1.6 DISTVERSIONPREFIX= v CATEGORIES= misc @@ -10,10 +10,14 @@ COMMENT= Non-curses, KISS file manager for the terminal LICENSE= GPLv2+ -USES= desktop-file-utils gettext-runtime readline +RUN_DEPENDS= gfind:misc/findutils guniq:sysutils/coreutils + +USES= desktop-file-utils gettext-runtime python:run \ + readline shebangfix USE_GITHUB= yes GH_ACCOUNT= leo-arch ALL_TARGET= build +SHEBANG_FILES= misc/tools/manpages_comp_gen.py OPTIONS_DEFINE= COLORS OPTIONS_DEFAULT= COLORS @@ -28,4 +32,7 @@ post-install-COLORS-on: ${INSTALL_DATA} ${WRKSRC_cfmc}/colors/*.cfm \ ${STAGEDIR}${DATADIR}/colors +post-stage: + @${RM} ${STAGEDIR}${DATADIR}/plugins/*.orig + .include diff --git a/misc/clifm/distinfo b/misc/clifm/distinfo index 5b841484fc23..0cde014a4cba 100644 --- a/misc/clifm/distinfo +++ b/misc/clifm/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1648330915 -SHA256 (leo-arch-clifm-v1.5.1_GH0.tar.gz) = c615fbf52a0f701b3c509437d3edf0bbdcb6645712f08cdf745fac38b23a087b -SIZE (leo-arch-clifm-v1.5.1_GH0.tar.gz) = 1217409 +TIMESTAMP = 1656397054 +SHA256 (leo-arch-clifm-v1.6_GH0.tar.gz) = 303f0ee2c6b19d3612de623c3ae0ee3ac110dcacfc348ec0f1d80015fc5f26e1 +SIZE (leo-arch-clifm-v1.6_GH0.tar.gz) = 1268633 SHA256 (leo-arch-clifm-colors-v0.1.0_GH0.tar.gz) = 147573aa1e83c286488fdf45c3673e6b417957fb3c5a7f70eba0021cc1f3aa70 SIZE (leo-arch-clifm-colors-v0.1.0_GH0.tar.gz) = 875324 diff --git a/misc/clifm/files/patch-Makefile b/misc/clifm/files/patch-Makefile index 3c635f8452a8..aeae151c3fd1 100644 --- a/misc/clifm/files/patch-Makefile +++ b/misc/clifm/files/patch-Makefile @@ -1,18 +1,15 @@ ---- Makefile.orig 2021-08-29 04:14:33 UTC +--- Makefile.orig 2022-06-28 06:17:34 UTC +++ Makefile -@@ -22,9 +22,9 @@ SRCDIR = src - SRC = $(SRCDIR)/*.c - HEADERS = $(SRCDIR)/*.h +@@ -24,7 +24,7 @@ LIBS_Linux ?= -lreadline -lacl -lcap -lmagic --CFLAGS ?= -O3 -fstack-protector-strong -march=native -Wall -DCLIFM_DATADIR=$(DATADIR) -+CFLAGS += -Wall -DCLIFM_DATADIR=$(DATADIR) + CFLAGS ?= -O3 -fstack-protector-strong -march=native -Wall LIBS_Linux ?= -lreadline -lacl -lcap -lmagic -LIBS_FreeBSD ?= -I/usr/local/include -L/usr/local/lib -lreadline -lintl -lmagic +LIBS_FreeBSD ?= -I$(LOCALBASE)/include -L$(LOCALBASE)/lib -lreadline -lintl -lmagic LIBS_NetBSD ?= -I/usr/pkg/include -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lreadline -lintl -lmagic LIBS_OpenBSD ?= -I/usr/local/include -L/usr/local/lib -lereadline -lintl -lmagic - -@@ -36,7 +36,7 @@ clean: + LIBS_Darwin ?= -I/opt/local/include -L/opt/local/lib -lreadline -lintl -lmagic +@@ -39,7 +39,7 @@ clean: $(RM) -- $(BIN) $(RM) -f -- $(SRCDIR)/*.o diff --git a/misc/clifm/files/patch-plugins_fdups.sh b/misc/clifm/files/patch-plugins_fdups.sh new file mode 100644 index 000000000000..747c786debbf --- /dev/null +++ b/misc/clifm/files/patch-plugins_fdups.sh @@ -0,0 +1,74 @@ +--- plugins/fdups.sh.orig 2022-06-28 06:17:34 UTC ++++ plugins/fdups.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # Plugin to find/remove duplicate files for CliFM + # +@@ -8,14 +8,12 @@ + # by MD5) in DIR (current directory if omitted) and allow the user to remove + # one or more of them + # +-# Dependencies: find md5sum sort uniq xargs sed stat ++# Dependencies: gfind md5 sort guniq xargs sed stat + # + # Notes: + # 1. If the file size exceeds SIZE_DIGITS digits the file will be misplaced. + # (12 digits amount to sizes up to 931GiB) +-# 2. Bash compatible shell required for mktemp(1) + # +-# Shell: Bash + # Based on https://github.com/jarun/nnn/blob/master/plugins/dups and modified + # to fit our needs + # +@@ -25,14 +23,14 @@ no_dep=0 + me="clifm" + no_dep=0 + +-if ! type find > /dev/null 2>&1; then +- printf "%s: find: command not found\n" "$me" >&2; no_dep=1 +-elif ! type md5sum > /dev/null 2>&1; then +- printf "%s: md5sum: command not found\n" "$me" >&2; no_dep=1 ++if ! type gfind > /dev/null 2>&1; then ++ printf "%s: gfind: command not found\n" "$me" >&2; no_dep=1 ++elif ! type md5 > /dev/null 2>&1; then ++ printf "%s: md5: command not found\n" "$me" >&2; no_dep=1 + elif ! type sort > /dev/null 2>&1; then + printf "%s: sort: command not found\n" "$me" >&2; no_dep=1 +-elif ! type uniq > /dev/null 2>&1; then +- printf "%s: uniq: command not found\n" "$me" >&2; no_dep=1 ++elif ! type guniq > /dev/null 2>&1; then ++ printf "%s: guniq: command not found\n" "$me" >&2; no_dep=1 + elif ! type xargs > /dev/null 2>&1; then + printf "%s: xargs: command not found\n" "$me" >&2; no_dep=1 + elif ! type sed > /dev/null 2>&1; then +@@ -72,20 +70,20 @@ printf "\ + " > "$tmp_file" + + # shellcheck disable=SC2016 +-find "$dir" -size +0 -type f -printf "%${size_digits}s %p\n" | sort -rn | uniq -w"${size_digits}" -D | sed -e ' s/^ \{0,12\}\([0-9]\{0,12\}\) \(.*\)$/printf "%s %s\\n" "$(md5sum "\2")" "d\1"/ ' | tr '\n' '\0' | xargs -0 -n1 -r sh -c | sort | { uniq -w32 --all-repeated=separate; echo; } | sed -ne ' +-h ++gfind "$dir" -size +0 -type f -printf "%${size_digits}s %p\n" | sort -rn | guniq -w"${size_digits}" -D | sed -e 's/^ \{0,12\}\([0-9]\{0,12\}\) \(.*\)$/printf "%s %s\\n" "$(md5 -r "\2")" "d\1"/' | tr '\n' '\0' | xargs -0 -n1 -r sh -c | sort | { guniq -w32 --all-repeated=separate; echo; } | sed -ne ' ++h + s/^\(.\{32\}\).* d\([0-9]*\)$/## md5sum: \1 size: \2 bytes/p +-g ++g + :loop +-N +-/.*\n$/!b loop +-p' | sed -e 's/^.\{32\} \(.*\) d[0-9]*$/\1/' >> "$tmp_file" ++N ++/.*\n$/!b loop ++p' | sed -e 's/^.\{32\} \(.*\) d[0-9]*$/\1/' >> "$tmp_file" + +-time_pre="$(stat -c '%Y' "$tmp_file")" ++time_pre="$(stat -f '%m' "$tmp_file")" + + "$EDITOR" "$tmp_file" + +-time_post="$(stat -c '%Y' "$tmp_file")" ++time_post="$(stat -f '%m' "$tmp_file")" + + if [ "$time_pre" = "$time_post" ]; then + printf "%s: Nothing to do\n" "$me" diff --git a/misc/clifm/files/patch-src_jump.c b/misc/clifm/files/patch-src_jump.c new file mode 100644 index 000000000000..6066e780b200 --- /dev/null +++ b/misc/clifm/files/patch-src_jump.c @@ -0,0 +1,16 @@ +--- src/jump.c.orig 2022-06-28 06:17:34 UTC ++++ src/jump.c +@@ -207,11 +207,11 @@ save_jumpdb(void) + } + + jump_num++; +-#ifndef __OpenBSD__ ++#ifndef __i386__ + fprintf(fp, "%zu:%ld:%ld:%s\n", jump_db[i].visits, jump_db[i].first_visit, + jump_db[i].last_visit, jump_db[i].path); + #else +- fprintf(fp, "%zu:%lld:%lld:%s\n", jump_db[i].visits, jump_db[i].first_visit, ++ fprintf(fp, "%zu:%d:%d:%s\n", jump_db[i].visits, jump_db[i].first_visit, + jump_db[i].last_visit, jump_db[i].path); + #endif + } diff --git a/misc/clifm/files/patch-src_properties.c b/misc/clifm/files/patch-src_properties.c new file mode 100644 index 000000000000..eeacb8c3c138 --- /dev/null +++ b/misc/clifm/files/patch-src_properties.c @@ -0,0 +1,32 @@ +--- src/properties.c.orig 2022-06-28 06:17:34 UTC ++++ src/properties.c +@@ -406,8 +406,8 @@ get_properties(char *filename, const int dsize) + if (colorize == 1) + printf("%s", cend); + +-#if defined(__OpenBSD__) || defined(__APPLE__) +- printf(_("\tBlocks: %s%lld%s"), cbold, attr.st_blocks, cend); ++#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__) ++ printf(_("\tBlocks: %s%lld%s"), cbold, (long long)attr.st_blocks, cend); + #else + printf(_("\tBlocks: %s%ld%s"), cbold, attr.st_blocks, cend); + #endif +@@ -417,15 +417,15 @@ get_properties(char *filename, const int dsize) + #else + printf(_("\tIO Block: %s%ld%s"), cbold, attr.st_blksize, cend); + #endif +-#if defined(__OpenBSD__) || defined(__APPLE__) +- printf(_("\tInode: %s%llu%s\n"), cbold, attr.st_ino, cend); ++#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__) ++ printf(_("\tInode: %s%llu%s\n"), cbold, (unsigned long long)attr.st_ino, cend); + #else + printf(_("\tInode: %s%zu%s\n"), cbold, attr.st_ino, cend); + #endif + #if defined(__OpenBSD__) || defined(__APPLE__) + printf(_("Device: %s%d%s"), cbold, attr.st_dev, cend); + #else +- printf(_("Device: %s%zu%s"), cbold, attr.st_dev, cend); ++ printf(_("Device: %s%zu%s"), cbold, (size_t)attr.st_dev, cend); + #endif + printf(_("\tUid: %s%u (%s)%s"), cid, attr.st_uid, !owner ? _("unknown") + : owner->pw_name, cend); diff --git a/misc/clifm/pkg-plist b/misc/clifm/pkg-plist index 220c8bd93a30..9c9eedb3d961 100644 --- a/misc/clifm/pkg-plist +++ b/misc/clifm/pkg-plist @@ -10,12 +10,17 @@ share/bash-completion/completions/clifm %%COLORS%%%%DATADIR%%/colors/cga.cfm %%COLORS%%%%DATADIR%%/colors/cold.cfm %%COLORS%%%%DATADIR%%/colors/default.cfm +%%COLORS%%%%DATADIR%%/colors/dracula-vivid.cfm %%COLORS%%%%DATADIR%%/colors/dracula.cfm %%COLORS%%%%DATADIR%%/colors/forest.cfm %%COLORS%%%%DATADIR%%/colors/green-256.cfm %%COLORS%%%%DATADIR%%/colors/gruvbox.cfm +%%COLORS%%%%DATADIR%%/colors/jellybeans-vivid.cfm %%COLORS%%%%DATADIR%%/colors/light.cfm %%COLORS%%%%DATADIR%%/colors/molokai.cfm +%%COLORS%%%%DATADIR%%/colors/nocolor.cfm +%%COLORS%%%%DATADIR%%/colors/nord.cfm +%%COLORS%%%%DATADIR%%/colors/one-dark.cfm %%COLORS%%%%DATADIR%%/colors/snow.cfm %%COLORS%%%%DATADIR%%/colors/solarized.cfm %%COLORS%%%%DATADIR%%/colors/sunset.cfm @@ -32,9 +37,13 @@ share/bash-completion/completions/clifm %%DATADIR%%/plugins/BFG.sh %%DATADIR%%/plugins/batch_copy.sh %%DATADIR%%/plugins/batch_create.sh +%%DATADIR%%/plugins/bm_import.sh %%DATADIR%%/plugins/clip.sh %%DATADIR%%/plugins/colors.sh +%%DATADIR%%/plugins/cprm.sh +%%DATADIR%%/plugins/disk_analyzer.sh %%DATADIR%%/plugins/dragondrop.sh +%%DATADIR%%/plugins/fdups.sh %%DATADIR%%/plugins/finder.sh %%DATADIR%%/plugins/fzcd.sh %%DATADIR%%/plugins/fzfdesel.sh @@ -49,13 +58,17 @@ share/bash-completion/completions/clifm %%DATADIR%%/plugins/kbgen.c %%DATADIR%%/plugins/mime_list.sh %%DATADIR%%/plugins/music_player.sh +%%DATADIR%%/plugins/pager.sh %%DATADIR%%/plugins/pdf_viewer.sh %%DATADIR%%/plugins/plugins-helper +%%DATADIR%%/plugins/recur_rm.sh %%DATADIR%%/plugins/rgfind.sh %%DATADIR%%/plugins/update.sh %%DATADIR%%/plugins/vid_viewer.sh %%DATADIR%%/plugins/wallpaper_setter.sh %%DATADIR%%/prompts.cfm %%DATADIR%%/readline.cfm +%%DATADIR%%/tools/deroff.py +%%DATADIR%%/tools/manpages_comp_gen.py share/icons/hicolor/scalable/apps/clifm.svg share/zsh/site-functions/_clifm