From nobody Fri Jan 13 16:25:58 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 4Ntmy62CByz2r6TP for ; Fri, 13 Jan 2023 16:26:22 +0000 (UTC) (envelope-from dan@langille.org) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ntmy574Hnz3CNt; Fri, 13 Jan 2023 16:26:21 +0000 (UTC) (envelope-from dan@langille.org) Authentication-Results: mx1.freebsd.org; none Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 081D5320090E; Fri, 13 Jan 2023 11:26:19 -0500 (EST) Received: from imap42 ([10.202.2.92]) by compute5.internal (MEProxy); Fri, 13 Jan 2023 11:26:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=langille.org; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1673627179; x= 1673713579; bh=hNsNbmd6OhTo7ikqgrYkBRIN6X4+mk9igKzr+L8qIH0=; b=e KgMY+vdvMKs8oaMwr38zTCwlR3cnBDdITiLzWhiof9/VKgkSGd1WuXO/vrs/Wz4K arYOlAu5o+XtXsbrZjIL4BZG2nBYW4azMssXktL/vfLU5E7kavo29cHkbujy3Doz qpWYgUB3afI3emEvJulIhvYpHJeyN5HirceRQ2baGbu5fRO2UfoO2Go6GA78jB/g bTfNcRRE4bJJYRAx7b4l4g35mvcyeoXHOd+XuApUpLVw5R9vR9+ooB1k3dAnchYe QXjFq+ePCL6+eJyZ520subEoeh9w7Q0QxWs9Vb8S8zPiI5BqOZr2IGETHS9XsLZN z+YKeP8Vo2K+nxOPw9DVA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1673627179; x= 1673713579; bh=hNsNbmd6OhTo7ikqgrYkBRIN6X4+mk9igKzr+L8qIH0=; b=C 232qee5OBYoPEeZJNnjyCG6BG45M8tZyd6znW8LG7YRhSLPigGMiBOJRxN5p3n1O 0K9UFwBR1GR77rr4Jc0S+ZfrCpbpbqChlT6EALc0ditQH15ZUKu1esyyka3NeWxK ZhbRGsPbmcJ6hOxqK+J1ZGMvkIMtGyM4Sb5dS9Ov3gsRIcINGrgWyITMDlI/NhSW R02qlRkyP4f2743/KeG8B40Jb6We0en7Go7akzp91uYV+FQv7t7oeiqYr/vvqaOc Ze3yjU81pwo+E4AtkE/YTigCKoBW3CkTJtdqwX5EJmL0mNzxpHTqsSAReWXWlX1B ZwYNhSBYEGuu71TrzFjnA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrleekgdekfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedfffgr nhcunfgrnhhgihhllhgvfdcuoegurghnsehlrghnghhilhhlvgdrohhrgheqnecuggftrf grthhtvghrnhepjefhfeehjeduheejhefhjedugeejleefgfelueeftddvffffhffhgeev udelkeehnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpfhhrvggvsghsugdrohhrgh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurghn sehlrghnghhilhhlvgdrohhrgh X-ME-Proxy: Feedback-ID: ifbf9424e:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 636A4BC007C; Fri, 13 Jan 2023 11:26:19 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1187-g678636ba0d-fm-20230113.001-g678636ba 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 Message-Id: <03f61e5f-64e4-4a82-be9c-f0e43342a703@app.fastmail.com> In-Reply-To: <20230113161256.Horde.AmUkrCrrKfqxlkTgPPSzF6q@graf.pompo.net> References: <20230113161256.Horde.AmUkrCrrKfqxlkTgPPSzF6q@graf.pompo.net> Date: Fri, 13 Jan 2023 11:25:58 -0500 From: "Dan Langille" To: "Thierry Thomas" Cc: freebsd-ports , cyberbotx@cyberbotx.com Subject: Re: How to port PHP projects which require composer Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Ntmy574Hnz3CNt X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, Jan 13, 2023, at 10:12 AM, thierry@freebsd.org wrote: > Selon Dan Langille le ven. 13 janv. 11:20:25 2023 : > >> Hello, >> >> I'm looking at porting https://github.com/vstelmakh/url-highlight =20 >> for use by FreshPorts. >> >> My current solution: >> >> % sudo pkg install php81-composer >> % fetch -o url-highlight-v3.0.1.tar.gz =20 >> https://github.com/vstelmakh/url-highlight/archive/refs/tags/v3.0.1.t= ar.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 direc= tory. >> >> If I copy that vendor directory to /usr/local/www/freshports/, I can =20 >> use it like this: >> >> > >> require_once($_SERVER['DOCUMENT_ROOT'] .=C2=A0 '/../vendor/autoload.p= hp'); >> 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 > have Mk/Uses/pear.mk. > > Adding cyberbotx@cyberbotx.com to the list: do you think it is possibl= e? FYI, what I do with net-mgmt/librenms[1] is manually build the vendor di= rectory and upload it as a separate DISTFILE. It works, but it is a manual proc= ess[2]. 1 - https://cgit.freebsd.org/ports/tree/net-mgmt/librenms/Makefile#n6 2 - https://gist.github.com/dlangille/e91b77ca4a32dfcbcdd7515ffb263e74 --=20 Dan Langille dan@langille.org