Initial import of libcii version 1.1.

Library from "C Interfaces and Implementations" by David Hanson.

PR:		6504
Submitted by:	J Han <hjh@photino.com>
This commit is contained in:
Steve Price 1999-01-10 19:05:23 +00:00
parent 2cab921ce5
commit 40081c11c4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=15986
7 changed files with 249 additions and 0 deletions

81
devel/libcii/Makefile Normal file
View file

@ -0,0 +1,81 @@
# New ports collection makefile for: libcii
# Version required: 1.1
# Date created: 21 April 1998
# Whom: J Han <hjh@photino.com>
#
# $Id$
#
DISTNAME= cii11
PKGNAME= libcii-1.1
CATEGORIES= devel
MASTER_SITES= ftp://ftp.cs.princeton.edu/pub/packages/cii/
MAINTAINER= hjh@photino.com
NO_INSTALL_MANPAGES= yes
NO_WRKSUBDIR= yes
SAMPLES= double calc ids mpcalc wf xref cref iref kref \
idents words basename dirname sort spin sieve
CIIBUILD= ${WRKDIR}/${PKGNAME}
CIICUSTOM= ${FILESDIR}/freebsd.mk
CIIMAJOR= 1
CIIDEST= ${PREFIX}/lib/cii
MAKEFILE= makefile
MAKE_FLAGS+= BUILDDIR=${PKGNAME} # ${CIIBUILD}
MAKE_FLAGS+= CUSTOM=${CIICUSTOM}
pre-build:
@${MKDIR} ${CIIBUILD}
@${MKDIR} ${CIIBUILD}/include
@${CP} ${WRKDIR}/include/*.h ${CIIBUILD}/include
do-build:
@(cd ${WRKDIR}; ${MAKE} ${MAKE_FLAGS})
# /usr/local/lib/cii/1/
# /usr/local/lib/cii/1/include
#
# libcii.a is placed in /usr/local/lib
# .h is placed in /usr/local/include/cii
#
do-install:
@${MKDIR} ${CIIDEST}
@${MKDIR} ${CIIDEST}/${CIIMAJOR}
@${MKDIR} ${CIIDEST}/${CIIMAJOR}/include
@${MKDIR} ${CIIDEST}/${CIIMAJOR}/examples
# @${MKDIR} ${PREFIX}/include/cii
##
${INSTALL} ${COPY} ${CIIBUILD}/libcii.a ${CIIDEST}/${CIIMAJOR}
${INSTALL_DATA} ${WRKSRC}/include/*.h ${CIIDEST}/${CIIMAJOR}/include
##
${LN} -s ${CIIDEST}/${CIIMAJOR}/libcii.a ${PREFIX}/lib/libcii.a
${LN} -s ${CIIDEST}/${CIIMAJOR}/include ${PREFIX}/include/cii
##
(for a in ${SAMPLES}; \
do \
${INSTALL_PROGRAM} ${CIIBUILD}/$$a ${CIIDEST}/${CIIMAJOR}/examples; \
done)
##
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${PREFIX}/share/doc/cii
@${MKDIR} ${PREFIX}/share/doc/cii/examples
@${MKDIR} ${PREFIX}/share/doc/cii/src
${INSTALL_DATA} ${WRKSRC}/makefile ${PREFIX}/share/doc/cii
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/cii
${INSTALL_DATA} ${WRKSRC}/history.html ${PREFIX}/share/doc/cii
${INSTALL_DATA} ${WRKSRC}/CPYRIGHT ${PREFIX}/share/doc/cii
${INSTALL_DATA} ${WRKSRC}/install.html ${PREFIX}/share/doc/cii
${INSTALL_DATA} ${WRKSRC}/packing.lst ${PREFIX}/share/doc/cii
${INSTALL_DATA} ${WRKSRC}/examples/* \
${PREFIX}/share/doc/cii/examples
${INSTALL_DATA} ${WRKSRC}/src/* \
${PREFIX}/share/doc/cii/src
.endif
.include <bsd.port.mk>

1
devel/libcii/distinfo Normal file
View file

@ -0,0 +1 @@
MD5 (cii11.tar.gz) = 5dba680da30c3f3bce37bf5b2486a702

View file

@ -0,0 +1,11 @@
--- src/thread.c.orig Wed Nov 5 15:03:00 1997
+++ src/thread.c Sat Jan 9 18:44:09 1999
@@ -269,7 +269,7 @@
*--t->sp = (unsigned long)_start - 8;
*--t->sp = (unsigned long)fp;
t->sp -= 64/4; }
-#elif linux && i386
+#elif (linux || unix) && i386
{ extern void _thrstart(void);
t->sp -= 4/4;
*t->sp = (unsigned long)_thrstart;

View file

@ -0,0 +1,23 @@
--- src/swtch.s.orig Wed Nov 5 15:03:00 1997
+++ src/swtch.s Sat Jan 9 18:56:46 1999
@@ -136,7 +136,7 @@
.end _swtch
.globl _ENDMONITOR
_ENDMONITOR:
-#elif linux && i386
+#elif (linux || unix) && i386
.align 4
.globl __swtch
.globl _swtch
@@ -165,7 +165,11 @@
pushl %edi
call *%esi
pushl %eax
+#ifdef __ELF__
call Thread_exit
+#else
+ call _Thread_exit
+#endif
.globl __ENDMONITOR
.globl _ENDMONITOR
__ENDMONITOR:

1
devel/libcii/pkg-comment Normal file
View file

@ -0,0 +1 @@
library from "C Interfaces and Implementations" by David Hanson

24
devel/libcii/pkg-descr Normal file
View file

@ -0,0 +1,24 @@
This hierarchy contains all the source code from my book
"C Interfaces and Implementations: Techniques for Creating Reusable
Software (Addison-Wesley Professional Computing Series, 1997,
ISBN 0-201-49841-3).
For installation instructions, see install.html.
For a summary of the distribution's revision history, see history.html.
For more information, visit http://www.cs.princeton.edu/software/cii/.
-----
David R. Hanson
drh@microsoft.com / http://www.research.microsoft.com/~drh/
$Id: README,v 1.11 1997/10/30 00:51:23 drh Exp $
---
FreeBSD note: in /usr/local
lib/libcii.a -> lib/cii/1/libcii.a
include/cii -> lib/cii/1/include
example binaries are in lib/cii/1/examples
copyright, history, etc share/doc/cii
source of CII share/doc/cii/src
source of examples share/doc/cii/examples
There is no documentation other than the book and its web site.

108
devel/libcii/pkg-plist Normal file
View file

@ -0,0 +1,108 @@
lib/cii/1/libcii.a
@exec ranlib %D/%F
lib/cii/1/include/ap.h
lib/cii/1/include/arena.h
lib/cii/1/include/arith.h
lib/cii/1/include/array.h
lib/cii/1/include/arrayrep.h
lib/cii/1/include/assert.h
lib/cii/1/include/atom.h
lib/cii/1/include/bit.h
lib/cii/1/include/chan.h
lib/cii/1/include/except.h
lib/cii/1/include/fmt.h
lib/cii/1/include/list.h
lib/cii/1/include/mem.h
lib/cii/1/include/mp.h
lib/cii/1/include/ring.h
lib/cii/1/include/sem.h
lib/cii/1/include/seq.h
lib/cii/1/include/set.h
lib/cii/1/include/stack.h
lib/cii/1/include/str.h
lib/cii/1/include/table.h
lib/cii/1/include/text.h
lib/cii/1/include/thread.h
lib/cii/1/include/xp.h
lib/cii/1/examples/double
lib/cii/1/examples/calc
lib/cii/1/examples/ids
lib/cii/1/examples/mpcalc
lib/cii/1/examples/wf
lib/cii/1/examples/xref
lib/cii/1/examples/cref
lib/cii/1/examples/iref
lib/cii/1/examples/kref
lib/cii/1/examples/idents
lib/cii/1/examples/words
lib/cii/1/examples/basename
lib/cii/1/examples/dirname
lib/cii/1/examples/sort
lib/cii/1/examples/spin
lib/cii/1/examples/sieve
@dirrm lib/cii/1/include
@dirrm lib/cii/1/examples
@dirrm lib/cii/1
@dirrm lib/cii
@unexec /bin/rm /usr/local/lib/libcii.a
@unexec /bin/rm /usr/local/include/cii
share/doc/cii/CPYRIGHT
share/doc/cii/README
share/doc/cii/history.html
share/doc/cii/install.html
share/doc/cii/makefile
share/doc/cii/packing.lst
share/doc/cii/src/ap.c
share/doc/cii/src/arena.c
share/doc/cii/src/arith.c
share/doc/cii/src/array.c
share/doc/cii/src/assert.c
share/doc/cii/src/atom.c
share/doc/cii/src/bit.c
share/doc/cii/src/chan.c
share/doc/cii/src/except.c
share/doc/cii/src/fmt.c
share/doc/cii/src/libcii.def
share/doc/cii/src/list.c
share/doc/cii/src/mem.c
share/doc/cii/src/memchk.c
share/doc/cii/src/memcmp.c
share/doc/cii/src/memmove.c
share/doc/cii/src/mp.c
share/doc/cii/src/ring.c
share/doc/cii/src/seq.c
share/doc/cii/src/set.c
share/doc/cii/src/stack.c
share/doc/cii/src/str.c
share/doc/cii/src/strerror.c
share/doc/cii/src/strncmp.c
share/doc/cii/src/table.c
share/doc/cii/src/swtch.s
share/doc/cii/src/swtch.s.orig
share/doc/cii/src/text.c
share/doc/cii/src/thread-nt.c
share/doc/cii/src/thread.c
share/doc/cii/src/thread.c.orig
share/doc/cii/src/xp.c
share/doc/cii/examples/basename.c
share/doc/cii/examples/calc.c
share/doc/cii/examples/cref.c
share/doc/cii/examples/double.c
share/doc/cii/examples/getword.c
share/doc/cii/examples/getword.h
share/doc/cii/examples/idents.c
share/doc/cii/examples/ids.c
share/doc/cii/examples/integer.c
share/doc/cii/examples/integer.h
share/doc/cii/examples/iref.c
share/doc/cii/examples/kref.c
share/doc/cii/examples/mpcalc.c
share/doc/cii/examples/sieve.c
share/doc/cii/examples/sort.c
share/doc/cii/examples/spin.c
share/doc/cii/examples/wf.c
share/doc/cii/examples/words.c
share/doc/cii/examples/xref.c
@dirrm share/doc/cii/src
@dirrm share/doc/cii/examples
@dirrm share/doc/cii