Add fallbacks to all common dependencies
This commit is contained in:
parent
31d448971a
commit
192c577966
|
@ -2,8 +2,7 @@ build*/
|
|||
.build*/
|
||||
lhelper/
|
||||
submodules/
|
||||
subprojects/lua*/
|
||||
subprojects/reproc/
|
||||
subprojects/*/
|
||||
/appimage*
|
||||
.ccls-cache
|
||||
.lite-debug.log
|
||||
|
|
26
meson.build
26
meson.build
|
@ -3,7 +3,10 @@ project('lite-xl',
|
|||
version : '2.0.3',
|
||||
license : 'MIT',
|
||||
meson_version : '>= 0.42',
|
||||
default_options : ['c_std=gnu11']
|
||||
default_options : [
|
||||
'c_std=gnu11',
|
||||
'wrap_mode=nofallback'
|
||||
]
|
||||
)
|
||||
|
||||
#===============================================================================
|
||||
|
@ -24,7 +27,7 @@ endif
|
|||
cc = meson.get_compiler('c')
|
||||
|
||||
lite_includes = []
|
||||
lite_cargs = []
|
||||
lite_cargs = ['-DSDL_MAIN_HANDLED', '-DPCRE2_STATIC']
|
||||
# On macos we need to use the SDL renderer to support retina displays
|
||||
if get_option('renderer') or host_machine.system() == 'darwin'
|
||||
lite_cargs += '-DLITE_USE_SDL_RENDERER'
|
||||
|
@ -47,15 +50,26 @@ if not get_option('source-only')
|
|||
libm = cc.find_library('m', required : false)
|
||||
libdl = cc.find_library('dl', required : false)
|
||||
threads_dep = dependency('threads')
|
||||
|
||||
lua_dep = dependency('lua5.4', required : false)
|
||||
if not lua_dep.found()
|
||||
lua_dep = dependency('lua', fallback: ['lua', 'lua_dep'],
|
||||
default_options: ['line_editing=false', 'default_library=static']
|
||||
default_options: ['default_library=static', 'line_editing=false', 'interpreter=false']
|
||||
)
|
||||
endif
|
||||
pcre2_dep = dependency('libpcre2-8')
|
||||
freetype_dep = dependency('freetype2')
|
||||
sdl_dep = dependency('sdl2')
|
||||
|
||||
pcre2_dep = dependency('libpcre2-8', fallback: ['pcre2', 'libpcre2_8'],
|
||||
default_options: ['default_library=static', 'grep=false', 'test=false']
|
||||
)
|
||||
|
||||
freetype_dep = dependency('freetype2', fallback: ['freetype2', 'freetype_dep'],
|
||||
default_options: ['default_library=static', 'zlib=disabled', 'bzip2=disabled', 'png=disabled', 'harfbuzz=disabled', 'brotli=disabled']
|
||||
)
|
||||
|
||||
sdl_dep = dependency('sdl2', fallback: ['sdl2', 'sdl2_dep'],
|
||||
default_options: ['default_library=static']
|
||||
)
|
||||
|
||||
lite_deps = [lua_dep, sdl_dep, freetype_dep, pcre2_dep, libm, libdl, threads_dep]
|
||||
endif
|
||||
#===============================================================================
|
||||
|
|
|
@ -63,10 +63,10 @@ main() {
|
|||
elif [[ "$OSTYPE" == "msys" ]]; then
|
||||
if [[ $lhelper == true ]]; then
|
||||
pacman --noconfirm -S \
|
||||
${MINGW_PACKAGE_PREFIX}-{gcc,meson,ninja,ntldd,pkg-config} unzip
|
||||
${MINGW_PACKAGE_PREFIX}-{gcc,meson,ninja,ntldd,pkg-config,mesa} unzip
|
||||
else
|
||||
pacman --noconfirm -S \
|
||||
${MINGW_PACKAGE_PREFIX}-{gcc,meson,ninja,ntldd,pkg-config,freetype,pcre2,SDL2} unzip
|
||||
${MINGW_PACKAGE_PREFIX}-{gcc,meson,ninja,ntldd,pkg-config,mesa,freetype,pcre2,SDL2} unzip
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <SDL.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
[wrap-file]
|
||||
directory = freetype-2.11.1
|
||||
source_url = https://download.savannah.gnu.org/releases/freetype/freetype-2.11.1.tar.gz
|
||||
source_filename = freetype-2.11.1.tar.gz
|
||||
source_hash = f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b
|
||||
|
||||
[provide]
|
||||
freetype2 = freetype_dep
|
||||
|
|
@ -3,9 +3,9 @@ directory = lua-5.4.3
|
|||
source_url = https://www.lua.org/ftp/lua-5.4.3.tar.gz
|
||||
source_filename = lua-5.4.3.tar.gz
|
||||
source_hash = f8612276169e3bfcbcfb8f226195bfc6e466fe13042f1076cbde92b7ec96bbfb
|
||||
patch_filename = lua_5.4.3-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/lua_5.4.3-1/get_patch
|
||||
patch_hash = 66794455e18d373041c8ffa9c23d1629b813c7a716f8905425d347937f5c8dc8
|
||||
patch_filename = lua_5.4.3-2_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/lua_5.4.3-2/get_patch
|
||||
patch_hash = 3c23ec14a3f000d80fe2e2fdddba63a56e13c758d74195daa4ff0da7bfdb02da
|
||||
|
||||
[provide]
|
||||
lua-5.4 = lua_dep
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
[wrap-file]
|
||||
directory = pcre2-10.39
|
||||
source_url = https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.39/pcre2-10.39.tar.bz2
|
||||
source_filename = pcre2-10.39.tar.bz2
|
||||
source_hash = 0f03caf57f81d9ff362ac28cd389c055ec2bf0678d277349a1a4bee00ad6d440
|
||||
patch_filename = pcre2_10.39-2_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.39-2/get_patch
|
||||
patch_hash = c4cfffff83e7bb239c8c330339b08f4367b019f79bf810f10c415e35fb09cf14
|
||||
|
||||
[provide]
|
||||
libpcre2-8 = -libpcre2_8
|
||||
libpcre2-16 = -libpcre2_16
|
||||
libpcre2-32 = -libpcre2_32
|
||||
libpcre2-posix = -libpcre2_posix
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
[wrap-file]
|
||||
directory = SDL2-2.0.18
|
||||
source_url = https://www.libsdl.org/release/SDL2-2.0.18.tar.gz
|
||||
source_filename = SDL2-2.0.18.tar.gz
|
||||
source_hash = 94d40cd73dbfa10bb6eadfbc28f355992bb2d6ef6761ad9d4074eff95ee5711c
|
||||
patch_filename = sdl2_2.0.18-2_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_2.0.18-2/get_patch
|
||||
patch_hash = cd77f33395d3d019bb89217b9da41fc640ed8c78cbbbebc5c662155a25e2820e
|
||||
|
||||
[provide]
|
||||
sdl2 = sdl2_dep
|
||||
|
Loading…
Reference in New Issue