1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

- Fix MASTER_SITES

- Support CC/CFLAGS/X11BASE properly
- Add WWW: line to pkg/DESCR

PR:		16670
Submitted by:	KATO Tsuguru <tkato@prontomail.ne.jp>
This commit is contained in:
Steve Price 2000-05-30 00:00:01 +00:00
parent b53c7742ba
commit 13ae48cfbd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=28964
9 changed files with 220 additions and 25 deletions

View File

@ -1,14 +1,14 @@
# New ports collection makefile for: 9term
# Date created: Sun Aug 13 12:36:14 CDT 1995
# Whom: erich@rrnet.com
# Date created: Sun Aug 13 12:36:14 CDT 1995
# Whom: erich@rrnet.com
#
# $FreeBSD$
#
PORTNAME= 9term
PORTVERSION= 1.6.3
PORTVERSION= 1.6.3
CATEGORIES= x11 plan9
MASTER_SITES= ftp://ftp.ecf.toronto.edu/pub/plan9/matty/
MASTER_SITES= ftp://ftp.cs.usyd.edu.au/matty/unicode/
DISTNAME= ${PORTNAME}.${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
@ -16,10 +16,9 @@ MAINTAINER= ports@FreeBSD.org
# needs library and private header, but not during runtime
BUILD_DEPENDS= /nonexistent:${PORTSDIR}/editors/sam:build
USE_XLIB= yes
MAN1= 9term.1
MANCOMPRESSED= yes
MAKE_ENV= SAMDIR=${WRKDIRPREFIX}${.CURDIR}/../../editors/sam/work
NO_WRKSUBDIR= yes
USE_X_PREFIX= yes
MAKE_ENV= SAMDIR=${WRKDIRPREFIX}${.CURDIR}/../../editors/sam/work
MAN1= 9term.1
.include <bsd.port.mk>

View File

@ -1,15 +1,11 @@
*** Makefile.orig Fri Aug 11 15:57:26 1995
--- Makefile Fri Aug 11 16:04:30 1995
*** Makefile.orig Fri Feb 11 10:13:45 2000
--- Makefile Fri Feb 11 10:16:11 2000
***************
*** 0 ****
--- 1,10 ----
+
+ MAN=man
--- 1,6 ----
+ all:
+ (cd libtext; make)
+ (cd 9term; make)
+ (cd libtext; ${MAKE})
+ (cd 9term; ${MAKE})
+ install:
+ $(INSTALL) -c 9term/9term $(PREFIX)/bin/
+ $(INSTALL) -c 9term/9term.1 $(PREFIX)/$(MAN)/man1/
+ strip $(PREFIX)/bin/9term
+ gzip -9nf $(PREFIX)/man/man1/9term.1
+ ${BSD_INSTALL_PROGRAM} 9term/9term $(PREFIX)/bin
+ ${BSD_INSTALL_MAN} 9term/9term.1 $(PREFIX)/man/man1

View File

@ -1,5 +1,5 @@
--- 9term/Makefile.orig Sun Mar 13 22:50:54 1994
+++ 9term/Makefile Sun Sep 27 22:36:53 1998
--- 9term/Makefile.orig Mon Mar 14 13:50:54 1994
+++ 9term/Makefile Fri Feb 11 10:18:21 2000
@@ -11,27 +11,31 @@
# Define RISCOS for Mips RISC/os
# Define BSDPTYS for BSD-style pty support
@ -19,10 +19,11 @@
-INCLUDES=-I. -I../include -I/usr/openwin/include
-CFLAGS=-g $(OS) $(INCLUDES) -fno-builtin -D_LIBXG_EXTENSION
-LDFLAGS=-g -R/usr/openwin/lib -L/usr/openwin/lib -R/usr/ucblib -L/usr/ucblib
+INCLUDES=-I. -I../libtext -I$(SAMPATH)/include -I/usr/X11R6/include
+CFLAGS= -O2 $(OS) $(INCLUDES)
-CC=gcc
+INCLUDES=-I. -I../libtext -I$(SAMPATH)/include -I${X11BASE}/include
+CFLAGS+= $(OS) $(INCLUDES)
+LDFLAGS=
CC=gcc
+CC?=gcc
# change this if your X11 libraries are in different places
# or if you need extra libraries to load with X11 applications
@ -30,7 +31,7 @@
-XLIBS=-lXt -lX11
-
+LIBS=../libtext/libtext.a $(SAMPATH)/libframe/libframe.a $(SAMPATH)/libXg/libXg.a
+XLIBS= -L/usr/X11R6/lib -lXt -lX11
+XLIBS= -lXt -lX11 -L${X11BASE}/lib
+.if $(PORTOBJFORMAT) == "elf"
+XLIBS+=-Wl,-rpath,$(X11BASE)/lib
+.endif

44
x11/9term/files/patch-ae Normal file
View File

@ -0,0 +1,44 @@
--- 9term/9term.c.orig Fri Jun 3 17:35:39 1994
+++ 9term/9term.c Fri Feb 11 10:08:04 2000
@@ -10,7 +10,11 @@
#include <frame.h>
#include <text.h>
+#ifdef __FreeBSD__
+#include <sys/termios.h>
+#else
#include <sys/termio.h>
+#endif
#include <signal.h>
#include <sys/stat.h>
@@ -153,9 +157,9 @@
}
}
- setenv("TERM", "9term", 1);
+ O_setenv("TERM", "9term", 1);
/* Cope with BSD-oid systems. - cks */
- setenv("TERMCAP", "9term: :am:bl=^G:do=^J:nl=^J:", 1);
+ O_setenv("TERMCAP", "9term: :am:bl=^G:do=^J:nl=^J:", 1);
signal(SIGINT, SIG_IGN);
init_display(&argc, argv, cmd, resource);
@@ -718,7 +722,7 @@
texthighlight(t, t->length, t->length, F&~D);
#ifdef REMOTE
flushstream();
- killpg(r == quitchar ? SIGQUIT : SIGINT);
+ O_killpg(r == quitchar ? SIGQUIT : SIGINT);
#else
sendrunes(&r, 1);
#endif
@@ -804,7 +808,7 @@
* export a name-value pair to environment
*/
int
-setenv(char *name, char *value, int overwrite)
+O_setenv(char *name, char *value, int overwrite)
{
char *p;

23
x11/9term/files/patch-af Normal file
View File

@ -0,0 +1,23 @@
--- 9term/9term.h.orig Thu Dec 15 23:49:15 1994
+++ 9term/9term.h Fri Feb 11 10:08:04 2000
@@ -31,7 +31,7 @@
extern int isig;
extern void specialchars(int);
-extern int setenv(char *, char *, int);
+extern int O_setenv(char *, char *, int);
extern void init_display(int *, char **, char**, char*);
#ifdef NEEDVARARG
extern void error();
@@ -65,6 +65,11 @@
#endif
#ifdef SUNOS
+#define POSIXPTYS
+#define BSDPTYS
+#endif
+
+#ifdef __FreeBSD__
#define POSIXPTYS
#define BSDPTYS
#endif

23
x11/9term/files/patch-ag Normal file
View File

@ -0,0 +1,23 @@
--- 9term/command.c.orig Mon Mar 7 10:50:51 1994
+++ 9term/command.c Fri Feb 11 10:08:04 2000
@@ -13,7 +13,11 @@
#include <sys/wait.h>
#include <signal.h>
#include <grp.h>
+#ifdef __FreeBSD__
+#include <termios.h>
+#else
#include <termio.h>
+#endif
#ifdef SOLARIS
#include <sys/stropts.h>
#endif
@@ -204,7 +208,7 @@
*/
void
-killpg(int sig)
+O_killpg(int sig)
{
if (comm_pid)
kill(-comm_pid, sig);

29
x11/9term/files/patch-ah Normal file
View File

@ -0,0 +1,29 @@
--- 9term/display.c.orig Thu Dec 15 23:48:28 1994
+++ 9term/display.c Fri Feb 11 10:08:04 2000
@@ -114,7 +114,7 @@
delwin(Widget w, XEvent *event, String *params, Cardinal *n)
{
if (w == _toplevel)
- killpg(SIGHUP);
+ O_killpg(SIGHUP);
}
/*
@@ -185,7 +185,7 @@
else if (!strcasecmp(s, "plan9"))
kbdmode = PLAN9;
if (s = get_resource(resource, class, "p9font", "P9font"))
- setenv("font", s, 1);
+ O_setenv("font", s, 1);
if (s = get_resource(resource, class, "highwater", "Highwater"))
highwater = atoi(s);
if (s = get_resource(resource, class, "lowwater", "Lowwater"))
@@ -230,7 +230,7 @@
#endif
/* export window id to environment */
sprintf(id, "%d", XtWindow(_toplevel));
- setenv("WINDOWID", id, 1);
+ O_setenv("WINDOWID", id, 1);
/* register mouse and keyboard events */
einit(Ekeyboard | Emouse);

78
x11/9term/files/patch-ai Normal file
View File

@ -0,0 +1,78 @@
--- 9term/pty.c.orig Sat Jul 23 00:47:29 1994
+++ 9term/pty.c Fri Feb 11 10:08:05 2000
@@ -12,7 +12,16 @@
#include <utmp.h>
#include <errno.h>
-#ifdef SUNOS
+
+#ifdef __FreeBSD__
+# include <termios.h>
+
+/* # include <stropts.h> */
+ /* Isn't POSIX and portability so much fun? */
+# define VRPRNT VREPRINT
+#endif
+
+#if defined(SUNOS) && !defined(__FreeBSD__)
# undef _POSIX_SOURCE
# include <sys/termio.h>
# include <stropts.h>
@@ -41,7 +50,7 @@
# define VEOL2 _VEOL2
#endif
-#ifdef RISCOS
+#ifdef RISCOS
# include <sys/stat.h>
# include </usr/include/ctype.h> /* to defeat posix version */
# define VLNEXT V_LNEXT
@@ -49,10 +58,12 @@
# define VRPRNT V_RPRNT
# define VWERASE V_WERAS
#else
+#ifndef __FreeBSD__
# include <ctype.h>
#endif
+#endif
-#ifdef OSF1
+#if defined(OSF1)
# define V_START VSTART
# define V_STOP VSTOP
# define V_SUSP VSUSP
@@ -115,7 +126,7 @@
char udef, p9def;
};
-#if defined(SUNOS) || defined(IRIX) || defined(SOLARIS)
+#if defined(SUNOS) || defined(IRIX) || defined(SOLARIS) || defined(__FreeBSD__)
# define V_START VSTART
# define V_STOP VSTOP
# define V_SUSP VSUSP
@@ -139,7 +150,7 @@
#ifndef _POSIX_SOURCE
{ "eol2", 4, VEOL2, 0, 0 },
#endif
-#if !defined(_OSF_SOURCE) && !defined(_POSIX_SOURCE)
+#if !defined(_OSF_SOURCE) && !defined(_POSIX_SOURCE) && !defined(__FreeBSD__)
{ "swtch", 5, VSWTCH, 0, 0 },
#endif
{ "start", 5, V_START, ctrl('q'), ctrl('q') },
@@ -292,10 +303,16 @@
/* Insure some sanity. */
ttmode.c_lflag |= ECHO;
ttmode.c_oflag &= ~(ONLCR);
+#ifndef __FreeBSD__
ttmode.c_oflag |= ONLRET;
+#endif
} else {
ttmode.c_iflag = BRKINT | IGNPAR | ICRNL | IXON;
+#ifdef __FreeBSD__
+ ttmode.c_oflag = OPOST;
+#else
ttmode.c_oflag = OPOST | ONLRET;
+#endif
ttmode.c_cflag = B9600 | PARENB | CS8 | CREAD;
ttmode.c_lflag = ISIG | ICANON | ECHO | ECHOK;
#ifdef __ultrix

View File

@ -8,3 +8,5 @@ This port needs work, it is functional enough to get the feel
for 9term, but some of the features don't work with FreeBSD.
eric.
WWW: http://www.cs.su.oz.au/~matty/9term/