import cfdg, from MAINTAINER jared r r spiegel. ok okan

Chris Coyne created a small language for design grammars called
CFDG. These grammars are sets of non-deterministic rules to produce
images. The images are surprisingly beautiful, often from very
simple grammars.

cfdg is a command-line tool to produce images in PNG format from
these grammars.
This commit is contained in:
sthen 2008-07-23 08:24:36 +00:00
parent f7b9067c69
commit 32f123d700
6 changed files with 127 additions and 0 deletions

42
graphics/cfdg/Makefile Normal file
View File

@ -0,0 +1,42 @@
# $OpenBSD: Makefile,v 1.1.1.1 2008/07/23 08:24:36 sthen Exp $
COMMENT = Context Free Design Grammar
VERSION = 2.1
DISTNAME = ContextFreeSource${VERSION}
PKGNAME = cfdg-${VERSION}
CATEGORIES = graphics
HOMEPAGE = http://www.contextfreeart.org/
MAINTAINER = jared r r spiegel <jrrs@ice-nine.org>
# GPLv2+
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = c m png stdc++ z
LIB_DEPENDS = :png-*:graphics/png
MASTER_SITES = http://www.contextfreeart.org/download/
EXTRACT_SUFX = .tgz
USE_GMAKE = Yes
EXAMPLEDIR = ${PREFIX}/share/examples/cfdg
MAKE_ENV += CPPFLAGS="${CFLAGS} -I$(LOCALBASE)/include/libpng"
do-install:
${INSTALL_PROGRAM} ${WRKBUILD}/cfdg ${PREFIX}/bin
${INSTALL_DATA_DIR} ${EXAMPLEDIR}
${INSTALL_DATA_DIR} ${EXAMPLEDIR}/input
${INSTALL_DATA} ${WRKSRC}/README.txt ${EXAMPLEDIR}
${INSTALL_DATA} ${WRKSRC}/input/* ${EXAMPLEDIR}/input
NO_REGRESS = Yes
.include <bsd.port.mk>

5
graphics/cfdg/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (ContextFreeSource2.1.tgz) = R3JC50xPlTzsp78G6USkbg==
RMD160 (ContextFreeSource2.1.tgz) = iZ07mb+QQ3zOVdz2LVfNU4taKNg=
SHA1 (ContextFreeSource2.1.tgz) = clpQhxjucrv2SRNBRrDaZYWznoE=
SHA256 (ContextFreeSource2.1.tgz) = BBpn40KSyJiJBWj+cjbqr9FgjRlpUb2szt6yJ1yhmLQ=
SIZE (ContextFreeSource2.1.tgz) = 1363136

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2008/07/23 08:24:36 sthen Exp $
--- Makefile.orig Sun Apr 29 06:51:20 2007
+++ Makefile Sat Jul 19 11:57:55 2008
@@ -52,7 +52,7 @@ $(OBJS): $(OBJ_DIR)/Sentry
# Under Cygwin replace strip $@ with strip $@.exe
cfdg: $(OBJS)
- $(LINK.o) $^ -L/usr/local/lib -lstdc++ -lpng -lz -fexceptions -o $@
+ $(LINK.o) $^ -L$(LOCALBASE)/lib -lstdc++ -lpng -lz -lm -fexceptions -o $@
strip $@
@@ -103,7 +103,7 @@ $(OUTPUT_DIR)/rtest-2k.png: cfdg $(RTEST_CFDG)
#
CPPFLAGS += $(patsubst %,-I%,$(INC_DIRS))
-CPPFLAGS += -O3
+#CPPFLAGS += -O3
#CPPFLAGS += -ggdb
$(OBJ_DIR)/%.o : %.cpp

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src-common_renderimpl_cpp,v 1.1.1.1 2008/07/23 08:24:36 sthen Exp $
--- src-common/renderimpl.cpp.orig Sun Sep 16 00:30:49 2007
+++ src-common/renderimpl.cpp Sun Sep 16 00:31:55 2007
@@ -21,6 +21,10 @@
#include <math.h>
#endif
+#if defined (__OpenBSD__)
+#define isfinite finite
+#endif
+
#include "shapeSTL.h"
#include "primShape.h"

7
graphics/cfdg/pkg/DESCR Normal file
View File

@ -0,0 +1,7 @@
Chris Coyne created a small language for design grammars called
CFDG. These grammars are sets of non-deterministic rules to produce
images. The images are surprisingly beautiful, often from very
simple grammars.
cfdg is a command-line tool to produce images in PNG format from
these grammars.

38
graphics/cfdg/pkg/PLIST Normal file
View File

@ -0,0 +1,38 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2008/07/23 08:24:36 sthen Exp $
@bin bin/cfdg
share/examples/cfdg/
share/examples/cfdg/README.txt
share/examples/cfdg/input/
share/examples/cfdg/input/aliastest.cfdg
share/examples/cfdg/input/alphabet.cfdg
share/examples/cfdg/input/chanukah.cfdg
share/examples/cfdg/input/cilia.cfdg
share/examples/cfdg/input/ciliasun.cfdg
share/examples/cfdg/input/demo1.cfdg
share/examples/cfdg/input/demo2.cfdg
share/examples/cfdg/input/dong.cfdg
share/examples/cfdg/input/funky_flower.cfdg
share/examples/cfdg/input/i_curves.cfdg
share/examples/cfdg/input/i_pix.cfdg
share/examples/cfdg/input/i_polygons.cfdg
share/examples/cfdg/input/lesson.cfdg
share/examples/cfdg/input/lesson2.cfdg
share/examples/cfdg/input/line_ending_tests.tgz
share/examples/cfdg/input/mtree.cfdg
share/examples/cfdg/input/octopi.cfdg
share/examples/cfdg/input/point.cfdg
share/examples/cfdg/input/quadcity.cfdg
share/examples/cfdg/input/rendering-tests.cfdg
share/examples/cfdg/input/rose.cfdg
share/examples/cfdg/input/sierpinski.cfdg
share/examples/cfdg/input/snowflake.cfdg
share/examples/cfdg/input/tangle.cfdg
share/examples/cfdg/input/thingy.cfdg
share/examples/cfdg/input/thorns.cfdg
share/examples/cfdg/input/tree_number_5.cfdg
share/examples/cfdg/input/triples.cfdg
share/examples/cfdg/input/underground.cfdg
share/examples/cfdg/input/weighting_demo.cfdg
share/examples/cfdg/input/welcome.cfdg
share/examples/cfdg/input/xmas.cfdg
share/examples/cfdg/input/ziggy.cfdg