From 572f5ae6c54b91e298ce94b7ce31a402891abcca Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Sat, 9 Jun 2007 11:59:41 +0000 Subject: - Merge graphics/tgif-nls and graphics/tgif into a single port graphics/tgif. The two ports were almost identical except for NLS support. The graphics/tgif now supports NLS by default and WITHOUT_NLS knob to disable it. - Add WITH_A4SIZE knob to set A4 as the default paper size. - Add a workaround for incorrect width calculation of wide characters. Approved by: maintainer --- graphics/tgif/files/Tgif.tmpl-freebsdports | 16 ++++++++++++ graphics/tgif/files/patch-Tgif.tmpl | 8 ++++++ graphics/tgif/files/patch-font.c | 41 ++++++++++++++++++++++++++++++ graphics/tgif/files/patch-po-Po.tmpl | 9 +++++++ graphics/tgif/files/patch-tgif.man | 11 ++++++++ 5 files changed, 85 insertions(+) create mode 100644 graphics/tgif/files/Tgif.tmpl-freebsdports create mode 100644 graphics/tgif/files/patch-Tgif.tmpl create mode 100644 graphics/tgif/files/patch-font.c create mode 100644 graphics/tgif/files/patch-po-Po.tmpl create mode 100644 graphics/tgif/files/patch-tgif.man (limited to 'graphics/tgif/files') diff --git a/graphics/tgif/files/Tgif.tmpl-freebsdports b/graphics/tgif/files/Tgif.tmpl-freebsdports new file mode 100644 index 000000000000..912e07e72c65 --- /dev/null +++ b/graphics/tgif/files/Tgif.tmpl-freebsdports @@ -0,0 +1,16 @@ +XCOMM $FreeBSD$ +#ifdef WITH_NLS +#define IHaveSubdirs +SUBDIRS= po + +LOCALEDIR= $(PREFIX)/share/locale +MOREDEFINES= -DUSE_XT_INITIALIZE -DENABLE_NLS + +LOCAL_LIBRARIES= $(XLIB) $(XTOOLLIB) +EXTRA_INCLUDES+= -I$(LOCALBASE)/include +EXTRA_LIBRARIES+= -L$(LOCALBASE)/lib -lintl +#endif /* WITH_NLS */ + +#ifdef WITH_A4SIZE +MOREDEFINES+= -DA4PAPER +#endif /* WITH_A4SIZE */ diff --git a/graphics/tgif/files/patch-Tgif.tmpl b/graphics/tgif/files/patch-Tgif.tmpl new file mode 100644 index 000000000000..4c15ff814036 --- /dev/null +++ b/graphics/tgif/files/patch-Tgif.tmpl @@ -0,0 +1,8 @@ +--- Tgif.tmpl.orig Tue May 22 17:10:16 2007 ++++ Tgif.tmpl Tue May 22 17:13:48 2007 +@@ -59,3 +59,5 @@ + XCOMM LOCAL_LIBRARIES = $(XMULIB) $(XTOOLLIB) $(XLIB) + XCOMM SYS_LIBRARIES = -ldl -lm + SYS_LIBRARIES = -lm ++ ++#include "Tgif.tmpl-freebsdports" diff --git a/graphics/tgif/files/patch-font.c b/graphics/tgif/files/patch-font.c new file mode 100644 index 000000000000..8ada18a9de58 --- /dev/null +++ b/graphics/tgif/files/patch-font.c @@ -0,0 +1,41 @@ +--- font.c.orig Sat Jun 9 20:34:29 2007 ++++ font.c Sat Jun 9 20:36:15 2007 +@@ -869,10 +869,10 @@ + (nOdd || ((*psz)&0x80) == nDoubleByte); + psz++, nSubStrIndex++) { + if (nOdd) { +- gpszTmpStr16[nDoubleByteIndex].byte2 = (unsigned char)(*psz); ++ gpszTmpStr16[nDoubleByteIndex].byte2 = (unsigned char)(*psz) & 0x7f; + nDoubleByteIndex++; + } else { +- gpszTmpStr16[nDoubleByteIndex].byte1 = (unsigned char)(*psz); ++ gpszTmpStr16[nDoubleByteIndex].byte1 = (unsigned char)(*psz) & 0x7f; + } + nOdd = !nOdd; + } +@@ -932,10 +932,10 @@ + (nOdd || ((*psz)&0x80) == nDoubleByte); + psz++, nSubStrIndex++) { + if (nOdd) { +- gpszTmpStr16[nDoubleByteIndex].byte2 = (unsigned char)(*psz); ++ gpszTmpStr16[nDoubleByteIndex].byte2 = (unsigned char)(*psz) & 0x7f; + nDoubleByteIndex++; + } else { +- gpszTmpStr16[nDoubleByteIndex].byte1 = (unsigned char)(*psz); ++ gpszTmpStr16[nDoubleByteIndex].byte1 = (unsigned char)(*psz) & 0x7f; + } + nOdd = !nOdd; + } +@@ -981,10 +981,10 @@ + (nOdd || ((*psz)&0x80) == nDoubleByte); + psz++, nSubStrIndex++) { + if (nOdd) { +- gpszTmpStr16[nDoubleByteIndex].byte2 = (unsigned char)(*psz); ++ gpszTmpStr16[nDoubleByteIndex].byte2 = (unsigned char)(*psz) & 0x7f; + nDoubleByteIndex++; + } else { +- gpszTmpStr16[nDoubleByteIndex].byte1 = (unsigned char)(*psz); ++ gpszTmpStr16[nDoubleByteIndex].byte1 = (unsigned char)(*psz) & 0x7f; + } + nOdd = !nOdd; + } diff --git a/graphics/tgif/files/patch-po-Po.tmpl b/graphics/tgif/files/patch-po-Po.tmpl new file mode 100644 index 000000000000..01fd642f23a7 --- /dev/null +++ b/graphics/tgif/files/patch-po-Po.tmpl @@ -0,0 +1,9 @@ +--- po/Po.tmpl.orig Sat Jun 17 02:35:00 2000 ++++ po/Po.tmpl Sat Jun 17 02:35:26 2000 +@@ -8,5 +8,5 @@ + MKINSTALLDIRS = install -d + + DESTDIR = +-SYSNLSDIR = /usr/share/locale ++SYSNLSDIR = $(PREFIX)/share/locale + NLSDIR = $(DESTDIR)$(SYSNLSDIR) diff --git a/graphics/tgif/files/patch-tgif.man b/graphics/tgif/files/patch-tgif.man new file mode 100644 index 000000000000..6376be445bc6 --- /dev/null +++ b/graphics/tgif/files/patch-tgif.man @@ -0,0 +1,11 @@ +--- tgif.man.orig Wed Jun 14 07:30:00 2006 ++++ tgif.man Tue May 22 17:05:48 2007 +@@ -8,7 +8,7 @@ + .\" + .\" + .\" +-.TH tgif n "Version 4.1 Patchlevel 45 and Above" "Tgif" ++.TH tgif 1L "Version 4.1 Patchlevel 45 and Above" "Tgif" + .\" + .SH NAME + .\" -- cgit v1.2.3