aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2020-04-08 10:31:58 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2020-04-08 10:31:58 +0200
commitb486ec3157aea83641f72dd040a58e1f95fb7098 (patch)
tree4c954d49ff3ddb92d66d5d40f303cba26e1f9c69
parente3de433739d0854402972bbbb45edb37bc3f7057 (diff)
downloadsherlock.lv2-b486ec3157aea83641f72dd040a58e1f95fb7098.tar.xz
meson: introduce lv2libdir option.
-rw-r--r--.gitlab-ci.yml15
-rw-r--r--VERSION2
-rw-r--r--meson.build12
-rw-r--r--meson_options.txt3
4 files changed, 19 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d0b3cfc..f6fa3a3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,16 +4,16 @@ stages:
.variables_template: &variables_definition
variables:
- BASE_NAME: "sherlock.lv2"
PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig:/usr/lib/${CI_BUILD_NAME}/pkgconfig"
+ BUILD_OPTS: ""
.common_template: &common_definition
<<: *variables_definition
stage: build
artifacts:
- name: "${BASE_NAME}-$(cat VERSION)-${CI_BUILD_NAME}"
+ name: "${CI_PROJECT_NAME}-$(cat VERSION)-${CI_BUILD_NAME}"
paths:
- - "${BASE_NAME}-$(cat VERSION)/"
+ - "${CI_PROJECT_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/"
.build_template: &build_definition
<<: *common_definition
@@ -21,12 +21,11 @@ stages:
- export PATH="/opt/lv2/bin:$PATH"
- sed -i -e '/Libs.private/d' "/opt/${CI_BUILD_NAME}/lib/pkgconfig/serd-0.pc"
script:
- - meson --prefix="/opt/${CI_BUILD_NAME}" --libdir="lib" --cross-file "${CI_BUILD_NAME}" build
+ - meson --prefix="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-$(cat VERSION)/${CI_BUILD_NAME}" -Dlv2libdir="" --cross-file "${CI_BUILD_NAME}" "${BUILD_OPTS}" build
- sed -i -e '/framework/s/-Wl,-O1//g' -e '/framework/s/-Wl,--start-group//g' -e '/framework/s/-Wl,--end-group//g' -e '/framework/s/-Wl,-soname,.*dylib//g' build/build.ninja
- ninja -C build
+ - ninja -C build test
- 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_stretch: &universal_linux_definition_stretch
image: ventosus/universal-linux-gnu:stretch
@@ -112,6 +111,6 @@ pack:
script:
- echo 'packing up...'
artifacts:
- name: "${BASE_NAME}-$(cat VERSION)"
+ name: "${CI_PROJECT_NAME}-$(cat VERSION)"
paths:
- - "${BASE_NAME}-$(cat VERSION)/"
+ - "${CI_PROJECT_NAME}-$(cat VERSION)/"
diff --git a/VERSION b/VERSION
index f302267..f9ba506 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.21.13
+0.21.19
diff --git a/meson.build b/meson.build
index 685ce9c..9ab7511 100644
--- a/meson.build
+++ b/meson.build
@@ -3,13 +3,20 @@ project('sherlock.lv2', 'c', default_options : [
'warning_level=1',
'werror=false',
'b_lto=false',
- 'c_std=c11'])
+ 'c_std=gnu11'])
nk_pugl = subproject('nk_pugl')
+
+lv2libdir = get_option('lv2libdir')
+
+inst_dir = join_paths(lv2libdir, meson.project_name())
+
nk_pugl_dep = nk_pugl.get_variable('nk_pugl_gl')
cousine_regular_ttf = nk_pugl.get_variable('cousine_regular_ttf')
+source_root = meson.source_root()
build_root = meson.build_root()
+
static_link = meson.is_cross_build()
cc = meson.get_compiler('c')
@@ -27,8 +34,6 @@ ser_inc = include_directories('ser_atom.lv2')
nk_pugl_inc = include_directories(join_paths('subprojects', 'nk_pugl'))
inc_dir = [props_inc, osc_inc, ser_inc, nk_pugl_inc]
-inst_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name())
-
rawvers = run_command('cat', 'VERSION').stdout().strip()
version = rawvers.split('.')
@@ -39,7 +44,6 @@ 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,
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..8a007bd
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,3 @@
+option('lv2libdir',
+ type : 'string',
+ value : 'lib/lv2')