Den 2026-06-28 kl. 21:04, skrev Piotr Smyrak:
On Sun, 28 Jun 2026 20:55:01 +0200
Piotr Smyrak <[email protected]> wrote:

On Sat, 27 Jun 2026 10:00:29 +0200
Roger Olofsson <[email protected]> wrote:

Den 2026-06-26 kl. 21:02, skrev Piotr Smyrak:
On Fri, 26 Jun 2026 20:35:43 +0200
Roger Olofsson <[email protected]> wrote:
A few months ago I made an attempt to create a port for a
software that can help with tuning a piano.

I would be glad for feedback and review.

Bugzilla link
<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293877>
You are using a hardcoded /usr/local path in the .desktop file.
That shall rather be $PREFIX, which might change on sysop
discretion.

Same remark regarging this patch:
files/patch-modules_core_calculation_calculationmanager.cpp
Hi Piotr,

Thanks for your feedback, I appreciate it!

I am guessing that sysops wants to do "make PREFIX=/path"?
Yes, exactly. Port is a skeleton to build a package, one may instruct
all packages to be built with PREFIX different from the default
LOCALBASE.

1. For the
files/patch-modules_core_calculation_caclulationmanager.cpp the
hardcoding affects the ${STAGEDIR}, ie the files being built lands
in ${STAGEDIR} and then the do-install: part of the Makefile takes
${PREFIX} into consideration.  This should be fine?
STAGEDIR is only a temporary location, note, you never run software
from within there.

2. I have removed the patch file for the .desktop file and done a
${REINPLACE_CMD} to change the contents of the .desktop file while
in ${STAGEDIR} so this also now takes ${PREFIX} into consideration.

The test mentioned in the porters handbook that says to check make
clean; make package PREFIX=/var/tmp/'make -V PORTNAME' fails and
says it can find /lib/qt6/bin/qmake in the /var/tmp path. I suspect
the qmake comes from USES= qmake. I don't know how to workaround
this right now.
This is expected, since to do a real test you would need to set PREFIX
to all dependencies, too.

As for how adapt patch-modules_core_calculation_calculationmanager.cpp
you might want to look into this patch [1] as an example.

1.
/usr/ports/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_pdfium_core_fxge_linux_fx__linux__impl.cpp

Hi Piotr and thank you for the link!

I have modified the patch file for calculationmanager.cpp and replaced /usr/local with %%PREFIX%% and added a post-patch part in the Makefile that replaces the %%PREFIX%% by the Makefile ${PREFIX}.

The patch has been updated on Bugzilla.

Have a nice day!

Roger



Reply via email to