Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftgl: Fix builds with freetype 2.13.3 #27288

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

halostatue
Copy link
Contributor

Description

Based on research into this issue, freetype 2.13.3 changed some return types that caused current (modern?) builds to fail as seen in the linked ticket.

A patch was applied with frankheckenbach/ftgl#20 that appears to fix this, but the repo owner has not indicated a plan to cut a new release with this and other fixes since v2.4.0.

In addition to the patch files that were previously present, I have applied all other patches from v2.4.0 to current HEAD. This involved removing the existing patch files, but those changes have been fully incorporated.

Builds with +doc and +universal variants worked fine and I have tested a downstream port (gource) with this on an affected system.

Closes: https://trac.macports.org/ticket/71434

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 15.2 24C101 arm64
Xcode 16.2 16C5032a

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL in commit message?
  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vs install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

Copy link
Contributor

@ryandesign ryandesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You seem to be making a lot of changes here that have nothing to do with the goal of fixing the build with the latest freetype.

For example, you've combined the existing patchfiles AC_ARG_WITH.patch and dylib_file.patch into a new file autoconf.patch, in the process deleting the commentary at the top that explained the purpose of those patches.

You've added a patch CMakeLists-pkgconfig.patch that makes changes to the cmake build system, but the port uses autoconf, not cmake.

You've added an empty patchfile fontdemo.patch.

You've added a patch debian.patch that changes files in the debian directory, which, not being Debian, MacPorts doesn't use.

In another patch, you added a new script ftgl-release which the developers of ftgl use to make releases. We are not the developers of ftgl so we have no use for this script.

And of course you have the workaround for the empty-named distfile being added, which I believe can be removed because I think it was caused by having an extra backslash at the end of one of the patchfile lines in the version of the code proposed in the ticket; the version of the code in this PR doesn't have that error.

I'd appreciate a more targeted PR that fixes just the problem at hand and doesn't make a bunch of unrelated unnecessary changes. Incorporating additional useful upstream fixes is ok but I would omit changes that do not affect us.

@halostatue

This comment was marked as outdated.

@halostatue

This comment was marked as outdated.

@halostatue halostatue force-pushed the ftgl-build branch 2 times, most recently from b68aa0c to 92594ff Compare January 22, 2025 02:41
@halostatue
Copy link
Contributor Author

@ryandesign What needs to happen to move this fix forward? I’ve adjusted the patches so that:

  1. anyone can follow the same procedure that I did to add new ones for the future (documented in the portfile) since the upstream appears to get PRs but seems unlikely to get another release
  2. they do not touch anything that macports doesn't use (the only questionable one is patch 10, but I don't know the project to know if demo files aren't used for testing).

My goal with being able to get this through is to install gource (which, because I can build this branch on my local system, I can, but others may want to do so as well).

Based on research into this issue, freetype 2.13.3 changed some return
types that caused current (modern?) builds to fail as seen in the linked
ticket.

A patch was applied with frankheckenbach/ftgl#20 that appears to fix
this, but the repo owner has not indicated a plan to cut a new release
with this and other fixes since v2.4.0.

In addition to the patch files that were previously present, I have
applied all other patches from v2.4.0 to current HEAD. This involved
removing the existing patch files, but those changes have been fully
incorporated.

Builds with +doc and +universal variants worked fine and I have tested
a downstream port (gource) with this on an affected system.

macOS 15.2 24C101 arm64
Xcode 16.2 16C5032a

Closes: https://trac.macports.org/ticket/71434
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants