- 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
This commit is contained in:
Hiroki Sato 2007-06-09 11:59:41 +00:00
parent 10a62574e8
commit 572f5ae6c5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=193095
15 changed files with 159 additions and 220 deletions

1
MOVED
View File

@ -3064,3 +3064,4 @@ www/py-htmltestcase||2007-06-04|Has expired: Upstream site disappeared and depen
multimedia/snd-music-duplicates||2007-06-05|Has expired: Development has been ceased, successor is shareware.
audio/freebirth||2007-06-05|Has expired: Doesn't work on FreeBSD 5.0 and higher
net/sixxs-heartbeatd||2007-06-05|obsolete, use net/sixxs-aiccu instead
graphics/tgif-nls|graphics/tgif|2007-06-09|graphics/tgif now supports NLS by default

View File

@ -674,7 +674,6 @@
SUBDIR += tcm
SUBDIR += telak
SUBDIR += tgif
SUBDIR += tgif-nls
SUBDIR += tif22pnm
SUBDIR += tiff
SUBDIR += tiff2png

View File

@ -1,64 +0,0 @@
# New ports collection makefile for: tgif-nls
# Date created: 3 May 1999
# Whom: one@netlab.is.tsukuba.ac.jp
#
# $FreeBSD$
#
PORTNAME= tgif
PORTVERSION= 4.1.45
PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= ftp://bourbon.usc.edu/pub/tgif/ \
${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= tgif
PKGNAMESUFFIX= -nls
DISTNAME= ${PORTNAME}-QPL-${PORTVERSION}
MAINTAINER= one@netlab.is.tsukuba.ac.jp
COMMENT= A two-dimensional drawing tool with NLS message catalogs support
RUN_DEPENDS= giftopnm:${PORTSDIR}/graphics/netpbm
USE_GETTEXT= yes
USE_IMAKE= yes
MAN1= tgif.1
.if !defined(NOPORTDOCS)
DEMO_FILES= an-sr-flip-flop.obj launch-demo-1.obj \
fonts.obj launch-demo.obj keys.obj slide-demo.obj example.tex
READMES= Copyright HISTORY LICENSE.QPL README
SPICE_FILES= README BZ.mod DN.mod DN.sym MN.mod MN.sym MP.mod MP.sym \
SN.mod SN.sym SP.mod SP.sym capacitor.sym connection.sym \
demo.obj gauge.sym ground.sym in.sym out.sym port.sym \
resistor.0tc.sym resistor.2tc.sym resistor.h.2tc.sym \
resistor.h.sym resistor.sym
.endif
post-extract:
${RM} -f ${WRKDIR}/${DISTNAME}/Tgif.tmpl
${CP} ${WRKDIR}/${DISTNAME}/Tgif.tmpl-freebsd \
${WRKDIR}/${DISTNAME}/Tgif.tmpl
post-patch:
${REINPLACE_CMD} -e 's|.TH tgif n|.TH tgif 1L|' \
${WRKSRC}/tgif.man
${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
s|/usr/share/lib|${PREFIX}/share/locale|' \
${WRKSRC}/tgif.Xdefaults
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}; ${MKDIR} ${EXAMPLESDIR}
(cd ${WRKSRC} ;\
${INSTALL_DATA} ${DEMO_FILES} ${EXAMPLESDIR} ;\
${INSTALL_DATA} ${READMES} ${DOCSDIR} \
)
${MKDIR} ${EXAMPLESDIR}/spice
(cd ${WRKSRC}/spice ;\
${INSTALL_DATA} ${SPICE_FILES} ${EXAMPLESDIR}/spice \
)
.endif
${LN} -fs tgif ${PREFIX}/bin/tgif-nls
.include <bsd.port.mk>

View File

@ -1,3 +0,0 @@
MD5 (tgif-QPL-4.1.45.tar.gz) = 5c1eba8291385c630b8099fa9b042455
SHA256 (tgif-QPL-4.1.45.tar.gz) = f18d503cbb15917e95667f8be90d6c1966139b87bcd098431861293bfa62880c
SIZE (tgif-QPL-4.1.45.tar.gz) = 2198909

View File

@ -1,40 +0,0 @@
--- Tgif.tmpl.orig Mon Dec 3 09:25:01 2001
+++ Tgif.tmpl Mon Dec 3 09:28:36 2001
@@ -41,6 +41,9 @@
XIMPDEFINES =
#endif
+#define IHaveSubdirs
+SUBDIRS = po
+
PROGRAMS = tgif XCOMM prtgif frontend11.o testdrive
TGIFDIR = $(LIBDIR)/tgif
XCOMM CDEBUGFLAGS= -g -Wall
@@ -48,7 +51,7 @@
XCOMM BINDIR = /u/halfmoon/bin
XCOMM MANPATH = /u/halfmoon/man
XCOMM TGIFDIR = /u/halfmoon/lib/X11/tgif
-LOCALEDIR = /usr/share/locale
+LOCALEDIR = $(PREFIX)/share/locale
DIRDEFINES = -DTGIF_PATH=\"$(TGIFDIR)\" -DPSFILE_MOD=0664 \@@\
-DLOCALEDIR=\"$(LOCALEDIR)\" \@@\
-DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\" \@@\
@@ -61,14 +64,16 @@
MISCDEFINES = -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT \@@\
-D_USE_PS_ADOBE_STRING=\"3.0/3.0\" -D_DONT_USE_MKTEMP \@@\
-D_DONT_REENCODE=\"FFDingbests:ZapfDingbats\"
-MOREDEFINES =
+MOREDEFINES = -DUSE_XT_INITIALIZE -D_ENABLE_NLS -DA4PAPER
XCOMM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
XCOMM Please see Imakefile for more defines to be added to MOREDEFINES above
XCOMM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DEPLIBS = $(DEPXLIB)
-LOCAL_LIBRARIES = $(XLIB)
+LOCAL_LIBRARIES = $(XLIB) $(XTOOLLIB) $(XLIB)
XCOMM LOCAL_LIBRARIES = $(XMULIB) $(XTOOLLIB) $(XLIB)
XCOMM SYS_LIBRARIES = -ldl -lm
SYS_LIBRARIES = -lm
+EXTRA_INCLUDES += -I$(LOCALBASE)/include
+EXTRA_LIBRARIES += -L$(LOCALBASE)/lib -lintl

View File

@ -1,23 +0,0 @@
Tgif 4.X with NLS message catalogs support
Tgif is an interactive drawing tool that allows the user to draw and
manipulate objects in the X Window System. It's also a hyper-graphics (or
hyper-structured-graphics) browser on the World-Wide-Web. Its hyper-text
home page is http://bourbon.usc.edu:8001/tgif/ and its hyper-graphics
home page is http://bourbon.usc.edu:8001/tgif/index.obj.
Tgif drawings can be converted to a variety of formats, including GIF,
encapsulated PostScript and XBM.
Version 4 has a completely revamped 3-D user interface, as well as a host
of new features. Tgif-4.1.5 and above version supports native language in
the menus.
Tgif depends on the `netpbm' package, available from the `ports'
collection. In order to native language support, `gettext' package is
required, and it's also available from the `ports' collection.
WWW: http://bourbon.usc.edu:8001/tgif/
Tgif is written, maintained and enhanced by
William Chia-Wei Cheng (william@cs.umd.edu)

