Bug 279280 - graphics/gegl: sort out Makefile and pet portclippy
Summary: graphics/gegl: sort out Makefile and pet portclippy
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-24 22:45 UTC by Vladimir Druzenko
Modified: 2024-06-02 18:26 UTC (History)
6 users (show)

See Also:
fluffy: maintainer-feedback+


Attachments
sort out Makefile and pet portclippy (6.54 KB, patch)
2024-05-24 22:45 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-24 22:45:13 UTC
Created attachment 250933 [details]
sort out Makefile and pet portclippy

Changes:
- converted to DISTVERSION;
- pet protclippy;
- removed unused converters/fribidi;
- alphabetical sort options;
- exclude GEXIV2 on i386 - it's BROKEN on i386;
- with options LIBRSVG2, PANGO and POPPLER libs builds only if CAIRO is ON - added *_IMPLIES=CAIRO;
- GRAPHVIZ: used "dot" for build and run, but not lib;
- V4L doesn't link with libv4l2.so - convert to RUN_DEPENDS;
- enable UMFPACK - build fine, gimp run fine;
- other minor changes.
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-24 22:47:14 UTC
Removed:
> ${REINPLACE_CMD} -e '/altivec.h/d' ${WRKSRC}/gegl/opencl/cl_platform.h
Comment 2 Dima Panov freebsd_committer freebsd_triage 2024-06-01 20:04:51 UTC
LGTM
Comment 3 Daniel Engberg freebsd_committer freebsd_triage 2024-06-01 20:19:03 UTC
Drop the omp hack?

Please move GEGL_VER= and PLIST_SUB+ (remove + too?) above MESON_ARGS for consistency with the tree
Place *_IMPLIES= below MESON_ARGS
tools/gobj2dot.py isn't called during build (needs shebangfix)?

