net/fort: don't depend on gcc10, fix version check

The current version of FORT builds fine with any c11 compiler.  There is
no need for USE_GCC.

Patch the build system to correctly define the version of FORT as seen
in the output of "fort --version" and the "User-Agent:" HTTP header. [1]

Approved by:	Toni Yannick Kalombo <toni@devboks.com> (maintainer)
Reported by:	Mark Tinka <mark@tinka.africa> [1]

(cherry picked from commit 9604608f8a)
This commit is contained in:
Philip Paeps 2021-10-27 07:59:54 +00:00
parent 13f3619de8
commit f5006bb2aa
2 changed files with 15 additions and 2 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= fort
DISTVERSION= 1.5.2
PORTREVISION= 1
CATEGORIES= net
MAINTAINER= toni@devboks.com
@ -12,8 +13,7 @@ LIB_DEPENDS= libcurl.so:ftp/curl libjansson.so:devel/jansson \
libxml2.so:textproc/libxml2
RUN_DEPENDS= ${LOCALBASE}/bin/rsync:net/rsync
USES= autoreconf pkgconfig ssl
USE_GCC= yes
USES= autoreconf compiler:c11 pkgconfig ssl
USE_GITHUB= yes
USE_RC_SUBR= fort
@ -25,6 +25,8 @@ GNU_CONFIGURE= yes
SUB_FILES= pkg-message
post-patch:
@${REINPLACE_CMD} -e "s|%%DISTVERSION%%|${DISTVERSION}|" \
${WRKSRC}/configure.ac
@${REINPLACE_CMD} -e "s|/tmp/fort|${ETCDIR}|" \
${WRKSRC}/examples/config.json
@${REINPLACE_CMD} -e "s|/usr/local/ssl|/etc/ssl|" \

View File

@ -0,0 +1,11 @@
--- configure.ac.orig 2021-10-19 22:44:35 UTC
+++ configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([fort], [m4_esyscmd_s([git describe --dirty --always --tags])],
+AC_INIT([fort], [%%DISTVERSION%%],
[fort-validator@nic.mx])
AC_CONFIG_SRCDIR([src/main.c])
AM_INIT_AUTOMAKE([subdir-objects])