diff --git a/.gitmodules b/.gitmodules index 83769058b1..dd558f464c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,27 +1,27 @@ -[submodule "subprojects/softfloat3"] - path = subprojects/softfloat3 - url = https://github.com/urbit/berkeley-softfloat-3.git -[submodule "subprojects/ed25519"] - path = subprojects/ed25519 - url = https://github.com/urbit/ed25519.git -[submodule "subprojects/libscrypt"] - path = subprojects/libscrypt - url = https://github.com/urbit/libscrypt.git -[submodule "subprojects/murmur3"] - path = subprojects/murmur3 - url = https://github.com/urbit/murmur3.git -[submodule "subprojects/libuv"] - path = subprojects/libuv - url = https://github.com/urbit/libuv.git -[submodule "subprojects/h2o"] - path = subprojects/libh2o - url = https://github.com/urbit/h2o.git [submodule "subprojects/argon2"] path = subprojects/argon2 url = https://github.com/urbit/argon2.git -[submodule "subprojects/secp256k1"] - path = subprojects/secp256k1 - url = https://github.com/urbit/secp256k1.git +[submodule "subprojects/ed25519"] + path = subprojects/ed25519 + url = https://github.com/urbit/ed25519.git +[submodule "subprojects/h2o"] + path = subprojects/libh2o + url = https://github.com/urbit/h2o.git +[submodule "subprojects/libuv"] + path = subprojects/libuv + url = https://github.com/urbit/libuv.git +[submodule "subprojects/libscrypt"] + path = subprojects/libscrypt + url = https://github.com/urbit/libscrypt.git [submodule "subprojects/libsni"] path = subprojects/libsni url = https://github.com/urbit/sniproxy +[submodule "subprojects/murmur3"] + path = subprojects/murmur3 + url = https://github.com/urbit/murmur3.git +[submodule "subprojects/secp256k1"] + path = subprojects/secp256k1 + url = https://github.com/urbit/secp256k1.git +[submodule "subprojects/softfloat3"] + path = subprojects/softfloat3 + url = https://github.com/urbit/berkeley-softfloat-3.git diff --git a/meson.build b/meson.build index e1da8d14e1..523ac3b258 100644 --- a/meson.build +++ b/meson.build @@ -242,22 +242,17 @@ conf_data.set('U3_MEMORY_DEBUG', get_option('gc')) conf_data.set('U3_CPU_DEBUG', get_option('prof')) conf_data.set('U3_EVENT_TIME_DEBUG', get_option('event-time')) -osdet = build_machine.system() +osdet = host_machine.system() +cc = meson.get_compiler('c') os_c_flags = ['-funsigned-char','-ffast-math'] -os_deps = [] +os_deps = [dependency('threads')] os_link_flags = [] if osdet == 'linux' conf_data.set('U3_OS_linux', true) - if(legacy_meson) - pthread_dep = find_library('pthread') - else - pthread_dep = meson.get_compiler('c').find_library('pthread') - endif - ncurses_dep = dependency('ncurses') - os_deps = os_deps + [pthread_dep, ncurses_dep] + os_deps = os_deps + [ncurses_dep] elif osdet == 'darwin' conf_data.set('U3_OS_osx', true) @@ -267,7 +262,7 @@ elif osdet == 'darwin' if(legacy_meson) ncurses_dep = find_library('ncurses') else - ncurses_dep = meson.get_compiler('c').find_library('ncurses') + ncurses_dep = cc.find_library('ncurses') endif os_deps = os_deps + [ncurses_dep] @@ -275,10 +270,9 @@ elif osdet == 'darwin' elif osdet == 'bsd' or osdet == 'freebsd' conf_data.set('U3_OS_bsd', true) - pthread_dep = meson.get_compiler('c').find_library('pthread') - kvm_dep = meson.get_compiler('c').find_library('kvm') + kvm_dep = cc.find_library('kvm') ncurses_dep = dependency('ncurses') - os_deps = os_deps + [kvm_dep, pthread_dep, ncurses_dep] + os_deps = os_deps + [kvm_dep, ncurses_dep] elif osdet == 'openbsd' conf_data.set('U3_OS_bsd', true) @@ -290,7 +284,7 @@ else error('Unsupported OS detected:' + osdet) endif -endian = build_machine.endian() +endian = host_machine.endian() if endian == 'little' conf_data.set('U3_OS_ENDIAN_little', true) @@ -305,9 +299,10 @@ configure_file(input : 'include/config.h.in', # We expect these libs to supplied with the distribution curl_dep = dependency('libcurl', version: '>=7.19.0') -if osdet == 'darwin' and not get_option('nix') - libcrypto = meson.get_compiler('c').find_library('crypto', dirs: [ '/usr/local/opt/openssl/lib/' ]) - libssl = meson.get_compiler('c').find_library('ssl', dirs: [ '/usr/local/opt/openssl/lib/' ]) +if (osdet == 'darwin' and not get_option('nix') and + run_command('test', '-d', '/usr/local/opt/openssl/lib').returncode() == 0) + libcrypto = cc.find_library('crypto', dirs: [ '/usr/local/opt/openssl/lib/' ]) + libssl = cc.find_library('ssl', dirs: [ '/usr/local/opt/openssl/lib/' ]) openssl_dep = declare_dependency(dependencies: [libcrypto, libssl], include_directories: include_directories('/usr/local/opt/openssl/include')) else openssl_dep = dependency('openssl', version: '>=1.0.0') @@ -317,36 +312,36 @@ if(legacy_meson) gmp_dep = find_library('gmp') sigsegv_dep = find_library('sigsegv') elif osdet != 'openbsd' - gmp_dep = meson.get_compiler('c').find_library('gmp') - sigsegv_dep = meson.get_compiler('c').find_library('sigsegv') + # XX on OS X with MacPorts, set LIBRARY_PATH=/opt/local/lib to get meson to + # find these. + gmp_dep = cc.find_library('gmp') + sigsegv_dep = cc.find_library('sigsegv') endif # For these libs we provide fallback bundle -urbitscrypt_dep = dependency('libscrypt', version: '>=0.1.21', fallback: ['libscrypt', 'libscrypt_dep']) - -ed25519_dep = dependency('ed25519', version: '>=0.1.0', fallback: ['ed25519', 'ed25519_dep']) -murmur3_dep = dependency('murmur3', version: '>=0.1.0', fallback: ['murmur3', 'murmur3_dep']) -softfloat3_dep = dependency('softfloat3', version: '>=3.0.0', fallback: ['softfloat3', 'softfloat3_dep']) -libuv_dep = dependency('libuv', version: '>=1.8.0', fallback:['libuv', 'libuv_dep']) -libh2o_dep = dependency('libh2o', version: '>=0.13.3', fallback: ['libh2o', 'libh2o_dep']) argon2_dep = dependency('argon2', version: '>=1', fallback: ['argon2', 'argon2_dep']) -secp256k1_dep = dependency('libsecp256k1', version: '>=0.1.0', fallback: ['secp256k1', 'secp256k1_dep']) - +ed25519_dep = dependency('ed25519', version: '>=0.1.0', fallback: ['ed25519', 'ed25519_dep']) +libh2o_dep = dependency('libh2o', version: '>=0.13.3', fallback: ['libh2o', 'libh2o_dep']) +libscrypt_dep = dependency('libscrypt', version: '>=0.1.21', fallback: ['libscrypt', 'libscrypt_dep']) libsni_dep = dependency('libsni', version: '>=0.5.0', fallback: ['libsni', 'libsni_dep']) +libuv_dep = dependency('libuv', version: '>=1.8.0', fallback:['libuv', 'libuv_dep']) +murmur3_dep = dependency('murmur3', version: '>=0.1.0', fallback: ['murmur3', 'murmur3_dep']) +secp256k1_dep = dependency('libsecp256k1', version: '>=0.1.0', fallback: ['secp256k1', 'secp256k1_dep']) +softfloat3_dep = dependency('softfloat3', version: '>=3.0.0', fallback: ['softfloat3', 'softfloat3_dep']) -deps = [openssl_dep, +deps = [argon2_dep, curl_dep, - libuv_dep, - libh2o_dep, - secp256k1_dep, - gmp_dep, - sigsegv_dep, - urbitscrypt_dep, ed25519_dep, + gmp_dep, + libh2o_dep, + libscrypt_dep, + libsni_dep, + libuv_dep, murmur3_dep, - argon2_dep, - softfloat3_dep, - libsni_dep] + openssl_dep, + secp256k1_dep, + sigsegv_dep, + softfloat3_dep] executable('urbit', sources : sources, diff --git a/subprojects/libh2o b/subprojects/libh2o index 3b1f53c86b..0ed9ac7075 160000 --- a/subprojects/libh2o +++ b/subprojects/libh2o @@ -1 +1 @@ -Subproject commit 3b1f53c86b71f6fdc099b3b378de6f379b4b8412 +Subproject commit 0ed9ac70757a16ec45f91b8a347850d9699c3fb1 diff --git a/subprojects/libuv b/subprojects/libuv index 0c3a346a60..6429495dc9 160000 --- a/subprojects/libuv +++ b/subprojects/libuv @@ -1 +1 @@ -Subproject commit 0c3a346a60f0b3bb42445b2c63198a6e0f94c89b +Subproject commit 6429495dc9a80aaf1c243038b381451f12bc7dcf diff --git a/subprojects/secp256k1 b/subprojects/secp256k1 index 87f73ffad3..b4e8798651 160000 --- a/subprojects/secp256k1 +++ b/subprojects/secp256k1 @@ -1 +1 @@ -Subproject commit 87f73ffad3d3047baf1ed134fb7827a9dca163ee +Subproject commit b4e87986511e01ea6477838dc686cc7c08c3c8c9