1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-30 00:47:45 +00:00

Ports: Remove LibGL workarounds

Now that ports can find our OpenGL headers and shared library, remove
all configuration and patches that was previously needed to make ports
compile with LibGL.
This commit is contained in:
Jelle Raaijmakers 2024-02-21 16:33:13 +01:00 committed by Tim Schumacher
parent 857ab2e06d
commit b2eaed43e9
24 changed files with 48 additions and 157 deletions

View file

@ -9,10 +9,9 @@ configopts=(
"--cross-file=${SERENITY_BUILD_DIR}/meson-cross-file.txt"
"--prefix=${SERENITY_INSTALL_ROOT}/usr/local"
'-Dbuildtype=release'
'-Dgl_provider=gl'
)
export CPPFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/include/LibGL"
configure() {
run meson setup "${configopts[@]}" build
}

View file

@ -1,37 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jelle Raaijmakers <jelle@gmta.nl>
Date: Sun, 11 Feb 2024 22:25:59 +0100
Subject: [PATCH] Build: Manually find LibGL
We don't have a working pkgconfig to find it, so get rid of it and
manually find the library using the C compiler.
---
meson.build | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/meson.build b/meson.build
index 7949e300ac60e0ff6955dedfd9a050cfa3010f4a..18dd4f497e7a43be3e36915bb5430e8891a3a9fb 100644
--- a/meson.build
+++ b/meson.build
@@ -18,7 +18,8 @@ gl_provider = get_option('gl_provider')
if gl_provider == 'glvnd'
gl_provider = 'opengl'
endif
-dep_gl = dependency(gl_provider)
+cc = meson.get_compiler('c')
+dep_gl = cc.find_library('gl', has_headers : 'GL/gl.h')
inc_include = include_directories('include')
@@ -28,11 +29,3 @@ install_headers(
'include/GL/glu.h',
subdir : 'GL',
)
-
-pkgconf = import('pkgconfig')
-pkgconf.generate(
- libglu,
- name : 'glu',
- description : 'Mesa OpenGL Utility Library',
- requires: dep_gl
-)

View file

@ -0,0 +1,27 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jelle Raaijmakers <jelle@gmta.nl>
Date: Sun, 11 Feb 2024 22:25:59 +0100
Subject: [PATCH] Build: Remove pkgconfig
We can't use pkgconfig here since the OpenGL dependency we find is
incompatible with it as an argument.
---
meson.build | 8 --------
1 file changed, 8 deletions(-)
diff --git a/meson.build b/meson.build
index 7949e300ac60e0ff6955dedfd9a050cfa3010f4a..eed52aea0419aa4efa7ae6d4e71cac4bc28a7b79 100644
--- a/meson.build
+++ b/meson.build
@@ -28,11 +28,3 @@ install_headers(
'include/GL/glu.h',
subdir : 'GL',
)
-
-pkgconf = import('pkgconfig')
-pkgconf.generate(
- libglu,
- name : 'glu',
- description : 'Mesa OpenGL Utility Library',
- requires: dep_gl
-)

View file

@ -1,11 +1,11 @@
# Patches for glu on SerenityOS
## `0001-Build-Manually-find-LibGL.patch`
## `0001-Build-Remove-pkgconfig.patch`
Build: Manually find LibGL
Build: Remove pkgconfig
We don't have a working pkgconfig to find it, so get rid of it and
manually find the library using the C compiler.
We can't use pkgconfig here since the OpenGL dependency we find is
incompatible with it as an argument.
## `0002-Build-Do-not-hide-symbols-by-default.patch`