ports/97376: [NEW PORT] www/quickie - lightweight Wiki engine written in C++

Shaun Amott shaun at inerd.com
Wed May 17 00:30:33 UTC 2006


>Number:         97376
>Category:       ports
>Synopsis:       [NEW PORT] www/quickie - lightweight Wiki engine written in C++
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 17 00:30:31 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Shaun Amott
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:

>Description:

This is a port of Quickie, a lightweight Wiki engine written in C++,
designed to be small, fast and have a small memory footprint.

Tinderbox tested on : 5.x (sparc64)
Manually tested on  : 6.x (sparc64), 5.x (i386)

>How-To-Repeat:

>Fix:

--- quickie.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	quickie
#	quickie/Makefile
#	quickie/distinfo
#	quickie/pkg-descr
#	quickie/files
#	quickie/files/patch-lib_file_regular.cc
#	quickie/files/patch-lib_input_file.cc
#	quickie/files/patch-lib_output_file.cc
#	quickie/files/freebsd.h
#	quickie/files/patch-lib_rcstring_list_sort_vers.cc
#	quickie/files/patch-lib_simple_version_tool_checkin.cc
#	quickie/files/pkg-message.in
#	quickie/pkg-plist
#
echo c - quickie
mkdir -p quickie > /dev/null 2>&1
echo x - quickie/Makefile
sed 's/^X//' >quickie/Makefile << 'END-of-quickie/Makefile'
X# New ports collection makefile for:	quickie
X# Date Created:				2006-05-16
X# Whom:					Shaun Amott <shaun at inerd.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	quickie
XPORTVERSION=	1.0
XCATEGORIES=	www
XMASTER_SITES=	http://${PORTNAME}.sourceforge.net/ \
X		http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/
X
XMAINTAINER=	shaun at inerd.com
XCOMMENT=	A small footprint, fast Wiki engine written in C++
X
XGNU_CONFIGURE=	yes
X
XCONFIGURE_ARGS=	--prefix=${PREFIX}		\
X		--sysconfdir=${PREFIX}/etc	\
X		--localstatedir=${DATADIR}
X
XMAN1=		quickie-config.1 quickie_prime.1 quickie.1 quickie_svt.1 \
X		quickie_license.1 quickie_post_install.1
X
XSUB_FILES=	pkg-message
X
XWWWOWN?=	www
XWWWGRP?=	www
XWWWDIR?=	${PREFIX}/www
X
XPORTDOCS=	${DISTNAME}.pdf
X
X.if !defined(NOPORTDOCS)
XDISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}.pdf
XEXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
X.endif
X
X.include <bsd.port.pre.mk>
X
X.if (${OSVERSION} < 500041)
XBROKEN=		does not compile on 4.x; needs a newer libc
X.endif
X
Xpost-patch:
X	@${CP} ${FILESDIR}/freebsd.h ${WRKSRC}/lib
X	@${REINPLACE_CMD} -e 's#var/[^ ]*\.man##g' ${WRKSRC}/Makefile.in
X
Xpre-install:
X	@${MKDIR} ${DATADIR}/admin
X	@${MKDIR} ${DATADIR}/manual
X
Xpost-install:
X	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${DATADIR}
X.if !defined(WITHOUT_CGICOPY)
X	@if [ -d ${WWWDIR}/cgi-bin/ ]; then \
X	    if [ ! -f ${WWWDIR}/cgi-bin/${PORTNAME} ]; then \
X	        ${ECHO_MSG} "===> Copying CGI binary..." ; \
X	        ${CP} -p ${PREFIX}/bin/${PORTNAME} ${WWWDIR}/cgi-bin/${PORTNAME} ; \
X	        ${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/cgi-bin/${PORTNAME} ; \
X	    fi ; \
X	fi
X.endif
X	@${CAT} ${PKGMESSAGE}
X
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	${INSTALL_DATA} ${DISTDIR}/${DISTNAME}.pdf ${DOCSDIR}
X.endif
X
X.include <bsd.port.post.mk>
END-of-quickie/Makefile
echo x - quickie/distinfo
sed 's/^X//' >quickie/distinfo << 'END-of-quickie/distinfo'
XMD5 (quickie-1.0.tar.gz) = 5dca1346dfbe034d8e43061763b9fb92
XSHA256 (quickie-1.0.tar.gz) = cdf17e935852f3e9d5b6928bea71e7acaf40f5b6df8779595927b13cea1eb93f
XSIZE (quickie-1.0.tar.gz) = 274016
XMD5 (quickie-1.0.pdf) = f9c2db25e11e0baf250d39bec0273e29
XSHA256 (quickie-1.0.pdf) = 2963b7cb55095f2970bcd9a1193bea31916f0ee219f64a9fb40fefb77a7873e4
XSIZE (quickie-1.0.pdf) = 110380
END-of-quickie/distinfo
echo x - quickie/pkg-descr
sed 's/^X//' >quickie/pkg-descr << 'END-of-quickie/pkg-descr'
XQuickie is a small footprint, fast C++ Wiki engine; hence the name.
X
XThe fundamental insight for this engine is that wiki pages are read far
Xmore often than they are modified. Thus, the generated HTML can be
Xcached. It follows that the main code path will check that the .html
Xfile exists and simply copy it to stdout in the vast majority of cases.
X
XThe .html file generated from each .wiki file is about the same size as
Xthe .wiki file itself, so there will be no particular I/O advantage,
Xbut there is a huge CPU advantage, and a significant memory footprint
Xadvantage, and since I want to run a wiki on a geriatric 20MB 33MHz 386
Xmachine, this is a good thing.
X
X    Online demo: http://quickie.sourceforge.net/cgi-bin/quickie
X
XWWW: http://quickie.sourceforge.net/
END-of-quickie/pkg-descr
echo c - quickie/files
mkdir -p quickie/files > /dev/null 2>&1
echo x - quickie/files/patch-lib_file_regular.cc
sed 's/^X//' >quickie/files/patch-lib_file_regular.cc << 'END-of-quickie/files/patch-lib_file_regular.cc'
X--- lib/file/regular.cc.orig	Mon Jun 13 12:21:49 2005
X+++ lib/file/regular.cc	Tue May 16 15:38:03 2006
X@@ -29,6 +29,11 @@
X #include <fcntl.h>
X #include <unistd.h>
X 
X+#ifdef __FreeBSD__
X+#include <sys/types.h>
X+#include <sys/stat.h>
X+#endif
X+
X #include <careful.h>
X #include <cgi.h>
X #include <configuration.h>
X@@ -386,7 +391,7 @@
X     output_stdout op;
X     op << "Content-Type: text/html\n"
X           "Content-Length: "
X-       << st.st_size
X+       << (char)st.st_size
X        << "\n"
X           "\n";
X     for (;;)
END-of-quickie/files/patch-lib_file_regular.cc
echo x - quickie/files/patch-lib_input_file.cc
sed 's/^X//' >quickie/files/patch-lib_input_file.cc << 'END-of-quickie/files/patch-lib_input_file.cc'
X--- lib/input/file.cc.orig	Mon Jun 13 12:21:49 2005
X+++ lib/input/file.cc	Tue May 16 15:39:14 2006
X@@ -25,6 +25,11 @@
X #include <fcntl.h>
X #include <unistd.h>
X 
X+#ifdef __FreeBSD__
X+#include <sys/types.h>
X+#include <sys/stat.h>
X+#endif
X+
X #include <input/file.h>
X 
X 
END-of-quickie/files/patch-lib_input_file.cc
echo x - quickie/files/patch-lib_output_file.cc
sed 's/^X//' >quickie/files/patch-lib_output_file.cc << 'END-of-quickie/files/patch-lib_output_file.cc'
X--- lib/output/file.cc.orig	Mon Jun 13 12:21:49 2005
X+++ lib/output/file.cc	Tue May 16 15:41:00 2006
X@@ -25,8 +25,11 @@
X #include <cstring>
X #include <fcntl.h>
X #include <unistd.h>
X-// #include <sys/types.h>
X-// #include <sys/stat.h>
X+
X+#ifdef __FreeBSD__
X+#include <sys/types.h>
X+#include <sys/stat.h>
X+#endif
X 
X #include <mkdir_p.h>
X #include <output/file.h>
END-of-quickie/files/patch-lib_output_file.cc
echo x - quickie/files/freebsd.h
sed 's/^X//' >quickie/files/freebsd.h << 'END-of-quickie/files/freebsd.h'
X#include <stdio.h>
X#include <stdlib.h>
X#include <string.h>
X#include <limits.h>
X
Xint
Xstrverscmp(const char *s1, const char *s2);
X
Xint
Xstrverscmp(const char *s1, const char *s2)
X{
X	static const char *digits = "0123456789";
X	int ret;
X	long n1, n2;
X	size_t p1, p2;
X
X	do {
X		p1 = strcspn(s1, digits);
X		p2 = strcspn(s2, digits);
X
X		/* Different prefix */
X		if ((ret = strncmp(s1, s2, p1)) != 0)
X			return ret;
X
X		s1 += p1;
X		s2 += p2;
X		n1 = strtol(s1, NULL, 10);
X		n2 = strtol(s2, NULL, 10);
X
X		if (n1 < n2)
X			return -1;
X		else if (n1 > n2)
X			return 1;
X
X		/* Numbers are equal or not present, try with next ones. */
X		p1 = strspn(s1, digits);
X		p2 = strspn(s2, digits);
X		s1 += p1;
X		s2 += p2;
X	} while (p1 == p2 && p1 != 0 && p1 != 0);
X
X	return strcmp(s1, s2);
X}
END-of-quickie/files/freebsd.h
echo x - quickie/files/patch-lib_rcstring_list_sort_vers.cc
sed 's/^X//' >quickie/files/patch-lib_rcstring_list_sort_vers.cc << 'END-of-quickie/files/patch-lib_rcstring_list_sort_vers.cc'
X--- lib/rcstring/list/sort_vers.cc.orig	Mon Jun 13 12:21:49 2005
X+++ lib/rcstring/list/sort_vers.cc	Tue May 16 15:48:39 2006
X@@ -23,6 +23,10 @@
X #include <cstring>
X #include <rcstring/list.h>
X 
X+#ifdef __FreeBSD__
X+#include "freebsd.h"
X+#endif
X+
X 
X static int
X cmp(const void *va, const void *vb)
END-of-quickie/files/patch-lib_rcstring_list_sort_vers.cc
echo x - quickie/files/patch-lib_simple_version_tool_checkin.cc
sed 's/^X//' >quickie/files/patch-lib_simple_version_tool_checkin.cc << 'END-of-quickie/files/patch-lib_simple_version_tool_checkin.cc'
X--- lib/simple_version_tool/checkin.cc.orig	Mon Jun 13 12:21:49 2005
X+++ lib/simple_version_tool/checkin.cc	Tue May 16 15:50:51 2006
X@@ -24,6 +24,11 @@
X #include <cstdio>
X #include <pwd.h>
X 
X+#ifdef __FreeBSD__
X+#include <unistd.h>
X+#include <sys/types.h>
X+#endif
X+
X #include <adler32.h>
X #include <careful.h>
X #include <input/file.h>
END-of-quickie/files/patch-lib_simple_version_tool_checkin.cc
echo x - quickie/files/pkg-message.in
sed 's/^X//' >quickie/files/pkg-message.in << 'END-of-quickie/files/pkg-message.in'
X-------------------------------------------------------------
X
XQuickie has been installed. Quickie's files are stored in
Xstandard system locations, rather than all under the web
Xroot. In order for Quickie to be accessible, a copy - or
Xsymlink if your web server supports it - of the CGI binary
Xmust be made to the cgi-bin directory of your web server:
X
X    cp -p %%PREFIX%%/bin/quickie /path/to/cgi-bin
X
XThis file should be owned by www:www, and be executable.
X
XIf this directory was found, the copy will have been made
Xfor you, and will be removed when the port is deinstalled
Xor upgraded.
X
X-------------------------------------------------------------
END-of-quickie/files/pkg-message.in
echo x - quickie/pkg-plist
sed 's/^X//' >quickie/pkg-plist << 'END-of-quickie/pkg-plist'
X at unexec bin="%D/bin/quickie"; cgi="%D/www/cgi-bin/quickie"; if cmp -s $bin $cgi; then rm -f $cgi; fi
Xbin/quickie
Xbin/quickie-config
Xbin/quickie_post_install
Xbin/quickie_prime
Xbin/quickie_svt
X%%DATADIR%%/admin/default.css
X%%DATADIR%%/admin/external.png
X%%DATADIR%%/admin/quickie.png
X%%DATADIR%%/index,svt
X%%DATADIR%%/index.html
X%%DATADIR%%/index.referred_to_by
X%%DATADIR%%/index.refers_to
X%%DATADIR%%/index.wiki
X%%DATADIR%%/manual/configuration,svt
X%%DATADIR%%/manual/configuration.html
X%%DATADIR%%/manual/configuration.referred_to_by
X%%DATADIR%%/manual/configuration.refers_to
X%%DATADIR%%/manual/configuration.wiki
X%%DATADIR%%/manual/index,svt
X%%DATADIR%%/manual/index.html
X%%DATADIR%%/manual/index.referred_to_by
X%%DATADIR%%/manual/index.refers_to
X%%DATADIR%%/manual/index.wiki
X%%DATADIR%%/manual/markup,svt
X%%DATADIR%%/manual/markup.html
X%%DATADIR%%/manual/markup.referred_to_by
X%%DATADIR%%/manual/markup.refers_to
X%%DATADIR%%/manual/markup.wiki
X%%DATADIR%%/manual/markup_hints,svt
X%%DATADIR%%/manual/markup_hints.html
X%%DATADIR%%/manual/markup_hints.referred_to_by
X%%DATADIR%%/manual/markup_hints.refers_to
X%%DATADIR%%/manual/markup_hints.wiki
X%%DATADIR%%/manual/sidebar,svt
X%%DATADIR%%/manual/sidebar.html
X%%DATADIR%%/manual/sidebar.referred_to_by
X%%DATADIR%%/manual/sidebar.refers_to
X%%DATADIR%%/manual/sidebar.wiki
X%%DATADIR%%/manual/users,svt
X%%DATADIR%%/manual/users.html
X%%DATADIR%%/manual/users.referred_to_by
X%%DATADIR%%/manual/users.refers_to
X%%DATADIR%%/manual/users.wiki
X%%DATADIR%%/sidebar,svt
X%%DATADIR%%/sidebar.html
X%%DATADIR%%/sidebar.referred_to_by
X%%DATADIR%%/sidebar.refers_to
X%%DATADIR%%/sidebar.wiki
X%%DATADIR%%/square_brackets.referred_to_by
X%%DATADIR%%/square_brackets.unlink_on_create
X at dirrm %%DATADIR%%/manual
X at dirrm %%DATADIR%%/admin
X at dirrm %%DATADIR%%
END-of-quickie/pkg-plist
exit
--- quickie.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list