Skip to content

Commit

Permalink
Merge pull request #3192 from mglae/le9_ncurses_stools110
Browse files Browse the repository at this point in the history
ncurses: improvements / system-tools 110: update mc and efibootmgr
  • Loading branch information
CvH authored Dec 30, 2018
2 parents 4de1c8b + f14c0f6 commit 33a1db0
Show file tree
Hide file tree
Showing 15 changed files with 102 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="efivar"
PKG_VERSION="70e63d4"
# 0.15 # Todo: later versions with buildproblems
PKG_SHA256="2638f1faa22e67bf99b4c537f7c21c336a5851a8c91c8dc09555da946a1b84c9"
PKG_VERSION="3e687d8072f3ed53ae727ec2cb99ae56dbcdf02b"
PKG_SHA256="810d386c9f4dafc160c721ef73e491c933c311e3df768e27eec50c28ac0f4d97"
PKG_ARCH="x86_64"
PKG_LICENSE="LGPL"
PKG_SITE="https://github.com/vathpela/efivar"
PKG_URL="https://github.com/vathpela/efivar-devel/archive/$PKG_VERSION.tar.gz"
PKG_SITE="https://github.com/rhboot/efivar"
PKG_URL="https://github.com/rhboot/efivar/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain efivar:host"
PKG_LONGDESC="Tools and library to manipulate EFI variables."

make_host() {
make -C src/ makeguids
make -C src/ include/efivar/efivar-guids.h
}

make_target() {
make -C src/ libefivar.a efivar-guids.h efivar.h
make -C src/ libefivar.a libefiboot.a efivar.h efivar
}

