summary refs log tree commit diff
path: root/port/wcwidth/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-21 18:10:52 -0400
committerJune McEnroe <june@causal.agency>2020-04-21 18:10:52 -0400
commite42acadee844af0505d78bac08de7c8456c0e5de (patch)
tree2142c61b9407d656cb86e35f73fdc0ba6987ed47 /port/wcwidth/Makefile
parentUse . as ${LDLIBS.$@} separator (diff)
downloadsrc-e42acadee844af0505d78bac08de7c8456c0e5de.tar.gz
src-e42acadee844af0505d78bac08de7c8456c0e5de.zip
Add Markus Kuhn's wcwidth implementation
And wcfix script for macOS, based on
<https://blog.nytsoi.net/2015/05/04/emoji-support-for-weechat> to fix
some emoji display in catgirl. Somehow this code from 2007 against
Unicode 5.0 does a better job than whatever the hell macOS Mojave's libc
is doing.
Diffstat (limited to '')
-rw-r--r--port/wcwidth/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/port/wcwidth/Makefile b/port/wcwidth/Makefile
new file mode 100644
index 00000000..4fbb2863
--- /dev/null
+++ b/port/wcwidth/Makefile
@@ -0,0 +1,16 @@
+PREFIX = ~/.local
+
+CFLAGS = -Dmk_wcwidth=wcwidth -Dmk_wcswidth=wcswidth
+
+OBJS = wcwidth.o
+DYLIB = libwcwidth.dylib
+
+${DYLIB}: ${OBJS}
+	${CC} -dynamiclib ${LDFLAGS} ${OBJS} -o $@
+
+install: ${DYLIB}
+	install -d ${PREFIX}/lib
+	install -m 644 ${DYLIB} ${PREFIX}/lib
+
+uninstall:
+	rm -f ${PREFIX}/lib/${DYLIB}