diff options
author | agc <agc> | 2002-08-12 16:21:12 +0000 |
---|---|---|
committer | agc <agc> | 2002-08-12 16:21:12 +0000 |
commit | c2532b2941bd6debde1bc405c5b2ad8e761d64e9 (patch) | |
tree | 733c727863021a6d821ca4bb0c2c21ce9fbe6a7a /lang | |
parent | f0fbd029b4e33ab7f5366f6703055c96dab18591 (diff) | |
download | pkgsrc-c2532b2941bd6debde1bc405c5b2ad8e761d64e9.tar.gz |
Make this package compile on NetBSD.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/siod/Makefile | 5 | ||||
-rw-r--r-- | lang/siod/distinfo | 8 | ||||
-rw-r--r-- | lang/siod/patches/patch-aa | 16 | ||||
-rw-r--r-- | lang/siod/patches/patch-ab | 107 | ||||
-rw-r--r-- | lang/siod/patches/patch-ad | 17 | ||||
-rw-r--r-- | lang/siod/patches/patch-ae | 14 |
6 files changed, 153 insertions, 14 deletions
diff --git a/lang/siod/Makefile b/lang/siod/Makefile index 7a270981573..6b5537118e6 100644 --- a/lang/siod/Makefile +++ b/lang/siod/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2001/09/09 20:36:33 agc Exp $ +# $NetBSD: Makefile,v 1.7 2002/08/12 16:21:12 agc Exp $ DISTNAME= siod PKGNAME= siod-3.0 @@ -10,12 +10,13 @@ MAINTAINER= packages@netbsd.org HOMEPAGE= http://people.delphi.com/gjc/siod.html COMMENT= Small-footprint implementation of the Scheme programming language -ONLY_FOR_PLATFORM= SunOS-*-* # untested on NetBSD +DEPENDS+= sdbm-[0-9]*:../../databases/sdbm WRKSRC= ${WRKDIR} MAKEFILE= makefile ALL_TARGET= ${OPSYS} MAKE_ENV+= CC="${CC}" +CPPFLAGS+= -Dunix=1 .include "../../mk/bsd.prefs.mk" diff --git a/lang/siod/distinfo b/lang/siod/distinfo index d6af408ccbd..1ece1131c8b 100644 --- a/lang/siod/distinfo +++ b/lang/siod/distinfo @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.2 2001/04/19 15:00:57 agc Exp $ +$NetBSD: distinfo,v 1.3 2002/08/12 16:21:12 agc Exp $ SHA1 (siod.tgz) = e49cbd59bbdf3af607335a300ace98c561ad5bdd Size (siod.tgz) = 214700 bytes -SHA1 (patch-aa) = 0cb517dbc1ed0a8cf525c6af8dae0602570fd0c0 -SHA1 (patch-ab) = a688fbde3f923d3f9a477dd2b79463e9b1cc064c +SHA1 (patch-aa) = ebd1c1ce389e25e5fdf2aeac2664956d440a3a11 +SHA1 (patch-ab) = 840474628c3863261ea91f0c7fe730765ab72e4e SHA1 (patch-ac) = 4466fd94141f87b4d9a6dd8ea3a0f29bdd09998b +SHA1 (patch-ad) = 3a09aba5ada19edb0307e69412dc18e90d60afbe +SHA1 (patch-ae) = 5931dfae3647d2eb36f467f520dbd4e78466ef7e diff --git a/lang/siod/patches/patch-aa b/lang/siod/patches/patch-aa index aa229c54702..5f4985cc5bf 100644 --- a/lang/siod/patches/patch-aa +++ b/lang/siod/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.1.1.1 1999/08/06 09:43:31 agc Exp $ +$NetBSD: patch-aa,v 1.2 2002/08/12 16:21:13 agc Exp $ NetBSD definition for makefile, and make solaris into SunOS so that we can use ${OPSYS}. @@ -20,7 +20,7 @@ that we can use ${OPSYS}. LIBSIODDIR=$(LIBDIR)/siod CP_F=cp -f # -Wmissing-prototypes -@@ -137,14 +137,25 @@ +@@ -137,16 +137,27 @@ # from /usr/lib/libSYBxxx.so -> /sybase/lib/libxxx.so # for each shared library in /sybase/lib. @@ -33,8 +33,8 @@ that we can use ${OPSYS}. CFLAGS="$(GCCW) $(CDEBUG) -DSUN5 -O2 $(SLD)" \ LD_EXE_FLAGS="-R $(LIBDIR) -R $(LIBSIODDIR)" \ LD_EXE_LIBS="-lm -lsocket -lnsl -lposix4 -dl" \ -+ LD_LIB_FLAGS="-G" \ -+ LD_LIB_LIBS="$(LD_EXE_LIBS)" \ + LD_LIB_FLAGS="-G" \ + LD_LIB_LIBS="$(LD_EXE_LIBS)" \ + SO="so" \ + build_driver + @@ -42,9 +42,11 @@ that we can use ${OPSYS}. + $(MAKE) $(LDLP) \ + PROGS="siod ndbm.so tar.so parser_pratt.so ss.so regex.so" \ + LD=ld \ -+ CFLAGS="$(GCCW) $(CDEBUG) -DSUN5 -O2 $(SLD)" \ ++ CFLAGS="$(GCCW) $(CDEBUG) -DSUN5 -O2 $(SLD) -I${INCDIR}" \ + LD_EXE_FLAGS="-Wl,-R$(LIBDIR) -L${LIBDIR} -Wl,-R$(LIBSIODDIR) -L${LIBSIODDIR}" \ + LD_EXE_LIBS="-lm" \ - LD_LIB_FLAGS="-G" \ - LD_LIB_LIBS="$(LD_EXE_LIBS)" \ ++ LD_LIB_FLAGS="-G" \ ++ LD_LIB_LIBS="$(LD_EXE_LIBS) -lm -lcrypt" \ SO="so" \ + build_driver + diff --git a/lang/siod/patches/patch-ab b/lang/siod/patches/patch-ab index e237bbde004..1747ecdf681 100644 --- a/lang/siod/patches/patch-ab +++ b/lang/siod/patches/patch-ab @@ -1,10 +1,67 @@ -$NetBSD: patch-ab,v 1.1.1.1 1999/08/06 09:43:31 agc Exp $ +$NetBSD: patch-ab,v 1.2 2002/08/12 16:21:13 agc Exp $ Solaris (2.6 and above) already has usleep() +Add *BSD defs + +Work around lchmod function and syscall clash. + +Work around missing putpwent on NetBSD. + --- slibu.c 1999/08/06 09:27:05 1.1 +++ slibu.c 1999/08/06 09:28:11 -@@ -1311,7 +1311,7 @@ +@@ -29,6 +29,7 @@ + #include <sys/stat.h> + #include <sys/time.h> + #include <sys/resource.h> ++#include <sys/param.h> + #include <grp.h> + #include <utime.h> + #include <sys/fcntl.h> +@@ -38,7 +39,7 @@ + #include <sys/mode.h> + #endif + +-#if defined(__osf__) || defined(SUN5) ++#if defined(__osf__) || defined(SUN5) || (defined(BSD) && BSD >= 199306) + #include <fnmatch.h> + #endif + +@@ -50,7 +51,7 @@ + #include <dl.h> + #endif + +-#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi) ++#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi) || (defined(BSD) && BSD >= 199306) + #include <dlfcn.h> + #endif + +@@ -288,6 +289,7 @@ + return(NIL);} + #endif + ++#if !(defined(BSD) && BSD >= 199506) + LISP lputpwent(LISP alist,LISP file) + {int iflag = no_interrupt(1); + int status; +@@ -296,6 +298,7 @@ + status = putpwent(&p,get_c_file(file,NULL)); + no_interrupt(iflag); + return(NIL);} ++#endif /* !BSD */ + + LISP laccess_problem(LISP lfname,LISP lacc) + {char *fname = get_c_string(lfname); +@@ -1021,7 +1024,7 @@ + + #if defined(unix) || defined(WIN32) + +-LISP lchmod(LISP path,LISP mode) ++LISP lispchmod(LISP path,LISP mode) + {if (chmod(get_c_string(path),get_c_long(mode))) + return(err("chmod",llast_c_errmsg(-1))); + else +@@ -1311,7 +1314,7 @@ } #endif @@ -13,3 +70,49 @@ Solaris (2.6 and above) already has usleep() long usleep(unsigned int winks) {struct timespec x; x.tv_sec = winks / 1000000; +@@ -1554,7 +1557,7 @@ + /* note: error cases can leak memory in this procedure. */ + {LISP init_name; + void (*fcn)(void) = NULL; +-#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi) ++#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi) || (defined(BSD) && BSD >= 199306) + void *handle; + #endif + #if defined(hpux) +@@ -1575,7 +1578,7 @@ + {put_st("so-loading "); + put_st(get_c_string(fname)); + put_st("\n");} +-#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi) ++#if defined(__osf__) || defined(sun) || defined(linux) || defined(sgi) || (defined(BSD) && BSD >= 199306) + #if !defined(__osf__) + /* Observed bug: values of LD_LIBRARY_PATH established with putenv + -after- a process has started are ignored. Work around follows. */ +@@ -2163,7 +2166,7 @@ + opendir_gc_free, + &j); + set_print_hooks(tc_opendir,opendir_prin1); +- init_subr_2("chmod",lchmod); ++ init_subr_2("chmod",lispchmod); + #endif + + gc_protect_sym(&sym_channels,"*channels*"); +@@ -2197,7 +2200,9 @@ + #if defined(__osf__) + init_subr_1("setpwfile",lsetpwfile); + #endif ++#if !(defined(BSD) && BSD >= 199306) + init_subr_2("putpwent",lputpwent); ++#endif + init_subr_2("access-problem?",laccess_problem); + init_subr_3("utime",lutime); + init_subr_2("fchmod",lfchmod); +@@ -2262,7 +2267,7 @@ + init_subr_1("encode-open-flags",encode_open_flags); + init_subr_1("lstat",l_lstat); + #endif +-#if defined(__osf__) || defined(SUN5) ++#if defined(__osf__) || defined(SUN5) || (defined(BSD) && BSD >= 199306) + init_subr_3("fnmatch",l_fnmatch); + #endif + #ifdef unix diff --git a/lang/siod/patches/patch-ad b/lang/siod/patches/patch-ad new file mode 100644 index 00000000000..79a20e178e7 --- /dev/null +++ b/lang/siod/patches/patch-ad @@ -0,0 +1,17 @@ +$NetBSD: patch-ad,v 1.1 2002/08/12 16:21:13 agc Exp $ + +--- ndbm.c 2002/08/12 16:08:46 1.1 ++++ ndbm.c 2002/08/12 16:10:13 +@@ -1,7 +1,12 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <sys/param.h> ++#if (defined(BSD) && BSD >= 199306) ++#include <sdbm.h> ++#else + #include <ndbm.h> ++#endif + #include "siod.h" + #if defined(sun) || defined(hpux) || defined(linux) || defined(sgi) + #include <sys/types.h> diff --git a/lang/siod/patches/patch-ae b/lang/siod/patches/patch-ae new file mode 100644 index 00000000000..24996b27d1b --- /dev/null +++ b/lang/siod/patches/patch-ae @@ -0,0 +1,14 @@ +$NetBSD: patch-ae,v 1.1 2002/08/12 16:21:14 agc Exp $ + +--- ss.c 2002/08/12 16:16:32 1.1 ++++ ss.c 2002/08/12 16:17:10 +@@ -12,7 +12,8 @@ + #ifdef unix + #include <unistd.h> + #endif +-#ifdef SUN5 ++#include <sys/param.h> ++#if defined(SUN5) && !(defined(BSD) && BSD >= 199306) + /* missing from unistd.h */ + long gethostid(void); + int gethostname(char *, int); |