- update to cfdg-3.0.9

- enable tests

maintainer timed-out
ok landry@
This commit is contained in:
jasper 2015-12-01 08:16:15 +00:00
parent f4f6a2cd6c
commit aa5dfa132d
6 changed files with 67 additions and 45 deletions

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.8 2015/11/21 18:21:32 dcoppa Exp $
# $OpenBSD: Makefile,v 1.9 2015/12/01 08:16:15 jasper Exp $
COMMENT = Context Free Design Grammar
VERSION = 2.2.2
VERSION = 3.0.9
DISTNAME = ContextFreeSource${VERSION}
PKGNAME = cfdg-${VERSION}
REVISION = 0
CATEGORIES = graphics
@ -16,27 +15,32 @@ MAINTAINER = jared r r spiegel <jrrs@ice-nine.org>
# GPLv2+
PERMIT_PACKAGE_CDROM = Yes
WANTLIB = c m png stdc++ z
LIB_DEPENDS = graphics/png
MASTER_SITES = http://www.contextfreeart.org/download/
EXTRACT_SUFX = .tgz
WANTLIB = c m png z
LIB_DEPENDS = graphics/png
MODULES = gcc4
MODGCC4_LANGS = c c++
MODGCC4_ARCHS = *
USE_GMAKE = Yes
# ????
WRKDIST = ${WRKDIR}/${DISTNAME}.tgz/
WRKDIST = ${WRKDIR}/context-free-${VERSION}
EXAMPLEDIR = ${PREFIX}/share/examples/cfdg
MAKE_ENV += CPPFLAGS="${CFLAGS} -I$(LOCALBASE)/include"
# FlexLexer.h is installed into /usr/include/g++, but we cannot set that
# include path since we use g++ from ports.
post-extract:
cp /usr/include/g++/FlexLexer.h ${WRKSRC}/src-unix/
do-install:
${INSTALL_PROGRAM} ${WRKBUILD}/cfdg ${PREFIX}/bin
${INSTALL_DATA_DIR} ${EXAMPLEDIR}/input
${INSTALL_DATA} ${WRKSRC}/README.txt ${EXAMPLEDIR}
${INSTALL_DATA} ${WRKSRC}/input/* ${EXAMPLEDIR}/input
NO_TEST = Yes
${INSTALL_DATA} ${WRKSRC}/README ${EXAMPLEDIR}
${INSTALL_DATA} ${WRKSRC}/input/*.cfdg ${EXAMPLEDIR}/input
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (ContextFreeSource2.2.2.tgz) = JSRybuml33x91M4xNk+tj+L8rZMODYivXPLGFIAXcF4=
SIZE (ContextFreeSource2.2.2.tgz) = 1635320
SHA256 (ContextFreeSource3.0.9.tgz) = VALtqBZuPQQnpodIeEANs02qJA1fuEoAFYrEbL6NF8s=
SIZE (ContextFreeSource3.0.9.tgz) = 8072254

View File

@ -1,21 +1,41 @@
$OpenBSD: patch-Makefile,v 1.2 2010/03/21 09:31:48 jasper Exp $
--- Makefile.orig Thu Aug 13 17:43:13 2009
+++ Makefile Tue Jan 26 17:35:03 2010
@@ -54,7 +54,7 @@ $(OBJS): $(OBJ_DIR)/Sentry
# Under Cygwin replace strip $@ with strip $@.exe
$OpenBSD: patch-Makefile,v 1.3 2015/12/01 08:16:16 jasper Exp $
--- Makefile.orig Wed May 13 05:00:57 2015
+++ Makefile Wed Nov 25 09:52:27 2015
@@ -18,13 +18,13 @@ SRC_DIRS = $(COMMON_DIR) $(UNIX_DIR) $(DERIVED_DIR) $(
vpath %.cpp $(SRC_DIRS)
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 $@
INC_DIRS = $(COMMON_DIR) $(UNIX_DIR) $(DERIVED_DIR) $(AGG_DIR)/include $(COMMON_DIR)/agg-extras $(FFMPEG_DIR)/include
-INC_DIRS += /usr/local/include
+INC_DIRS += $(LOCALBASE)/include
#
# Library directories for FFmpeg and libpng
#
@@ -105,7 +105,7 @@ $(OUTPUT_DIR)/rtest-2k.png: cfdg $(RTEST_CFDG)
-LIB_DIRS = $(FFMPEG_DIR)/lib /usr/local/lib
+LIB_DIRS = $(FFMPEG_DIR)/lib $(LOCALBASE)/lib
#
# Sources and Objects
@@ -52,7 +52,11 @@ LIBS = png z m
ifeq ($(shell uname -s), Darwin)
LIBS += c++
else
- LIBS += stdc++
+ ifeq ($(shell uname -s), OpenBSD)
+ LIBS += estdc++
+ else
+ LIBS += stdc++
+ endif
endif
#
@@ -143,7 +147,7 @@ test: cfdg
#
CPPFLAGS += $(patsubst %,-I%,$(INC_DIRS))
-CPPFLAGS += -O3 -Wall
+#CPPFLAGS += -O3 -Wall
#CPPFLAGS += -ggdb
-CPPFLAGS += -O3 -Wall -march=native -Wno-parentheses -std=c++0x
+CPPFLAGS += -Wall -Wno-parentheses -std=c++0x
#CPPFLAGS += -g
$(OBJ_DIR)/%.o : %.cpp
# Add this for clang

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-runtests_sh,v 1.1 2015/12/01 08:16:16 jasper Exp $
https://github.com/MtnViewJohn/context-free/pull/5
--- runtests.sh.orig Wed Nov 25 09:55:19 2015
+++ runtests.sh Wed Nov 25 09:55:24 2015
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
mkdir output
for file in input/tests/*.cfdg input/*.cfdg ; do echo -n "$file "; if ./cfdg -Pq "$file" output/test.png ; then echo ' pass' ; : ; else echo ' FAIL' ; break; fi ; done

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src-common_yglue_h,v 1.1 2015/11/21 18:21:32 dcoppa Exp $
Unbreak building with newer flex
--- src-common/yglue.h.orig Mon Sep 13 06:15:28 2010
+++ src-common/yglue.h Sat Nov 21 18:39:52 2015
@@ -51,7 +51,6 @@ typedef union {
int yyget_lineno(void);
FILE *yyget_in (void);
FILE *yyget_out (void);
-size_t yyget_leng (void);
char *yyget_text (void);
void yyset_lineno (int line_number );
void yyset_in (FILE * in_str );

View File

@ -1,7 +1,7 @@
@comment $OpenBSD: PLIST,v 1.2 2010/03/21 09:31:48 jasper Exp $
@comment $OpenBSD: PLIST,v 1.3 2015/12/01 08:16:16 jasper Exp $
@bin bin/cfdg
share/examples/cfdg/
share/examples/cfdg/README.txt
share/examples/cfdg/README
share/examples/cfdg/input/
share/examples/cfdg/input/aliastest.cfdg
share/examples/cfdg/input/alphabet.cfdg