Created attachment 225359 [details]
Update to 0.9.8
Hi I'm the maintainer of the graphics/libbpg port, it has been brought to my attention that a newer version has been available for some time.
Here is a patch to bring the port to the latest version. No major changes, QA seems happy:
/usr/ports/graphics/libbpg# portlint .
/usr/ports/graphics/libbpg# make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
I've left the SDL viewer option by default, there's no recommandation yet to avoid things based on SDL1? Porting to SDL2 should be easy if upstream has not done it in the meanwhile.
^Triage: If there is a changelog or release notes URL available for this version, please add it to the URL field.
^Triage: Please set the maintainer-approval attachment flag (to +) on patches for ports you maintain to signify approval.
Attachment -> Details -> maintainer-approval [+]
^Triage: Maintainer-feedback flag (+) not required unless requested (?) first.
Q/A: /tmp/256243/graphics/libbpg/pkg-plist: You have defined USE_LDCONFIG, but this port does not install shared objects in the format lib*.so.[0-9] which ldconfig(8) needs to register them in the hints file.
Is libbpg.so a normal shared library?
The patch contains dos end-of-line characters. If you copy-pasted the patch, would you mind attaching it?
Created attachment 225500 [details]
Update to 0.9.8 (upload file rather than copy-paste)
Sure, first I re-uploaded the patch (first time submitting a git patch in the system, I guess the output won't work like it did with svn?)
Regarding the changelog, there is no officially published changelog on the project website, but there's a file in the source with the following:
- x265 library compilation fixes
- buffer overflow fixes
Would that do work for you?
Regarding the library: yes, libbpg.so is a normal library. I am not sure what the ports way would be: should I create a post-install target to rename the .so and create symlinks? Or directly patch the project makefiles?
Thanks for your time and review,
(In reply to Matthieu Volat from comment #3)
The new patch applies cleanly, thanks!
Also thanks for checking about the ChangeLog, I might link to the file in the unofficial GH repo: https://github.com/mirrorer/libbpg/blob/master/ChangeLog
Probably the library should be versioned, most likely in the Makefiles using links, but I don't know how hard that would be. What is true is that LDCONFIG will not do anything with the library because it does not follow the proper pattern.
A final question. There is this JCTVCHI_DESC variable in the Makefile but there is no JCTVCHI option defined. Is that from an old option that is no longer present?
Created attachment 225586 [details]
Update to 0.9.8 v2 (install versionned shared libs, JVTCHI option)
Hi, sorry for the delay,
The github mirror looks the best available place to advertize the changelog indeed!
Regarding JVTCHI, there is an option for a hi-depth (12bits) JVTC encoder that I had set option but not the actual hooks. This option still exist in libbpg, I guess it should be exposed -- option and configure actions have been added. The only thing I am not sure is that it depends on JVTC, but there is no option depedency system right now in ports?
I've reviewed that the upstream makefile do not provide an install target and the port makefile deal with this, so I set it up to create a versioned lib with links.
I think this cover all for now?
Created attachment 225655 [details]
Fix soname and add option dependency
Good job Matthieu!
In addition to the name scheme, the soname must be added to the shared object with soname option (syntax varies with the linker) so it can be found later:
root@12_2amd64-default:~ # objdump -x /usr/local/lib/libbpg.so.0.9 | grep SONAME
I just did that and add an _IMPLIES to the OPTIONS to make one activate automatically if the other is selected. See https://docs.freebsd.org/en/books/porters-handbook/book.html#options-implies
What do you think?
Ho you are right!
Thanks for adding the soname and for pointing there is IMPLIES now.
I am also 100% OK, thanks for reviewing this (and doing more work that you should have).
A commit in branch main references this bug:
Author: Fernando ApesteguÃa <fernape@FreeBSD.org>
AuthorDate: 2021-06-09 07:13:12 +0000
Commit: Fernando ApesteguÃa <fernape@FreeBSD.org>
CommitDate: 2021-06-09 08:18:07 +0000
graphics/libbpg: update to 0.9.8
* Add library SONAME
* Fix JVTCHI option
Reported by: email@example.com (maintainer)
graphics/libbpg/Makefile | 17 +++++++++++------
graphics/libbpg/distinfo | 6 +++---
graphics/libbpg/files/patch-Makefile | 30 ++++++++++++++++--------------
graphics/libbpg/pkg-plist | 2 ++
4 files changed, 32 insertions(+), 23 deletions(-)