From 3c679046c81ce90baa5081d2cd231fef41ef9d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 29 Dec 2020 08:50:40 +0700 Subject: [PATCH] lilyterm: update to 0.9.9.4+20190725. --- srcpkgs/lilyterm/patches/lilyterm-musl.patch | 17 ++++--- .../lilyterm/patches/lilyterm-pkgconfig.patch | 22 --------- .../no-empty-environment-variables.patch | 21 ++++++++ srcpkgs/lilyterm/template | 49 ++++++++++++++++--- 4 files changed, 73 insertions(+), 36 deletions(-) delete mode 100644 srcpkgs/lilyterm/patches/lilyterm-pkgconfig.patch create mode 100644 srcpkgs/lilyterm/patches/no-empty-environment-variables.patch diff --git a/srcpkgs/lilyterm/patches/lilyterm-musl.patch b/srcpkgs/lilyterm/patches/lilyterm-musl.patch index 28778e85799..5cd2fe64014 100644 --- a/srcpkgs/lilyterm/patches/lilyterm-musl.patch +++ b/srcpkgs/lilyterm/patches/lilyterm-musl.patch @@ -1,14 +1,17 @@ ---- src/profile.c.orig 2016-05-07 00:22:09.702161948 +0900 -+++ src/profile.c 2016-05-07 00:24:21.566170424 +0900 -@@ -2660,11 +2660,7 @@ +diff --git src/profile.c src/profile.c +index 3de9fb5..b7dc71f 100644 +--- src/profile.c ++++ src/profile.c +@@ -2974,12 +2974,8 @@ GString *save_user_settings(GtkWidget *widget, struct Window *win_data) // g_debug("save_user_settings(): profile = %s", profile); // g_debug("\n%s", contents->str); --#ifdef BSD - gchar *real_file_name = realpath((const gchar *)profile, NULL); --#else +-# ifdef BSD + gchar resolved_patch[PATH_MAX+1]; + gchar *real_file_name = g_strdup(realpath((const gchar *)profile, resolved_patch)); +-# else - gchar *real_file_name = canonicalize_file_name((const gchar *)profile); --#endif +-# endif if (real_file_name==NULL) { //if (access(profile, F_OK)) diff --git a/srcpkgs/lilyterm/patches/lilyterm-pkgconfig.patch b/srcpkgs/lilyterm/patches/lilyterm-pkgconfig.patch deleted file mode 100644 index 6bff0be35a9..00000000000 --- a/srcpkgs/lilyterm/patches/lilyterm-pkgconfig.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- configure.orig 2016-05-08 15:18:37.105172865 +0900 -+++ configure 2016-05-08 15:18:25.159172097 +0900 -@@ -138,7 +138,7 @@ - exit 0 - fi - --PKGCONFIG=`whereis "pkg-config" | tr -s ' ' '\n' | grep "bin/""pkg-config""$" | head -n 1` -+PKGCONFIG=`which pkg-config` - if [ -z "$PKGCONFIG" ]; then - ERR "\n ERROR: \`" - WARN "pkg-config" ---- src/Makefile.orig 2016-05-08 15:19:20.502175654 +0900 -+++ src/Makefile 2016-05-08 15:20:22.909179665 +0900 -@@ -22,7 +22,7 @@ - include ../.default - -include ../.config - --PKGCONFIG := $(shell whereis "pkg-config" | tr -s ' ' '\n' | grep "bin/""pkg-config""$$" | head -n 1) -+PKGCONFIG := $(shell which pkg-config) - - VTE ?= "" - diff --git a/srcpkgs/lilyterm/patches/no-empty-environment-variables.patch b/srcpkgs/lilyterm/patches/no-empty-environment-variables.patch new file mode 100644 index 00000000000..69b8a8f3c51 --- /dev/null +++ b/srcpkgs/lilyterm/patches/no-empty-environment-variables.patch @@ -0,0 +1,21 @@ +diff --git src/notebook.c src/notebook.c +index eb4d973..0789a33 100644 +--- src/notebook.c ++++ src/notebook.c +@@ -158,13 +158,13 @@ struct Page *add_page(struct Window *win_data, + #ifdef ENABLE_SET_EMULATION + # ifdef SAFEMODE + if (win_data->emulate_term == NULL) +- g_string_append_printf (environ_str, "TERM=xterm"); ++ g_string_append_printf (environ_str, "TERM=xterm\t"); + else + # endif +- g_string_append_printf (environ_str, "TERM=%s", win_data->emulate_term); ++ g_string_append_printf (environ_str, "TERM=%s\t", win_data->emulate_term); + #endif + // set colorterm +- g_string_append_printf (environ_str, "\tCOLORTERM=lilyterm"); ++ g_string_append_printf (environ_str, "COLORTERM=lilyterm"); + + // ---- Setting the VTE_CJK_WIDTH environment ---- // + diff --git a/srcpkgs/lilyterm/template b/srcpkgs/lilyterm/template index 7728486a60e..31bc2ad9dc0 100644 --- a/srcpkgs/lilyterm/template +++ b/srcpkgs/lilyterm/template @@ -1,15 +1,50 @@ # Template file for 'lilyterm' pkgname=lilyterm -version=0.9.9.4 -revision=2 -build_style="gnu-configure" -hostmakedepends="pkg-config which" -makedepends="vte-devel gtk+-devel" +_githash=faf1254f46049edfb1fd6e9191e78b1b23b9c51d +version=0.9.9.4+20190725 +revision=1 +wrksrc=LilyTerm-$_githash +build_style="gnu-makefile" +hostmakedepends="pkg-config gettext" +makedepends="vte3-devel gtk+3-devel" short_desc="Fast and lightweight terminal emulator based off of libvte" maintainer="Kris Scott " license="GPL-3.0-or-later" homepage="http://lilyterm.luna.com.tw" -distfiles="http://lilyterm.luna.com.tw/file/lilyterm-${version}.tar.gz" +# distfiles="http://lilyterm.luna.com.tw/file/lilyterm-${version}.tar.gz" +distfiles="https://github.com/Tetralet/LilyTerm/archive/$_githash.tar.gz" conf_files="/etc/lilyterm.conf" -checksum="b72626431d4f5645e0e0f18449319fbb69bef4eab4345d5e37cde0ae712a5d74" +checksum=e777122cb4db0c75b893368aa5a3ae7de1bdfe27e1efb8fad8f9c19acb0a802e CFLAGS="-Wno-deprecated-declarations" + +post_patch() { + vsed -i -e '/LDFLAGS.*BINARY/s/$/ -lX11/' \ + -e '/^PKGCONFIG :=/d' \ + -e '/^STRIP :=/d' \ + src/Makefile +} + +do_configure() { + cat <<-_EOF >.config + BSD = 0 + PREFIX = /usr + prefix = /usr + ETCDIR = /etc + NLS = Y + VERBOSITY = Y + DEBUG = N + SAFEMODE = Y + FORCE_ENABLE_VTE_BACKGROUND = N + CC = $CC + STRIP = $STRIP + CPPFLAGS = $CPPFLAGS + CFLAGS = $CFLAGS + LDFLAGS = $LDFLAGS + MAKE = make + GTK = gtk+-3.0 + VTE = vte-2.91 + GNOME_CONTROL_CENTER = N + PACKAGE = lilyterm + PKGCONFIG = $PKG_CONFIG + _EOF +}