View File

@ -1,60 +0,0 @@
bin/tgif
bin/tgif-nls
lib/X11/tgif/Copyright
lib/X11/tgif/LICENSE.QPL
lib/X11/tgif/eq4.sym
lib/X11/tgif/eq4-2x.sym
lib/X11/tgif/eq4-epstool.sym
lib/X11/tgif/eq4-lyx-ps2epsi.sym
lib/X11/tgif/eq4-ps2epsi.sym
lib/X11/tgif/eq4xpm.sym
lib/X11/tgif/keys.obj
lib/X11/tgif/tangram.sym
lib/X11/tgif/tgif.Xdefaults
lib/X11/tgif/tgificon.eps
lib/X11/tgif/tgificon.obj
lib/X11/tgif/tgificon.xbm
lib/X11/tgif/tgificon.xpm
%%PORTDOCS%%%%DOCSDIR%%/Copyright
%%PORTDOCS%%%%DOCSDIR%%/HISTORY
%%PORTDOCS%%%%DOCSDIR%%/LICENSE.QPL
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%EXAMPLESDIR%%/an-sr-flip-flop.obj
%%PORTDOCS%%%%EXAMPLESDIR%%/example.tex
%%PORTDOCS%%%%EXAMPLESDIR%%/fonts.obj
%%PORTDOCS%%%%EXAMPLESDIR%%/keys.obj
%%PORTDOCS%%%%EXAMPLESDIR%%/launch-demo.obj
%%PORTDOCS%%%%EXAMPLESDIR%%/launch-demo-1.obj
%%PORTDOCS%%%%EXAMPLESDIR%%/slide-demo.obj
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/BZ.mod
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/DN.mod
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/DN.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/MN.mod
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/MN.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/MP.mod
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/MP.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/README
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/SN.mod
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/SN.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/SP.mod
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/SP.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/capacitor.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/connection.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/demo.obj
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/gauge.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/ground.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/in.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/out.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/port.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/resistor.0tc.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/resistor.2tc.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/resistor.h.2tc.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/resistor.h.sym
%%PORTDOCS%%%%EXAMPLESDIR%%/spice/resistor.sym
share/locale/fr/LC_MESSAGES/tgif.mo
share/locale/ja/LC_MESSAGES/tgif.mo
share/locale/ru/LC_MESSAGES/tgif.mo
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/spice
%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
@dirrm lib/X11/tgif

