Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -4274,6 +4274,7 @@
"sfml-all"
],
"versions": [
"3.1.0-1",
"3.0.2-1",
"3.0.1-1",
"2.6.2-2",
Expand Down
6 changes: 6 additions & 0 deletions subprojects/packagefiles/sfml/examples/http/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
executable(
'http',
'Http.cpp',
dependencies: sfml_dep,
override_options: override_opts,
)
6 changes: 5 additions & 1 deletion subprojects/packagefiles/sfml/examples/meson.build
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
examples_inc = include_directories('include')

subdir('ftp')
subdir('http')
subdir('sftp')
subdir('sockets')
subdir('voip')
subdir('sound')
subdir('sound_capture')
subdir('sound_device')

subdir('window')
subdir('event_handling')
subdir('opengl')
subdir('stencil')
subdir('text')

subdir('joystick')
subdir('shader')
Expand All @@ -19,7 +23,7 @@ subdir('vulkan')
if host_machine.system() == 'windows'
subdir('win32')
subdir('raw_input')
elif host_machine.system() in ['linux', 'freebsd']
elif host_machine.system() in ['linux', 'freebsd', 'openbsd']
subdir('X11')
subdir('raw_input')
elif host_machine.system() == 'darwin'
Expand Down
6 changes: 6 additions & 0 deletions subprojects/packagefiles/sfml/examples/sftp/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
executable(
'sftp',
'Sftp.cpp',
dependencies: sfml_dep,
override_options: override_opts,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
executable(
'sound_device',
'SoundDevice.cpp',
dependencies: [sfml_dep, thread_dep],
override_options: override_opts,
)
8 changes: 8 additions & 0 deletions subprojects/packagefiles/sfml/examples/text/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
subdir('resources')

executable(
'text',
'Text.cpp',
dependencies: sfml_dep,
override_options: override_opts,
)
25 changes: 25 additions & 0 deletions subprojects/packagefiles/sfml/examples/text/resources/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
fs = import('fs')

resources = [
'NotoNaskhArabic-Regular.ttf',
'NotoSerif-Regular.ttf',
'NotoSerifArmenian-Regular.ttf',
'NotoSerifDevanagari-Regular.ttf',
'NotoSerifEthiopic-Regular.ttf',
'NotoSerifGeorgian-Regular.ttf',
'NotoSerifHebrew-Regular.ttf',
'NotoSerifJP-Regular.subset.ttf',
'NotoSerifKhmer-Regular.ttf',
'NotoSerifKR-Regular.subset.ttf',
'NotoSerifMyanmar-Regular.ttf',
'NotoSerifTamil-Regular.ttf',
'NotoSerifTC-Regular.subset.ttf',
'NotoSerifThai-Regular.ttf',
'NotoSerifTibetan-Regular.ttf',
'tuffy.ttf',
]

foreach resource : resources
fs.copyfile(resource)
endforeach

13 changes: 6 additions & 7 deletions subprojects/packagefiles/sfml/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(
'sfml',
'cpp',
license: 'Zlib',
version: '3.0.2',
version: '3.1.0',
default_options: ['wrap_mode=forcefallback'],
meson_version: '>=0.64.0',
)
Expand All @@ -15,15 +15,14 @@ winmm_dep = cpp.find_library(
'winmm',
required: host_machine.system() == 'windows',
)
w32_dep = cpp.find_library(
'ws2_32',
required: host_machine.system() == 'windows',
)

stb_inc = include_directories('extlibs/headers/stb_image')
glad_inc = include_directories('extlibs/headers/glad/include')
vulkan_inc = include_directories('extlibs/headers/vulkan')
mp3_inc = include_directories('extlibs/headers/minimp3')
mp3_inc = include_directories('extlibs/headers/dr_mp3')
qoi_inc = include_directories('extlibs/headers/qoi')
wepoll_inc = include_directories('extlibs/headers/wepoll')
unicode_inc = include_directories('extlibs/headers/cpp-unicodelib')
pub_inc = include_directories('include')
priv_inc = include_directories('src')

Expand Down Expand Up @@ -56,6 +55,6 @@ sfml_dep = declare_dependency(
meson.override_dependency('sfml', sfml_dep)
meson.override_dependency('sfml-all', sfml_dep)

if get_option('examples') and build_machine.system() != 'android'
if get_option('examples')
subdir('examples')
endif
6 changes: 3 additions & 3 deletions subprojects/packagefiles/sfml/src/SFML/Audio/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ audio_cpp_args += [
audio_cpp_args += '-DMA_USE_STDINT'

miniaudio_dep = dependency('miniaudio')
flac_dep = dependency('flac')
vorbis_dep = dependency('vorbis')
flac_dep = dependency('flac', version: '>=1.5.0')
vorbis_dep = dependency('vorbis', version: '>=1.3.7')
vorbisenc_dep = dependency('vorbisenc')
vorbisfile_dep = dependency('vorbisfile')
ogg_dep = dependency('ogg')
ogg_dep = dependency('ogg', version: '>=1.3.6')

audio_lib = library(
'sfml-audio',
Expand Down
42 changes: 38 additions & 4 deletions subprojects/packagefiles/sfml/src/SFML/Graphics/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,49 @@ graphics_sources += files(
'RenderTextureImplFBO.cpp',
)

freetype_dep = dependency('freetype2')
graphics_args = []

graphics_args += get_option('default_library') != 'static' ? '-DSFML_GRAPHICS_EXPORTS' : '-DSFML_STATIC'

freetype_dep = dependency('freetype2', version: '>=2.14.3')
harfbuzz_dep = dependency(
'harfbuzz',
#version: '>=14.1.0',
default_options: [
'subset=disabled', #font subsetting and instancing library
'raster=disabled', #glyph rasterization library
'vector=disabled', #glyph vector drawing library
'gpu=disabled', #GPU rasterization library
],
)

#harfbuzz
graphics_args += [
'-DHB_DISABLE_DEPRECATED',
'-DHB_NO_ATEXIT',
'-DHB_NO_BORING_EXPANSION',
'-DHB_NO_BUFFER_MESSAGE',
'-DHB_NO_BUFFER_SERIALIZE',
'-DHB_NO_BUFFER_VERIFY',
'-DHB_NO_BITMAP',
'-DHB_NO_DRAW',
'-DHB_NO_ERRNO',
'-DHB_NO_GETENV',
'-DHB_NO_MT',
'-DHB_NO_PAINT',
'-DHB_NO_SETLOCALE',
'-DHB_OPTIMIZE_SIZE',
]

sheenbidi_dep = dependency('sheenbidi')

graphics_lib = library(
'sfml-graphics',
graphics_sources,
cpp_args: get_option('default_library') != 'static' ? '-DSFML_GRAPHICS_EXPORTS' : '-DSFML_STATIC',
include_directories: [glad_inc, pub_inc, priv_inc, stb_inc],
cpp_args: graphics_args,
include_directories: [glad_inc, pub_inc, priv_inc, stb_inc, qoi_inc],
link_with: [window_lib, system_lib],
dependencies: [gl_dep, freetype_dep],
dependencies: [gl_dep, freetype_dep, harfbuzz_dep, sheenbidi_dep],
override_options: override_opts,
install: true,
)
47 changes: 45 additions & 2 deletions subprojects/packagefiles/sfml/src/SFML/Network/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,67 @@ network_sources = files(
'@0@/SocketImpl.cpp'.format(
host_machine.system() == 'windows' ? 'Win32' : 'Unix',
),
'Dns.cpp',
'Ftp.cpp',
'Http.cpp',
'IpAddress.cpp',
'Packet.cpp',
'Sftp.cpp',
'Socket.cpp',
'SocketSelector.cpp',
'TcpListener.cpp',
'TcpSocket.cpp',
'UdpSocket.cpp',
)

network_deps = []

if host_machine.system() == 'windows'
foreach lib : ['ws2_32', 'Crypt32', 'Dnsapi']
network_win_deps += cpp.find_library(lib, required: true)
endforeach
endif

if host_machine.system() in ['linux', 'darwin']
network_deps += cpp.find_library('resolv', required: true)
endif

network_deps += [
dependency('mbedtls'),
dependency('mbedcrypto'),
dependency('mbedx509'),
dependency(
'libssh2',
default_options: [
'crypto_backend=mbedtls',
'examples=false',
],
)
]

network_inc = [pub_inc, priv_inc]

if host_machine.system() == 'windows'
network_inc += wepoll_inc
endif

network_link_args = []

if host_machine.system() == 'darwin'
network_link_args = [
'-framework Security',
'-framework CoreFoundation',
]
endif

network_lib = library(
'sfml-network',
network_sources,
cpp_args: get_option('default_library') != 'static' ? '-DSFML_NETWORK_EXPORTS' : '-DSFML_STATIC',
include_directories: [pub_inc, priv_inc],
include_directories: network_inc,
link_with: system_lib,
dependencies: w32_dep,
link_args: network_link_args,
dependencies: network_deps,
override_options: override_opts,
install: true,
)
6 changes: 3 additions & 3 deletions subprojects/packagefiles/sfml/src/SFML/System/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ system_sources = files(
'MemoryInputStream.cpp',
'Sleep.cpp',
'String.cpp',
'TimeoutWithPredicate.cpp',
'Utils.cpp',
'Vector2.cpp',
'Vector3.cpp',
'Version.cpp',
)

if host_machine.system() == 'windows'
Expand All @@ -20,7 +20,7 @@ system_lib = library(
'sfml-system',
system_sources,
cpp_args: get_option('default_library') != 'static' ? '-DSFML_SYSTEM_EXPORTS' : '-DSFML_STATIC',
include_directories: [pub_inc, priv_inc],
include_directories: [pub_inc, priv_inc, unicode_inc],
dependencies: [thread_dep, winmm_dep],
override_options: override_opts,
install: true,
Expand Down
8 changes: 4 additions & 4 deletions subprojects/sfml.wrap
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[wrap-file]
directory = SFML-3.0.2
source_url = https://github.com/SFML/SFML/archive/refs/tags/3.0.2.tar.gz
source_filename = SFML-3.0.2.tar.gz
source_hash = 0034e05f95509e5d3fb81b1625713e06da7b068f210288ce3fd67106f8f46995
directory = SFML-3.1.0
source_url = https://github.com/SFML/SFML/archive/refs/tags/3.1.0.tar.gz
source_filename = SFML-3.1.0.tar.gz
source_hash = 91209a112c2bd0bc6f4ce0d5f3e413cfb48b57c0de59f5507dc81f71b1ad7a5c
patch_directory = sfml

[provide]
Expand Down
Loading