From owner-dev-commits-ports-main@freebsd.org Mon Aug 30 13:38:35 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62A1A676D49; Mon, 30 Aug 2021 13:38:35 +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 4Gyrxl27TNz4Y9k; Mon, 30 Aug 2021 13:38:35 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 31A121EC36; Mon, 30 Aug 2021 13:38:35 +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 17UDcZ5t002289; Mon, 30 Aug 2021 13:38:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17UDcZvQ002288; Mon, 30 Aug 2021 13:38:35 GMT (envelope-from git) Date: Mon, 30 Aug 2021 13:38:35 GMT Message-Id: <202108301338.17UDcZvQ002288@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: d279f6deeb41 - main - misc/clifm: the port had been updated and improved (+) 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: d279f6deeb41dab75fa35e0461ccec33ecdc6701 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 13:38:35 -0000 The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=d279f6deeb41dab75fa35e0461ccec33ecdc6701 commit d279f6deeb41dab75fa35e0461ccec33ecdc6701 Author: Alexey Dokuchaev AuthorDate: 2021-08-30 13:37:12 +0000 Commit: Alexey Dokuchaev CommitDate: 2021-08-30 13:37:14 +0000 misc/clifm: the port had been updated and improved (+) - Update CliFM to version 1.2.1 which is more FreeBSD-friendly out of the box now; adjust the LICENSE (it's GPLv2 or later) - Drop dependency on GNU make, custom MAKE_ENV, and `post-patch' target now that Makefile had been improved upstream - Do not depend on phony build target to avoid needless rebuild of the program upon installation - Install extra color themes by default (but allow to opt-out) - Spell ``command line'' correctly in the port description text Reported by: portscout --- misc/clifm/Makefile | 23 ++++++--- misc/clifm/distinfo | 8 +-- misc/clifm/files/patch-Makefile | 23 +++++++++ misc/clifm/files/patch-src_misc.c | 102 -------------------------------------- misc/clifm/pkg-descr | 4 +- misc/clifm/pkg-plist | 28 ++++++++++- 6 files changed, 71 insertions(+), 117 deletions(-) diff --git a/misc/clifm/Makefile b/misc/clifm/Makefile index 90769df4590b..13844759df8c 100644 --- a/misc/clifm/Makefile +++ b/misc/clifm/Makefile @@ -1,24 +1,31 @@ # Created by: Alexey Dokuchaev PORTNAME= clifm -PORTVERSION= 1.1 +PORTVERSION= 1.2.1 DISTVERSIONPREFIX= v CATEGORIES= misc MAINTAINER= danfe@FreeBSD.org COMMENT= Non-curses, KISS file manager for the terminal -LICENSE= GPLv2 +LICENSE= GPLv2+ -USES= desktop-file-utils gettext-runtime gmake localbase readline +USES= desktop-file-utils gettext-runtime readline USE_GITHUB= yes GH_ACCOUNT= leo-arch ALL_TARGET= build -MAKE_ENV= INSTALLPREFIX=${STAGEDIR}${PREFIX}/bin \ - DESKTOPPREFIX=${STAGEDIR}${PREFIX}/share -post-patch: - @${REINPLACE_CMD} -e '/^CFLAGS/s,=.*-march=native,+=,' \ - ${WRKSRC}/src/Makefile +OPTIONS_DEFINE= COLORS +OPTIONS_DEFAULT= COLORS +OPTIONS_SUB= yes + +COLORS_DESC= Install extra color themes +COLORS_GH_PROJECT= clifm-colors:cfmc +COLORS_GH_TAGNAME= v0.1.0:cfmc + +post-install-COLORS-on: + @${MKDIR} ${STAGEDIR}${DATADIR}/colors + ${INSTALL_DATA} ${WRKSRC_cfmc}/colors/*.cfm \ + ${STAGEDIR}${DATADIR}/colors .include diff --git a/misc/clifm/distinfo b/misc/clifm/distinfo index 8acd70659951..1a661c6f9ef9 100644 --- a/misc/clifm/distinfo +++ b/misc/clifm/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1622268275 -SHA256 (leo-arch-clifm-v1.1_GH0.tar.gz) = e2be66e8000fc43f177e472045d9d30f44625e854d85b4cdf5aad8179d32d5af -SIZE (leo-arch-clifm-v1.1_GH0.tar.gz) = 7195392 +TIMESTAMP = 1630210473 +SHA256 (leo-arch-clifm-v1.2.1_GH0.tar.gz) = 5a74270f07c54915c6c67ebb56c33a2b53ed9abdd04815f4d4dc618a160aba79 +SIZE (leo-arch-clifm-v1.2.1_GH0.tar.gz) = 7516820 +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 new file mode 100644 index 000000000000..cfa245403e5b --- /dev/null +++ b/misc/clifm/files/patch-Makefile @@ -0,0 +1,23 @@ +--- Makefile.orig 2021-08-29 04:14:33 UTC ++++ Makefile +@@ -22,9 +22,9 @@ SRCDIR = src + SRC = $(SRCDIR)/*.c + HEADERS = $(SRCDIR)/*.h + +-CFLAGS ?= -O3 -fstack-protector-strong -march=native -Wall ++CFLAGS += -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: + $(RM) -- $(BIN) + $(RM) -f -- $(SRCDIR)/*.o + +-install: build ++install: $(BIN) + $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin + $(INSTALL) -m 0755 $(BIN) $(DESTDIR)$(PREFIX)/bin + $(INSTALL) -m 0755 -d $(DESTDIR)$(PROG_DATADIR) diff --git a/misc/clifm/files/patch-src_misc.c b/misc/clifm/files/patch-src_misc.c deleted file mode 100644 index 0e2d7c9ffc7d..000000000000 --- a/misc/clifm/files/patch-src_misc.c +++ /dev/null @@ -1,102 +0,0 @@ ---- src/misc.c.orig 2021-05-29 06:04:35 UTC -+++ src/misc.c -@@ -31,6 +31,10 @@ - #include - #include - #include -+#if defined(__FreeBSD__) -+#include -+#include -+#endif - #include - #include - #include -@@ -255,9 +259,16 @@ new_instance(char *dir, int sudo) - } - - /* Get absolute path of executable name of itself */ -+#if defined(__linux__) - char *self = realpath("/proc/self/exe", NULL); - - if (!self) { -+#elif defined(__FreeBSD__) -+ const int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; -+ char *self = malloc(PATH_MAX); -+ size_t len = PATH_MAX; -+ if (!self || sysctl(mib, 4, self, &len, NULL, 0) == -1) { -+#endif - fprintf(stderr, "%s: %s\n", PROGRAM_NAME, strerror(errno)); - return EXIT_FAILURE; - } -@@ -812,6 +823,7 @@ set_shell(char *str) - int - list_mountpoints(void) - { -+#if defined(__linux__) - FILE *mp_fp = fopen("/proc/mounts", "r"); - - if (!mp_fp) { -@@ -819,13 +831,15 @@ list_mountpoints(void) - PROGRAM_NAME, strerror(errno)); - return EXIT_FAILURE; - } -+#endif - - printf(_("%sMountpoints%s\n\n"), bold, df_c); - - char **mountpoints = (char **)NULL; - size_t mp_n = 0; -- int exit_status = EXIT_SUCCESS; -+ int i, j, exit_status = EXIT_SUCCESS; - -+#if defined(__linux__) - size_t line_size = 0; - char *line = (char *)NULL; - ssize_t line_len = 0; -@@ -870,6 +884,10 @@ list_mountpoints(void) - free(line); - line = (char *)NULL; - fclose(mp_fp); -+#elif defined(__FreeBSD__) -+ struct statfs *fslist; -+ mp_n = getmntinfo(&fslist, MNT_NOWAIT); -+#endif - - /* This should never happen: There should always be a mountpoint, - * at least "/" */ -@@ -877,6 +895,26 @@ list_mountpoints(void) - fputs(_("mp: There are no available mountpoints\n"), stdout); - return EXIT_SUCCESS; - } -+#if defined(__FreeBSD__) -+ for (i = j = 0; i < mp_n; i++) { -+ /* Do not list all mountpoints, but only those corresponding -+ * to a block device (/dev) */ -+ if (strncmp(fslist[i].f_mntfromname, "/dev/", 5) == 0) { -+ printf("%s%u%s %s%s%s (%s)\n", el_c, j + 1, df_c, -+ (access(fslist[i].f_mntonname, R_OK | X_OK) -+ == 0) ? di_c : nd_c, fslist[i].f_mntonname, -+ df_c, fslist[i].f_mntfromname); -+ /* Store the mountpoint into an array */ -+ mountpoints = (char **)xrealloc(mountpoints, -+ (j + 1) * sizeof(char *)); -+ mountpoints[j++] = savestring(fslist[i].f_mntonname, -+ strlen(fslist[i].f_mntonname)); -+ } -+ } -+ /* Update filesystem counter as it would be used to free() the -+ * mountpoints entries later (below) */ -+ mp_n = j; -+#endif - - putchar('\n'); - /* Ask the user and chdir into the selected mountpoint */ -@@ -922,7 +960,7 @@ list_mountpoints(void) - /* Free stuff and exit */ - free(input); - -- int i = (int)mp_n; -+ i = (int)mp_n; - while (--i >= 0) - free(mountpoints[i]); - diff --git a/misc/clifm/pkg-descr b/misc/clifm/pkg-descr index 1588853c1ff8..ac03122a34ae 100644 --- a/misc/clifm/pkg-descr +++ b/misc/clifm/pkg-descr @@ -6,8 +6,8 @@ Search for files, copy, rename, and trash some of them, but, at the same time, update/upgrade your system, add some cronjob, stop a service, and run nano (or vi, or emacs, if you like). -Those familiar with the command-line will find in a file manager based on -it a desirable addition to its functionality. The command-line is still +Those familiar with the command line will find in a file manager based on +it a desirable addition to its functionality. The command line is still there, never hidden. WWW: https://github.com/leo-arch/clifm diff --git a/misc/clifm/pkg-plist b/misc/clifm/pkg-plist index ef396d41ed04..90132d200446 100644 --- a/misc/clifm/pkg-plist +++ b/misc/clifm/pkg-plist @@ -1,11 +1,35 @@ bin/clifm +man/man1/clifm.1.gz share/applications/clifm.desktop share/bash-completion/completions/clifm +%%DATADIR%%/actions.cfm +%%DATADIR%%/clifmrc +%%COLORS%%%%DATADIR%%/colors/amber-256.cfm +%%COLORS%%%%DATADIR%%/colors/aqua.cfm +%%COLORS%%%%DATADIR%%/colors/base16.cfm +%%COLORS%%%%DATADIR%%/colors/cga.cfm +%%COLORS%%%%DATADIR%%/colors/cold.cfm +%%COLORS%%%%DATADIR%%/colors/default.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/light.cfm +%%COLORS%%%%DATADIR%%/colors/molokai.cfm +%%COLORS%%%%DATADIR%%/colors/snow.cfm +%%COLORS%%%%DATADIR%%/colors/solarized.cfm +%%COLORS%%%%DATADIR%%/colors/sunset.cfm +%%COLORS%%%%DATADIR%%/colors/white-256.cfm +%%COLORS%%%%DATADIR%%/colors/white.cfm +%%COLORS%%%%DATADIR%%/colors/zenburn.cfm %%DATADIR%%/functions/cd_on_quit.sh %%DATADIR%%/functions/file_picker.sh %%DATADIR%%/functions/subshell_notice.sh +%%DATADIR%%/keybindings.cfm %%DATADIR%%/mimelist.cfm +%%DATADIR%%/plugins/BFG.cfg %%DATADIR%%/plugins/BFG.sh +%%DATADIR%%/plugins/batch_copy.sh %%DATADIR%%/plugins/batch_create.sh %%DATADIR%%/plugins/clip.sh %%DATADIR%%/plugins/colors.sh @@ -27,7 +51,7 @@ share/bash-completion/completions/clifm %%DATADIR%%/plugins/update.sh %%DATADIR%%/plugins/vid_viewer.sh %%DATADIR%%/plugins/wallpaper_setter.sh +%%DATADIR%%/prompts.cfm +%%DATADIR%%/readline.cfm share/icons/hicolor/scalable/apps/clifm.svg -share/locale/es/LC_MESSAGES/clifm.mo -share/man/man1/clifm.1.gz share/zsh/site-functions/_clifm