[gobject-introspection/gnome-3-20] build/win32/pc_base.py: Allow custom options



commit 5e5e20f30dfce8f1372970f3d8166ee5beaf50ab
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Apr 21 19:19:08 2016 +0800

    build/win32/pc_base.py: Allow custom options
    
    Some packages might have some parts that are built for certain build
    configs, meaning that they could have .pc files of their own, such as
    Pango, where PangoFT2 is optionally built.  Allow such an option if
    needed.
    
    Also remove some trailing whitespaces.

 build/win32/pc_base.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/build/win32/pc_base.py b/build/win32/pc_base.py
index 80f9884..da10560 100644
--- a/build/win32/pc_base.py
+++ b/build/win32/pc_base.py
@@ -26,17 +26,18 @@ class BasePCItems:
         self.top_srcdir = self.srcdir + '\\..\\..'
         self.version = ''
 
-    def setup(self, argv):
-        parser = argparse.ArgumentParser(description='Setup basic .pc file info')
+    def setup(self, argv, parser=None):
+        if parser is None:
+            parser = argparse.ArgumentParser(description='Setup basic .pc file info')
         parser.add_argument('--prefix', help='prefix of the installed library',
                             required=True)
-        parser.add_argument('--exec-prefix', 
+        parser.add_argument('--exec-prefix',
                             help='prefix of the installed programs, \
                                   if different from the prefix')
-        parser.add_argument('--includedir', 
+        parser.add_argument('--includedir',
                             help='includedir of the installed library, \
                                   if different from ${prefix}/include')
-        parser.add_argument('--libdir', 
+        parser.add_argument('--libdir',
                             help='libdir of the installed library, \
                                   if different from ${prefix}/lib')
         parser.add_argument('--version', help='Version of the package',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]