From 592f8ed316840cf10235a777ff3281d9f1d78f9b Mon Sep 17 00:00:00 2001 From: Denis Feklushkin Date: Thu, 8 Feb 2024 08:10:48 +0300 Subject: [PATCH] removes Meson files --- meson.build | 119 ----------------------------------- meson_options.txt | 8 --- source/eventcore/meson.build | 92 --------------------------- 3 files changed, 219 deletions(-) delete mode 100644 meson.build delete mode 100644 meson_options.txt delete mode 100644 source/eventcore/meson.build diff --git a/meson.build b/meson.build deleted file mode 100644 index 94377e92..00000000 --- a/meson.build +++ /dev/null @@ -1,119 +0,0 @@ -project('eventcore', 'd', - meson_version: '>=0.53', - version: '0.9.13', -) - -project_soversion = '0' -project_version_suffix = '' -project_version = meson.project_version() -project_version_full = project_version + project_version_suffix - -taggedalgebraic_dep = dependency('taggedalgebraic', version: ['>=0.10.12', '<0.12']) - -eventcore_build_versions = [] -eventcore_extra_deps = [] - -default_driver = 'select' -host_system = host_machine.system() - -host_is_posix = false -host_is_osx = false -host_is_windows = false -host_is_bsd = false -host_is_linux = false - -# Determine the default driver if 'driver' was not explicitly set -if host_system == 'linux' - host_is_linux = true - host_is_posix = true -elif host_system == 'windows' - host_is_windows = true -elif host_system == 'dragonfly' or host_system == 'freebsd' or host_system == 'netbsd' or host_system == 'openbsd' - host_is_bsd = true - host_is_posix = true -else - # What are we running on? - default_driver = 'generic' -endif - -if host_is_linux - default_driver = 'epoll' -elif host_is_osx - default_driver = 'cfrunloop' -elif host_is_windows - default_driver = 'winapi' -elif host_is_bsd - default_driver = 'kqueue' -elif host_is_posix - default_driver = 'select' -endif - -# Optional dependencies -libasync_dep = dependency('libasync', version: '~>0.8.2', required: false) -gaia_dep = dependency('anl', required: get_option('use_gaia')) - -# Driver logic -driver_opt = get_option('driver') -if driver_opt == 'auto' - driver_opt = default_driver -endif - -if driver_opt == 'epoll' - if not host_is_linux - error('epoll driver is only supported on Linux') - endif - eventcore_build_versions += ['EventcoreEpollDriver'] - if gaia_dep.found() - eventcore_extra_deps += [gaia_dep] - eventcore_build_versions += ['EventcoreUseGAIA'] - endif -elif driver_opt == 'cfrunloop' - if not host_is_osx - error('cfrunloop driver is only supported on OSX') - endif - eventcore_build_versions += ['EventcoreCFRunLoopDriver'] -elif driver_opt == 'kqueue' - if not host_is_bsd - error('kqueue driver is only supported on BSD variants (including OSX)') - endif - eventcore_build_versions += ['EventcoreKqueueDriver'] -elif driver_opt == 'winapi' - if not host_is_windows - error('winapi driver is only supported on Windows') - endif - eventcore_build_versions += ['EventcoreWinAPIDriver'] -elif driver_opt == 'select' - if not (host_is_posix or host_is_windows) - error('select driver is only supported on POSIX-like systems and Windows') - endif - eventcore_build_versions += ['EventcoreSelectDriver'] -elif driver_opt == 'libasync' - if not libasync_dep.found() - error('libasync could not be found, but is required for the libasync driver') - endif - eventcore_build_versions += ['EventcoreLibasyncDriver'] - eventcore_extra_deps += [libasync_dep] -elif driver_opt == 'generic' - # Defines eventDriver as the generic EventDriver interface. Setup must be done manually. -else - error('No combination of driver and compatible host machine OS specified') -endif - -summary( - { - 'Chosen driver': driver_opt, - 'Default driver': default_driver, - 'Using GAIA': gaia_dep.found() - }, - bool_yn: true -) - - -source_root = meson.source_root() -build_root = meson.build_root() -subdir('source/eventcore') - -eventcore_dep = declare_dependency( - include_directories: include_directories('source'), - link_with: eventcore_lib -) diff --git a/meson_options.txt b/meson_options.txt deleted file mode 100644 index 23b54924..00000000 --- a/meson_options.txt +++ /dev/null @@ -1,8 +0,0 @@ -option('driver', - type: 'combo', - choices: ['epoll', 'cfrunloop', 'kqueue', 'winapi', 'select', 'libasync', 'generic', 'auto'], - value: 'auto', - description: 'Which async backend driver to use', - yield: true -) -option('use_gaia', type: 'feature', value: 'auto') diff --git a/source/eventcore/meson.build b/source/eventcore/meson.build deleted file mode 100644 index 8e07191f..00000000 --- a/source/eventcore/meson.build +++ /dev/null @@ -1,92 +0,0 @@ -eventcore_src = [ - 'core.d', - 'driver.d', - 'drivers/libasync.d', - 'drivers/posix/cfrunloop.d', - 'drivers/posix/dns.d', - 'drivers/posix/driver.d', - 'drivers/posix/epoll.d', - 'drivers/posix/events.d', - 'drivers/posix/kqueue.d', - 'drivers/posix/pipes.d', - 'drivers/posix/processes.d', - 'drivers/posix/select.d', - 'drivers/posix/signals.d', - 'drivers/posix/sockets.d', - 'drivers/posix/watchers.d', - 'drivers/threadedfile.d', - 'drivers/timer.d', - 'drivers/winapi/core.d', - 'drivers/winapi/dns.d', - 'drivers/winapi/driver.d', - 'drivers/winapi/events.d', - 'drivers/winapi/files.d', - 'drivers/winapi/pipes.d', - 'drivers/winapi/processes.d', - 'drivers/winapi/signals.d', - 'drivers/winapi/sockets.d', - 'drivers/winapi/watchers.d', - 'internal/consumablequeue.d', - 'internal/corefoundation.d', - 'internal/dlist.d', - 'internal/ioworker.d', - 'internal/utils.d', - 'internal/win32.d', - 'socket.d', -] - -eventcore_lib = library( - 'eventcore', - eventcore_src, - version: project_version, - install: true, - include_directories: include_directories('../'), - dependencies: [taggedalgebraic_dep, eventcore_extra_deps], - d_module_versions: eventcore_build_versions -) - -pkgc = import('pkgconfig') - -pkgc.generate( - eventcore_lib, - subdirs: 'd/eventcore', - d_module_versions: eventcore_build_versions -) - -# This is using install_subdir instead of install_headers, since -# install_headers flattens the headers directory, it turns -# ├ ... -# ├ driver.d -# ├ drivers -# │ ├ libasync.d -# │ ├ ... -# │ └ winapi -# │ └ ... -# ├ ... -# └ socket.d -# -# into -# -# ├ ... -# ├ drivers.d -# ├ libasync.d -# ├ ... -# └ socket.d -# - -install_subdir( - '../', - install_dir: 'include/d/eventcore/eventcore', -) - -test_exe = executable( - 'eventcore_test', - eventcore_src, - include_directories: include_directories('../'), - d_unittest: true, - d_args: meson.get_compiler('d').unittest_args(), - link_args: '-main', - dependencies: taggedalgebraic_dep, -) - -test('test_eventcore', test_exe)