diff options
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/quickie/Makefile | 71 | ||||
-rw-r--r-- | www/quickie/distinfo | 6 | ||||
-rw-r--r-- | www/quickie/files/freebsd.h | 43 | ||||
-rw-r--r-- | www/quickie/files/patch-lib_file_regular.cc | 23 | ||||
-rw-r--r-- | www/quickie/files/patch-lib_input_file.cc | 14 | ||||
-rw-r--r-- | www/quickie/files/patch-lib_output_file.cc | 16 | ||||
-rw-r--r-- | www/quickie/files/patch-lib_rcstring_list_sort_vers.cc | 13 | ||||
-rw-r--r-- | www/quickie/files/patch-lib_simple_version_tool_checkin.cc | 14 | ||||
-rw-r--r-- | www/quickie/files/pkg-message.in | 17 | ||||
-rw-r--r-- | www/quickie/pkg-descr | 16 | ||||
-rw-r--r-- | www/quickie/pkg-plist | 54 |
12 files changed, 288 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index 28b296457c92..993c9047968f 100644 --- a/www/Makefile +++ b/www/Makefile @@ -826,6 +826,7 @@ SUBDIR += pyblosxom SUBDIR += pyweblib SUBDIR += qdecoder + SUBDIR += quickie SUBDIR += quixote SUBDIR += raqdevil SUBDIR += rejik diff --git a/www/quickie/Makefile b/www/quickie/Makefile new file mode 100644 index 000000000000..29feba4f092b --- /dev/null +++ b/www/quickie/Makefile @@ -0,0 +1,71 @@ +# New ports collection makefile for: quickie +# Date Created: 2006-05-16 +# Whom: Shaun Amott <shaun@inerd.com> +# +# $FreeBSD$ +# + +PORTNAME= quickie +PORTVERSION= 1.0 +CATEGORIES= www +MASTER_SITES= http://${PORTNAME}.sourceforge.net/ \ + http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/ + +MAINTAINER= shaun@inerd.com +COMMENT= A small footprint, fast Wiki engine written in C++ + +GNU_CONFIGURE= yes + +CONFIGURE_ARGS= --prefix=${PREFIX} \ + --sysconfdir=${PREFIX}/etc \ + --localstatedir=${DATADIR} + +MAN1= quickie-config.1 quickie_prime.1 quickie.1 quickie_svt.1 \ + quickie_license.1 quickie_post_install.1 + +SUB_FILES= pkg-message + +WWWOWN?= www +WWWGRP?= www +WWWDIR?= ${PREFIX}/www + +PORTDOCS= ${DISTNAME}.pdf + +.if !defined(NOPORTDOCS) +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}.pdf +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} +.endif + +.include <bsd.port.pre.mk> + +.if (${OSVERSION} < 500041) +BROKEN= does not compile on 4.x; needs a newer libc +.endif + +post-patch: + @${CP} ${FILESDIR}/freebsd.h ${WRKSRC}/lib + @${REINPLACE_CMD} -e 's#var/[^ ]*\.man##g' ${WRKSRC}/Makefile.in + +pre-install: + @${MKDIR} ${DATADIR}/admin + @${MKDIR} ${DATADIR}/manual + +post-install: + @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${DATADIR} +.if !defined(WITHOUT_CGICOPY) + @if [ -d ${WWWDIR}/cgi-bin/ ]; then \ + if [ ! -f ${WWWDIR}/cgi-bin/${PORTNAME} ]; then \ + ${ECHO_MSG} "===> Copying CGI binary..." ; \ + ${CP} -p ${PREFIX}/bin/${PORTNAME} ${WWWDIR}/cgi-bin/${PORTNAME} ; \ + ${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/cgi-bin/${PORTNAME} ; \ + fi ; \ + fi +.endif + @${CAT} ${PKGMESSAGE} + +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${DISTDIR}/${DISTNAME}.pdf ${DOCSDIR} +.endif + +.include <bsd.port.post.mk> diff --git a/www/quickie/distinfo b/www/quickie/distinfo new file mode 100644 index 000000000000..724323032592 --- /dev/null +++ b/www/quickie/distinfo @@ -0,0 +1,6 @@ +MD5 (quickie-1.0.tar.gz) = 5dca1346dfbe034d8e43061763b9fb92 +SHA256 (quickie-1.0.tar.gz) = cdf17e935852f3e9d5b6928bea71e7acaf40f5b6df8779595927b13cea1eb93f +SIZE (quickie-1.0.tar.gz) = 274016 +MD5 (quickie-1.0.pdf) = f9c2db25e11e0baf250d39bec0273e29 +SHA256 (quickie-1.0.pdf) = 2963b7cb55095f2970bcd9a1193bea31916f0ee219f64a9fb40fefb77a7873e4 +SIZE (quickie-1.0.pdf) = 110380 diff --git a/www/quickie/files/freebsd.h b/www/quickie/files/freebsd.h new file mode 100644 index 000000000000..52826298f5b7 --- /dev/null +++ b/www/quickie/files/freebsd.h @@ -0,0 +1,43 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <limits.h> + +int +strverscmp(const char *s1, const char *s2); + +int +strverscmp(const char *s1, const char *s2) +{ + static const char *digits = "0123456789"; + int ret; + long n1, n2; + size_t p1, p2; + + do { + p1 = strcspn(s1, digits); + p2 = strcspn(s2, digits); + + /* Different prefix */ + if ((ret = strncmp(s1, s2, p1)) != 0) + return ret; + + s1 += p1; + s2 += p2; + n1 = strtol(s1, NULL, 10); + n2 = strtol(s2, NULL, 10); + + if (n1 < n2) + return -1; + else if (n1 > n2) + return 1; + + /* Numbers are equal or not present, try with next ones. */ + p1 = strspn(s1, digits); + p2 = strspn(s2, digits); + s1 += p1; + s2 += p2; + } while (p1 == p2 && p1 != 0 && p1 != 0); + + return strcmp(s1, s2); +} diff --git a/www/quickie/files/patch-lib_file_regular.cc b/www/quickie/files/patch-lib_file_regular.cc new file mode 100644 index 000000000000..53ed768dd175 --- /dev/null +++ b/www/quickie/files/patch-lib_file_regular.cc @@ -0,0 +1,23 @@ +--- lib/file/regular.cc.orig Mon Jun 13 12:21:49 2005 ++++ lib/file/regular.cc Tue May 16 15:38:03 2006 +@@ -29,6 +29,11 @@ + #include <fcntl.h> + #include <unistd.h> + ++#ifdef __FreeBSD__ ++#include <sys/types.h> ++#include <sys/stat.h> ++#endif ++ + #include <careful.h> + #include <cgi.h> + #include <configuration.h> +@@ -386,7 +391,7 @@ + output_stdout op; + op << "Content-Type: text/html\n" + "Content-Length: " +- << st.st_size ++ << (char)st.st_size + << "\n" + "\n"; + for (;;) diff --git a/www/quickie/files/patch-lib_input_file.cc b/www/quickie/files/patch-lib_input_file.cc new file mode 100644 index 000000000000..d48283ac73be --- /dev/null +++ b/www/quickie/files/patch-lib_input_file.cc @@ -0,0 +1,14 @@ +--- lib/input/file.cc.orig Mon Jun 13 12:21:49 2005 ++++ lib/input/file.cc Tue May 16 15:39:14 2006 +@@ -25,6 +25,11 @@ + #include <fcntl.h> + #include <unistd.h> + ++#ifdef __FreeBSD__ ++#include <sys/types.h> ++#include <sys/stat.h> ++#endif ++ + #include <input/file.h> + + diff --git a/www/quickie/files/patch-lib_output_file.cc b/www/quickie/files/patch-lib_output_file.cc new file mode 100644 index 000000000000..154f8e585637 --- /dev/null +++ b/www/quickie/files/patch-lib_output_file.cc @@ -0,0 +1,16 @@ +--- lib/output/file.cc.orig Mon Jun 13 12:21:49 2005 ++++ lib/output/file.cc Tue May 16 15:41:00 2006 +@@ -25,8 +25,11 @@ + #include <cstring> + #include <fcntl.h> + #include <unistd.h> +-// #include <sys/types.h> +-// #include <sys/stat.h> ++ ++#ifdef __FreeBSD__ ++#include <sys/types.h> ++#include <sys/stat.h> ++#endif + + #include <mkdir_p.h> + #include <output/file.h> diff --git a/www/quickie/files/patch-lib_rcstring_list_sort_vers.cc b/www/quickie/files/patch-lib_rcstring_list_sort_vers.cc new file mode 100644 index 000000000000..35c467b94420 --- /dev/null +++ b/www/quickie/files/patch-lib_rcstring_list_sort_vers.cc @@ -0,0 +1,13 @@ +--- lib/rcstring/list/sort_vers.cc.orig Mon Jun 13 12:21:49 2005 ++++ lib/rcstring/list/sort_vers.cc Tue May 16 15:48:39 2006 +@@ -23,6 +23,10 @@ + #include <cstring> + #include <rcstring/list.h> + ++#ifdef __FreeBSD__ ++#include "freebsd.h" ++#endif ++ + + static int + cmp(const void *va, const void *vb) diff --git a/www/quickie/files/patch-lib_simple_version_tool_checkin.cc b/www/quickie/files/patch-lib_simple_version_tool_checkin.cc new file mode 100644 index 000000000000..966c47ead450 --- /dev/null +++ b/www/quickie/files/patch-lib_simple_version_tool_checkin.cc @@ -0,0 +1,14 @@ +--- lib/simple_version_tool/checkin.cc.orig Mon Jun 13 12:21:49 2005 ++++ lib/simple_version_tool/checkin.cc Tue May 16 15:50:51 2006 +@@ -24,6 +24,11 @@ + #include <cstdio> + #include <pwd.h> + ++#ifdef __FreeBSD__ ++#include <unistd.h> ++#include <sys/types.h> ++#endif ++ + #include <adler32.h> + #include <careful.h> + #include <input/file.h> diff --git a/www/quickie/files/pkg-message.in b/www/quickie/files/pkg-message.in new file mode 100644 index 000000000000..144d78ff4c04 --- /dev/null +++ b/www/quickie/files/pkg-message.in @@ -0,0 +1,17 @@ +------------------------------------------------------------- + +Quickie has been installed. Quickie's files are stored in +standard system locations, rather than all under the web +root. In order for Quickie to be accessible, a copy - or +symlink if your web server supports it - of the CGI binary +must be made to the cgi-bin directory of your web server: + + cp -p %%PREFIX%%/bin/quickie /path/to/cgi-bin + +This file should be owned by www:www, and be executable. + +If this directory was found, the copy will have been made +for you, and will be removed when the port is deinstalled +or upgraded. + +------------------------------------------------------------- diff --git a/www/quickie/pkg-descr b/www/quickie/pkg-descr new file mode 100644 index 000000000000..1f198e7b35f8 --- /dev/null +++ b/www/quickie/pkg-descr @@ -0,0 +1,16 @@ +Quickie is a small footprint, fast C++ Wiki engine; hence the name. + +The fundamental insight for this engine is that wiki pages are read far +more often than they are modified. Thus, the generated HTML can be +cached. It follows that the main code path will check that the .html +file exists and simply copy it to stdout in the vast majority of cases. + +The .html file generated from each .wiki file is about the same size as +the .wiki file itself, so there will be no particular I/O advantage, +but there is a huge CPU advantage, and a significant memory footprint +advantage, and since I want to run a wiki on a geriatric 20MB 33MHz 386 +machine, this is a good thing. + + Online demo: http://quickie.sourceforge.net/cgi-bin/quickie + +WWW: http://quickie.sourceforge.net/ diff --git a/www/quickie/pkg-plist b/www/quickie/pkg-plist new file mode 100644 index 000000000000..d47e4f8b1e38 --- /dev/null +++ b/www/quickie/pkg-plist @@ -0,0 +1,54 @@ +@unexec bin="%D/bin/quickie"; cgi="%D/www/cgi-bin/quickie"; if cmp -s $bin $cgi; then rm -f $cgi; fi +bin/quickie +bin/quickie-config +bin/quickie_post_install +bin/quickie_prime +bin/quickie_svt +%%DATADIR%%/admin/default.css +%%DATADIR%%/admin/external.png +%%DATADIR%%/admin/quickie.png +%%DATADIR%%/index,svt +%%DATADIR%%/index.html +%%DATADIR%%/index.referred_to_by +%%DATADIR%%/index.refers_to +%%DATADIR%%/index.wiki +%%DATADIR%%/manual/configuration,svt +%%DATADIR%%/manual/configuration.html +%%DATADIR%%/manual/configuration.referred_to_by +%%DATADIR%%/manual/configuration.refers_to +%%DATADIR%%/manual/configuration.wiki +%%DATADIR%%/manual/index,svt +%%DATADIR%%/manual/index.html +%%DATADIR%%/manual/index.referred_to_by +%%DATADIR%%/manual/index.refers_to +%%DATADIR%%/manual/index.wiki +%%DATADIR%%/manual/markup,svt +%%DATADIR%%/manual/markup.html +%%DATADIR%%/manual/markup.referred_to_by +%%DATADIR%%/manual/markup.refers_to +%%DATADIR%%/manual/markup.wiki +%%DATADIR%%/manual/markup_hints,svt +%%DATADIR%%/manual/markup_hints.html +%%DATADIR%%/manual/markup_hints.referred_to_by +%%DATADIR%%/manual/markup_hints.refers_to +%%DATADIR%%/manual/markup_hints.wiki +%%DATADIR%%/manual/sidebar,svt +%%DATADIR%%/manual/sidebar.html +%%DATADIR%%/manual/sidebar.referred_to_by +%%DATADIR%%/manual/sidebar.refers_to +%%DATADIR%%/manual/sidebar.wiki +%%DATADIR%%/manual/users,svt +%%DATADIR%%/manual/users.html +%%DATADIR%%/manual/users.referred_to_by +%%DATADIR%%/manual/users.refers_to +%%DATADIR%%/manual/users.wiki +%%DATADIR%%/sidebar,svt +%%DATADIR%%/sidebar.html +%%DATADIR%%/sidebar.referred_to_by +%%DATADIR%%/sidebar.refers_to +%%DATADIR%%/sidebar.wiki +%%DATADIR%%/square_brackets.referred_to_by +%%DATADIR%%/square_brackets.unlink_on_create +@dirrm %%DATADIR%%/manual +@dirrm %%DATADIR%%/admin +@dirrm %%DATADIR%% |