diff options
| author | TBK <tbk@jjtc.eu> | 2020-02-24 16:06:23 +0100 |
|---|---|---|
| committer | Leo <thinkabit.ukim@gmail.com> | 2020-02-29 22:44:18 -0300 |
| commit | 134e91ea5c6bcade5ead51f93c879b4d22e93a0e (patch) | |
| tree | 55a62858d0e61d04b61628b3eaa90e41d281ec74 | |
| parent | 405975727576ed51d470b3597bbe36e980f104ae (diff) | |
| download | aports-134e91ea5c6bcade5ead51f93c879b4d22e93a0e.tar.bz2 aports-134e91ea5c6bcade5ead51f93c879b4d22e93a0e.tar.xz | |
main/yeahconsole: modernize
makefile.patch - set prefix to /usr + add mkdir & DESTDIR to install
restarthidden.patch - add restartHidden resource option
x11.patch - fixes deprecated warning
| -rw-r--r-- | main/yeahconsole/APKBUILD | 30 | ||||
| -rw-r--r-- | main/yeahconsole/makefile.patch (renamed from main/yeahconsole/yeahconsole-0.3.4-make.patch) | 19 | ||||
| -rw-r--r-- | main/yeahconsole/restarthidden.patch | 53 | ||||
| -rw-r--r-- | main/yeahconsole/x11.patch | 29 |
4 files changed, 110 insertions, 21 deletions
diff --git a/main/yeahconsole/APKBUILD b/main/yeahconsole/APKBUILD index 977ac83cd8..6a1b0cabb2 100644 --- a/main/yeahconsole/APKBUILD +++ b/main/yeahconsole/APKBUILD @@ -2,30 +2,28 @@ # Maintainer: Johannes Matheis <jomat+alpinebuild@jmt.gr> pkgname=yeahconsole pkgver=0.3.4 -pkgrel=0 +pkgrel=1 pkgdesc="Drop-down X terminal emulator wrapper" url="http://phrat.de/" arch="all" -license="GPL-2.0" -depends="" -depends_dev="" -makedepends="$depends_dev libx11-dev" -install="" -source="${url}${pkgname}-${pkgver}.tar.gz - yeahconsole-0.3.4-make.patch" - -builddir="$srcdir/$pkgname-$pkgver" +license="GPL-2.0-or-later" +options="!check" # No test suite +makedepends="libx11-dev" +source="http://phrat.de/yeahconsole-$pkgver.tar.gz + makefile.patch + restarthidden.patch + x11.patch + " build() { - cd "$builddir" - make PREFIX=${pkgdir}/usr || return 1 + make } package() { - cd "$builddir" - mkdir -p $pkgdir'/usr/bin' - make PREFIX=${pkgdir}/usr install || return 1 + make DESTDIR="$pkgdir" install } sha512sums="cba74d988b3cb991d95de1796e9e79b881fe011d4fc8d6aa1f863f4c465aadfd31250e57d36ce0118dfc367225c2861cf8e80ac47996c2718d83756a8e638ead yeahconsole-0.3.4.tar.gz -e78ace16e451fabe508ff9e6b691ae215b626a1b16868d44f958801c01278b15921cd8a187d454dd685a75eea8b798cd00e71ae024d83c43918104c43cf1a58f yeahconsole-0.3.4-make.patch" +1840c129c6a66b6d7d038b369cf33587a3760a584f7e94288897081f40e07562e87cb39b9767b937ba2fb613f931295fee0336c77ef3fa9aedeaa8498583736e makefile.patch +d0c5046f841a98e20aa290de6d09a7beb9e5c08afef89dee66e91c6e71b155887863c2d6c103fe585c804ee5c54999c4651c168f9ced46832b24298b665a70d6 restarthidden.patch +675918d4634addf605ff7070c40b6c1364672ee6a87f68dcc6fd5cda40273675225899721545a0eb57977de620498cbe1b5b34a3a9d7af16ada1fbbcdb5cce07 x11.patch" diff --git a/main/yeahconsole/yeahconsole-0.3.4-make.patch b/main/yeahconsole/makefile.patch index 0075c43329..d11583d487 100644 --- a/main/yeahconsole/yeahconsole-0.3.4-make.patch +++ b/main/yeahconsole/makefile.patch @@ -1,13 +1,14 @@ ---- a/Makefile 2006-01-14 16:54:05.000000000 +0100 -+++ b/Makefile 2009-02-26 16:18:25.000000000 +0100 -@@ -1,6 +1,4 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,30 +1,28 @@ TARGET = yeahconsole -CC = gcc -#CC = cc INSTALL = install - PREFIX = /usr/local -@@ -8,17 +6,16 @@ +-PREFIX = /usr/local ++PREFIX = /usr + LIBS = -lX11 INCLUDES = -I/usr/X11R6/include LIB_DIRS = -L/usr/X11R6/lib @@ -28,3 +29,11 @@ clean: rm -rf $(TARGET) $(OBJECTS) + + install: $(TARGET) $(MAN) +- $(INSTALL) -o root -g root -m 0755 $(TARGET) $(PREFIX)/bin ++ mkdir -p $(DESTDIR)$(PREFIX)/bin ++ $(INSTALL) -m 0755 $(TARGET) $(DESTDIR)$(PREFIX)/bin + + + uninstall: diff --git a/main/yeahconsole/restarthidden.patch b/main/yeahconsole/restarthidden.patch new file mode 100644 index 0000000000..42c82d0487 --- /dev/null +++ b/main/yeahconsole/restarthidden.patch @@ -0,0 +1,53 @@ +Based on https://github.com/rduplain/yeahconsole/commit/22488002357cda40ddcc67df695f64f5b06a44a6 + +--- a/yeahconsole.c ++++ b/yeahconsole.c +@@ -48,7 +48,7 @@ char *progname, command[256]; + int revert_to; + int screen; + int opt_x, opt_width, opt_height, opt_delay, opt_bw, opt_step, +- height, opt_restart; ++ height, opt_restart, opt_restart_hidden; + char *opt_color; + char *opt_term; + KeySym opt_key; +@@ -72,7 +72,8 @@ int main(int argc, char *argv[]) + XEvent event; + int hidden = 1; + int fullscreen = 0; +- int i, old_height; ++ int i; ++ int old_height = 0; + Window last_focused, current_focused; + + /* strip the path from argv[0] if there is one */ +@@ -190,10 +191,18 @@ int main(int argc, char *argv[]) + case UnmapNotify: + if (event.xunmap.window == termwin) { + if (opt_restart) { ++ if (opt_restart_hidden) { ++ roll(UP); ++ hidden = 1; ++ } + init_xterm(0); + XSync(dpy, False); +- XSetInputFocus(dpy, termwin, RevertToPointerRoot, +- CurrentTime); ++ if (opt_restart_hidden && last_focused) ++ XSetInputFocus(dpy, last_focused, ++ RevertToPointerRoot, CurrentTime); ++ else ++ XSetInputFocus(dpy, termwin, RevertToPointerRoot, ++ CurrentTime); + } else { + if (last_focused) + XSetInputFocus(dpy, last_focused, +@@ -264,6 +273,8 @@ void get_defaults() + opt_step = opt ? atoi(opt) : 1; + opt = XGetDefault(dpy, progname, "restart"); + opt_restart = opt ? atoi(opt) : 0; ++ opt = XGetDefault(dpy, progname, "restartHidden"); ++ opt_restart_hidden = opt ? atoi(opt) : 0; + opt = XGetDefault(dpy, progname, "term"); + opt_term = opt ? opt : "xterm"; + opt = XGetDefault(dpy, progname, "toggleKey"); diff --git a/main/yeahconsole/x11.patch b/main/yeahconsole/x11.patch new file mode 100644 index 0000000000..00069fb0ca --- /dev/null +++ b/main/yeahconsole/x11.patch @@ -0,0 +1,29 @@ +--- a/yeahconsole.c ++++ b/yeahconsole.c +@@ -26,7 +26,7 @@ + /*************************************************************************/ + + #include <X11/Xlib.h> +-#include <X11/keysym.h> ++#include <X11/XKBlib.h> + #include <X11/Xutil.h> + #include <X11/cursorfont.h> + #include <unistd.h> +@@ -130,7 +130,7 @@ + CurrentTime); + break; + case KeyPress: +- key = XKeycodeToKeysym(dpy, event.xkey.keycode, 0); ++ key = XkbKeycodeToKeysym(dpy, event.xkey.keycode, 0, 0); + if (key == opt_key) { + if (!hidden) { + XGetInputFocus(dpy, ¤t_focused, &revert_to); +@@ -351,7 +351,7 @@ + XMapWindow(dpy, win); + } + +-void init_xterm(move) ++void init_xterm(int move) + { + XEvent ev; + long dummy; |
