summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-04-19 04:01:39 +0000
committerJune McEnroe <june@causal.agency>2021-04-19 04:01:39 +0000
commit89a0ffa1ba96e412d35009aca6e1fd336272f9ff (patch)
tree48575b5f52b5f38f051e23096c3030622809330e
parentAdd freecell (diff)
downloadplay-89a0ffa1ba96e412d35009aca6e1fd336272f9ff.tar.gz
play-89a0ffa1ba96e412d35009aca6e1fd336272f9ff.zip
Force UTF-8 locale and add to chroot, link to cursesw
-rw-r--r--Makefile4
-rw-r--r--play.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f8c597c..372ee3d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ CHROOT_GROUP = ${CHROOT_USER}
 
 CFLAGS += -std=c11 -Wall -Wextra
 LDFLAGS = -static
-LDLIBS = -lcurses
+LDLIBS = -lcursesw
 
 -include config.mk
 
@@ -25,8 +25,10 @@ chroot.tar: play
 		root \
 		root/bin \
 		root/home \
+		root/usr/share/locale \
 		root/usr/share/misc
 	install -d -o ${CHROOT_USER} -g ${CHROOT_GROUP} root/home/${CHROOT_USER}
+	cp -LRfp /usr/share/locale/en_US.UTF-8 root/usr/share/locale
 	cp -fp /usr/share/misc/termcap.db root/usr/share/misc
 	cp -fp /rescue/sh root/bin
 	install play root/bin
diff --git a/play.c b/play.c
index b895e9e..345dcd1 100644
--- a/play.c
+++ b/play.c
@@ -266,7 +266,7 @@ static void info(void) {
 }
 
 int main(int argc, char *argv[]) {
-	setlocale(LC_CTYPE, "");
+	setlocale(LC_CTYPE, "en_US.UTF-8");
 	atexit(info);
 
 	const char *path = NULL;
5-08Import LibreSSL 3.3.3June McEnroe 2021-04-18build: Remove added x509_verify.3 links 3.3.2June McEnroe 2021-04-18tls: Use EC_KEY_set_ex_dataJune McEnroe 2021-04-18Import LibreSSL 3.3.2June McEnroe 2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe Some compat sources (getentropy_linux.c for example) require OpenSSL. Reported by Robert Scheck. 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe