Bug 256243 - graphics/libbpg: update to 0.9.8
Summary: graphics/libbpg: update to 0.9.8
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: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-29 12:53 UTC by Matthieu Volat
Modified: 2021-06-09 08:22 UTC (History)
2 users (show)

See Also:
mazhe: maintainer-feedback+


Attachments
Update to 0.9.8 (912 bytes, text/plain)
2021-05-29 12:53 UTC, Matthieu Volat
no flags Details
Update to 0.9.8 (upload file rather than copy-paste) (875 bytes, patch)
2021-06-02 15:31 UTC, Matthieu Volat
no flags Details | Diff
Update to 0.9.8 v2 (install versionned shared libs, JVTCHI option) (2.55 KB, patch)
2021-06-06 09:18 UTC, Matthieu Volat
no flags Details | Diff
Fix soname and add option dependency (4.84 KB, patch)
2021-06-09 06:53 UTC, Fernando Apesteguía
fernape: maintainer-approval? (mazhe)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Volat 2021-05-29 12:53:03 UTC
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 .
looks fine.

/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.

Regards,
Comment 1 Fernando Apesteguía freebsd_committer 2021-06-02 15:01:01 UTC
^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?


Thanks!
Comment 2 Fernando Apesteguía freebsd_committer 2021-06-02 15:17:40 UTC
Hi Matthieu

The patch contains dos end-of-line characters. If you copy-pasted the patch, would you mind attaching it?

Thanks!
Comment 3 Matthieu Volat 2021-06-02 15:31:06 UTC
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:

version 0.9.8:
- 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,
Comment 4 Fernando Apesteguía freebsd_committer 2021-06-02 16:40:56 UTC
(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?

Thanks!
Comment 5 Matthieu Volat 2021-06-06 09:18:05 UTC
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?

Regards,
Comment 6 Fernando Apesteguía freebsd_committer 2021-06-09 06:53:46 UTC
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
  SONAME      0.9

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?
Comment 7 Matthieu Volat 2021-06-09 07:24:38 UTC
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).
Comment 8 commit-hook freebsd_committer 2021-06-09 08:22:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=46a560897d7c17a9dcd0aa0bd16633d5a286a5fc

commit 46a560897d7c17a9dcd0aa0bd16633d5a286a5fc
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

    ChangeLog: https://github.com/mirrorer/libbpg/blob/master/ChangeLog

    * Add library SONAME
    * Fix JVTCHI option

    PR:     256243
    Reported by:    mazhe@alkumuna.eu (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(-)
Comment 9 Fernando Apesteguía freebsd_committer 2021-06-09 08:22:45 UTC
Committed,

Thanks!