chiark / gitweb /
Update tty-clock to version 2.3 (#680)
authorOliver Schmidhauser <oli@glow.li>
Tue, 17 Jan 2017 15:10:09 +0000 (16:10 +0100)
committerFredrik Fornwall <fredrik@fornwall.net>
Tue, 17 Jan 2017 15:10:09 +0000 (16:10 +0100)
When the debian developers come ringing for a tagged release, suddenly
everything goes really fast.

In the build environment `ncurses5-config --libs` also returns
-ltinfo, which is unavailable to the linker. That's why the patch was
needed. Is this something that could be fixed in the build environment
or is this simply a badly written makefile, unsuitable for cross
compiling?

packages/tty-clock/Makefile.patch [new file with mode: 0644]
packages/tty-clock/build.sh

diff --git a/packages/tty-clock/Makefile.patch b/packages/tty-clock/Makefile.patch
new file mode 100644 (file)
index 0000000..e8172f0
--- /dev/null
@@ -0,0 +1,14 @@
+diff --git a/Makefile b/Makefile
+index 5028ee4..6294b23 100644
+--- a/Makefile
++++ b/Makefile
+@@ -11,7 +11,8 @@ MANPATH = ${DESTDIR}${PREFIX}/share/man/man1
+ ifeq ($(shell sh -c 'which ncurses5-config>/dev/null 2>/dev/null && echo y'), y)
+       CFLAGS += -Wall -g $$(ncurses5-config --cflags)
+-      LDFLAGS += $$(ncurses5-config --libs)
++      # Overwrite instead of appending LDFLAGS, because `ncurses-config --libs` also returns -ltinfo, which it can't find
++      LDFLAGS ?= $$(ncurses5-config --libs)
+ else ifeq ($(shell sh -c 'which ncursesw5-config>/dev/null 2>/dev/null && echo y'), y)
+               CFLAGS += -Wall -g $$(ncursesw5-config --cflags)
+               LDFLAGS += $$(ncursesw5-config --libs)
index 4132cfe37950fa42f3c5ebf5fb9d3c91edd86efa..a8cad8f0154770cf97e28f8fadd1eb3b3a2cecf5 100644 (file)
@@ -1,16 +1,13 @@
-TERMUX_PKG_HOMEPAGE=https://github.com/xorg62/tty-clock
 TERMUX_PKG_DESCRIPTION="tty-clock is a simple ncurses-based clock that shows the time and date using a large display. It has a few commandline options to customize the output."
-TERMUX_PKG_VERSION=0.1.20160928
-# The current tagged release is a few years older than the latest commit and has many problems
-_COMMIT=516afbf9f96101c0bed1c366f80d7ca087b0557d
+TERMUX_PKG_VERSION=2.3
 TERMUX_PKG_MAINTAINER="Oliver Schmidhauser @Neo-Oli"
-TERMUX_PKG_SRCURL=https://github.com/xorg62/tty-clock/archive/${_COMMIT}.tar.gz
-TERMUX_PKG_FOLDERNAME=tty-clock-${_COMMIT}
+TERMUX_PKG_SRCURL=https://github.com/xorg62/tty-clock/archive/v${TERMUX_PKG_VERSION}.tar.gz
+TERMUX_PKG_FOLDERNAME=tty-clock-${TERMUX_PKG_VERSION}
 TERMUX_PKG_DEPENDS="ncurses"
 TERMUX_PKG_BUILD_IN_SRC=yes
 
 termux_step_post_configure() {
-       LDFLAGS+=" -lncurses"
-       CFLAGS+=" $CPPFLAGS"
+    LDFLAGS+=" -lncurses"
+    CFLAGS+=" $CPPFLAGS"
 }