diff options
author | minskim <minskim@pkgsrc.org> | 2006-05-04 09:35:33 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2006-05-04 09:35:33 +0000 |
commit | be4959a550c8f405207b4246088d8c8c4e16f3b4 (patch) | |
tree | 2b20c8fdfa2b3f742dd06c6dcbad9aa289890322 /devel/sgb | |
parent | 47d5bfdb102a41b0a0a0978177b26432e7283b7e (diff) | |
download | pkgsrc-be4959a550c8f405207b4246088d8c8c4e16f3b4.tar.gz |
Import sgb.
The Stanford GraphBase is a highly portable collection of programs and
data for researchers who study combinatorial algorithms and data
structures. All files are in the public domain and usable with only
one restriction: They must not be changed! A ``change file'' mechanism
allows local customization while the master files stay intact.
The programs are intended to be interesting in themselves as examples
of ``literate programming.'' Thus, the Stanford GraphBase can also be
regarded as a collection of approximately 30 essays for programmers to
enjoy reading, whether or not they are doing algorithmic research.
The programs are written in CWEB, a combination of TeX and C that is
easy to use by anyone who knows those languages and easy to read by
anyone familiar with the rudiments of C.
Diffstat (limited to 'devel/sgb')
-rw-r--r-- | devel/sgb/DESCR | 13 | ||||
-rw-r--r-- | devel/sgb/Makefile | 32 | ||||
-rw-r--r-- | devel/sgb/PLIST | 40 | ||||
-rw-r--r-- | devel/sgb/buildlink3.mk | 18 | ||||
-rw-r--r-- | devel/sgb/distinfo | 6 | ||||
-rw-r--r-- | devel/sgb/patches/patch-aa | 122 |
6 files changed, 231 insertions, 0 deletions
diff --git a/devel/sgb/DESCR b/devel/sgb/DESCR new file mode 100644 index 00000000000..b048e872698 --- /dev/null +++ b/devel/sgb/DESCR @@ -0,0 +1,13 @@ +The Stanford GraphBase is a highly portable collection of programs and +data for researchers who study combinatorial algorithms and data +structures. All files are in the public domain and usable with only +one restriction: They must not be changed! A ``change file'' mechanism +allows local customization while the master files stay intact. + +The programs are intended to be interesting in themselves as examples +of ``literate programming.'' Thus, the Stanford GraphBase can also be +regarded as a collection of approximately 30 essays for programmers to +enjoy reading, whether or not they are doing algorithmic research. +The programs are written in CWEB, a combination of TeX and C that is +easy to use by anyone who knows those languages and easy to read by +anyone familiar with the rudiments of C. diff --git a/devel/sgb/Makefile b/devel/sgb/Makefile new file mode 100644 index 00000000000..9ff7c5318eb --- /dev/null +++ b/devel/sgb/Makefile @@ -0,0 +1,32 @@ +# $NetBSD: Makefile,v 1.1.1.1 2006/05/04 09:35:33 minskim Exp $ + +DISTNAME= sgb +PKGNAME= ${DISTNAME}-0pre20050409 +CATEGORIES= devel +MASTER_SITES= ftp://ftp.cs.stanford.edu/pub/sgb/ + +MAINTAINER= minskim@NetBSD.org +HOMEPAGE= http://www-cs-faculty.stanford.edu/~uno/sgb.html +COMMENT= The Stanford GraphBase + +DEPENDS+= teTeX-bin-[0-9]*:../../print/teTeX3-bin + +USE_LIBTOOL= yes +WRKSRC= ${WRKDIR} + +BUILD_TARGET= lib doc +TEST_TARGET= tests + +SUBST_CLASSES+= paths +SUBST_MESSAGE.paths= Fixing hardcoded paths. +SUBST_STAGE.paths= pre-configure +SUBST_FILES.paths= Makefile +SUBST_SED.paths= -e 's,@PREFIX@,${PREFIX},g' + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/sgb +.for f in abstract.dvi README ERRATA + ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/sgb +.endfor + +.include "../../mk/bsd.pkg.mk" diff --git a/devel/sgb/PLIST b/devel/sgb/PLIST new file mode 100644 index 00000000000..e0b8d319feb --- /dev/null +++ b/devel/sgb/PLIST @@ -0,0 +1,40 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2006/05/04 09:35:33 minskim Exp $ +include/gb_basic.h +include/gb_books.h +include/gb_dijk.h +include/gb_econ.h +include/gb_flip.h +include/gb_games.h +include/gb_gates.h +include/gb_graph.h +include/gb_io.h +include/gb_lisa.h +include/gb_miles.h +include/gb_plane.h +include/gb_raman.h +include/gb_rand.h +include/gb_roget.h +include/gb_save.h +include/gb_sort.h +include/gb_words.h +lib/cweb/boilerplate.w +lib/cweb/gb_types.w +lib/libgb.la +share/doc/sgb/ERRATA +share/doc/sgb/README +share/doc/sgb/abstract.dvi +share/sgb/data/anna.dat +share/sgb/data/david.dat +share/sgb/data/econ.dat +share/sgb/data/games.dat +share/sgb/data/homer.dat +share/sgb/data/huck.dat +share/sgb/data/jean.dat +share/sgb/data/lisa.dat +share/sgb/data/miles.dat +share/sgb/data/roget.dat +share/sgb/data/words.dat +@dirrm share/sgb/data +@dirrm share/sgb +@dirrm share/doc/sgb +@dirrm lib/cweb diff --git a/devel/sgb/buildlink3.mk b/devel/sgb/buildlink3.mk new file mode 100644 index 00000000000..80c539cbbb7 --- /dev/null +++ b/devel/sgb/buildlink3.mk @@ -0,0 +1,18 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2006/05/04 09:35:33 minskim Exp $ + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +SGB_BUILDLINK3_MK:= ${SGB_BUILDLINK3_MK}+ + +.if !empty(BUILDLINK_DEPTH:M+) +BUILDLINK_DEPENDS+= sgb +.endif + +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nsgb} +BUILDLINK_PACKAGES+= sgb + +.if !empty(SGB_BUILDLINK3_MK:M+) +BUILDLINK_API_DEPENDS.sgb+= sgb>=0pre20050409 +BUILDLINK_PKGSRCDIR.sgb?= ../../devel/sgb +.endif # SGB_BUILDLINK3_MK + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/devel/sgb/distinfo b/devel/sgb/distinfo new file mode 100644 index 00000000000..2a5eab9a964 --- /dev/null +++ b/devel/sgb/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1.1.1 2006/05/04 09:35:33 minskim Exp $ + +SHA1 (sgb.tar.gz) = 3dec52ac3352a09fb6478dd04e8321a6832eb5d1 +RMD160 (sgb.tar.gz) = 5d9361770ebc0d66124fa845205d4ecdf8eaa313 +Size (sgb.tar.gz) = 493841 bytes +SHA1 (patch-aa) = 310fb196a09cdc0255d491ebad9d3c2ec1c18c38 diff --git a/devel/sgb/patches/patch-aa b/devel/sgb/patches/patch-aa new file mode 100644 index 00000000000..1de47fb3d61 --- /dev/null +++ b/devel/sgb/patches/patch-aa @@ -0,0 +1,122 @@ +$NetBSD: patch-aa,v 1.1.1.1 2006/05/04 09:35:33 minskim Exp $ + +--- Makefile.orig 1999-12-27 14:27:24.000000000 -0800 ++++ Makefile +@@ -8,22 +8,22 @@ + # current directory. (Not recommended for serious users.) + + # Change SGBDIR to the directory where all GraphBase files will go: +-SGBDIR = /usr/local/sgb ++SGBDIR = @PREFIX@/share/sgb + + # Change DATADIR to the directory where GraphBase data files will go: + DATADIR = $(SGBDIR)/data + + # Change INCLUDEDIR to the directory where GraphBase header files will go: +-INCLUDEDIR = $(SGBDIR)/include ++INCLUDEDIR = @PREFIX@/include + + # Change LIBDIR to the directory where GraphBase library routines will go: +-LIBDIR = /usr/local/lib ++LIBDIR = @PREFIX@/lib + + # Change BINDIR to the directory where installdemos will put demo programs: +-BINDIR = /usr/local/bin ++BINDIR = @PREFIX@/bin + + # Change CWEBINPUTS to the directory where CWEB include files will go: +-CWEBINPUTS = /usr/local/lib/cweb ++CWEBINPUTS = @PREFIX@/lib/cweb + + # SHORTCUT: Uncomment these lines, for single-directory installation: + #DATADIR = . +@@ -36,11 +36,11 @@ CWEBINPUTS = /usr/local/lib/cweb + #SYS = -DSYSV + + # If you prefer optimization to debugging, change -g to something like -O: +-CFLAGS = -g -I$(INCLUDEDIR) $(SYS) ++CFLAGS += -I$(INCLUDEDIR) $(SYS) + + ########## You shouldn't have to change anything after this point ########## + +-LDFLAGS = -L. -L$(LIBDIR) ++LDFLAGS += -L. -L$(LIBDIR) + LDLIBS = -lgb + LOADLIBES = $(LDLIBS) + +@@ -67,6 +67,12 @@ LOADLIBES = $(LDLIBS) + make $*.tex + make $*.dvi + ++.c.o: ++ ${LIBTOOL} --mode=compile ${CC} ${CPPFLAGS} ${CFLAGS} -c $*.c ++ ++.c: ++ ${LIBTOOL} --mode=link ${CC} -o $* $*.c ${LDLIBS} ++ + DATAFILES = anna.dat david.dat econ.dat games.dat homer.dat huck.dat \ + jean.dat lisa.dat miles.dat roget.dat words.dat + KERNELFILES = gb_flip.w gb_graph.w gb_io.w gb_sort.w +@@ -98,20 +104,20 @@ lib: libgb.a + + libgb.a: $(OBJS) + rm -f certified +- ar rcv libgb.a $(OBJS) +- - ranlib libgb.a ++ ${LIBTOOL} --mode=link ${CC} -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} \ ++ -rpath ${PREFIX}/lib -version-info 0:0 + + gb_io.o: gb_io.c +- $(CC) $(CFLAGS) -DDATA_DIRECTORY=\"$(DATADIR)/\" -c gb_io.c ++ ${LIBTOOL} --mode=compile $(CC) $(CFLAGS) -DDATA_DIRECTORY=\"$(DATADIR)/\" -c gb_io.c + + test_io: gb_io.o +- $(CC) $(CFLAGS) test_io.c gb_io.o -o test_io ++ ${LIBTOOL} --mode=link $(CC) $(CFLAGS) test_io.c gb_io.lo -o test_io + + test_graph: gb_graph.o +- $(CC) $(CFLAGS) test_graph.c gb_graph.o -o test_graph ++ ${LIBTOOL} --mode=link $(CC) $(CFLAGS) test_graph.c gb_graph.lo -o test_graph + + test_flip: gb_flip.o +- $(CC) $(CFLAGS) test_flip.c gb_flip.o -o test_flip ++ ${LIBTOOL} --mode=link $(CC) $(CFLAGS) test_flip.c gb_flip.lo -o test_flip + + tests: test_io test_graph test_flip + ./test_io +@@ -128,24 +134,22 @@ tests: test_io test_graph test_flip + touch certified + + install: lib +- if test ! -r certified; then echo "Please run 'make tests' first!"; fi +- test -r certified + make installdata +- - mkdir $(LIBDIR) +- - cp libgb.a $(LIBDIR) +- - mkdir $(CWEBINPUTS) +- - cp -p boilerplate.w gb_types.w $(CWEBINPUTS) +- - mkdir $(INCLUDEDIR) +- - cp -p $(HEADERS) Makefile $(INCLUDEDIR) ++ - ${BSD_INSTALL_LIB_DIR} $(LIBDIR) ++ - ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} libgb.la $(LIBDIR) ++ - ${BSD_INSTALL_DATA_DIR} $(CWEBINPUTS) ++ - ${BSD_INSTALL_DATA} boilerplate.w gb_types.w $(CWEBINPUTS) ++ - ${BSD_INSTALL_DATA_DIR} $(INCLUDEDIR) ++ - ${BSD_INSTALL_DATA} $(HEADERS) $(INCLUDEDIR) + + installdata: $(DATAFILES) +- - mkdir $(SGBDIR) +- - mkdir $(DATADIR) +- - cp -p $(DATAFILES) $(DATADIR) ++ - ${BSD_INSTALL_DATA_DIR} $(SGBDIR) ++ - ${BSD_INSTALL_DATA_DIR} $(DATADIR) ++ - ${BSD_INSTALL_DATA} $(DATAFILES) $(DATADIR) + + installdemos: lib $(DEMOS) +- - mkdir $(BINDIR) +- - mv $(DEMOS) $(BINDIR) ++ - ${BSD_INSTALL_PROGRAM_DIR} $(BINDIR) ++ - ${BSD_INSTALL_PROGRAM} $(DEMOS) $(BINDIR) + + uninstalldemos: + - cd $(BINDIR); rm -f $(DEMOS) |