Author: tack
Date: Mon Jan 15 18:03:07 2007
New Revision: 2398

Modified:
   trunk/base/src/distribution/core.py
   trunk/display/setup.py

Log:
Add extra_libraries kwarg to check_cc() and compile() methods; fix
kaa.display setup.py to use this for checking dfb evas engine.


Modified: trunk/base/src/distribution/core.py
==============================================================================
--- trunk/base/src/distribution/core.py (original)
+++ trunk/base/src/distribution/core.py Mon Jan 15 18:03:07 2007
@@ -181,9 +181,18 @@
         return True, version
 
 
-    def compile(self, includes, code='', args=''):
+    def compile(self, includes, code='', args='', extra_libraries = []):
         ext_args = [ "-L%s" % x for x in self.library_dirs ]
         ext_args += [ "-I%s" % x for x in self.include_dirs ]
+
+        for lib in extra_libraries:
+            if isinstance(lib, basestring):
+                lib = get_library(lib)
+            for dir in lib.library_dirs:
+                ext_args.append("-L%s" % dir)
+            for dir in lib.include_dirs:
+                ext_args.append("-I%s" % dir)
+
         if compile(includes, code, args + ' %s' % ' '.join(ext_args)):
             self.valid = True
             return True
@@ -296,13 +305,13 @@
         return False
 
 
-    def check_cc(self, includes, code='', args=''):
+    def check_cc(self, includes, code='', args='', extra_libraries = []):
         """
         Check the given code with the linker. The optional parameter args
         can contain additional command line options like -l.
         """
         ext_args = []
-        for lib in self.library_objects:
+        for lib in self.library_objects + extra_libraries:
             for dir in lib.library_dirs:
                 ext_args.append("-L%s" % dir)
             for dir in lib.include_dirs:
@@ -504,7 +513,7 @@
     kwargs['cmdclass']['build_py'] = build_py
     kwargs['cmdclass']['ebuild'] = GentooEbuild
 
-    if sys.argv[1] == 'bdist_rpm':
+    if len(sys.argv) > 1 and sys.argv[1] == 'bdist_rpm':
         dist = None
         release = "1"
         if '--dist' in sys.argv:

Modified: trunk/display/setup.py
==============================================================================
--- trunk/display/setup.py      (original)
+++ trunk/display/setup.py      Mon Jan 15 18:03:07 2007
@@ -135,7 +135,7 @@
     # the dfb so module
     dfb = Extension('kaa.display._DFBmodule', [ 'src/dfb.c', 'src/common.c'] )
     dfb.add_library('directfb')
-    if evas and evas.compile(['<Evas.h>', '<Evas_Engine_DirectFB.h>']):
+    if evas and evas.compile(['<Evas.h>', '<Evas_Engine_DirectFB.h>'], 
extra_libraries = ['directfb']):
         print "+ DirectFB (evas)"
         dfb.add_library('evas')
         config.define('ENABLE_ENGINE_DIRECTFB')

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to