graphics/freeimage: Add pkgconf support While here: - Take MAINTAINER'ship - reorder Makefile (portclippy) PR: 254340 Submitted by: Freddy DISSAUX <dsx@bsdsx.fr> Approved by: dbaio, garga (mentors) Differential Revision: https://reviews.freebsd.org/D29311
Details
- Reviewers
dbaio garga - Commits
- rP569542: graphics/freeimage: Add pkgconf support
$ portlint -C looks fine $ pkgconf --modversion freeimage 3.18.0 $ pkgconf --libs freeimage -L/usr/local/lib -lfreeimage $ pkgconf --cflags freeimage -I/usr/local/include
poudriere bulk -f freeimage-consumers.list
114amd64 11.4-RELEASE-p8 amd64
114i386 11.4-RELEASE-p8 i386
122amd64 12.2-RELEASE-p4 amd64
122i386 12.2-RELEASE-p4 i386
140amd64 14.0-CURRENT amd64
140i386 14.0-CURRENT i386
poudriere testport logs
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
This issue first appeared when updating graphics/imv to 4.2.0 that changed to meson/pkgconf and it failed building with freeimage (option):
"library 'freeimage' not found.
PR line on commit log must contain only PR number instead of full URL. While touching it please add missed newline chars
Looks like some kind of review interface bug, I was forced to remove "-" from first list of port changes.
If you start all these lines with 2 spaces, as I did, it will show all block with fixed font and will respect text
If you start all these lines with 2 spaces, as I did, it will show all block with fixed font and will respect text
Nice, from now on I will use it this way
This update seems simple, but as there are many ports that depends on it, a good practice is doing tests for consumers as well.
https://www.freshports.org/graphics/freeimage
You can do a poudriere bulk -f /tmp/freeimage-consumers-list.txt for instance.
or check manually a few of them... well, more tests the better.
Let us know about your tests.
Makefile | ||
---|---|---|
39 ↗ | (On Diff #85879) | PREFIX is added by the default here, you don't need this. Check with |
57 ↗ | (On Diff #85879) | What about a blank line separating this? |
files/freeimage.pc.in | ||
1 ↗ | (On Diff #85879) | Use %%PREFIX%% here |
- separate PLIST_FILES block from PKGCONFIGDIR with a blank line
- use prefix=%%PREFIX%% in files/freeimage.pc.in
I've started poudriere bulk -f /tmp/logs/freeimage-consumers-list.txt for:
140amd64, 140i386, 122amd64, 122i386, 114amd64 and 114i386.
I will post results when it's done.
Makefile | ||
---|---|---|
39 ↗ | (On Diff #85879) | with prefix="${PREFIX}" line, make -V SUB_LIST gives: prefix="/usr/local" name="freeimage" description="Simple C/C++ bitmap graphics library" version="3.18.0" PREFIX=/usr/local LOCALBASE=/usr/local DATADIR=/usr/local/share/freeimage DOCSDIR=/usr/local/share/doc/freeimage EXAMPLESDIR=/usr/local/share/examples/freeimage WWWDIR=/usr/local/www/freeimage ETCDIR=/usr/local/etc/freeimage without prefix="${PREFIX}" line, make -V SUB_LIST gives: PREFIX=/usr/local LOCALBASE=/usr/local DATADIR=/usr/local/share/freeimage DOCSDIR=/usr/local/share/doc/freeimage EXAMPLESDIR=/usr/local/share/examples/freeimage WWWDIR=/usr/local/www/freeimage ETCDIR=/usr/local/etc/freeimage Are you sure that I can delete this line? |
Makefile | ||
---|---|---|
39 ↗ | (On Diff #85879) | I was referring just the prefix variable. |
@eduardo I've seen you have posted all build logs, I imagine this was a good exercise, thanks!
In future you don't need to show all logs (from the consumers) for us, just say if it is ok, test a few of them, that's it.
To proceed here, remove the variable prefix="${PREFIX}" and exec another poudriere testport in graphics/freeimage, update your patch and let us know.
I've tested removing prefix="${PREFIX}" variable but pkgconf doesn't find freeimage:
% pkgconf --modversion freeimage %%version%% % pkgconf --modversion freeimage %%version%% % pkgconf --cflags freeimage -I/usr/local/include
Makefile | ||
---|---|---|
39 ↗ | (On Diff #85879) | Ok, let me think: |
I'm not saying for you to remove the prefix variable from the files/freeimage.pc.in.
What I said is to remove the prefix="${PREFIX}" from the Makefile.
From:
SUB_LIST= prefix="${PREFIX}" \ name="${PORTNAME}" \ description="${COMMENT}" \ version="${PORTVERSION}"
To:
SUB_LIST= name="${PORTNAME}" \ description="${COMMENT}" \ version="${PORTVERSION}"
In the files/freeimage.pc.in you are already using prefix=%%PREFIX%% as I pointed to you in my first comment here.
PREFIX is a variable that exists in SUB_LIST by default.
Do you understand what is happening in the files/freeimage.pc.in?
Just in case, take a look on Porters Handbook: using-sub-files.
remove prefix="${PREFIX}" from SUB_LIST
Could you please apply this patch and test the following commands?
$ pkgconf --modversion freeimage $ pkgconf --libs freeimage $ pkgconf --cflags freeimage
before I do poudriere testport?
$ pkgconf --modversion freeimage 3.18.0 $ pkgconf --libs freeimage -L/usr/local/lib -lfreeimage $ pkgconf --cflags freeimage -I/usr/local/include
Maybe a local problem for me then:
% pkgconf --modversion freeimage %%version%% % pkgconf --modversion freeimage %%version%% % pkgconf --cflags freeimage -I/usr/local/include
I've added poudriere tesport logs in Test Plan seccion.
And I've tested graphics/imv 4.2.0 with succsess, meson finds freeimage jiust fine.
Yeah, that's not right, but check inside a jail with the Interactive mode:
$ sudo poudriere testport -j 14-amd64 -p head -o graphics/freeimage -I $ sudo jexec 14-amd64-head-n env -i TERM=$TERM /usr/bin/login -fp root ... root@14-amd64-head:~ # cat /usr/local/libdata/pkgconfig/freeimage.pc prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: freeimage Description: Simple C/C++ bitmap graphics library Version: 3.18.0 Libs: -L${libdir} -lfreeimage Cflags: -I${includedir} root@14-amd64-head:~ # exit $sudo poudriere jail -k -j 14-amd64 -p head
Maybe a local problem for me then:
% pkgconf --modversion freeimage %%version%% % pkgconf --modversion freeimage %%version%% % pkgconf --cflags freeimage -I/usr/local/includeYeah, that's not right, but check inside a jail with the Interactive mode:
$ sudo poudriere testport -j 14-amd64 -p head -o graphics/freeimage -I $ sudo jexec 14-amd64-head-n env -i TERM=$TERM /usr/bin/login -fp root ... root@14-amd64-head:~ # cat /usr/local/libdata/pkgconfig/freeimage.pc prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: freeimage Description: Simple C/C++ bitmap graphics library Version: 3.18.0 Libs: -L${libdir} -lfreeimage Cflags: -I${includedir} root@14-amd64-head:~ # exit $sudo poudriere jail -k -j 14-amd64 -p head
I've tested inside jail and it is fine!
Next time I have a similar problem I will test it this way, thanks.
I received a message saying:
"This revision was not accepted when it landed; it landed in state "Needs Review".",
Did I do something wrong?
This message comes when no reviewer or in your case not all reviewers have accepted a revision but gets committed anyway.