From e19de49584185aecb83c0b8237747405b43fe4b2 Mon Sep 17 00:00:00 2001 From: monomere <139407889+monomere@users.noreply.github.com> Date: Wed, 17 Jul 2024 14:24:37 +0300 Subject: [PATCH] a bunch of fixes, also tests work now --- glfw-examples/buildfile | 2 +- glfw-examples/manifest | 6 +++--- glfw-tests/buildfile | 2 +- glfw-tests/glfwinfo.testscript | 7 +++---- glfw-tests/manifest | 6 +++--- glfw/build/root.build | 6 +++--- glfw/buildfile | 2 +- glfw/manifest | 12 ++++++------ glfw/src/buildfile | 3 +-- packages.manifest | 4 ++++ repositories.manifest | 15 --------------- 11 files changed, 26 insertions(+), 39 deletions(-) diff --git a/glfw-examples/buildfile b/glfw-examples/buildfile index 158206c..44de978 100644 --- a/glfw-examples/buildfile +++ b/glfw-examples/buildfile @@ -27,7 +27,7 @@ exe{particles}: libue{tinycthread} libue{getopt} c.poptions += "-I$src_root/deps/" exe{*}: install = false -c.loptions += "-lm" +c.libs += "-lm" if ($c.target.class == 'windows') c.poptions += -D_CRT_SECURE_NO_WARNINGS diff --git a/glfw-examples/manifest b/glfw-examples/manifest index 6f35d96..8306289 100644 --- a/glfw-examples/manifest +++ b/glfw-examples/manifest @@ -7,8 +7,8 @@ license: Zlib description-file: README.md url: https://www.glfw.org package-url: https://github.com/Swat-SomeBug/glfw.git -email: swat.somebug@gmail.com -depends: * build2 >= 0.13.0 -depends: * bpkg >= 0.13.0 +email: packaging@build2.org ; Mailing list. +depends: * build2 >= 0.17.0 +depends: * bpkg >= 0.17.0 requires: ; OpengGL libraries. Usually installed with system or SDK on Windows. requires: ; X11 and Wayland when building for Linux diff --git a/glfw-tests/buildfile b/glfw-tests/buildfile index e1f22c4..ea11293 100644 --- a/glfw-tests/buildfile +++ b/glfw-tests/buildfile @@ -40,7 +40,7 @@ exe{monitors}: testscript{monitors} c.poptions += "-I$src_root/deps/" exe{*}: install = false -c.loptions += "-lm" +c.libs += -lm if ($c.target.class == 'windows') c.poptions += -D_CRT_SECURE_NO_WARNINGS diff --git a/glfw-tests/glfwinfo.testscript b/glfw-tests/glfwinfo.testscript index 25868f2..ee4668b 100644 --- a/glfw-tests/glfwinfo.testscript +++ b/glfw-tests/glfwinfo.testscript @@ -1,7 +1,6 @@ : GLFWVERSION_TEST $* --version >>~%EOM% -GLFW header version: 3.4 -GLFW library version: 3.4 -%GLFW library version string: \"3\.4.+% +GLFW header version: 3.4.0 +GLFW library version: 3.4.0 +%GLFW library version string: \"3\.4\.0.+% EOM - diff --git a/glfw-tests/manifest b/glfw-tests/manifest index e4e0e10..6860b67 100644 --- a/glfw-tests/manifest +++ b/glfw-tests/manifest @@ -7,8 +7,8 @@ license: Zlib description-file: README.md url: https://www.glfw.org package-url: https://github.com/Swat-SomeBug/glfw.git -email: swat.somebug@gmail.com -depends: * build2 >= 0.13.0 -depends: * bpkg >= 0.13.0 +email: packaging@build2.org ; Mailing list. +depends: * build2 >= 0.17.0 +depends: * bpkg >= 0.17.0 requires: ; OpengGL/Vulkan libraries. Usually installed with system or SDK on Windows. requires: ; X11 when building for Linux diff --git a/glfw/build/root.build b/glfw/build/root.build index 6ac918f..1409a39 100644 --- a/glfw/build/root.build +++ b/glfw/build/root.build @@ -18,11 +18,11 @@ config [bool] config.glfw.usewayland ?= true config [bool] config.glfw.usex11 ?= true config [bool] config.glfw.usehybridhpg ?= false -linux = ($tcls == 'linux') -unix = ($tcls == 'freebsd' || $tcls == 'linux') win32 = ($tcls == 'windows') cocoa = ($tcls == 'macos') +linux = ($tcls == 'linux') +unix = ($tcls == 'freebsd' || $tcls == 'linux') build_wayland = ($unix && $config.glfw.usewayland) -build_x11 = ($unix && $config.glfw.usex11) +build_x11 = ($unix && $config.glfw.usex11) hybridhpg = ($win32 && $config.glfw.usehybridhpg) diff --git a/glfw/buildfile b/glfw/buildfile index 1185629..9b2e670 100644 --- a/glfw/buildfile +++ b/glfw/buildfile @@ -1,4 +1,4 @@ -./: {src/} doc{README.md} legal{LICENSE.md} manifest +./: {*/ -build/ -deps/} doc{README.md} legal{LICENSE.md} manifest # Don't install tests. # diff --git a/glfw/manifest b/glfw/manifest index 6eb4e09..4cc546d 100644 --- a/glfw/manifest +++ b/glfw/manifest @@ -5,12 +5,12 @@ summary: GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES an license: Zlib description-file: README.md url: https://www.glfw.org -package-url: https://github.com/monomere/glfw-build2.git -email: monomere@duck.com -# tests: glfw-tests == $ -# examples: glfw-examples == $ -depends: * build2 >= 0.16.0 -depends: * bpkg >= 0.16.0 +package-url: https://github.com/build2-packaging/glfw.git +email: packaging@build2.org ; Mailing list. +tests: glfw-tests == $ +examples: glfw-examples == $ +depends: * build2 >= 0.17.0 +depends: * bpkg >= 0.17.0 builds: -freebsd build-exclude: macos*-gcc** ; GCC not supported on macos -> Cannot parse Cocoa requires: ; OpengGL/Vulkan libraries. Usually installed with system or SDK on Windows. diff --git a/glfw/src/buildfile b/glfw/src/buildfile index 2efc09d..5db063a 100644 --- a/glfw/src/buildfile +++ b/glfw/src/buildfile @@ -82,10 +82,9 @@ if ($cocoa) gl_libs += -framework Cocoa -framework IOKit -framework CoreFoundation } -wayland_protos = $src_base/../deps/wayland - if ($build_wayland) { + wayland_protos = $src_base/../deps/wayland c.poptions += -D_GLFW_WAYLAND -D_DEFAULT_SOURCE gl_libs += -lrt -lm -ldl -lwayland-client -lwayland-cursor -lwayland-egl -lpthread import! scanner = wayland-scanner%exe{wayland-scanner} diff --git a/packages.manifest b/packages.manifest index f115268..683f726 100644 --- a/packages.manifest +++ b/packages.manifest @@ -1,2 +1,6 @@ :1 location: glfw/ +: +location: glfw-tests/ +: +location: glfw-examples/ diff --git a/repositories.manifest b/repositories.manifest index 21c4ece..93c0c27 100644 --- a/repositories.manifest +++ b/repositories.manifest @@ -1,17 +1,2 @@ -# monomere/glfw-build2 -# : 1 -min-bpkg-version: 0.17.0 -: summary: glfw project repository -email: monomere@duck.com - - -#: -#role: prerequisite -#location: https://pkg.cppget.org/1/stable -#trust: ... - -#: -#role: prerequisite -#location: https://git.build2.org/hello/libhello.git