Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Tools: add st terminal emulator on Generic (rev 116) #4799

Merged
merged 6 commits into from
Dec 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.21"
PKG_SHA256="8f37e546ac7c31c9c203a03b1c1d6cb2d2f623a300b86badfd367e5559fe148c"
PKG_VERSION="4.8.25"
PKG_SHA256="ffc19617f20ebb23330acd3998b7fd559a042d172fa55746d53d246697b2548a"
PKG_LICENSE="GPL"
PKG_SITE="http://www.midnight-commander.org"
PKG_URL="http://ftp.midnight-commander.org/mc-${PKG_VERSION}.tar.xz"
Expand Down
20 changes: 20 additions & 0 deletions packages/addons/addon-depends/system-tools-depends/st/package.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="st"
PKG_VERSION="0.8.4"
PKG_SHA256="d42d3ceceb4d6a65e32e90a5336e3d446db612c3fbd9ebc1780bc6c9a03346a6"
PKG_ARCH="x86_64"
PKG_LICENSE="GPL"
PKG_SITE="https://st.suckless.org/"
PKG_URL="https://dl.suckless.org/st/st-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain libX11 libXft libXrender fontconfig freetype ncurses"
PKG_LONGDESC="A simple terminal implementation for X"
PKG_BUILD_FLAGS="-sysroot"

PKG_MAKE_OPTS_TARGET="X11INC=$(get_build_dir libXft)/include \
X11LIB=$(get_build_dir libXft)/.$TARGET_NAME/src/.libs"

pre_configure_target() {
LDFLAGS="-lXrender $LDFLAGS"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

- XftColorAllocName() is failing on "#rrggbb", use XParseColor()
- Xutf8TextListToTextProperty() needs locale to be set.

--- a/x.c 2020-06-19 11:29:45.000000000 +0200
+++ b/x.c 2020-06-26 01:07:13.000000000 +0200
@@ -752,6 +752,7 @@
xloadcolor(int i, const char *name, Color *ncolor)
{
XRenderColor color = { .alpha = 0xffff };
+ XColor xcol;

if (!name) {
if (BETWEEN(i, 16, 255)) { /* 256 color */
@@ -769,6 +770,14 @@
name = colorname[i];
}

+ if (XParseColor(xw.dpy, xw.cmap, name, &xcol)) {
+ color.green = xcol.green;
+ color.blue = xcol.blue;
+ color.red = xcol.red;
+ return XftColorAllocValue(xw.dpy, xw.vis,
+ xw.cmap, &color, ncolor);
+ }
+
return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor);
}

@@ -1585,8 +1594,10 @@
XTextProperty prop;
DEFAULT(p, opt_title);

- Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
- &prop);
+ if (Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
+ &prop) < 0)
+ return;
+
XSetWMName(xw.dpy, xw.win, &prop);
XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname);
XFree(prop.value);
Loading