From 611bd13f970bb44d068782a24c0d5c6af1a5cb65 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Sun, 4 Mar 2018 21:44:46 +0100 Subject: [PATCH 1/4] Make Tinyendian easy to use as Meson subproject --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index 104b4f2..417fff5 100644 --- a/meson.build +++ b/meson.build @@ -25,3 +25,9 @@ pkgc.generate(name: 'tinyendian', version: project_version, description: 'Lightweight endianness library for D.' ) + +# Make Tinyendian easy to use as subproject +tinyendian_dep = declare_dependency( + link_with: tinyendian_lib, + include_directories: [src_dir] +) From 36dbe8064aa213d92e6bea00a577df094d07b553 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Sun, 4 Mar 2018 21:58:47 +0100 Subject: [PATCH 2/4] Modernize Meson file --- meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 417fff5..0d6d1aa 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,8 @@ -project('tinyendian', 'd', meson_version: '>=0.40.0') +project('tinyendian', 'd', + meson_version: '>=0.40', + version: '0.1.2' +) -project_version = '0.1.2' project_soversion = '0' src_dir = include_directories('source/') @@ -15,14 +17,14 @@ tinyendian_lib = static_library('tinyendian', [tinyendian_src], include_directories: [src_dir], install: true, - version: project_version, + version: meson.project_version(), soversion: project_soversion, pic: true ) pkgc.generate(name: 'tinyendian', libraries: tinyendian_lib, subdirs: 'd/', - version: project_version, + version: meson.project_version(), description: 'Lightweight endianness library for D.' ) From ae9671c7acf9d80e0b757a65e2ed1b2e90c7dd9c Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Sun, 4 Mar 2018 21:59:07 +0100 Subject: [PATCH 3/4] trivial: Update Travis definition --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 07e01a0..3041135 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,13 +13,14 @@ d: - ldc-beta before_install: + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv global system 3.6; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja python3; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip3 install meson; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip3 install meson; fi install: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir .ntmp && curl -L https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip -o .ntmp/ninja-linux.zip; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir .ntmp && curl -L https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip -o .ntmp/ninja-linux.zip; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then unzip .ntmp/ninja-linux.zip -d .ntmp; fi before_script: From e35b5d1b9ae7e40c81ba5775289553e87db844f5 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Mon, 5 Mar 2018 15:46:34 +0100 Subject: [PATCH 4/4] travis: Make MacOS build work again --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3041135..ecf1d2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,8 @@ d: before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv global system 3.6; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja python3; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip3 install meson; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip3 install meson; fi