Skip to content

Please add GLFW #64

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

Open
mohawk2 opened this issue Mar 27, 2025 · 4 comments
Open

Please add GLFW #64

mohawk2 opened this issue Mar 27, 2025 · 4 comments

Comments

@mohawk2
Copy link
Contributor

mohawk2 commented Mar 27, 2025

As discussed on StrawberryPerl/Perl-Dist-Strawberry#233 (comment)

Would it be possible to include a compiled version of GLFW in Strawberry, at least the PDL edition? I intend soon to switch PDL::Graphics::TriD to use that. It would then be possible (at least for PDL purposes) to drop FreeGLUT, though again on current plans there would need to be an overlap with both.

@shawnlaffan
Copy link
Contributor

The build is relatively straightforward. Extract from build.sh diff below as notes.

Still need to sort out the license files and any other special packing needs.

+glfw-3*)
+cd $WRKDIR/$PACK
+#  zip file has on extra dir
+cd $PACK
+sed -i "s/set(GLFW_LIB_NAME glfw3)/set(GLFW_LIB_NAME glfw3${DLLSUFFIX})/" src/CMakeLists.txt
+
+mkdir _build
+cd _build
+
+xxrun cmake -G 'MSYS Makefiles' -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF -DCMAKE_INSTALL_PREFIX=$OUT ..
+xxrun make
+xxrun make install
+
+;;
+

@mohawk2
Copy link
Contributor Author

mohawk2 commented Apr 3, 2025

If it helps, it's on nuget at https://www.nuget.org/packages/glfw/ - there's a Chocolatey package too but of a 10-year-old version. The licencing stuff I just went through with Debian packaging, see https://salsa.debian.org/perl-team/modules/packages/libopengl-glfw-perl/-/blob/debian/latest/debian/copyright?ref_type=heads

What I'm actually after is that the CPAN library OpenGL::GLFW also be bundled in Strawberry, since we'll be switching to use that.

@shawnlaffan
Copy link
Contributor

Thanks. The license note concerns setting up the packaging script to find the correct license file and include it in the zip file.

I can look at packaging OpenGL::GLFW once this is sorted.

@mohawk2
Copy link
Contributor Author

mohawk2 commented Apr 11, 2025

Further notes: PDL::Graphics::TriD now depends on OpenGL::GLFW so a PDL edition would need this executed.

Also for Windows, I made this update to the CI using vcpkg to build/install GLFW, which with the right tweaks to install stuff (including the .pc file) into the Strawberry build directory would probably provide a pattern for simplifying a lot of extlib stuff: Perl-GPU/devops@f7a60a8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants