aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-04-06 12:16:40 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-04-06 12:27:32 +0200
commitdf3fa0563deef01b0b569761e2ddb2a03f3aae09 (patch)
tree8d9d32e5c2f3744d100937d7c74b7119b7145ab5
parente1670c4262f7d7c0963bd7f94415f040755789c7 (diff)
downloadsherlock.lv2-df3fa0563deef01b0b569761e2ddb2a03f3aae09.tar.xz
fixes for meson and CI
-rw-r--r--.gitlab-ci.yml8
-rw-r--r--VERSION2
-rwxr-xr-xdocker_build.sh9
-rw-r--r--meson.build58
-rw-r--r--meson/arm-linux-gnueabihf2
-rw-r--r--meson/i686-w64-mingw322
-rw-r--r--meson/x86_64-w64-mingw322
-rw-r--r--sherlock.ttl (renamed from sherlock.ttl.in)0
-rw-r--r--sherlock_ui.ttl (renamed from sherlock_ui.ttl.in)0
9 files changed, 54 insertions, 29 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 89b6757..95888d3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,7 +7,7 @@ stages:
variables:
BASE_NAME: "sherlock.lv2"
PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig:/usr/lib/${CI_BUILD_NAME}/pkgconfig"
- TOOLCHAIN_FILE: "${CI_PROJECT_DIR}/meson/${CI_BUILD_NAME}"
+ TOOLCHAIN_FILE: "meson/${CI_BUILD_NAME}"
.common_template: &common_definition
<<: *variables_definition
@@ -20,9 +20,11 @@ stages:
.build_template: &build_definition
<<: *common_definition
script:
- - meson --prefix="/" --libdir="lib" --cross-file "${TOOLCHAIN_FILE}" build
+ - meson --prefix="/opt/${CI_BUILD_NAME}" --libdir="lib" --cross-file "${TOOLCHAIN_FILE}" build
- ninja -C build
- - DESTDIR="${CI_PROJECT_DIR}/${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}" ninja -C build install
+ - ninja -C build install
+ - mkdir -p "${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/${BASE_NAME}"
+ - cp -r "/opt/${CI_BUILD_NAME}/lib/lv2/${BASE_NAME}/" "${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/"
.universal_linux_template: &universal_linux_definition
image: ventosus/universal-linux-gnu
diff --git a/VERSION b/VERSION
index 799b4c9..1a4ce11 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.17.121
+0.17.125
diff --git a/docker_build.sh b/docker_build.sh
index 04dbd5a..9da1be1 100755
--- a/docker_build.sh
+++ b/docker_build.sh
@@ -1,17 +1,20 @@
#!/bin/bash
-CI_PROJECT_DIR=$(pwd)
+BASE_NAME="sherlock.lv2"
CI_BUILD_NAME=$1
CI_BUILD_DIR="build-${CI_BUILD_NAME}"
PKG_CONFIG_PATH="/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig:/usr/lib/${CI_BUILD_NAME}/pkgconfig"
-TOOLCHAIN_FILE="${CI_PROJECT_DIR}/meson/${CI_BUILD_NAME}"
+TOOLCHAIN_FILE="meson/${CI_BUILD_NAME}"
rm -rf ${CI_BUILD_DIR}
PKG_CONFIG_PATH=${PKG_CONFIG_PATH} meson \
- --prefix="/" \
+ --prefix="/opt/${CI_BUILD_NAME}" \
--libdir="lib" \
--cross-file ${TOOLCHAIN_FILE} ${CI_BUILD_DIR}
ninja -C ${CI_BUILD_DIR}
ninja -C ${CI_BUILD_DIR} install
+
+mkdir -p "${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/${BASE_NAME}"
+cp -r "/opt/${CI_BUILD_NAME}/lib/lv2/${BASE_NAME}/" "${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/"
diff --git a/meson.build b/meson.build
index 92d0b8c..1b9a935 100644
--- a/meson.build
+++ b/meson.build
@@ -5,15 +5,12 @@ project('sherlock.lv2', 'c', default_options : [
'b_lto=true',
'c_std=c11'])
-add_project_arguments('-D_GNU_SOURCE', language : 'c')
-add_project_arguments('-DPUGL_HAVE_GL', language : 'c')
-
-conf_data = configuration_data()
cc = meson.get_compiler('c')
m_dep = cc.find_library('m')
lv2_dep = dependency('lv2', version : '>=1.14.0')
-sratom_dep = dependency('sratom-0', version : '>=0.6.0', static : true)
+sratom_dep = dependency('sratom-0', version : '>=0.6.0',
+ static : meson.is_cross_build())
dsp_deps = [m_dep, lv2_dep]
ui_deps = [m_dep, lv2_dep, sratom_dep]
@@ -28,26 +25,40 @@ inst_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name())
rawvers = run_command('cat', 'VERSION').stdout().strip()
version = rawvers.split('.')
+
+conf_data = configuration_data()
conf_data.set('MAJOR_VERSION', version[0])
conf_data.set('MINOR_VERSION', version[1])
conf_data.set('MICRO_VERSION', version[2])
add_project_arguments('-DSHERLOCK_VERSION="'+rawvers+'"', language : 'c')
+add_project_arguments('-D_GNU_SOURCE', language : 'c')
+add_project_arguments('-DPUGL_HAVE_GL', language : 'c')
flex = find_program('flex')
-
lgen = generator(flex,
output : '@PLAINNAME@.c',
arguments : ['--prefix=enc', '-o', '@OUTPUT@', '@INPUT@'])
+cp = find_program('cp')
+clone = [cp, '@INPUT@', '@OUTPUT@']
+
lfiles = lgen.process('encoder.l')
+dsp_srcs = ['sherlock.c',
+ 'atom_inspector.c',
+ 'midi_inspector.c',
+ 'osc_inspector.c']
+
ui_srcs = ['sherlock_nk.c',
'atom_inspector_nk.c',
'midi_inspector_nk.c',
'osc_inspector_nk.c',
lfiles]
+c_args = ['-fvisibility=hidden',
+ '-ffast-math']
+
if host_machine.system() == 'linux'
conf_data.set('UI_TYPE', 'X11UI')
ui_deps += dependency('gl')
@@ -64,18 +75,14 @@ elif host_machine.system() == 'windows'
elif host_machine.system() == 'darwin'
#add_languages('objc')
conf_data.set('UI_TYPE', 'CocoaUI')
- ui_deps += cc.find_library('Cocoa')
+ #ui_deps += cc.find_library('Cocoa')
#ui_deps += cc.find_library('gl')
#ui_deps += dependency('appleframeworks', modules : 'cocoa')
- ui_srcs += 'pugl/pugl/pugl_osx.m'
+ #ui_srcs += 'pugl/pugl/pugl_osx.m'
endif
-mod = shared_module('sherlock',
- 'sherlock.c',
- 'atom_inspector.c',
- 'midi_inspector.c',
- 'osc_inspector.c',
- c_args : ['-fvisibility=hidden', '-ffast-math'],
+mod = shared_module('sherlock', dsp_srcs,
+ c_args : c_args,
include_directories : inc_dir,
name_prefix : '',
dependencies : dsp_deps,
@@ -83,7 +90,7 @@ mod = shared_module('sherlock',
install_dir : inst_dir)
ui = shared_module('sherlock_nk', ui_srcs,
- c_args : ['-fvisibility=hidden', '-ffast-math'],
+ c_args : c_args,
include_directories : inc_dir,
name_prefix : '',
dependencies : ui_deps,
@@ -97,11 +104,24 @@ configure_file(input : 'manifest.ttl.in', output : 'manifest.ttl',
configuration : conf_data,
install : true,
install_dir : inst_dir)
-configure_file(input : 'sherlock.ttl.in', output : 'sherlock.ttl',
- configuration : conf_data,
+
+custom_target('dsp_ttl',
+ input : 'sherlock.ttl',
+ output : 'sherlock.ttl',
+ command : clone,
install : true,
install_dir : inst_dir)
-configure_file(input : 'sherlock_ui.ttl.in', output : 'sherlock_ui.ttl',
- configuration : conf_data,
+
+custom_target('ui_ttl',
+ input : 'sherlock_ui.ttl',
+ output : 'sherlock_ui.ttl',
+ command : clone,
+ install : true,
+ install_dir : inst_dir)
+
+custom_target('font',
+ input : join_paths('nuklear', 'extra_font', 'Cousine-Regular.ttf'),
+ output : 'Cousine-Regular.ttf',
+ command : clone,
install : true,
install_dir : inst_dir)
diff --git a/meson/arm-linux-gnueabihf b/meson/arm-linux-gnueabihf
index 6d0ea7b..241266e 100644
--- a/meson/arm-linux-gnueabihf
+++ b/meson/arm-linux-gnueabihf
@@ -6,7 +6,7 @@ endian = 'little'
[binaries]
c = '/usr/bin/arm-linux-gnueabihf-gcc'
-cpp = '/usr/bin/arm-linux-gnueabihf-cpp'
+cpp = '/usr/bin/arm-linux-gnueabihf-g++'
ar = '/usr/bin/arm-linux-gnueabihf-ar'
strip = '/usr/bin/arm-linux-gnueabihf-strip'
pkgconfig = '/usr/bin/pkg-config'
diff --git a/meson/i686-w64-mingw32 b/meson/i686-w64-mingw32
index 3cb44ac..4966ba7 100644
--- a/meson/i686-w64-mingw32
+++ b/meson/i686-w64-mingw32
@@ -6,7 +6,7 @@ endian = 'little'
[binaries]
c = '/usr/bin/i686-w64-mingw32-gcc'
-cpp = '/usr/bin/i686-w64-mingw32-c++'
+cpp = '/usr/bin/i686-w64-mingw32-g++'
ar = '/usr/bin/i686-w64-mingw32-ar'
strip = '/usr/bin/i686-w64-mingw32-strip'
pkgconfig = '/usr/bin/pkg-config'
diff --git a/meson/x86_64-w64-mingw32 b/meson/x86_64-w64-mingw32
index 77dd3a5..40c8a32 100644
--- a/meson/x86_64-w64-mingw32
+++ b/meson/x86_64-w64-mingw32
@@ -6,7 +6,7 @@ endian = 'little'
[binaries]
c = '/usr/bin/x86_64-w64-mingw32-gcc'
-cpp = '/usr/bin/x86_64-w64-mingw32-c++'
+cpp = '/usr/bin/x86_64-w64-mingw32-g++'
ar = '/usr/bin/x86_64-w64-mingw32-ar'
strip = '/usr/bin/x86_64-w64-mingw32-strip'
pkgconfig = '/usr/bin/pkg-config'
diff --git a/sherlock.ttl.in b/sherlock.ttl
index c8dab15..c8dab15 100644
--- a/sherlock.ttl.in
+++ b/sherlock.ttl
diff --git a/sherlock_ui.ttl.in b/sherlock_ui.ttl
index 78b62dd..78b62dd 100644
--- a/sherlock_ui.ttl.in
+++ b/sherlock_ui.ttl