Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Oct 2023 14:41:45 -0400
From:      "Dan Langille" <dan@langille.org>
To:        "Vladimir Druzenko" <vvd@freebsd.org>, "Sergey A. Osokin" <osa@freebsd.org>
Cc:        dvl <dvl@freebsd.org>, ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: 73922d6b363a - main - net-mgmt/librenms: Fix start on FreeBSD 14/nginx
Message-ID:  <e581cda8-0bd0-4d74-a4eb-4a483b3a9f80@app.fastmail.com>
In-Reply-To: <816dffaa-7fbf-4352-96e6-30c715b430a0@freebsd.org>
References:  <202310071152.397BqxAf037182@gitrepo.freebsd.org> <ZSLCnqP3gTmzxHEr@FreeBSD.org> <d1a0e113-ebce-4a80-b203-f8844239cf43@app.fastmail.com> <ZSLZir9W5w82iUcE@FreeBSD.org> <816dffaa-7fbf-4352-96e6-30c715b430a0@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 8, 2023, at 12:47 PM, Vladimir Druzenko wrote:
> 08.10.2023 19:32, Sergey A. Osokin =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
>> On Sun, Oct 08, 2023 at 12:16:59PM -0400, Dan Langille wrote:
>>> On Sun, Oct 8, 2023, at 10:54 AM, Sergey A. Osokin wrote:
>>>>> +-        base =3D ("/usr/bin/env", "php")
>>>>> ++        base =3D ("/usr/local/bin/php",)
>>>> Would that be better to use %%PREFIX%% in a patch and substitute
>>>> that with a value of the ${LOCALBASE} variable in a post-patch
>>>> phase?
>>> This is a great idea. I know the port is already doing this for othe=
r locations
>>> in the code. There are other patches which need this adjustment as w=
ell.
>>>
>>>   post-patch:
>>>          ${REINPLACE_CMD}    's|%%LOCALBASE%%|${LOCALBASE}|g'       =
           ${WRKSRC}/LibreNMS/Validations/Php.php
>>> +       ${REINPLACE_CMD}    's|%%LOCALBASE%%|${LOCALBASE}|g'        =
          ${WRKSRC}/LibreNMS/__init__.py
>>> +       ${REINPLACE_CMD}    's|%%LOCALBASE%%|${LOCALBASE}|g'        =
          ${WRKSRC}/LibreNMS/wrapper.py
>>>          ${REINPLACE_CMD}    's|%%LOCALBASE%%|${LOCALBASE}|g'       =
           ${WRKSRC}/LibreNMS/Util/Version.php
>> sed(1) supports multiple files as arguments, so I'd prefer to see more
>> compact version (not tested), i.e.:
>>
>> 	${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \
>> 		${WRKSRC}/LibreNMS/Validations/Php.php \
>> 		${WRKSRC}/LibreNMS/__init__.py \
>> 		${WRKSRC}/LibreNMS/wrapper.py \
>> 		${WRKSRC}/LibreNMS/Util/Version.php \
>>                  ...
>>
>> Thank you.
>
> 	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
> 		-e ${WRKSRC}/LibreNMS/Validations/Php.php \
> 		-e ${WRKSRC}/LibreNMS/__init__.py \
> 		-e ${WRKSRC}/LibreNMS/wrapper.py \
> 		-e ${WRKSRC}/LibreNMS/Util/Version.php \

See https://cgit.freebsd.org/ports/commit/?id=3D7d8ac44c90242ecd1656ce0c=
5a5c68910afb712b

Thank you.

--=20
  Dan Langille
  dan@langille.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e581cda8-0bd0-4d74-a4eb-4a483b3a9f80>