Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2018 13:53:30 -0400
From:      Dan Langille <dan@langille.org>
To:        FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   getting PKGNAME from CONFLICTS
Message-ID:  <ED883748-4CE1-4CEB-9830-224F253561E4@langille.org>

next in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ED883748-4CE1-4CEB-9830-224F253561E4>