[libgit2-glib] meson: Fix DESTDIR use in Windows
- From: Iñigo Martínez <inigomartinez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] meson: Fix DESTDIR use in Windows
- Date: Sat, 9 Feb 2019 13:01:38 +0000 (UTC)
commit 5e9bf6ddd96742209c546aa31dfdc9f6c7211266
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Mon Nov 12 13:29:40 2018 +0100
meson: Fix DESTDIR use in Windows
The use of DESTDIR in Windows produces some errors[0]. To fix this
issue a different approach has been used for paths. Instead of using
absolute paths, relative paths are used as meson does. One of this
relative paths is used along with MESON_INSTALL_DESTDIR_PREFIX to
avoid any issues.
[0] https://github.com/Alexpux/MINGW-packages/pull/4560#issuecomment-431294899
meson.build | 7 +++----
meson_python_compile.py | 4 +++-
meson_vapi_link.py | 7 ++-----
3 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/meson.build b/meson.build
index fddcb9c..3b4d2f4 100644
--- a/meson.build
+++ b/meson.build
@@ -37,11 +37,10 @@ revision = libgit2_glib_interface_age
libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
libgit2_glib_prefix = get_option('prefix')
-libgit2_glib_libdir = join_paths(libgit2_glib_prefix, get_option('libdir'))
-libgit2_glib_includedir = join_paths(libgit2_glib_prefix, get_option('includedir'))
-libgit2_glib_datadir = join_paths(libgit2_glib_prefix, get_option('datadir'))
+libgit2_glib_libdir = get_option('libdir')
+libgit2_glib_datadir = get_option('datadir')
-libgit2_glib_pkgincludedir = join_paths(libgit2_glib_includedir, libgit2_glib_api_name, meson.project_name())
+libgit2_glib_pkgincludedir = join_paths(get_option('includedir'), libgit2_glib_api_name,
meson.project_name())
gnome = import('gnome')
pkg = import('pkgconfig')
diff --git a/meson_python_compile.py b/meson_python_compile.py
index 8aff82c..1fa54ff 100644
--- a/meson_python_compile.py
+++ b/meson_python_compile.py
@@ -5,7 +5,9 @@ import subprocess
import sys
if not os.environ.get('DESTDIR'):
- libdir = sys.argv[1]
+ prefix = os.environ['MESON_INSTALL_PREFIX']
+
+ libdir = os.path.join(prefix, sys.argv[1])
print('Byte-compiling python modules...')
subprocess.call(['python', '-m', 'compileall', '-f', '-q', libdir])
diff --git a/meson_vapi_link.py b/meson_vapi_link.py
index 435cd95..eb64fd6 100644
--- a/meson_vapi_link.py
+++ b/meson_vapi_link.py
@@ -4,10 +4,7 @@ import os
import subprocess
import sys
-vapidir = os.path.join(sys.argv[1], 'vala', 'vapi')
-
-destdir = os.environ.get('DESTDIR', '')
-dest_vapidir = os.path.normpath(destdir + os.sep + vapidir)
+vapidir = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], sys.argv[1], 'vala', 'vapi')
# FIXME: meson will not track the creation of these files
# https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39
@@ -15,7 +12,7 @@ old = 'ggit-1.0'
new = 'libgit2-glib-1.0'
wd = os.getcwd()
-os.chdir(dest_vapidir)
+os.chdir(vapidir)
for ext in ['vapi', 'deps']:
src = os.path.join('{}.{}'.format(new, ext))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]