From nobody Fri Jan 13 15:12:56 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NtlKc08JDz2qwy2 for ; Fri, 13 Jan 2023 15:13:08 +0000 (UTC) (envelope-from thierry@freebsd.org) Received: from erza.lautre.net (erza.lautre.net [80.67.160.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "lautre.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NtlKb5BSjz4GgY for ; Fri, 13 Jan 2023 15:13:07 +0000 (UTC) (envelope-from thierry@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from graf.pompo.net (graf.pompo.net [82.66.0.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by erza.lautre.net (Postfix) with ESMTPSA id BCE1CE75F6; Fri, 13 Jan 2023 16:12:57 +0100 (CET) Received: by graf.pompo.net (Postfix, from userid 80) id 5BDDC65F4A3; Fri, 13 Jan 2023 16:12:57 +0100 (CET) Received: from [163.62.112.237] ([163.62.112.237]) by graf.pompo.net (Horde Framework) with HTTPS; Fri, 13 Jan 2023 16:12:57 +0100 Date: Fri, 13 Jan 2023 16:12:56 +0100 Message-ID: <20230113161256.Horde.AmUkrCrrKfqxlkTgPPSzF6q@graf.pompo.net> From: thierry@freebsd.org To: Dan Langille Cc: freebsd-ports , cyberbotx@cyberbotx.com Subject: Re: How to port PHP projects which require composer In-Reply-To: <9a4cedc4-82cf-6114-000a-ad4f3d56478e@langille.org> User-Agent: Horde Application Framework 5 Accept-Language: en,fr Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4NtlKb5BSjz4GgY X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20766, ipnet:80.67.160.0/19, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Selon Dan Langille le ven. 13 janv. 11:20:25 2023 : > Hello, > > I'm looking at porting https://github.com/vstelmakh/url-highlight=20=20 >=20for use by FreshPorts. > > My current solution: > > % sudo pkg install php81-composer > % fetch -o url-highlight-v3.0.1.tar.gz=20=20 >=20https://github.com/vstelmakh/url-highlight/archive/refs/tags/v3.0.1.tar= .gz > % tar -xzf url-highlight-v3.0.1.tar.gz > % composer require vstelmakh/url-highlight > > At this point, everything I need is in the newly-created vendor directory= . > > If I copy that vendor directory to /usr/local/www/freshports/, I can=20= =20 >=20use it like this: > > > require_once($_SERVER['DOCUMENT_ROOT'] .=C2=A0 '/../vendor/autoload.php')= ; > use VStelmakh\UrlHighlight\Encoder\HtmlSpecialcharsEncoder; > use VStelmakh\UrlHighlight\UrlHighlight; > > ... etc > > > What is the proper way to port code like this? It would be very interesting to have a Mk/Uses/composer.mk, like we=20=20 have=20Mk/Uses/pear.mk. Adding cyberbotx@cyberbotx.com to the list: do you think it is possible? --=20 Th.=20Thomas.