View File

@ -7,7 +7,7 @@
PORTNAME= tgif
PORTVERSION= 4.1.45
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= ftp://bourbon.usc.edu/pub/tgif/ \
http://groups.yahoo.com/group/tgif4-announce/files/ \
@ -20,25 +20,52 @@ COMMENT= An Xlib-based two-dimensional drawing tool and hyper-object browser
RUN_DEPENDS= giftopnm:${PORTSDIR}/graphics/netpbm
OPTIONS= NLS "Enable native language support" on \
A4SIZE "Set default paper size to A4" off
USE_IMAKE= yes
PORTDOCS= HISTORY README
MAN1= tgif.1
TGIFDOC= ${PREFIX}/share/doc/tgif
DEMO_FILES= an-sr-flip-flop.obj launch-demo-1.obj \
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
IMAKEDEFINES+= WITH_NLS
PLIST_SUB= NLS=""
.else
PLIST_SUB= NLS="@comment "
.endif
.if defined(WITH_A4SIZE)
IMAKEDEFINES+= WITH_A4SIZE
.endif
EXAMPLES.demo= an-sr-flip-flop.obj launch-demo-1.obj \
fonts.obj launch-demo.obj keys.obj slide-demo.obj example.tex
READMES= Copyright HISTORY README
EXAMPLES.spice= README BZ.mod DN.mod DN.sym MN.mod MN.sym MP.mod MP.sym \
SN.mod SN.sym SP.mod SP.sym capacitor.sym connection.sym \
demo.obj gauge.sym ground.sym in.sym out.sym port.sym \
resistor.0tc.sym resistor.2tc.sym resistor.h.2tc.sym \
resistor.h.sym resistor.sym
post-extract:
${RM} -f ${WRKDIR}/${DISTNAME}/Tgif.tmpl
${CP} ${WRKDIR}/${DISTNAME}/Tgif.tmpl-freebsd \
${WRKDIR}/${DISTNAME}/Tgif.tmpl
post-patch:
@${REINPLACE_CMD} -e 's|.TH tgif n|.TH tgif 1L|' \
${WRKSRC}/tgif.man
${CP} -f ${WRKDIR}/${DISTNAME}/Tgif.tmpl-freebsd \
${WRKSRC}/Tgif.tmpl
( for D in ${IMAKEDEFINES}; do \
${ECHO_CMD} "#define $${D}"; \
done; \
${CAT} ${FILESDIR}/Tgif.tmpl-freebsdports; \
) > ${WRKSRC}/Tgif.tmpl-freebsdports
post-install:
${MKDIR} ${TGIFDOC}
(cd ${WRKSRC} ;\
${INSTALL_DATA} ${DEMO_FILES} ${TGIFDOC} ;\
${INSTALL_DATA} ${READMES} ${TGIFDOC} ;\
)
.for D in demo spice
${MKDIR} ${EXAMPLESDIR}/${D}
cd ${WRKSRC}/${D:S/demo//} \
&& ${INSTALL_DATA} ${EXAMPLES.${D}} ${EXAMPLESDIR}/${D}
.endfor
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,3 @@
Tgif 4.0.41
Tgif is an interactive drawing tool that allows the user to draw and
manipulate objects in the X Window System. It's also a hyper-graphics (or
hyper-structured-graphics) browser on the World-Wide-Web. Its hyper-text