Best regards,
Daniel
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-01 20:46:48 UTC
(In reply to Daniel Engberg from comment #3)
> Drop the omp hack?
Replaced:
.if !exists(/usr/include/omp.h)
A
.else
B
.endif
with:
.if exists(/usr/include/omp.h)
B
.else
A
.endif

> Please move GEGL_VER= and PLIST_SUB+ (remove + too?) above MESON_ARGS for consistency with the tree
portclippy said MESON_ARGS must be before PLIST_SUB.

> Place *_IMPLIES= below MESON_ARGS
portclippy said *_IMPLIES= must be before even *_BUILD_DEPENDS=

> tools/gobj2dot.py isn't called during build (needs shebangfix)?
Nothing changed around this.
/usr/ports/graphics/gegl/work/gegl-0.4.48/tools/gobj2dot.py: "#!/usr/bin/env python3"
If add to shebangfix, than changed to "#!/usr/local/bin/python".
Testing with and without and then compare build logs.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-01 20:52:14 UTC
(In reply to Vladimir Druzenko from comment #4)
tools/gobj2dot.py used in docs/meson.build only.
DOCS build force off with -Ddocs=false in MESON_ARGS=.

I didn't planned to turn on DOCS.
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2024-06-01 21:01:06 UTC
Portclippy isn't completely consistent with the tree and one shouldn't blindly rely on it. 

Do we need the omp hack at all?
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2024-06-01 21:04:54 UTC
(In reply to Daniel Engberg from comment #6)

Yes, it is needed for armv7.
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-01 21:10:12 UTC
(In reply to Daniel Engberg from comment #6)
> Portclippy isn't completely consistent with the tree and one shouldn't blindly rely on it. 
Where I can find _exhaustive_ _list_ with correct order?
That's why I use portclippy and portlint - both are happy.

> Do we need the omp hack at all?
I hear some ARCHS doesn't have it (riscv64 or arm7 or powerpc*).
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-06-01 23:24:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1d1d7ac81d64a108829f66e0f93f53fe46fc57c4

commit 1d1d7ac81d64a108829f66e0f93f53fe46fc57c4
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-06-01 20:24:38 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-06-01 23:16:57 +0000

    graphics/gegl: sort out Makefile and pet portclippy

    Also:
    - remove unnecessary dependency from fribidi;
    - LIBRSVG2, PANGO and POPPLER used only if CAIRO is ON;
    - resurect option UMFPACK;
    - remove patch for powerpc* with altivec.

    PR:             279280
    Tested by:      pkubaj (build on powerpc*)
    Approved by:    fluffy (gnome, maintainer)

 graphics/gegl/Makefile  | 114 ++++++++++++++++++++++--------------------------
 graphics/gegl/pkg-plist |   7 +--
 2 files changed, 57 insertions(+), 64 deletions(-)
Comment 10 Guido Falsi freebsd_committer freebsd_triage 2024-06-02 07:43:43 UTC
This is now failing for me with:

Run-time dependency libv4l1 found: NO (tried pkgconfig)

meson.build:393:12: ERROR: Dependency "libv4l1" not found, tried pkgconfig

A full log can be found at /wrkdirs/usr/ports/graphics/gegl/work/gegl-0.4.48/_build/meson-logs/meson-log.txt


Looks like limiting V4L to run depends is wrong, ti is also needed at build time even if it is not linking. Maybe LIB_DEPENDS is not strictly correct, but it is common practice t use LIB_DEPENDS in place of duplicate BUILD_DEPENDS + RUN DEPENDS.


Please always test with clean env (for example with poudriere), because this is not going to be noticed in a live environment where V4L just happens to be there. This is also going to fail on the official build cluster.
Comment 11 Guido Falsi freebsd_committer freebsd_triage 2024-06-02 08:00:29 UTC
(In reply to Guido Falsi from comment #10)

@VVD I just noticed my comment here came out much harsher than intended!

I did not mean to scold you, it was meant as a notice and suggestion.

In fact I do appreciate what you did here, but wanted to let you know unluckily it introduces this small breakage problem.

Thanks for your work!
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-02 09:31:25 UTC
(In reply to Guido Falsi from comment #10)
Ofc I tested it in poudriere - it builds without errors.
Usually I wrote this in 1st comment - check my other PRs:
> Tested build in poudriere and on live system 13.3 amd64.
Or:
> Tested build in poudriere 13.2, 13.3 amd64 i386 and on live system 13.3 amd64.

Just build without errors again in poudriere 13.3 amd64.
libv4l-1.23.0_4 installed as dependency ffmpeg - option FFMPEG is default on.
I don't understand how you can find this in clean environment - only with custom options.

> it is common practice t use LIB_DEPENDS in place of duplicate BUILD_DEPENDS + RUN DEPENDS.
I discussed this with my former mentor (arrowd) several months ago and he said use LIB_DEPENDS is incorrect and it must be BUILD_DEPENDS + RUN_DEPENDS.
IMHO, BUILD_DEPENDS + RUN_DEPENDS than see a lot of warnings in make satage-qa:
Warning: you might not need LIB_DEPENDS on libnsgif.so
Warning: you might not need LIB_DEPENDS on libpng.so
Warning: you might not need LIB_DEPENDS on libgexiv2.so
Warning: you might not need LIB_DEPENDS on libOpenEXR.so
Warning: you might not need LIB_DEPENDS on libImath.so
Warning: you might not need LIB_DEPENDS on libSDL2.so

I'll add libv4l1 to BUILD_DEPENDS.
Comment 13 commit-hook freebsd_committer freebsd_triage 2024-06-02 10:40:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=533628264cd5562ca77a240fd36ff63a64b66800

commit 533628264cd5562ca77a240fd36ff63a64b66800
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-06-02 10:27:39 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-06-02 10:27:39 +0000

    graphics/gegl: fix build with default option FFMPEG off and V4L on

    Run-time dependency libv4l1 found: NO (tried pkgconfig)
    meson.build:393:12: ERROR: Dependency "libv4l1" not found, tried pkgconfig

    PR:             279280
    Reported by:    madpilot

 graphics/gegl/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 14 Guido Falsi freebsd_committer freebsd_triage 2024-06-02 13:40:40 UTC
(In reply to Vladimir Druzenko from comment #12)

As I said, sorry my first message came out much more aggressive than intended. If you felt attacked or offended, sorry, I did not mean anything like that!

> Just build without errors again in poudriere 13.3 amd64.
> libv4l-1.23.0_4 installed as dependency ffmpeg - option FFMPEG is default on.

Maybe it depends on what is enabled in FFMPEG too, I admit I did not dig too much in it. Anyway even if this depends on non default options, it would become an hidden dependency, it needs to be explicit in the Makefile.

> I discussed this with my former mentor (arrowd) several months ago and he said > use LIB_DEPENDS is incorrect and it must be BUILD_DEPENDS + RUN_DEPENDS.

I do agree, but unluckily the tree if full of improper LIB_DEPENDS, even in many USES files. We need to account for those in our commits as long as they exist.

I do not like those warnings either.

BTW sometimes such improper LIB_DEPENDS in USES files are needed, since at least some of the software requiring it DO link to the library, while others do not. It is not easy to distinguish (I am guilty of this in the xfce.mk file)
Comment 15 Guido Falsi freebsd_committer freebsd_triage 2024-06-02 13:41:11 UTC
(In reply to Guido Falsi from comment #14)

Ops, forgot to mention, thanks for the quick fix!
Comment 16 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-02 18:26:59 UTC
(In reply to Guido Falsi from comment #14)
Don't worry, everything is fine.
There were no hidden negative emotions in my message - my English is too poor for that. :-)
I translate all complex sentences through online translators, but they are unable (yet) to correctly convey emotional overtones. :-o

> I do agree, but unluckily the tree if full of improper LIB_DEPENDS, even in many USES files. We need to account for those in our commits as long as they exist.
I'm trying to tidy up GIMP and its ports, as well as Blender and its ports.

(In reply to Guido Falsi from comment #15)
When I committed, I was ready to quickly (within a few hours) fix errors if any were found.

It isn't so important not to make mistakes at all, but how you correct them and what conclusions you draw from this.
Only those who do nothing do not make mistakes.