From owner-freebsd-ports@freebsd.org Tue Aug 14 17:54:01 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66044107FF39 for ; Tue, 14 Aug 2018 17:54:01 +0000 (UTC) (envelope-from dan@langille.org) Received: from clavin2.langille.org (clavin2.langille.org [199.233.228.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "clavin.langille.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 193977F05E for ; Tue, 14 Aug 2018 17:54:00 +0000 (UTC) (envelope-from dan@langille.org) Received: from (clavin2.int.langille.org (clavin2.int.unixathome.org [10.4.7.7]) (Authenticated sender: hidden) with ESMTPSA id 526A81648B for ; Tue, 14 Aug 2018 17:53:54 +0000 (UTC) From: Dan Langille Content-Type: multipart/signed; boundary="Apple-Mail=_56DB7603-AF96-4313-8B29-118F7E007B6C"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: getting PKGNAME from CONFLICTS Message-Id: Date: Tue, 14 Aug 2018 13:53:30 -0400 To: FreeBSD Ports X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 17:54:01 -0000 --Apple-Mail=_56DB7603-AF96-4313-8B29-118F7E007B6C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I am in the process of adding FreshPorts support for CONFLICTS[1]. I reference www/p5-CGI only because it had a recent commit and it = contains a CONFLICTS directive. At https://dev.freshports.org/www/p5-CGI/ you can see: CONFLICTS: p5-CGI.pm-[1-3]* My goal is to allow a link to the search page or to the page for that = port. The CONFLICTS field is a 'A list of package name patterns'[2] I interpret this to mean the values returned by make -V PKGNAME and the = documentation[3] indicates this is correct. Thus, the CONFLICTS matches https://dev.freshports.org/www/p5-CGI.pm [4] To extract the PKGNAME values from the CONFLICTS I will need to remove = everything after the trailing dash. Can someone do me up a regex for that please? regex is a weak point for = me. Or point me into the Mk infrastructure to locate an existing = solution. Thank you. refs: [1] - https://github.com/FreshPorts/freshports/issues/84 [2] - = https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?view=3Dmarkup#l436 [3] - = https://www.freebsd.org/doc/en/books/porters-handbook/conflicts.html [4] - = https://dev.freshports.org/search.php?stype=3Dpackage&method=3Dprefix&quer= y=3Dp5-CGI.pm&num=3D10&orderby=3Dcategory&orderbyupdown=3Dasc&search=3DSea= rch&format=3Dhtml&branch=3Dhead -- Dan Langille - BSDCan / PGCon dan@langille.org --Apple-Mail=_56DB7603-AF96-4313-8B29-118F7E007B6C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQGTBAEBCgB9FiEEzqcJ4oeyf8sgTIEBIU09XU2nXtMFAltzFxpfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldENF QTcwOUUyODdCMjdGQ0IyMDRDODEwMTIxNEQzRDVENERBNzVFRDMACgkQIU09XU2n XtMc1wgAoCO8AfCKK56eppsP9phs69t99GanDQNTvQk0XT0T3/LlXad73VE3s7no CWx0jX/lAkRUZzGV3Tt6NxaJZjEImBeH6ZlfhEDjB316lsH9U3QhC3jZ2oe7GcOc GEm/MRLZSkoBZXoIH2BTH7tkcK3JQyFHWxup54arkmFiidURODAQXf0BGPj+OB6Z SiaJ67Uo/jThF2bSpGbaaIw0YqnXR5m2O01Nfnmk6NeKIOF4WajrRA2e6Zxabphl M7+ocH8fOYx2N2wVQ2RANsur5T6W81UB8WKGDm+RE+csi4CBHn4myIpXdF9dVngt 0OL9JZfC25V3IbAYEKu5ahb05j6pHg== =Lng7 -----END PGP SIGNATURE----- --Apple-Mail=_56DB7603-AF96-4313-8B29-118F7E007B6C--