View File

@ -1,3 +1,4 @@
@comment $FreeBSD$
bin/tgif
lib/X11/tgif/Copyright
lib/X11/tgif/LICENSE.QPL
@ -14,15 +15,42 @@ lib/X11/tgif/tgificon.xbm
lib/X11/tgif/tgificon.xpm
lib/X11/tgif/tangram.sym
lib/X11/tgif/keys.obj
share/doc/tgif/Copyright
share/doc/tgif/HISTORY
share/doc/tgif/README
share/doc/tgif/an-sr-flip-flop.obj
share/doc/tgif/example.tex
share/doc/tgif/fonts.obj
share/doc/tgif/launch-demo-1.obj
share/doc/tgif/launch-demo.obj
share/doc/tgif/keys.obj
share/doc/tgif/slide-demo.obj
@dirrm share/doc/tgif
%%EXAMPLESDIR%%/demo/an-sr-flip-flop.obj
%%EXAMPLESDIR%%/demo/example.tex
%%EXAMPLESDIR%%/demo/fonts.obj
%%EXAMPLESDIR%%/demo/launch-demo-1.obj
%%EXAMPLESDIR%%/demo/launch-demo.obj
%%EXAMPLESDIR%%/demo/keys.obj
%%EXAMPLESDIR%%/demo/slide-demo.obj
@dirrm %%EXAMPLESDIR%%/demo
%%EXAMPLESDIR%%/spice/BZ.mod
%%EXAMPLESDIR%%/spice/DN.mod
%%EXAMPLESDIR%%/spice/DN.sym
%%EXAMPLESDIR%%/spice/MN.mod
%%EXAMPLESDIR%%/spice/MN.sym
%%EXAMPLESDIR%%/spice/MP.mod
%%EXAMPLESDIR%%/spice/MP.sym
%%EXAMPLESDIR%%/spice/README
%%EXAMPLESDIR%%/spice/SN.mod
%%EXAMPLESDIR%%/spice/SN.sym
%%EXAMPLESDIR%%/spice/SP.mod
%%EXAMPLESDIR%%/spice/SP.sym
%%EXAMPLESDIR%%/spice/capacitor.sym
%%EXAMPLESDIR%%/spice/connection.sym
%%EXAMPLESDIR%%/spice/demo.obj
%%EXAMPLESDIR%%/spice/gauge.sym
%%EXAMPLESDIR%%/spice/ground.sym
%%EXAMPLESDIR%%/spice/in.sym
%%EXAMPLESDIR%%/spice/out.sym
%%EXAMPLESDIR%%/spice/port.sym
%%EXAMPLESDIR%%/spice/resistor.0tc.sym
%%EXAMPLESDIR%%/spice/resistor.2tc.sym
%%EXAMPLESDIR%%/spice/resistor.h.2tc.sym
%%EXAMPLESDIR%%/spice/resistor.h.sym
%%EXAMPLESDIR%%/spice/resistor.sym
@dirrm %%EXAMPLESDIR%%/spice
%%NLS%%share/locale/fr/LC_MESSAGES/tgif.mo
%%NLS%%share/locale/ja/LC_MESSAGES/tgif.mo
%%NLS%%share/locale/ru/LC_MESSAGES/tgif.mo
@dirrm %%EXAMPLESDIR%%
@dirrm lib/X11/tgif