Skip to content

Commit

Permalink
a bunch of fixes, also tests work now
Browse files Browse the repository at this point in the history
  • Loading branch information
monomere committed Jul 17, 2024
1 parent 38b47f0 commit e19de49
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 39 deletions.
2 changes: 1 addition & 1 deletion glfw-examples/buildfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions glfw-examples/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
depends: * build2 >= 0.13.0
depends: * bpkg >= 0.13.0
email: [email protected] ; 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
2 changes: 1 addition & 1 deletion glfw-tests/buildfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions glfw-tests/glfwinfo.testscript
Original file line number Diff line number Diff line change
@@ -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

6 changes: 3 additions & 3 deletions glfw-tests/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
depends: * build2 >= 0.13.0
depends: * bpkg >= 0.13.0
email: [email protected] ; 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
6 changes: 3 additions & 3 deletions glfw/build/root.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion glfw/buildfile
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down
12 changes: 6 additions & 6 deletions glfw/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
# 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: [email protected] ; 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.
Expand Down
3 changes: 1 addition & 2 deletions glfw/src/buildfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 4 additions & 0 deletions packages.manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
:1
location: glfw/
:
location: glfw-tests/
:
location: glfw-examples/
15 changes: 0 additions & 15 deletions repositories.manifest
Original file line number Diff line number Diff line change
@@ -1,17 +1,2 @@
# monomere/glfw-build2
#
: 1
min-bpkg-version: 0.17.0
:
summary: glfw project repository
email: [email protected]


#:
#role: prerequisite
#location: https://pkg.cppget.org/1/stable
#trust: ...

#:
#role: prerequisite
#location: https://git.build2.org/hello/libhello.git

0 comments on commit e19de49

Please sign in to comment.