Page MenuHomeFreeBSD

graphics/glfw: add patches to support running applications such as Minecraft with games/lwjgl3
ClosedPublic

Authored by vvd on Mar 24 2024, 5:10 PM.
Tags
Referenced Files
Unknown Object (File)
Fri, Jun 7, 2:54 PM
Unknown Object (File)
Thu, Jun 6, 5:34 PM
Unknown Object (File)
Tue, Jun 4, 3:07 AM
Unknown Object (File)
Tue, May 28, 7:02 PM
Unknown Object (File)
May 13 2024, 1:34 PM
Unknown Object (File)
May 12 2024, 2:27 AM
Unknown Object (File)
May 11 2024, 6:07 PM
Unknown Object (File)
May 5 2024, 7:21 PM
Subscribers
None

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

vvd requested review of this revision.Mar 24 2024, 5:10 PM
vvd created this revision.

Hello,

My first impression is that adding 14 upstream patches to a port based on a release is not good.
We usually use patches to fix something and in this case we are promoting glfw -> glfw-devel.

My sugestion is to create a glfw-devel so we can use devel features in ports that needs it.

Hello,

My first impression is that adding 14 upstream patches to a port based on a release is not good.
We usually use patches to fix something and in this case we are promoting glfw -> glfw-devel.

My sugestion is to create a glfw-devel so we can use devel features in ports that needs it.

But in this case, you will not be able to install both on the same host.
This problem can be solved by using USES and default version. Is this port so popular that it makes sense to make a USES for it?

This problem can be solved by using USES and default version. Is this port so popular that it makes sense to make a USES for it?

Can't get it, could you explain better or add an example?

This problem can be solved by using USES and default version. Is this port so popular that it makes sense to make a USES for it?

Can't get it, could you explain better or add an example?

Ok, I follow it.

You talking about having USES (Mk/Uses/) feature.
IMO I don't think it have a requisite of popularity to be able to use USES feature, take for example:

Mk/Uses/makeself.mk that is used by port archivers/makeself to unpack itself.

Let's explore all possibilities to have a release and devel port working at same time.

Create USES=glfw with option devel: USES=glfw:devel.
If user want to use glfw:devel then he must set DEFAULT_VERSIONS+=glfw=devel.
In default configuration lwjgl3 is broken - it's bad.
I forgot that a lot of users use pkg instead of build from ports.
Same issue if add option with EXTRAPATCHES to the port.

Myabe flavour can help.

Myabe flavour can help.

flavors will have same problem as separated ports since they cannot be installed both in same system.

Myabe flavour can help.

flavors will have same problem as separated ports since they cannot be installed both in same system.

Yes, but they co-exist in prebuilded pkg repos.
Can they replace each other? During build - yes, but if installed as packages? I don't know - never used pakages.

Today on ports@ I have read something that might be applicable to this case:

That would be the case with two slave ports and a master port too.
But flavors would allow me to consolidate everything into a single
port. Can you use FLAVOR to pick a different PORTVERSION? If that's
possible a v4 and v5 'flavor' (with the default on v4) sounds good
too. Do you know of a port that I could look at?

Technically, you are not obliged to use upstream version for PORTVERSION.
Take a look at security/gost-engine. It uses different upstream branches
being built with openssl-1.1.1 or openssl-3.0.x, hence different PORTVERSION.

$ make -VPORTVERSION FLAVOR=base # in case of FreeBSD 13
g20220520
$ make -VPORTVERSION FLAVOR=openssl30
g20230106

i.e., default and devel flavor. ports needing devel depends on @devel the other ports on @default (release)
We need to take a look at security/gost-engine port.

Simple way to introduce specific devel features avoiding master/slave and flavors ports.

lgtm

This revision is now accepted and ready to land.Apr 20 2024, 3:28 PM

It fails if EXAMPLES and PREEDIT both on (both are non-default).
Patch:

diff -ur graphics/glfw/Makefile.orig graphics/glfw/Makefile
--- graphics/glfw/Makefile.orig
+++ graphics/glfw/Makefile
@@ -10,7 +10,7 @@
 LICENSE=       ZLIB
 LICENSE_FILE=  ${WRKSRC}/LICENSE.md

-USES=          cmake:insource localbase zip
+USES=          cmake:insource localbase:ldflags zip
 USE_LDCONFIG=  yes

 CMAKE_ON=      BUILD_SHARED_LIBS
@@ -30,6 +30,7 @@
 PLATFORM_DESC=         Window creation platform
 PREEDIT_DESC=          Add patches for run Minecraft (https://github.com/glfw/glfw/pull/2130)

+EXAMPLES_BUILD_DEPENDS=  fontconfig>0:x11-fonts/fontconfig
 EXAMPLES_CMAKE_BOOL=   GLFW_BUILD_EXAMPLES GLFW_BUILD_TESTS

 # Patches to support running applications such as Minecraft with games/lwjgl3

Nice catch, please commit it.
+ bump port revision