aboutsummaryrefslogtreecommitdiffstats
path: root/community/yeahconsole
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-02-29 22:44:45 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-02-29 22:44:45 -0300
commit71f076e558696b1511a0f21c5830c07bfab86338 (patch)
treedde485ec3165eb56dbfcea4114486d9198fdc080 /community/yeahconsole
parent134e91ea5c6bcade5ead51f93c879b4d22e93a0e (diff)
downloadaports-71f076e558696b1511a0f21c5830c07bfab86338.tar.bz2
aports-71f076e558696b1511a0f21c5830c07bfab86338.tar.xz
community/yeahconsole: move from main
Diffstat (limited to 'community/yeahconsole')
-rw-r--r--community/yeahconsole/APKBUILD29
-rw-r--r--community/yeahconsole/makefile.patch39
-rw-r--r--community/yeahconsole/restarthidden.patch53
-rw-r--r--community/yeahconsole/x11.patch29
4 files changed, 150 insertions, 0 deletions
diff --git a/community/yeahconsole/APKBUILD b/community/yeahconsole/APKBUILD
new file mode 100644
index 0000000000..6a1b0cabb2
--- /dev/null
+++ b/community/yeahconsole/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Johannes Matheis <jomat+alpinebuild@jmt.gr>
+# Maintainer: Johannes Matheis <jomat+alpinebuild@jmt.gr>
+pkgname=yeahconsole
+pkgver=0.3.4
+pkgrel=1
+pkgdesc="Drop-down X terminal emulator wrapper"
+url="http://phrat.de/"
+arch="all"
+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() {
+ make
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="cba74d988b3cb991d95de1796e9e79b881fe011d4fc8d6aa1f863f4c465aadfd31250e57d36ce0118dfc367225c2861cf8e80ac47996c2718d83756a8e638ead yeahconsole-0.3.4.tar.gz
+1840c129c6a66b6d7d038b369cf33587a3760a584f7e94288897081f40e07562e87cb39b9767b937ba2fb613f931295fee0336c77ef3fa9aedeaa8498583736e makefile.patch
+d0c5046f841a98e20aa290de6d09a7beb9e5c08afef89dee66e91c6e71b155887863c2d6c103fe585c804ee5c54999c4651c168f9ced46832b24298b665a70d6 restarthidden.patch
+675918d4634addf605ff7070c40b6c1364672ee6a87f68dcc6fd5cda40273675225899721545a0eb57977de620498cbe1b5b34a3a9d7af16ada1fbbcdb5cce07 x11.patch"
diff --git a/community/yeahconsole/makefile.patch b/community/yeahconsole/makefile.patch
new file mode 100644
index 0000000000..d11583d487
--- /dev/null
+++ b/community/yeahconsole/makefile.patch
@@ -0,0 +1,39 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,30 +1,28 @@
+ TARGET = yeahconsole
+-CC = gcc
+-#CC = cc
+ INSTALL = install
+
+-PREFIX = /usr/local
++PREFIX = /usr
+
+ LIBS = -lX11
+ INCLUDES = -I/usr/X11R6/include
+ LIB_DIRS = -L/usr/X11R6/lib
+-FLAGS = -Os -Wall
++FLAGS = -Wall $(CFLAGS)
+
+ OBJECTS := yeahconsole.o
+ SOURCES := yeahconsole.c
+
+ $(TARGET): $(OBJECTS)
+- $(CC) $(DEFINES) $(INCLUDES) $(LIB_DIRS) $(LIBS) -o $@ $<
+- strip $@
++ $(CC) $(FLAGS) $(LDFLAGS) $(DEFINES) $(INCLUDES) $(LIB_DIRS) -o $@ $< $(LIBS)
+
+ $(OBJECTS): $(SOURCES)
+- $(CC) $(FLAGS) $(DEFINES) $(INCLUDES) $(LIB_DIRS) -c -o $@ $<
++ $(CC) $(FLAGS) $(DEFINES) $(INCLUDES) $(LIB_DIRS) -c -o $@ $<
+
+ 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/community/yeahconsole/restarthidden.patch b/community/yeahconsole/restarthidden.patch
new file mode 100644
index 0000000000..42c82d0487
--- /dev/null
+++ b/community/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/community/yeahconsole/x11.patch b/community/yeahconsole/x11.patch
new file mode 100644
index 0000000000..00069fb0ca
--- /dev/null
+++ b/community/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, &current_focused, &revert_to);
+@@ -351,7 +351,7 @@
+ XMapWindow(dpy, win);
+ }
+
+-void init_xterm(move)
++void init_xterm(int move)
+ {
+ XEvent ev;
+ long dummy;