Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 May 2020 15:54:05 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r535474 - in head/net/librsync: . files
Message-ID:  <202005161554.04GFs5Qx009500@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mandree
Date: Sat May 16 15:54:05 2020
New Revision: 535474
URL: https://svnweb.freebsd.org/changeset/ports/535474

Log:
  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)

Added:
  head/net/librsync/files/rdiff_bad_option.sh   (contents, props changed)
Modified:
  head/net/librsync/Makefile

Modified: head/net/librsync/Makefile
==============================================================================
--- head/net/librsync/Makefile	Sat May 16 15:45:35 2020	(r535473)
+++ head/net/librsync/Makefile	Sat May 16 15:54:05 2020	(r535474)
@@ -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>

Added: head/net/librsync/files/rdiff_bad_option.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/librsync/files/rdiff_bad_option.sh	Sat May 16 15:54:05 2020	(r535474)
@@ -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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005161554.04GFs5Qx009500>