1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-09 06:51:44 +00:00

graphics/cfdg: update to 3.4.1

Changelog: https://www.contextfreeart.org/downloads.html

Reported by:	diizzy
PR:		270205
This commit is contained in:
Robert Clausecker 2023-03-21 17:19:57 +01:00
parent 9827d3f049
commit 7e90d9bac7
4 changed files with 46 additions and 19 deletions

View File

@ -1,10 +1,9 @@
PORTNAME= cfdg
PORTVERSION= 3.3
PORTREVISION= 4
DISTVERSION= 3.4.1
CATEGORIES= graphics math
MASTER_SITES= http://www.contextfreeart.org/download/ \
http://glyphic.s3.amazonaws.com/cfa/download/
DISTNAME= ContextFreeSource${PORTVERSION}
DISTNAME= ContextFreeSource${DISTVERSION}
MAINTAINER= fuz@FreeBSD.org
COMMENT= Context Free Design Grammar compiler
@ -20,7 +19,13 @@ USES= bison gmake tar:xz
MAKE_ARGS= prefix=${PREFIX} \
DESTDIR=${STAGEDIR}
TEST_TARGET= check
NO_WRKSUBDIR= yes
CXXFLAGS+= -Wno-register
# graphics/agg cannot be unbundled: version in ports too outdated
# furthermore, its header files conflict with the headers bundled by cfdg
CONFLICTS_BUILD= agg
WRKSRC= ${WRKDIR}/context-free${DISTVERSION}
PLIST_FILES= bin/cfdg \
share/man/man1/cfdg.1.gz
@ -33,7 +38,7 @@ FFMPEG_LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \
FFMPEG_MAKE_ARGS= WANT_FFMPEG=yes
post-patch:
${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},' ${WRKSRC}/Makefile
${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},' ${WRKSRC}/Makefile
do-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1633352475
SHA256 (ContextFreeSource3.3.tar.xz) = f0b9b3622d7e729d867a5e5a9f8d1e9a134f019215fdde553c11b523416291c8
SIZE (ContextFreeSource3.3.tar.xz) = 2684008
TIMESTAMP = 1679405487
SHA256 (ContextFreeSource3.4.1.tar.xz) = d8a496a61a5de970a29214c161dd59ed2fc6ddcecc631bc50bf773131f76d698
SIZE (ContextFreeSource3.4.1.tar.xz) = 3097376

View File

@ -1,15 +1,24 @@
--- Makefile.orig 2020-04-10 19:38:18 UTC
--- Makefile.orig 2023-02-04 00:34:00 UTC
+++ Makefile
@@ -19,7 +19,7 @@ vpath %.cpp $(SRC_DIRS)
vpath %.cfdg input
INC_DIRS = $(COMMON_DIR) $(UNIX_DIR) $(DERIVED_DIR) $(COMMON_DIR)/agg-extras
-INC_DIRS += /usr/local/include
+INC_DIRS += %%LOCALBASE%%/include
#
# Installation directories
@@ -34,7 +34,7 @@ MAN_DIR = $(DESTDIR)$(prefix)/share/man
# Library directories for FFmpeg and libpng
#
-LIB_DIRS = /usr/local/lib
+LIB_DIRS = /usr/local/lib $(shell libpng-config --libdir)
+LIB_DIRS := %%LOCALBASE%%/lib $(shell libpng-config --libdir)
#
# Sources and Objects
@@ -69,30 +69,20 @@ INPUT_SRCS = ciliasun_v2.cfdg demo1_v2.cfdg demo2_v2.c
@@ -69,43 +69,35 @@ INPUT_SRCS = ciliasun_v2.cfdg demo1_v2.cfdg demo2_v2.c
welcome.cfdg ziggy.cfdg
@ -27,8 +36,8 @@
#
# FFmpeg support
#
-# Uncomment these lines to enable FFmpeg support
-#
# Uncomment these lines to enable FFmpeg support
#
+ifeq ($(WANT_FFMPEG), yes)
+ COMMON_SRCS += ffCanvas.cpp
+ LIBS += avformat avcodec swscale swresample avutil z m x264 pthread dl
@ -48,7 +57,20 @@
SRCS = $(DERIVED_SRCS) $(COMMON_SRCS) $(UNIX_SRCS)
#
@@ -113,6 +103,7 @@ DEPS = $(patsubst %.o,%.d,$(OBJS))
# Configuration for local AGG
#
SRCS += $(AGG_SRCS)
INC_DIRS += $(AGG_DIR) $(AGG_DIR)/agg2
#
# Configuration for system AGG
#
#LIBS += agg
OBJS = $(patsubst %.cpp,$(OBJ_DIR)/%.o,$(SRCS))
@@ -113,6 +105,7 @@ DEPS = $(patsubst %.o,%.d,$(OBJS))
LINKFLAGS += $(patsubst %,-L%,$(LIB_DIRS))
LINKFLAGS += $(patsubst %,-l%,$(LIBS))
@ -56,7 +78,7 @@
LINKFLAGS += -fexceptions
deps: $(OBJ_DIR) $(DEPS)
@@ -133,7 +124,7 @@ $(OBJS): $(OBJ_DIR)/Sentry
@@ -133,7 +126,7 @@ $(OBJS): $(OBJ_DIR)/Sentry
# Under Cygwin replace strip $@ with strip $@.exe
cfdg: $(OBJS)
@ -65,12 +87,12 @@
strip $@
@@ -196,7 +187,7 @@ check: cfdg
@@ -196,7 +189,7 @@ check: cfdg
#
CXXFLAGS += $(patsubst %,-I%,$(INC_DIRS))
-CXXFLAGS += -O2 -Wall -Wextra -march=native -Wno-parentheses -std=c++14
+CXXFLAGS += -Wall -Wextra -Wno-parentheses -std=c++14
-CXXFLAGS += -O2 -Wall -Wextra -Wno-parentheses -std=c++17
+CXXFLAGS += -Wall -Wextra -Wno-parentheses -std=c++17
CXXFLAGS += -g -D_GLIBCXX_USE_C99_MATH=1
CPPFLAGS += -DNDEBUG

View File

@ -1,4 +1,4 @@
--- src-common/cfdg.ypp.orig 2021-10-04 13:54:54 UTC
--- src-common/cfdg.ypp.orig 2023-02-04 00:34:00 UTC
+++ src-common/cfdg.ypp
@@ -31,7 +31,7 @@
%skeleton "lalr1.cc" /* -*- C++ -*- */