mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
mc: initial package
This commit is contained in:
parent
d929a2153b
commit
a0c61aeb8d
@ -0,0 +1,63 @@
|
|||||||
|
################################################################################
|
||||||
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
|
# Copyright (C) 2016 Team LibreELEC
|
||||||
|
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||||
|
#
|
||||||
|
# LibreELEC is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# LibreELEC is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
PKG_NAME="mc"
|
||||||
|
PKG_VERSION="4.8.17"
|
||||||
|
PKG_REV="1"
|
||||||
|
PKG_ARCH="any"
|
||||||
|
PKG_LICENSE="GPL"
|
||||||
|
PKG_SITE="http://www.midnight-commander.org"
|
||||||
|
PKG_URL="http://ftp.midnight-commander.org/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||||
|
PKG_DEPENDS_TARGET="toolchain libtool:host gettext:host glib pcre netbsd-curses"
|
||||||
|
PKG_PRIORITY="optional"
|
||||||
|
PKG_SECTION="tools"
|
||||||
|
PKG_SHORTDESC="mc: visual file manager"
|
||||||
|
PKG_LONGDESC="mc is a visual file manager, licensed under GNU General Public License and therefore qualifies as Free Software. It's a feature rich full-screen text mode application that allows you to copy, move and delete files and whole directory trees, search for files and run commands in the subshell. Internal viewer and editor are included"
|
||||||
|
|
||||||
|
PKG_AUTORECONF="yes"
|
||||||
|
PKG_IS_ADDON="no"
|
||||||
|
|
||||||
|
PKG_CONFIGURE_OPTS_TARGET="--sysconfdir=/storage/.kodi/addons/virtual.system-tools/etc \
|
||||||
|
--datadir=/storage/.kodi/addons/virtual.system-tools/data \
|
||||||
|
--libdir=/storage/.kodi/addons/virtual.system-tools/mclib \
|
||||||
|
--disable-mclib \
|
||||||
|
--disable-aspell \
|
||||||
|
--disable-vfs \
|
||||||
|
--disable-doxygen-doc \
|
||||||
|
--disable-doxygen-dot \
|
||||||
|
--disable-doxygen-html \
|
||||||
|
--with-sysroot=$SYSROOT_PREFIX \
|
||||||
|
--with-screen=ncurses \
|
||||||
|
--without-x \
|
||||||
|
--with-gnu-ld \
|
||||||
|
--without-libiconv-prefix \
|
||||||
|
--without-libintl-prefix \
|
||||||
|
--with-internal-edit \
|
||||||
|
--without-diff-viewer \
|
||||||
|
--with-subshell"
|
||||||
|
|
||||||
|
pre_configure_target() {
|
||||||
|
export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/ncurses"
|
||||||
|
export LDFLAGS="$(echo $LDFLAGS | sed -e "s|-Wl,--as-needed||") -ltermcap"
|
||||||
|
}
|
||||||
|
|
||||||
|
post_makeinstall_target() {
|
||||||
|
rm -rf $INSTALL/storage/.kodi/addons/virtual.system-tools/data/locale
|
||||||
|
rm -rf $INSTALL/storage/.kodi/addons/virtual.system-tools/data/mc/help/mc.hlp.*
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
From 38d4c655d322837574e957b4a824f4a0d1bb3b86 Mon Sep 17 00:00:00 2001
|
||||||
|
From: rofl0r <retnyg@gmx.net>
|
||||||
|
Date: Mon, 18 Jul 2016 22:19:56 +0100
|
||||||
|
Subject: [PATCH] Ticket #3665: fix compatibility with netbsd curses.
|
||||||
|
|
||||||
|
The code that manipulates the ncurses backend into changing
|
||||||
|
the key combination to generate SIGINT from CTRL-c to CTRL-g does
|
||||||
|
so by accessing undocumented internal ncurses data structures.
|
||||||
|
This breaks compilation with netbsd-curses[0], and could also break
|
||||||
|
when the ncurses author decides to change internal structures in a
|
||||||
|
future release.
|
||||||
|
|
||||||
|
Fix it by using a portable approach that works everywhere using libc
|
||||||
|
primitives instead.
|
||||||
|
|
||||||
|
[0] https://github.com/sabotage-linux/netbsd-curses
|
||||||
|
|
||||||
|
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
|
||||||
|
---
|
||||||
|
lib/tty/tty-ncurses.c | 8 +++++---
|
||||||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
|
||||||
|
index efee8ec..76a21d2 100644
|
||||||
|
--- a/lib/tty/tty-ncurses.c
|
||||||
|
+++ b/lib/tty/tty-ncurses.c
|
||||||
|
@@ -179,6 +179,7 @@ mc_tty_normalize_lines_char (const char *ch)
|
||||||
|
void
|
||||||
|
tty_init (gboolean mouse_enable, gboolean is_xterm)
|
||||||
|
{
|
||||||
|
+ struct termios mode;
|
||||||
|
initscr ();
|
||||||
|
|
||||||
|
#ifdef HAVE_ESCDELAY
|
||||||
|
@@ -194,11 +195,12 @@ tty_init (gboolean mouse_enable, gboolean is_xterm)
|
||||||
|
ESCDELAY = 200;
|
||||||
|
#endif /* HAVE_ESCDELAY */
|
||||||
|
|
||||||
|
+ tcgetattr (STDIN_FILENO, &mode);
|
||||||
|
/* use Ctrl-g to generate SIGINT */
|
||||||
|
- cur_term->Nttyb.c_cc[VINTR] = CTRL ('g'); /* ^g */
|
||||||
|
+ mode.c_cc[VINTR] = CTRL ('g'); /* ^g */
|
||||||
|
/* disable SIGQUIT to allow use Ctrl-\ key */
|
||||||
|
- cur_term->Nttyb.c_cc[VQUIT] = NULL_VALUE;
|
||||||
|
- tcsetattr (cur_term->Filedes, TCSANOW, &cur_term->Nttyb);
|
||||||
|
+ mode.c_cc[VQUIT] = NULL_VALUE;
|
||||||
|
+ tcsetattr (STDIN_FILENO, TCSANOW, &mode);
|
||||||
|
|
||||||
|
tty_start_interrupt_key ();
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From 2da86f2595157c68c2d49e6c2b08a508750878ed Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andrew Borodin <aborodin@vmail.ru>
|
||||||
|
Date: Tue, 9 Aug 2016 16:55:12 +0300
|
||||||
|
Subject: [PATCH] Define NCURSES_CONST if curses library doesn't define it.
|
||||||
|
|
||||||
|
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
|
||||||
|
---
|
||||||
|
lib/tty/tty-ncurses.h | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/tty/tty-ncurses.h b/lib/tty/tty-ncurses.h
|
||||||
|
index 4f0e603..9962c7c 100644
|
||||||
|
--- a/lib/tty/tty-ncurses.h
|
||||||
|
+++ b/lib/tty/tty-ncurses.h
|
||||||
|
@@ -20,6 +20,11 @@
|
||||||
|
#include <ncursesw/curses.h>
|
||||||
|
#endif /* USE_NCURSESW */
|
||||||
|
|
||||||
|
+/* netbsd-libcurses doesn't define NCURSES_CONST */
|
||||||
|
+#ifndef NCURSES_CONST
|
||||||
|
+#define NCURSES_CONST const
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*** typedefs(not structures) and defined constants **********************************************/
|
||||||
|
|
||||||
|
/*** enums ***************************************************************************************/
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user