logo

overlay

My own overlay for experimentations, use with caution, no support is provided

gdbus-codegen-2.56.1-sitedir.patch (1898B)


      1 From 9eaaa76e2e36e46a43dbd419724696fd7ff8ea64 Mon Sep 17 00:00:00 2001
      2 From: =?UTF-8?q?R=C3=A9mi=20Cardona?= <remi@gentoo.org>
      3 Date: Sat, 14 Apr 2018 09:55:22 +0200
      4 Subject: [PATCH 1/2] gdbus-codegen-2.54.3-sitedir.patch
      5 
      6 ---
      7  gio/gdbus-2.0/codegen/gdbus-codegen.in | 28 --------------------------
      8  1 file changed, 28 deletions(-)
      9 
     10 diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in
     11 index 67d367543..190afa28f 100755
     12 --- a/gdbus-codegen.in
     13 +++ b/gdbus-codegen.in
     14 @@ -20,36 +20,8 @@
     15  # Author: David Zeuthen <davidz@redhat.com>
     16  
     17  
     18 -import os
     19  import sys
     20  
     21 -srcdir = os.getenv('UNINSTALLED_GLIB_SRCDIR', None)
     22 -filedir = os.path.dirname(__file__)
     23 -
     24 -if srcdir is not None:
     25 -    path = os.path.join(srcdir, 'gio', 'gdbus-2.0')
     26 -elif os.path.basename(filedir) == 'bin':
     27 -    # Make the prefix containing gdbus-codegen 'relocatable' at runtime by
     28 -    # adding /some/prefix/bin/../share/glib-2.0 to the python path
     29 -    path = os.path.join(filedir, '..', 'share', 'glib-2.0')
     30 -else:
     31 -    # Assume that the modules we need are in the current directory and add the
     32 -    # parent directory to the python path.
     33 -    path = os.path.join(filedir, '..')
     34 -
     35 -# Canonicalize, then do further testing
     36 -path = os.path.abspath(path)
     37 -
     38 -# If the above path detection failed, use the hard-coded datadir. This can
     39 -# happen when, for instance, bindir and datadir are not in the same prefix or
     40 -# on Windows where we cannot make any guarantees about the directory structure.
     41 -#
     42 -# In these cases our installation cannot be relocatable, but at least we should
     43 -# be able to find the codegen module.
     44 -if not os.path.isfile(os.path.join(path, 'codegen', 'codegen_main.py')):
     45 -    path = os.path.join('@DATADIR@', 'glib-2.0')
     46 -
     47 -sys.path.insert(0, path)
     48 -from codegen import codegen_main
     49 +from gdbus_codegen import codegen_main
     50  
     51  sys.exit(codegen_main.codegen_main())
     52 -- 
     53 2.17.0
     54