From 1f34a62245ba6ce118c47ebbbbb8c5bf514e0917 Mon Sep 17 00:00:00 2001 From: Mid Favila Date: Sat, 12 Feb 2022 20:12:39 -0400 Subject: [PATCH] Patch XLess to use TTF fonts. --- ports/unofficial/rolling/mtm-git/build | 2 +- ports/unofficial/stable/xless/build | 10 ++++-- ports/unofficial/stable/xless/checksums | 2 ++ ports/unofficial/stable/xless/files/Makefile | 26 ++++++++++++++ ports/unofficial/stable/xless/files/ttf.patch | 35 +++++++++++++++++++ ports/unofficial/stable/xless/sources | 2 ++ 6 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 ports/unofficial/stable/xless/files/Makefile create mode 100644 ports/unofficial/stable/xless/files/ttf.patch diff --git a/ports/unofficial/rolling/mtm-git/build b/ports/unofficial/rolling/mtm-git/build index 5d47431..a0d8d69 100755 --- a/ports/unofficial/rolling/mtm-git/build +++ b/ports/unofficial/rolling/mtm-git/build @@ -4,7 +4,7 @@ # directory that doesn't exist. This is a kludge # to work around that by disabling manpage install. -sed '22{/cp/d;}' -i Makefile +sed -i '22{/cp/d;}' Makefile # This is another kludge to fix a problematic # flag in the makefile. Doesn't cause any diff --git a/ports/unofficial/stable/xless/build b/ports/unofficial/stable/xless/build index 4b6177e..1ff5041 100755 --- a/ports/unofficial/stable/xless/build +++ b/ports/unofficial/stable/xless/build @@ -1,8 +1,12 @@ #!/bin/sh -e +chmod +rw * patch -p1 < errors.patch +chmod +rw * +patch -p1 < ttf.patch -xmkmf -a make -install -Dm755 xless "$1/usr/bin/xless" -install -Dm755 xless.man "$1/usr/share/man/man1/xless.1" +make DESTDIR="$1" install + +#install -Dm755 xless "$1/usr/bin/xless" +#install -Dm755 xless.man "$1/usr/share/man/man1/xless.1" diff --git a/ports/unofficial/stable/xless/checksums b/ports/unofficial/stable/xless/checksums index c96be14..a9534d7 100644 --- a/ports/unofficial/stable/xless/checksums +++ b/ports/unofficial/stable/xless/checksums @@ -1,2 +1,4 @@ 02407ddd78a09a0af9b74e87311cba8c4561ae0e8161ab99b1ad52a557d7bf19 425aa7145416638686d9fb90a03a284416d3509472b2f976b3196a3a5ac2fd6e +d49615fb5140dcd720654879fe0ee2e408d33e4400ab04486febeaddb02df8c6 +2f734e457578a83c109384eb0c283f97f45b5bf457faaa608d96785f36e52b09 diff --git a/ports/unofficial/stable/xless/files/Makefile b/ports/unofficial/stable/xless/files/Makefile new file mode 100644 index 0000000..c6f29d5 --- /dev/null +++ b/ports/unofficial/stable/xless/files/Makefile @@ -0,0 +1,26 @@ +DESTDIR = +CC = gcc +DEFINES = -DDEBIAN +INCLUDES = -I/usr/X11R6/include -DXAW_INTERNATIONALIZATION -DXAW_MULTIPLANE_PIXMAPS -DXAW_GRAY_BLKWHT_STIPPLES -DXAW_ARROW_SCROLLBARS -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid +CFLAGS = -O2 -Wall -fno-strength-reduce $(INCLUDES) $(DEFINES) + +OBJS = help.o init.o popup.o util.o callbacks.o window.o main.o actions.o \ + functions.o + +LIBS = -lX11 -lXmu -lXt -lXaw3dxft -lfontconfig -lXmu -lXt -lX11 -lXft -lfreetype + +%.o: %.c + $(CC) $(CFLAGS) -c $< + +xless: $(OBJS) + $(CC) $(CFLAGS) -o xless $(OBJS) $(LIBS) + +install: xless + mkdir -p $(DESTDIR)/usr/bin + mkdir -p $(DESTDIR)/etc/X11/app-defaults + install -m 0755 xless $(DESTDIR)/usr/bin + install -c -m 0644 XLess.ad $(DESTDIR)/etc/X11/app-defaults/XLess + install -c -m 0644 XLess-co.ad $(DESTDIR)/etc/X11/app-defaults/XLess-color + +clean: + rm -f *.o xless core diff --git a/ports/unofficial/stable/xless/files/ttf.patch b/ports/unofficial/stable/xless/files/ttf.patch new file mode 100644 index 0000000..6a7102b --- /dev/null +++ b/ports/unofficial/stable/xless/files/ttf.patch @@ -0,0 +1,35 @@ +--- xless-1.7.orig/main.c 2022-02-12 20:10:24.150641527 -0400 ++++ xless-1.7/main.c 2022-02-12 20:09:08.314646493 -0400 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include + +@@ -205,6 +206,24 @@ + int argc; + char *argv[]; + { ++Xaw3dXftData *xaw3dxft_data=NULL; ++Xaw3dXftProc *xaw3dxft_proc=NULL; ++ ++GET_XAW3DXFT_DATA(xaw3dxft_data); ++ ++if(xaw3dxft_data) ++{ ++xaw3dxft_data->border_hack=0; ++xaw3dxft_data->text_fg_alternate_color=1; ++xaw3dxft_data->encoding=-1; ++xaw3dxft_data->menu_spacing=3; ++xaw3dxft_data->string_use_pixmap=0; ++xaw3dxft_data->button_dashed=0; ++xaw3dxft_data->show_tips=1; ++} ++else ++return(1); ++ + int i, attempted; + + #ifdef _DEBUG_MALLOC_INC diff --git a/ports/unofficial/stable/xless/sources b/ports/unofficial/stable/xless/sources index 368c263..2ccb74c 100644 --- a/ports/unofficial/stable/xless/sources +++ b/ports/unofficial/stable/xless/sources @@ -1,2 +1,4 @@ https://deb.debian.org/debian/pool/main/x/xless/xless_1.7.orig.tar.gz files/errors.patch +files/ttf.patch +files/Makefile