uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,84 @@
diff --git a/data/meson.build b/data/meson.build
index c189753..12c10cb 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -7,7 +7,7 @@ if get_option('enable-backend')
conf.set('demo_agent', '')
endif
- conf_dir = join_paths(sysconfdir, 'geoclue')
+ conf_dir = join_paths(sysconfdir_install, 'geoclue')
configure_file(output: 'geoclue.conf',
input: 'geoclue.conf.in',
configuration: conf,
@@ -16,7 +16,7 @@ if get_option('enable-backend')
conf = configuration_data()
conf.set('libexecdir', libexecdir)
conf.set('dbus_srv_user', get_option('dbus-srv-user'))
- conf.set('sysconfdir', sysconfdir)
+ conf.set('sysconfdir', sysconfdir_install)
service_dir = join_paths(datadir, 'dbus-1', 'system-services')
configure_file(output: 'org.freedesktop.GeoClue2.service',
@@ -33,7 +33,7 @@ if get_option('enable-backend')
# DBus Service policy file
dbus_service_dir = get_option('dbus-sys-dir')
if dbus_service_dir == ''
- dbus_service_dir = join_paths(sysconfdir, 'dbus-1', 'system.d')
+ dbus_service_dir = join_paths(sysconfdir_install, 'dbus-1', 'system.d')
endif
configure_file(output: 'org.freedesktop.GeoClue2.conf',
input: 'org.freedesktop.GeoClue2.conf.in',
diff --git a/demo/meson.build b/demo/meson.build
index 1427fbe..2623f16 100644
--- a/demo/meson.build
+++ b/demo/meson.build
@@ -54,7 +54,7 @@ if get_option('demo-agent')
install_dir: desktop_dir)
# Also install in the autostart directory.
- autostart_dir = join_paths(sysconfdir, 'xdg', 'autostart')
+ autostart_dir = join_paths(sysconfdir_install, 'xdg', 'autostart')
meson.add_install_script('install-file.py',
desktop_file.full_path(),
autostart_dir)
diff --git a/meson.build b/meson.build
index fde6fa3..39b7b0a 100644
--- a/meson.build
+++ b/meson.build
@@ -12,7 +12,11 @@ gclue_api_version='2.0'
datadir = join_paths(get_option('prefix'), get_option('datadir'))
includedir = join_paths(get_option('prefix'), get_option('includedir'))
libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
-sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
+if get_option('sysconfdir_install') != ''
+ sysconfdir_install = join_paths(get_option('prefix'), get_option('sysconfdir_install'))
+else
+ sysconfdir_install = get_option('sysconfdir')
+endif
localedir = join_paths(datadir, 'locale')
header_dir = 'libgeoclue-' + gclue_api_version
@@ -29,7 +33,7 @@ conf.set_quoted('PACKAGE_URL', 'https://gitlab.freedesktop.org/geoclue/geoclue/w
conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/geoclue/geoclue/issues/new')
conf.set_quoted('TEST_SRCDIR', meson.source_root() + '/data/')
conf.set_quoted('LOCALEDIR', localedir)
-conf.set_quoted('SYSCONFDIR', sysconfdir)
+conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
conf.set_quoted('MOZILLA_API_KEY', get_option('mozilla-api-key'))
conf.set10('GCLUE_USE_3G_SOURCE', get_option('3g-source'))
conf.set10('GCLUE_USE_CDMA_SOURCE', get_option('cdma-source'))
diff --git a/meson_options.txt b/meson_options.txt
index 83bc60e..b726329 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -34,6 +34,9 @@ option('systemd-system-unit-dir',
option('dbus-srv-user',
type: 'string', value: 'root',
description: 'The user (existing) as which the service will run')
+option('sysconfdir_install',
+ type: 'string', value: '',
+ description: 'sysconfdir to use during installation')
option('mozilla-api-key',
type: 'string', value: 'geoclue',
description: 'Your API key for Mozilla Location Service')

View file

@ -0,0 +1,123 @@
{ lib
, stdenv
, fetchFromGitLab
, fetchpatch
, intltool
, meson
, ninja
, pkg-config
, gtk-doc
, docbook-xsl-nons
, docbook_xml_dtd_412
, glib
, json-glib
, libsoup
, libnotify
, gdk-pixbuf
, modemmanager
, avahi
, glib-networking
, python3
, wrapGAppsHook
, gobject-introspection
, vala
, withDemoAgent ? false
}:
stdenv.mkDerivation rec {
pname = "geoclue";
version = "2.5.7";
outputs = [ "out" "dev" "devdoc" ];
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = pname;
repo = pname;
rev = version;
sha256 = "1mv1vs4q94bqkmgkj53jcsw1x31kczwydyy3r27a7fycgzmii1pj";
};
patches = [
# Fix for falling back to GeoIP when WiFi devices are not found
# https://gitlab.freedesktop.org/geoclue/geoclue/-/commit/2de651b6590087a2df2defe8f3d85b3cf6b91494
# NOTE: this should be removed when the next version is released
(fetchpatch {
url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/2de651b6590087a2df2defe8f3d85b3cf6b91494.patch";
sha256 = "hv7t2Hmpv2oDXiPWA7JpYD9q+cuuk+En/lJJickvFII=";
})
# Make the Mozilla API key configurable
# https://gitlab.freedesktop.org/geoclue/geoclue/merge_requests/54 (only partially backported)
(fetchpatch {
url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/95c9ad4dc176860c85a07d0db4cb4179929bdb54.patch";
sha256 = "/lq/dLBJl2vf16tt7emYoTtXY6iUw+4s2XcABUHp3Kc=";
})
(fetchpatch {
url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/1a00809a0d89b0849a57647c878d192354247a33.patch";
sha256 = "6FuiukgFWg2cEKt8LlKP4E0rfSH/ZQgk6Ip1mGJpNFQ=";
})
./add-option-for-installation-sysconfdir.patch
];
nativeBuildInputs = [
pkg-config
intltool
meson
ninja
wrapGAppsHook
python3
vala
gobject-introspection
# devdoc
gtk-doc
docbook-xsl-nons
docbook_xml_dtd_412
];
buildInputs = [
glib
json-glib
libsoup
avahi
] ++ lib.optionals withDemoAgent [
libnotify gdk-pixbuf
] ++ lib.optionals (!stdenv.isDarwin) [
modemmanager
];
propagatedBuildInputs = [
glib
glib-networking
];
mesonFlags = [
"-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
"-Ddemo-agent=${lib.boolToString withDemoAgent}"
"--sysconfdir=/etc"
"-Dsysconfdir_install=${placeholder "out"}/etc"
"-Dmozilla-api-key=5c28d1f4-9511-47ff-b11a-2bef80fc177c"
"-Ddbus-srv-user=geoclue"
"-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
] ++ lib.optionals stdenv.isDarwin [
"-D3g-source=false"
"-Dcdma-source=false"
"-Dmodem-gps-source=false"
"-Dnmea-source=false"
];
postPatch = ''
chmod +x demo/install-file.py
patchShebangs demo/install-file.py
'';
meta = with lib; {
broken = stdenv.isDarwin;
description = "Geolocation framework and some data providers";
homepage = "https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home";
maintainers = with maintainers; [ raskin ];
platforms = with platforms; linux ++ darwin;
license = licenses.lgpl2;
};
}