aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2021-08-30 13:37:12 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2021-08-30 13:37:14 +0000
commitd279f6deeb41dab75fa35e0461ccec33ecdc6701 (patch)
tree1ef87e8581fae4a86fd4349a5749e2c7d9baecfa /misc
parent904aa60469601239cefbb5dde7f5aa33ccac9a21 (diff)
downloadports-d279f6deeb41dab75fa35e0461ccec33ecdc6701.tar.gz
ports-d279f6deeb41dab75fa35e0461ccec33ecdc6701.zip
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
Diffstat (limited to 'misc')
-rw-r--r--misc/clifm/Makefile23
-rw-r--r--misc/clifm/distinfo8
-rw-r--r--misc/clifm/files/patch-Makefile23
-rw-r--r--misc/clifm/files/patch-src_misc.c102
-rw-r--r--misc/clifm/pkg-descr4
-rw-r--r--misc/clifm/pkg-plist28
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 <danfe@FreeBSD.org>
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 <bsd.port.mk>
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 <stdio.h>
- #include <string.h>
- #include <sys/stat.h>
-+#if defined(__FreeBSD__)
-+#include <sys/mount.h>
-+#include <sys/sysctl.h>
-+#endif
- #include <time.h>
- #include <unistd.h>
- #include <readline/readline.h>
-@@ -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