aboutsummaryrefslogtreecommitdiff
path: root/graphics/a2png
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@fuz.su>2022-03-05 05:02:38 +0000
committerGuangyuan Yang <ygy@FreeBSD.org>2022-03-05 05:02:38 +0000
commit06dfcbd2cbebaf3b3b81744ed8adaa903f1b24b7 (patch)
treec1db3f8dbf682af7b4a20e23b25df41669914950 /graphics/a2png
parentae8a681dc5e199fb68118ff2e4ef5b9f9e50d6bb (diff)
downloadports-06dfcbd2cbebaf3b3b81744ed8adaa903f1b24b7.tar.gz
ports-06dfcbd2cbebaf3b3b81744ed8adaa903f1b24b7.zip
graphics/a2png: Fix build with C99 inline semantics
- This fixes the build on arm and i386. PR: 262267
Diffstat (limited to 'graphics/a2png')
-rw-r--r--graphics/a2png/Makefile13
-rw-r--r--graphics/a2png/files/patch-src_image.c26
-rw-r--r--graphics/a2png/files/patch-src_image.h9
-rw-r--r--graphics/a2png/files/patch-src_parse.c13
4 files changed, 51 insertions, 10 deletions
diff --git a/graphics/a2png/Makefile b/graphics/a2png/Makefile
index 541763b4d11c..b8b644b7b957 100644
--- a/graphics/a2png/Makefile
+++ b/graphics/a2png/Makefile
@@ -2,7 +2,7 @@
PORTNAME= a2png
PORTVERSION= 0.1.5
-PORTREVISION= 10
+PORTREVISION= 11
CATEGORIES= graphics
MASTER_SITES= SF
@@ -12,24 +12,17 @@ COMMENT= Converts plain ASCII text into PNG bitmap images
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
-BROKEN_armv6= fails to build: parse.c:(.text+0x174): undefined reference to 'fgettok'
-BROKEN_armv7= fails to build: parse.c:(.text+0x174): undefined reference to 'fgettok'
-BROKEN_i386= fails to build: parse.c:(.text+0x135): undefined reference to 'fgettok'
-
LIB_DEPENDS= libgd.so:graphics/gd
USES= tar:bzip2 localbase
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --enable-gd --with-gdlib-config-path=${WRKDIR}
+CONFIGURE_ARGS= --enable-gd
CFLAGS+= -DDEFAULT_FONTPATH='\"${FONTROOTDIR}/TTF:${FONTROOTDIR}/Type1:${FONTROOTDIR}\"'
+BINARY_ALIAS= gdlib-config=true
PLIST_FILES= bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
FONTROOTDIR?= ${LOCALBASE}/share/fonts
-pre-configure:
- ${ECHO_CMD} "#!/bin/sh" > ${WRKDIR}/gdlib-config
- ${CHMOD} +x ${WRKDIR}/gdlib-config
-
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/man/${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
diff --git a/graphics/a2png/files/patch-src_image.c b/graphics/a2png/files/patch-src_image.c
new file mode 100644
index 000000000000..fbd52cdc7b95
--- /dev/null
+++ b/graphics/a2png/files/patch-src_image.c
@@ -0,0 +1,26 @@
+--- src/image.c.orig 2006-10-05 13:36:26 UTC
++++ src/image.c
+@@ -148,7 +148,6 @@ void image_resize_crop(engine_t *e, const int width_px
+ #endif
+ }
+
+-inline
+ void image_set_foreground(engine_t *p, const rgb_t* color) {
+ #ifdef ENABLE_CAIRO
+ static const double alpha = 1.0;
+@@ -286,7 +285,6 @@ image_points_t image_get_font_max_metrics(engine_t *p,
+ return r;
+ }
+
+-inline
+ void image_move_to(engine_t *en, const image_point_t x, const image_point_t y) {
+ en->pos.x = x;
+ en->pos.y = y;
+@@ -296,7 +294,6 @@ void image_move_to(engine_t *en, const image_point_t x
+ #endif
+ }
+
+-inline
+ image_points_t image_get_position(engine_t *en) {
+ #ifdef ENABLE_CAIRO
+ static image_points_t r;
diff --git a/graphics/a2png/files/patch-src_image.h b/graphics/a2png/files/patch-src_image.h
new file mode 100644
index 000000000000..9186c20317fc
--- /dev/null
+++ b/graphics/a2png/files/patch-src_image.h
@@ -0,0 +1,9 @@
+--- src/image.h.orig 2021-12-03 16:02:51 UTC
++++ src/image.h
+@@ -22,5 +22,6 @@ void image_putc(engine_t *en, const char c);
+ void image_set_foreground(engine_t *p, const rgb_t* color);
+ void image_fill_rect(engine_t *en, const image_point_t x1, const image_point_t y1, const image_point_t x2, const image_point_t y2);
+ void image_move_to(engine_t *en, const image_point_t x, const image_point_t y);
++void image_show_text(engine_t *en, const char* text);
+
+ #endif
diff --git a/graphics/a2png/files/patch-src_parse.c b/graphics/a2png/files/patch-src_parse.c
new file mode 100644
index 000000000000..e94f0932f30b
--- /dev/null
+++ b/graphics/a2png/files/patch-src_parse.c
@@ -0,0 +1,13 @@
+--- src/parse.c.orig 2006-10-05 13:36:26 UTC
++++ src/parse.c
+@@ -22,9 +22,8 @@ void scan_rgb(const char* s, rgb_t* color) {
+
+ // returns 1 if not EOF, 0 if EOF
+ // see note in parse_html for a rationale of this rather odd tokenizer function
+-inline
+ int fgettok(FILE *f, char* buf, size_t buflen) {
+- char c;
++ int c;
+
+ // read until we get start of a token
+ do {