aboutsummaryrefslogtreecommitdiff
path: root/net/librsync
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2020-05-16 15:54:05 +0000
committerMatthias Andree <mandree@FreeBSD.org>2020-05-16 15:54:05 +0000
commitcf6082fbf2c14199a173cf702568640e1e5a43dd (patch)
treef13e2fd91ec6f4611741830c45647c1582b26d66 /net/librsync
parent9a069d8feef30365f3a0d656173d302912087ca8 (diff)
downloadports-cf6082fbf2c14199a173cf702568640e1e5a43dd.tar.gz
ports-cf6082fbf2c14199a173cf702568640e1e5a43dd.zip
net/librsync 2.3.0: fix build with pkg-config available [1]
While here, enable "make test" (requires upstream file missing from tarball and adaptations as to bash's install path, which add). This bug shows building the ports directly because pkg-config is often available, but does not show in poudriere because pkgconf/pkg-config is not a listed requisite und therefore missing from the build jail. PR: 245514 [2] Submitted by: Franco Fichtner <franco@opnsense.org> [1][2] Reported by: Simeon Simeonov <sgs@pichove.org> [2] Reported by: Xavier Humbert <xavier@groumpf.org> (through freebsd-ports@) Reported by: Jakob Breivik Grimstveit <jakob@grimstveit.no> (through freebsd-ports@) Approved by: sunpoet@ (maintainer timeout, 17 days; also blanket fix broken port approval)
Notes
Notes: svn path=/head/; revision=535474
Diffstat (limited to 'net/librsync')
-rw-r--r--net/librsync/Makefile8
-rw-r--r--net/librsync/files/rdiff_bad_option.sh32
2 files changed, 39 insertions, 1 deletions
diff --git a/net/librsync/Makefile b/net/librsync/Makefile
index 1b5e97b6f4ea..ea7e20b0b102 100644
--- a/net/librsync/Makefile
+++ b/net/librsync/Makefile
@@ -13,13 +13,19 @@ LICENSE= LGPL21+
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libpopt.so:devel/popt
+TEST_DEPENDS= bash:shells/bash
-USES= compiler:c11 cmake
+USES= cmake compiler:c11 localbase:ldflags
USE_GITHUB= yes
USE_LDCONFIG= yes
+TEST_TARGET= check
+
PLIST_SUB= PORTVERSION=${PORTVERSION}
+pre-test:
+ ${CP} -p ${FILESDIR}/rdiff_bad_option.sh ${WRKSRC}/tests/
+
.include <bsd.port.mk>
diff --git a/net/librsync/files/rdiff_bad_option.sh b/net/librsync/files/rdiff_bad_option.sh
new file mode 100644
index 000000000000..fe8b62b5ec76
--- /dev/null
+++ b/net/librsync/files/rdiff_bad_option.sh
@@ -0,0 +1,32 @@
+#! /usr/bin/env bash
+
+# taken from https://github.com/librsync/librsync/blob/master/tests/rdiff_bad_option.sh
+# and adapted to suit the FreeBSD ports build rig by Matthias Andree, 2020-05-16
+
+# librsync -- the library for network deltas
+
+# Copyright (C) 2016 by Martin Pool
+
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# Bad command-line options return an error and print a message.
+
+set -ex
+errout=`mktemp -t rdiff_bad_option_test_XXXXXXX`
+trap "rm $errout" EXIT
+! $1/rdiff --imaginary-option 2>"$errout"
+cat "$errout"
+grep 'unknown option: --imaginary-option' "$errout"