misc/mc: sync with upstream

Taken from: HardenedBSD
This commit is contained in:
Franco Fichtner 2021-05-27 17:16:50 +02:00
parent 45c9dea350
commit 2c8085779b
2 changed files with 36 additions and 17 deletions

View file

@ -2,6 +2,7 @@
PORTNAME= mc
PORTVERSION= 4.8.26
PORTREVISION= 1
CATEGORIES= misc shells
MASTER_SITES= http://ftp.midnight-commander.org/ \
https://ftp.osuosl.org/pub/midnightcommander/
@ -12,8 +13,6 @@ COMMENT= Midnight Commander, a free Norton Commander Clone
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING
CONFLICTS= mc-light-4*
USES= gmake gnome libtool perl5 pkgconfig python shebangfix tar:xz
SHEBANG_FILES= ${WRKSRC}/src/vfs/extfs/helpers/s3+.in \
${WRKSRC}/src/vfs/extfs/helpers/uc1541
@ -24,18 +23,24 @@ CONFIGURE_ENV= ZIP=${ZIP_CMD} UNZIP=${UNZIP_CMD}
USE_HARDENING= safestack
OPTIONS_DEFINE= DOCS EDITOR ICONV NLS SFTP SMB SUBSHELL X11
OPTIONS_DEFAULT=EDITOR ICONV SFTP SLANG SMB SUBSHELL X11
PORTDOCS= AUTHORS FAQ HACKING MAINTAINERS NEWS README *.txt
OPTIONS_DEFINE= DOCS EDITOR EXTATTR ICONV NLS SFTP SMB SUBSHELL X11
OPTIONS_DEFAULT= EDITOR EXTATTR ICONV SFTP SLANG SMB SUBSHELL X11
OPTIONS_SINGLE= SCREEN
OPTIONS_SINGLE_SCREEN= SLANG NCURSES
OPTIONS_SUB= yes
EDITOR_DESC= Build with internal editor
EXTATTR_DESC= Ext2fs extended attributes support
SCREEN_DESC= Screen library
SFTP_DESC= Support for SFTP (via libssh)
SUBSHELL_DESC= Build with subshell support
EDITOR_CONFIGURE_WITH= internal-edit
EXTATTR_LIB_DEPENDS= libe2p.so:sysutils/e2fsprogs
ICONV_USES= iconv
ICONV_CONFIGURE_ENABLE= charset
@ -58,6 +63,7 @@ SMB_CONFIGURE_WITH= smb-configdir=${LOCALBASE}/etc \
smb-codepagedir=${LOCALBASE}/etc/codepages
SUBSHELL_CONFIGURE_WITH=subshell
SUBSHELL_SUB_FILES= pkg-message
X11_CONFIGURE_ENABLE= x
X11_USES= xorg
@ -65,25 +71,21 @@ X11_USE= xorg=x11,xext
X11_VARS= CONFLICTS_INSTALL+="mc-nox11-[0-9]*"
X11_VARS_OFF= CONFLICTS_INSTALL+="mc-[0-9]*"
PORTDOCS= *
DOCSRCDIR1= ${WRKSRC}
DOC_FILES1= AUTHORS NEWS README
DOCSRCDIR2= ${WRKSRC}/doc
DOCSDIR2= ${DOCSDIR}/doc
DOC_FILES2= FAQ HACKING MAINTAINERS *.txt
post-patch:
@${REINPLACE_CMD} -e 's|missing-parameter-type|unused-variable|; \
s|but-set-variable|variable|' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|x$$UNRAR_VERSION = x|$$UNRAR_VERSION -ge |' \
${WRKSRC}/src/vfs/extfs/helpers/urar.in
post-install:
post-patch-EXTATTR-off:
@${REINPLACE_CMD} -e '/found_e2p=/s|yes|disabled|; /e2p library/ \
{ s| or|,|; s|)|&, or disabled|; }' ${WRKSRC}/configure
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR2}
${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR2}
${LN} -sf ../${PORTDOCS:[1]} ${WRKSRC}/doc
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}
post-install-X11-on:
${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.png \

View file

@ -0,0 +1,17 @@
[
{ type: install
message: <<EOM
Midnight Commander was built with subshell support, which works with most
popular shells, e.g. bash(1), dash(1), tcsh(1), zsh(1), but not sh(1) due
to its lack of "precmd" or equivalent hooks which mc(1) needs to read the
subshell's current directory.
$ env SHELL=/bin/sh mc
common.c: unimplemented subshell type 1
read (subshell_pty...): No such file or directory (2)
Please either use more advanced interactive shell, or start mc(1) with -u
(--nosubshell) switch if you're confined to /bin/sh for some reason.
EOM
}
]