diff --git a/education/algotutor/Makefile b/education/algotutor/Makefile index 27e181d811e..ba41d883dc5 100644 --- a/education/algotutor/Makefile +++ b/education/algotutor/Makefile @@ -1,22 +1,21 @@ -# $OpenBSD: Makefile,v 1.7 2007/09/16 03:07:06 merdely Exp $ +# $OpenBSD: Makefile,v 1.8 2008/12/21 11:51:01 kevlo Exp $ COMMENT= interactive tutorial for algorithms and data structures -DISTNAME= algotutor-0.8.5 -PKGNAME= ${DISTNAME}p0 +DISTNAME= algotutor-0.8.6 CATEGORIES= education math -HOMEPAGE= http://www.ofset.org/~ckhung/p/algotutor/ +HOMEPAGE= http://people.ofset.org/~ckhung/p/algotutor/ MAINTAINER= Kevin Lo -# GPL +# GPLv2 PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -MASTER_SITES= http://www.cyut.edu.tw/~ckhung/dl/ +MASTER_SITES= http://people.ofset.org/~ckhung/dl/ EXTRACT_SUFX= .tgz RUN_DEPENDS= :p5-Tk-*:x11/p5-Tk @@ -27,14 +26,15 @@ P5SITE= libdata/perl5/site_perl P5INST= ${PREFIX}/${P5SITE} SUBST_VARS= P5SITE -do-configure: - @perl -i -pe 's@%%P5INST%%@${P5INST}@g' ${WRKSRC}/algotutor +DOCS= ChangeLog gpl.html -pre-install: - ${INSTALL_DATA_DIR} ${P5INST}/algotutor +do-configure: + ${SUBST_CMD} ${WRKSRC}/algotutor do-install: + ${INSTALL_DATA_DIR} ${P5INST}/algotutor ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/algotutor + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/algotutor ${INSTALL_DATA} ${WRKSRC}/etc/algotutor \ ${PREFIX}/share/examples/algotutor ${INSTALL_DATA_DIR} ${PREFIX}/share/algotutor @@ -42,6 +42,10 @@ do-install: ${INSTALL_SCRIPT} ${WRKSRC}/gen_at_graph ${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/doc/algotutor.1 ${PREFIX}/man/man1 ${INSTALL_MAN} ${WRKSRC}/doc/gen_at_graph.1 ${PREFIX}/man/man1 + ${INSTALL_DATA} ${WRKSRC}/doc/*.{php,png,css} \ + ${PREFIX}/share/doc/algotutor + cd ${WRKSRC}/doc && ${INSTALL_DATA} ${DOCS} \ + ${PREFIX}/share/doc/algotutor cp -R ${WRKSRC}/cgeom ${P5INST}/algotutor cp -R ${WRKSRC}/data ${PREFIX}/share/algotutor cp -R ${WRKSRC}/dp ${P5INST}/algotutor diff --git a/education/algotutor/distinfo b/education/algotutor/distinfo index 2581e2c9e7b..c17b3bfe74c 100644 --- a/education/algotutor/distinfo +++ b/education/algotutor/distinfo @@ -1,5 +1,5 @@ -MD5 (algotutor-0.8.5.tgz) = v2nev3YkMsU1V52slNsO/A== -RMD160 (algotutor-0.8.5.tgz) = 4BPKrVrqtHPU5gVpQIa+EfJMHHI= -SHA1 (algotutor-0.8.5.tgz) = ngSojWIrSl1pv0yJNKHD9pb3u1k= -SHA256 (algotutor-0.8.5.tgz) = FSAsokOb/ZXo8JWrvjzYoexP3gAxFsoZcj64aKEzknw= -SIZE (algotutor-0.8.5.tgz) = 106432 +MD5 (algotutor-0.8.6.tgz) = WLhnyzGe0+b4sL1DS02RRQ== +RMD160 (algotutor-0.8.6.tgz) = 3zqWNgBJ763xq7uyhyRxzztIldo= +SHA1 (algotutor-0.8.6.tgz) = mrVnGnZQi8cIq2gGCgKB8BzIHro= +SHA256 (algotutor-0.8.6.tgz) = eOR3l3nlp174QZxmDMy+n81KrGebvUeOgBM/+RVBSIY= +SIZE (algotutor-0.8.6.tgz) = 176802 diff --git a/education/algotutor/patches/patch-algotutor b/education/algotutor/patches/patch-algotutor index 2ef50d86d55..0d93a0fd928 100644 --- a/education/algotutor/patches/patch-algotutor +++ b/education/algotutor/patches/patch-algotutor @@ -1,21 +1,30 @@ -$OpenBSD: patch-algotutor,v 1.2 2005/04/13 01:27:42 kevlo Exp $ ---- algotutor.orig Tue Apr 12 13:35:39 2005 -+++ algotutor Wed Apr 13 09:23:13 2005 +$OpenBSD: patch-algotutor,v 1.3 2008/12/21 11:51:02 kevlo Exp $ +--- algotutor.orig Mon Apr 9 14:56:08 2007 ++++ algotutor Sun Dec 21 19:22:54 2008 @@ -4,7 +4,7 @@ use strict; use Getopt::Std; -use lib '/usr/share/perl5/algotutor'; -+use lib '%%P5INST%%/algotutor'; ++use lib '${PREFIX}/${P5SITE}/algotutor'; BEGIN { my ($path) = $0 =~ m#(.*/)#; -@@ -33,7 +33,7 @@ if (grep { $opts{a} eq $_ } qw(lcs matc) - dynprog($opts{a}); - } +@@ -58,7 +58,7 @@ if (grep { $opts{a} eq $_ } qw(lcs matc flwa)) { + $tab->{$algo}{run}(); + } else { + # algorithms other than dynamic programming +- die "need exactly one data file. Example:\n\talgotutor -a bst /usr/share/algotutor/data/countries.gr\n" ++ die "need exactly one data file. Example:\n\talgotutor -a bst ${PREFIX}/share/algotutor/data/countries.gr\n" + unless $#ARGV == 0; + $dfn = $ARGV[0]; + die "cannot read data file '$dfn'.\nDoes it exist and do you have read permissions?\n" unless -r $dfn; +@@ -239,7 +239,7 @@ B ckhung AT ofset DOT org --die "need exactly one data file. Example:\n\talgotutor -a bst /usr/share/algotutor/data/countries.gr\n" -+die "need exactly one data file. Example:\n\talgotutor -a bst /usr/local/share/algotutor/data/countries.gr\n" - unless $#ARGV == 0; - $dfn = $ARGV[0]; - die "cannot read data file '$dfn'.\nDoes it exist and do you have read permissions?\n" unless -r $dfn; + =head1 SEE ALSO + +-Please see /usr/share/doc/algotutor/doc/ for examples and ++Please see ${PREFIX}/share/doc/algotutor/ for examples and + the full set of documentations. + + =cut diff --git a/education/algotutor/pkg/PLIST b/education/algotutor/pkg/PLIST index b0eb5b917e9..18677f170fc 100644 --- a/education/algotutor/pkg/PLIST +++ b/education/algotutor/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.4 2005/06/09 01:19:36 kevlo Exp $ +@comment $OpenBSD: PLIST,v 1.5 2008/12/21 11:51:02 kevlo Exp $ bin/algotutor bin/gen_at_graph ${P5SITE}/algotutor/ @@ -10,12 +10,15 @@ ${P5SITE}/algotutor/DCEdge.pm ${P5SITE}/algotutor/Edge.pm ${P5SITE}/algotutor/Graph.pm ${P5SITE}/algotutor/Heap.pm +${P5SITE}/algotutor/Line.pm ${P5SITE}/algotutor/PQueue.pm ${P5SITE}/algotutor/RBTree.pm ${P5SITE}/algotutor/RecCanvas.pm ${P5SITE}/algotutor/RecDialog.pm ${P5SITE}/algotutor/TreeNode.pm ${P5SITE}/algotutor/Vector.pm +${P5SITE}/algotutor/Vector2.pm +${P5SITE}/algotutor/Vector3.pm ${P5SITE}/algotutor/Vertex.pm ${P5SITE}/algotutor/basic.pl ${P5SITE}/algotutor/cgeom/ @@ -41,5 +44,26 @@ share/algotutor/data/randgrid.gr share/algotutor/data/simple.gr share/algotutor/data/trc.gr share/algotutor/data/tt.gr +share/doc/algotutor/ +share/doc/algotutor/ChangeLog +share/doc/algotutor/algotutor.php +share/doc/algotutor/algowriter.php +share/doc/algotutor/bst.png +share/doc/algotutor/core.css +share/doc/algotutor/developer.php +share/doc/algotutor/dijk.png +share/doc/algotutor/footer.en.php +share/doc/algotutor/gen_at_graph.php +share/doc/algotutor/gpl.html +share/doc/algotutor/header.en.php +share/doc/algotutor/index.php +share/doc/algotutor/index.tw.php +share/doc/algotutor/light.css +share/doc/algotutor/q6.en.php +share/doc/algotutor/q6.php +share/doc/algotutor/q61.png +share/doc/algotutor/q62.png +share/doc/algotutor/q63.png +share/doc/algotutor/user.php share/examples/algotutor/ share/examples/algotutor/algotutor