makeinstall_host() {
Expand All @@ -26,9 +25,8 @@ makeinstall_host() {

makeinstall_target() {
mkdir -p $SYSROOT_PREFIX/usr/lib
cp -P src/libefivar.a $SYSROOT_PREFIX/usr/lib/
cp -P src/libefivar.a src/libefiboot.a $SYSROOT_PREFIX/usr/lib/

mkdir -p $SYSROOT_PREFIX/usr/include/efivar
cp -P src/efivar.h $SYSROOT_PREFIX/usr/include/efivar
cp -P src/efivar-guids.h $SYSROOT_PREFIX/usr/include/efivar
cp -P src/include/efivar/*.h $SYSROOT_PREFIX/usr/include/efivar
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/Makefile 2018-10-01 21:30:06.000000000 +0200
+++ b/src/Makefile 2018-10-17 14:16:46.000000000 +0200
@@ -69,7 +69,7 @@ libefivar.so : | $(GENERATED_SOURCES) li
libefivar.so : LIBS=dl
libefivar.so : MAP=libefivar.map

-efivar : efivar.c | libefivar.so
+efivar : efivar.c | libefivar.a
efivar : LIBS=efivar dl

efivar-static : efivar.c $(patsubst %.o,%.static.o,$(LIBEFIVAR_OBJECTS))

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="efibootmgr"
PKG_VERSION="95f7a63"
PKG_SHA256="a6f936508c5b50b6fb5693dd2f0db911da298da0f72ffc0e2e74b09b22592fd1"
PKG_VERSION="99b578501643377e0b1994b2a068b790d189d5ad"
PKG_SHA256="04bc45dc8a841985d78d8df87b3475eb6e1122f993fae975197bf3adbc6e3341"
PKG_ARCH="x86_64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/vathpela/efibootmgr"
PKG_URL="https://github.com/vathpela/efibootmgr-devel/archive/$PKG_VERSION.tar.gz"
PKG_SITE="https://github.com/rhboot/efibootmgr"
PKG_URL="https://github.com/rhboot/efibootmgr/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain efivar pciutils zlib"
PKG_LONGDESC="Tool to modify UEFI Firmware Boot Manager Variables."

pre_make_target() {
export EXTRA_CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include -I$SYSROOT_PREFIX/usr/include/efivar -fgnu89-inline"
make_target() {
export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include -I$SYSROOT_PREFIX/usr/include/efivar -fgnu89-inline"
export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -ludev -ldl"

make EFIDIR=BOOT EFI_LOADER=bootx64.efi PKG_CONFIG=true \
LDLIBS="-lefiboot -lefivar" \
efibootmgr
}

makeinstall_target() {
Expand Down

This file was deleted.

10 changes: 7 additions & 3 deletions packages/addons/addon-depends/system-tools-depends/mc/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="mc"
PKG_VERSION="4.8.20"
PKG_SHA256="017ee7f4f8ae420a04f4d6fcebaabe5b494661075c75442c76e9c8b1923d501c"
PKG_VERSION="4.8.21"
PKG_SHA256="8f37e546ac7c31c9c203a03b1c1d6cb2d2f623a300b86badfd367e5559fe148c"
PKG_LICENSE="GPL"
PKG_SITE="http://www.midnight-commander.org"
PKG_URL="http://ftp.midnight-commander.org/mc-${PKG_VERSION}.tar.xz"
Expand All @@ -13,7 +13,8 @@ PKG_LONGDESC="Midnight Commander is a text based filemanager that emulates Norto

PKG_CONFIGURE_OPTS_TARGET=" \
--datadir=/storage/.kodi/addons/virtual.system-tools/data \
--libdir=/storage/.kodi/addons/virtual.system-tools/mclib \
--libexecdir=/storage/.kodi/addons/virtual.system-tools/mclib \
--with-homedir=/storage/.kodi/userdata/addon_data/virtual.system-tools \
--sysconfdir=/storage/.kodi/addons/virtual.system-tools/etc \
--with-screen=ncurses \
--with-sysroot=$SYSROOT_PREFIX \
Expand Down Expand Up @@ -41,4 +42,7 @@ pre_configure_target() {
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.*
mv $INSTALL/usr/bin/mc $INSTALL/usr/bin/mc-bin
rm -f $INSTALL/usr/bin/{mcedit,mcview}
cp $PKG_DIR/wrapper/* $INSTALL/usr/bin
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
HISTFILE="/run/mc_histfile"
export HISTFILE
exec mc-bin "$@"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
HISTFILE="/run/mc_histfile"
export HISTFILE
exec mc-bin -e "$@"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
HISTFILE="/run/mc_histfile"
export HISTFILE
exec mc-bin -v "$@"
6 changes: 6 additions & 0 deletions packages/addons/tools/system-tools/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
110
- updated and improved mc (4.8.21)
- using more compatible "xterm" TERM definition
- updated efibootmgr to 17
- fixed screen

109
- added stress-ng

Expand Down
4 changes: 2 additions & 2 deletions packages/addons/tools/system-tools/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PKG_NAME="system-tools"
PKG_VERSION="1.0"
PKG_REV="109"
PKG_REV="110"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://libreelec.tv"
Expand Down Expand Up @@ -72,7 +72,7 @@ addon() {
cp -P $(get_build_dir dtach)/.$TARGET_NAME/dtach $ADDON_BUILD/$PKG_ADDON_ID/bin

# efibootmgr
cp -P $(get_build_dir efibootmgr)/src/efibootmgr/efibootmgr $ADDON_BUILD/$PKG_ADDON_ID/bin 2>/dev/null || :
cp -P $(get_build_dir efibootmgr)/src/efibootmgr $ADDON_BUILD/$PKG_ADDON_ID/bin 2>/dev/null || :

# encfs
cp -P $(get_build_dir encfs)/.$TARGET_NAME/encfs $ADDON_BUILD/$PKG_ADDON_ID/bin
Expand Down
2 changes: 1 addition & 1 deletion packages/addons/tools/system-tools/source/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

yes = xbmcgui.Dialog().yesno('', 'This is a console-only addon','','Open a terminal window?','No','Yes')
if yes:
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;exec mrxvt"], shell=False, close_fds=True)
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;cd;exec mrxvt -ls"], shell=False, close_fds=True)

9 changes: 5 additions & 4 deletions packages/devel/ncurses/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="ncurses"
PKG_VERSION="6.1-20180203"
PKG_SHA256="fac9db9460f271ee632af386a5b502d43a25d7cf14138e3d3166d4bedc4f6cb0"
PKG_VERSION="6.1-20181215"
PKG_SHA256="08b07c3e792961f300829512c283d5fefc0b1c421a57b76922c3d13303ed677d"
PKG_LICENSE="MIT"
PKG_SITE="http://www.gnu.org/software/ncurses/"
PKG_URL="http://invisible-mirror.net/archives/ncurses/current/ncurses-$PKG_VERSION.tgz"
PKG_DEPENDS_TARGET="toolchain zlib"
PKG_DEPENDS_TARGET="toolchain zlib ncurses:host"
PKG_LONGDESC="A library is a free software emulation of curses in System V Release 4.0, and more."
# causes some segmentation fault's (dialog) when compiled with gcc's link time optimization.
PKG_BUILD_FLAGS="+pic"
Expand All @@ -31,10 +31,11 @@ PKG_CONFIGURE_OPTS_TARGET="--without-ada \
--disable-rpath \
--disable-database \
--with-fallbacks=linux,screen,xterm,xterm-color \
--with-termpath=/storage/.config/termcap \
--disable-big-core \
--enable-termcap \
--enable-getcap \
--enable-getcap-cache \
--disable-getcap-cache \
--enable-symlinks \
--disable-bsdpad \
--without-rcs-ids \
Expand Down
16 changes: 16 additions & 0 deletions packages/devel/ncurses/patches/ncurses-001-terminfo-xterm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

Remove recent xterm terminfo features to be compatible with other emulations

--- a/misc/terminfo.src 2018-12-21 18:53:11.000000000 +0100
+++ a/misc/terminfo.src 2018-12-22 22:56:47.000000000 +0100
@@ -4335,8 +4335,8 @@ xterm-xfree86|xterm terminal emulator (X
xterm-new|modern xterm terminal emulator,
npc,
indn=\E[%p1%dS, kb2=\EOE, kcbt=\E[Z, kent=\EOM,
- rin=\E[%p1%dT, use=ansi+rep, use=ecma+strikeout,
- use=xterm+sm+1006, use=xterm+pcfkeys, use=xterm+tmux,
+ rin=\E[%p1%dT, use=ecma+strikeout,
+ use=xterm+sm+1005, use=xterm+pcfkeys, use=xterm+tmux,
use=xterm-basic,

# This fragment is for people who cannot agree on what the backspace key
24 changes: 24 additions & 0 deletions packages/devel/ncurses/patches/ncurses-002-alloc-fallbacks.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Fix freeing not allocated fallback entries by allocating a copy.

--- a/ncurses/tinfo/lib_setup.c 2018-11-24 23:13:16.000000000 +0100
+++ b/ncurses/tinfo/lib_setup.c 2018-12-29 10:31:01.000000000 +0100
@@ -756,6 +756,8 @@ TINFO_SETUP_TERM(TERMINAL **tp,
if (status != TGETENT_YES) {
const TERMTYPE2 *fallback = _nc_fallback2(tname);

+ if (fallback)
+ fallback = _nc_copy_entry(fallback);
if (fallback) {
T(("found fallback entry"));
TerminalType(termp) = *fallback;
--- a/ncurses/tinfo/tinfo_driver.c 2018-11-24 23:17:03.000000000 +0100
+++ b/ncurses/tinfo/tinfo_driver.c 2018-12-29 10:27:19.000000000 +0100
@@ -172,6 +172,8 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * T
if (status != TGETENT_YES) {
const TERMTYPE2 *fallback = _nc_fallback2(tname);

+ if (fallback)
+ fallback = _nc_copy_entry(fallback);
if (fallback) {
T(("found fallback entry"));
TerminalType(termp) = *fallback;

0 comments on commit 33a1db0

Please sign in to comment.