1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

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/

PR:		ports/97376
Submitted by:	Shaun Amott <shaun@inerd.com>
This commit is contained in:
Renato Botelho 2006-05-17 13:48:19 +00:00
parent 02a2c25b36
commit 29ce428a7c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=162654
12 changed files with 288 additions and 0 deletions

View File

@ -826,6 +826,7 @@
SUBDIR += pyblosxom
SUBDIR += pyweblib
SUBDIR += qdecoder
SUBDIR += quickie
SUBDIR += quixote
SUBDIR += raqdevil
SUBDIR += rejik

71
www/quickie/Makefile Normal file
View File

@ -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>

6
www/quickie/distinfo Normal file
View File

@ -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

View File

@ -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);
}

View File

@ -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 (;;)

View File

@ -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>

View File

@ -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>

View File

@ -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)

View File

@ -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>

View File

@ -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.
-------------------------------------------------------------

16
www/quickie/pkg-descr Normal file
View File

@ -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/

54
www/quickie/pkg-plist Normal file
View File

@ -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%%