Patch XLess to use TTF fonts.

This commit is contained in:
Mid Favila 2022-02-12 20:12:39 -04:00
parent b2ed59561c
commit 1f34a62245
6 changed files with 73 additions and 4 deletions

View File

@ -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

View File

@ -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"

View File

@ -1,2 +1,4 @@
02407ddd78a09a0af9b74e87311cba8c4561ae0e8161ab99b1ad52a557d7bf19
425aa7145416638686d9fb90a03a284416d3509472b2f976b3196a3a5ac2fd6e
d49615fb5140dcd720654879fe0ee2e408d33e4400ab04486febeaddb02df8c6
2f734e457578a83c109384eb0c283f97f45b5bf457faaa608d96785f36e52b09

View File

@ -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

View File

@ -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 <X11/StringDefs.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>
+#include <X11/Xaw3dxft/Xaw3dXft.h>
#include <X11/Xmu/Xmu.h>
@@ -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

View File

@ -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