diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2024-01-15 10:38:18 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2024-01-15 10:38:18 +0000 |
commit | a5ade24bb0d77d5ca30a27dc33748ff644a09588 (patch) | |
tree | 4f45c918ac06c7c32d72a29e39243c572982e580 | |
parent | 7fa65791d38dd7bc5c11879e6e3d6293b7dc8c94 (diff) |
misc/mc: drop needless run-time dependencies on Aspell and Xlib
Yury V. Zaytsev points out that for X11 and Aspell support, header
files <X11/Xlib.h> and <aspell.h> are only needed during the build,
while their corresponding libraries would be loaded dynamically if
available; if not, mc(1) would still work fine, just without those
features. The source code and ldd(1) output confirm his findings:
% cd $WRKDIR/mc-4.8.30 && grep -R -A1 g_module_build_path *
lib/tty/x11conn.c: x11_module_fname = g_module_build_path (NULL, "X11");
lib/tty/x11conn.c- x11_module = g_module_open (x11_module_fname, G_MODULE_BIND_LAZY);
--
src/editor/spell.c: spell_module_fname = g_module_build_path (NULL, "libaspell");
src/editor/spell.c- spell_module = g_module_open (spell_module_fname, G_MODULE_BIND_LAZY);
This allows to enable Aspell support by default and drop X11-less
slave port now that both of these dependencies are build-time only
yet still can be completely disabled via options.
PR: 269120
-rw-r--r-- | MOVED | 1 | ||||
-rw-r--r-- | misc/Makefile | 1 | ||||
-rw-r--r-- | misc/mc-nox11/Makefile | 4 | ||||
-rw-r--r-- | misc/mc/Makefile | 11 |
4 files changed, 6 insertions, 11 deletions
@@ -2933,3 +2933,4 @@ net-im/libaccounts-qt5|net-im/libaccounts-qt|2024-01-05|Renamed to support flavo devel/py-pygithub|devel/py-PyGithub|2024-01-06|Rename port match upstream devel/freebsd-gcc9||2024-01-09|No longer able to build base system, use GCC 12 or later instead net/downzemall|net/arrowdl|2024-01-11|Project was renamed upstream +misc/mc-nox11|misc/mc|2023-01-15|No longer useful (misc/mc does not require Xlib at runtime) diff --git a/misc/Makefile b/misc/Makefile index 219cd07ac295..7c358530f4bb 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -259,7 +259,6 @@ SUBDIR += mate-user-guide SUBDIR += mbuffer SUBDIR += mc - SUBDIR += mc-nox11 SUBDIR += mdp SUBDIR += meshoptimizer SUBDIR += metalink-checker diff --git a/misc/mc-nox11/Makefile b/misc/mc-nox11/Makefile deleted file mode 100644 index 6f1710a2814a..000000000000 --- a/misc/mc-nox11/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -MASTERDIR= ${.CURDIR}/../mc -OPTIONS_EXCLUDE= X11 - -.include "${MASTERDIR}/Makefile" diff --git a/misc/mc/Makefile b/misc/mc/Makefile index d7f41964a223..b6e0f887b391 100644 --- a/misc/mc/Makefile +++ b/misc/mc/Makefile @@ -1,5 +1,6 @@ PORTNAME= mc PORTVERSION= 4.8.30 +PORTREVISION= 1 CATEGORIES= misc shells MASTER_SITES= http://ftp.midnight-commander.org/ \ https://ftp.osuosl.org/pub/midnightcommander/ @@ -29,7 +30,7 @@ CONFIGURE_ENV= ZIP=${LOCALBASE}/bin/zip UNZIP=${UNZIP_NATIVE_CMD} PORTDOCS= AUTHORS FAQ HACKING MAINTAINERS NEWS README *.txt OPTIONS_DEFINE= ASPELL DOCS EDITOR EXTATTR ICONV NLS PCRE2 SFTP SUBSHELL X11 -OPTIONS_DEFAULT= EDITOR ICONV SFTP SLANG SUBSHELL X11 +OPTIONS_DEFAULT= ASPELL EDITOR ICONV SFTP SLANG SUBSHELL X11 OPTIONS_SINGLE= SCREEN OPTIONS_SINGLE_SCREEN= SLANG NCURSES OPTIONS_SUB= yes @@ -41,8 +42,9 @@ PCRE2_DESC= Use PCRE2 as low-level search engine SCREEN_DESC= Screen library SFTP_DESC= Support for SFTP (via libssh) SUBSHELL_DESC= Build with subshell support +X11_DESC= X11 events support (if available) -ASPELL_LIB_DEPENDS= libaspell.so:textproc/aspell +ASPELL_BUILD_DEPENDS= ${LOCALBASE}/include/aspell.h:textproc/aspell ASPELL_CONFIGURE_ENABLE=aspell EDITOR_CONFIGURE_WITH= internal-edit @@ -71,11 +73,8 @@ SLANG_CONFIGURE_ON= --with-screen=slang SUBSHELL_CONFIGURE_WITH=subshell SUBSHELL_SUB_FILES= pkg-message +X11_BUILD_DEPENDS= ${LOCALBASE}/include/X11/Xlib.h:x11/libX11 X11_CONFIGURE_WITH= x -X11_USES= xorg -X11_USE= xorg=x11,xext -X11_VARS= CONFLICTS_INSTALL=mc-nox11 -X11_VARS_OFF= CONFLICTS_INSTALL=mc PKGNAMESUFFIX=-nox11 post-patch: @${REINPLACE_CMD} -e 's|clang\*)|*)|' ${WRKSRC}/configure |