mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
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>.
This commit is contained in:
parent
9b8acfb3fd
commit
5a690a0836
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=17637
43
www/libxpg4-ns/Makefile
Normal file
43
www/libxpg4-ns/Makefile
Normal file
@ -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>
|
1
www/libxpg4-ns/distinfo
Normal file
1
www/libxpg4-ns/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (libxpg4-3.1r.tar.gz) = 6c5be3c40783d1d29e4219d79c3c2fe9
|
57
www/libxpg4-ns/files/patch-aa
Normal file
57
www/libxpg4-ns/files/patch-aa
Normal file
@ -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;
|
15
www/libxpg4-ns/files/patch-ab
Normal file
15
www/libxpg4-ns/files/patch-ab
Normal file
@ -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
|
||||
|
1
www/libxpg4-ns/pkg-comment
Normal file
1
www/libxpg4-ns/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
libxpg4(aout) for Netscape Browser, against the browser's locale bug.
|
6
www/libxpg4-ns/pkg-descr
Normal file
6
www/libxpg4-ns/pkg-descr
Normal file
@ -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
|
5
www/libxpg4-ns/pkg-plist
Normal file
5
www/libxpg4-ns/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user