Bug 285652 - graphics/agg: update to 2.6
Summary: graphics/agg: update to 2.6
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dirk Meyer
URL: https://github.com/ghaerr/agg-2.6/
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-25 13:42 UTC by Robert Clausecker
Modified: 2025-04-14 16:22 UTC (History)
0 users

See Also:
dinoex: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2025-03-25 13:42:00 UTC
A maintained fork of this discontinued library is available.

    https://github.com/ghaerr/agg-2.6/

Would you mind switching the port to it?  This would allow me to unbundle agg in graphics/cfdg.
Comment 1 Dirk Meyer freebsd_committer freebsd_triage 2025-03-27 20:52:41 UTC
I have then port ready to update.

But all ports using agg as dependency fail to build with the new version.

The API has non trivial changes,
I am still searching for patches to progress in this matter.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2025-03-27 20:53:54 UTC
(In reply to Dirk Meyer from comment #1)

Perhaps you could add agg-2.6 as graphics/agg26 and let the maintainer of the dependent ports figure out how to migrate.
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-04-01 17:26:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=65f14e18b68589889353a671be33b2aabf2f0c4d

commit 65f14e18b68589889353a671be33b2aabf2f0c4d
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2025-04-01 17:23:23 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2025-04-01 17:23:23 +0000

    graphics/agg26: new port for 2.6

    PR: 285652
    update MASTER_SITES

 graphics/Makefile                                  |   1 +
 graphics/agg26/Makefile (new)                      |  36 +++++
 graphics/agg26/distinfo (new)                      |   3 +
 ...atch-font_freetype__agg_font_freetype.cpp (new) |  11 ++
 .../patch-include__agg_renderer_outline_aa.h (new) |  11 ++
 graphics/agg26/pkg-descr (new)                     |  14 ++
 graphics/agg26/pkg-plist (new)                     | 160 +++++++++++++++++++++
 7 files changed, 236 insertions(+)
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2025-04-01 17:48:47 UTC
Thanks, much appreciated!
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2025-04-14 12:17:07 UTC
Unfortunately this version of agg-2.6 has a bug which prevents cfdg from builing with it.  I have filed an issue up stream:

    https://github.com/ghaerr/agg-2.6/issues/14

The fix is probably to adjust the return type of pix_value_ptr() such that no cast is needed, but I don't know enough about the code base to say for sure.

Please also consider using WRKSRC_SUBDIR instead of setting WRKSRC with USE_GITHUB.  As is, I get a big warning that this port is setting WRKSRC incorrectly!
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2025-04-14 12:52:56 UTC
It appears that the repository of the fork is less current than the upstream (which is now at version 2.7).  Unfortunately upstream does not provide tarballs.  To remedy this, I've cloned their SVN repository to github here:

    https://github.com/clausecker/agg

Maybe we can make use of this repository instead?  I'll try to keep it up to date.

It also has a fix for the bug I encountered:

    https://github.com/clausecker/agg/commit/b88c58b11c0bfda68090f5eff307f6b3b0a8d617
Comment 7 Dirk Meyer freebsd_committer freebsd_triage 2025-04-14 14:24:24 UTC
The distros differ for now which version or fork to use.

https://repology.org/project/agg-antigrain/versions
https://repology.org/project/agg-unclassified/versions

Homepage of the project has been removed.

newest by number: (2.8.33)
https://github.com/cppfw/agg

As 2.6 API breaks 2.4 applications.
Is the 2.6 API and 2.7 API compatible?
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2025-04-14 16:22:35 UTC
(In reply to Dirk Meyer from comment #7)

> Is the 2.6 API and 2.7 API compatible?

It seems like it, there are just two tiny commits between them; one fixes the bug I mentioned, the other bumps the library version.  Though I think it might be best to directly go to the current SVN trunk (r145) as there are a bunch of cleanup following that establish compatibility with modern compilers.

The upstream website is still available here:

https://agg.sourceforge.net/antigrain.com/news/index.html

it's just the domain that is down.  Note that r145 is from 2024-09-28, which counts as "maintained" in my book.

This whole thing is very confusing.