summaryrefslogtreecommitdiff
path: root/www/libxpg4-ns
diff options
context:
space:
mode:
authorSADA Kenji <sada@FreeBSD.org>1999-04-04 18:09:57 +0000
committerSADA Kenji <sada@FreeBSD.org>1999-04-04 18:09:57 +0000
commit5a690a0836db083c63b700c731515b2b661801cc (patch)
tree0e8749d2711c746deebaaaac73cb582464ad6e03 /www/libxpg4-ns
parentUpgrade to ucspi-tcp 0.84 (diff)
libxpg4 (aout) for Netscape Browser. This is against browser's locale bug.
Patches are created by <nagahama@yasuda.comm.waseda.ac.jp>. Refer to <URL:http://www.yasuda.comm.waseda.ac.jp/~nagahama/freebsd.html>.
Diffstat (limited to 'www/libxpg4-ns')
-rw-r--r--www/libxpg4-ns/Makefile43
-rw-r--r--www/libxpg4-ns/distinfo1
-rw-r--r--www/libxpg4-ns/files/patch-aa57
-rw-r--r--www/libxpg4-ns/files/patch-ab15
-rw-r--r--www/libxpg4-ns/pkg-comment1
-rw-r--r--www/libxpg4-ns/pkg-descr6
-rw-r--r--www/libxpg4-ns/pkg-plist5
7 files changed, 128 insertions, 0 deletions
diff --git a/www/libxpg4-ns/Makefile b/www/libxpg4-ns/Makefile
new file mode 100644
index 000000000000..c4008be2ece8
--- /dev/null
+++ b/www/libxpg4-ns/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: libxpg4-ns
+# Version required: 3.1-R
+# Date created: 27 February 1999
+# Whom: sada
+#
+# $Id$
+#
+
+DISTNAME= libxpg4-3.1r
+PKGNAME= libxpg4-ns-3.1r
+CATEGORIES= japanese
+MASTER_SITES= ${MASTER_SITE_PORTS_JP} \
+ http://WWW.FreeBSD.ORG/~sada/distfiles/
+
+MAINTAINER= sada@FreeBSD.ORG
+
+MAKE_ENV+= OBJFORMAT=aout SHLIB_MAJOR=2 SHLIB_MINOR=0 \
+ LDDESTDIRENV=LIBRARY_PATH=${PREFIX}/lib/aout
+PORTOBJFORMAT= aout
+
+LIBDIR= ${PREFIX}/lib/aout
+SRCDIR= /usr/src
+
+pre-install:
+ ${MKDIR} ${LIBDIR}
+
+post-install:
+ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${LIBDIR}
+
+extract-from-freebsd: # only for port maintainer.
+.if exists(/usr/src/lib)
+ ${RM} -rf ${WRKSRC}
+ ${MKDIR} ${WRKSRC}
+ tar cfC - ${SRCDIR}/lib/libc locale | tar xfC - ${WRKSRC}
+ ${CP} ${SRCDIR}/lib/libxpg4/Makefile ${WRKSRC}/
+.else
+ ${ECHO} You should INSTALL \"src/lib\" distribution"
+.endif
+
+private-distribution: # only for port maintainer.
+ tar czfC ${WRKDIR}/${DISTNAME}${EXTRACT_SUFX} ${WRKDIR} ${DISTNAME}
+
+.include <bsd.port.mk>
diff --git a/www/libxpg4-ns/distinfo b/www/libxpg4-ns/distinfo
new file mode 100644
index 000000000000..57f91b6f0795
--- /dev/null
+++ b/www/libxpg4-ns/distinfo
@@ -0,0 +1 @@
+MD5 (libxpg4-3.1r.tar.gz) = 6c5be3c40783d1d29e4219d79c3c2fe9
diff --git a/www/libxpg4-ns/files/patch-aa b/www/libxpg4-ns/files/patch-aa
new file mode 100644
index 000000000000..df01df2795d6
--- /dev/null
+++ b/www/libxpg4-ns/files/patch-aa
@@ -0,0 +1,57 @@
+--- locale/ansi.c.orig Sun Oct 25 14:06:42 1998
++++ locale/ansi.c Sun Feb 28 00:59:25 1999
+@@ -42,6 +42,7 @@
+ #include <limits.h>
+ #include <stddef.h>
+ #include <rune.h>
++#include <string.h>
+
+ int
+ mblen(s, n)
+@@ -105,9 +106,19 @@
+ char const *e;
+ int cnt = 0;
+
+- if (!pwcs || !s)
++ if (!s)
+ return (-1);
+
++ if (!pwcs) {
++ while (*s) {
++ if (sgetrune(s, MB_LEN_MAX, &e) == _INVALID_RUNE)
++ return (-1);
++ s = e;
++ ++cnt;
++ }
++ return (cnt);
++ }
++
+ while (n-- > 0) {
+ *pwcs = sgetrune(s, MB_LEN_MAX, &e);
+ if (*pwcs == _INVALID_RUNE)
+@@ -132,6 +143,13 @@
+ if (!pwcs || !s || n > INT_MAX)
+ return (-1);
+
++if( (pwcs[0]&0xffff0000) || ((!(pwcs[0]&0x8000))&&(pwcs[0]&0xff00)) ){
++ int len;
++ strncpy(s, (char *)pwcs, n);
++ len = strlen((char *)pwcs);
++ return (len < n) ? len : n;
++}
++
+ nb = n;
+ cnt = 0;
+ while (nb > 0) {
+@@ -141,8 +159,10 @@
+ }
+ if (!sputrune(*pwcs++, s, nb, &e))
+ return (-1); /* encoding error */
+- if (!e) /* too long */
++ if (!e) { /* too long */
++ *s = 0;
+ return (cnt);
++ }
+ cnt += e - s;
+ nb -= e - s;
+ s = e;
diff --git a/www/libxpg4-ns/files/patch-ab b/www/libxpg4-ns/files/patch-ab
new file mode 100644
index 000000000000..8fc638c941f9
--- /dev/null
+++ b/www/libxpg4-ns/files/patch-ab
@@ -0,0 +1,15 @@
+--- Makefile.orig Sat Feb 27 20:19:25 1999
++++ Makefile Sat Feb 27 20:20:05 1999
+@@ -1,8 +1,8 @@
+-LIB= xpg4
++LIB= xpg4-ns
+ SRCS= setlocale.c setrunelocale.c big5.c euc.c mskanji.c utf2.c runetype.c \
+- tolower.c toupper.c
+-CFLAGS+= -Wall -DXPG4 -I${.CURDIR}/../libc/locale
+-.PATH: ${.CURDIR}/../libc/locale
++ tolower.c toupper.c ansi.c
++CFLAGS+= -Wall -DXPG4 -I${.CURDIR}/locale
++.PATH: ${.CURDIR}/locale
+
+ NOMAN= YES
+
diff --git a/www/libxpg4-ns/pkg-comment b/www/libxpg4-ns/pkg-comment
new file mode 100644
index 000000000000..d00724c5133a
--- /dev/null
+++ b/www/libxpg4-ns/pkg-comment
@@ -0,0 +1 @@
+libxpg4(aout) for Netscape Browser, against the browser's locale bug.
diff --git a/www/libxpg4-ns/pkg-descr b/www/libxpg4-ns/pkg-descr
new file mode 100644
index 000000000000..b16acedb1f92
--- /dev/null
+++ b/www/libxpg4-ns/pkg-descr
@@ -0,0 +1,6 @@
+libxpg4 (aout) for Netscape Browser. This is against browser's locale bug.
+Patches are created by <nagahama@yasuda.comm.waseda.ac.jp>.
+Refer to <URL:http://www.yasuda.comm.waseda.ac.jp/~nagahama/freebsd.html>.
+
+- SADA Kenji
+sada@FreeBSD.ORG
diff --git a/www/libxpg4-ns/pkg-plist b/www/libxpg4-ns/pkg-plist
new file mode 100644
index 000000000000..343f355e7829
--- /dev/null
+++ b/www/libxpg4-ns/pkg-plist
@@ -0,0 +1,5 @@
+lib/aout/libxpg4-ns.a
+lib/aout/libxpg4-ns.so.2.0
+lib/aout/libxpg4-ns_p.a
+@exec env OBJFORMAT=aout ldconfig -m %B
+@unexec env OBJFORMAT=aout ldconfig -R %B