summaryrefslogtreecommitdiffstats
path: root/gpsd/gpsd-3.4-link.patch
blob: 05604eb548d5febab9b47a348b2aa5ea891a94be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- SConstruct.link	2011-10-29 13:48:53.000000000 +0200
+++ SConstruct	2012-01-02 12:18:38.400921746 +0100
@@ -768,7 +768,7 @@
                            target="gpsd",
                            sources=libgpsd_sources,
                            version=libgps_version,
-                           parse_flags=usblibs + rtlibs + bluezlibs)
+                           parse_flags=usblibs + bluezlibs + ['-lgps', '-lm'])
 
 libraries = [compiled_gpslib, compiled_gpsdlib]
 
@@ -792,8 +792,8 @@
         qtobjects.append(qt_env.SharedObject(src.split(".")[0] + '-qt', src,
                                              CC=compile_with,
                                              CFLAGS=compile_flags,
-                                             parse_flags=dbus_libs))
-    compiled_qgpsmmlib = Library(qt_env, "Qgpsmm", qtobjects, libgps_version)
+                                             parse_flags=dbus_libs + ['-lgps']))
+    compiled_qgpsmmlib = Library(qt_env, "Qgpsmm", qtobjects, libgps_version, parse_flags=dbus_libs + ['-lgps'])
     libraries.append(compiled_qgpsmmlib)
 
 # The libraries have dependencies on system libraries
@@ -830,8 +830,7 @@
 # distributions don't do implicit linking by design. See the test
 # code for implicit_link.
 #
-if not env['shared'] or not env["implicit_link"]:
-    env.MergeFlags("-lm")
+env.MergeFlags("-lm")
 
 gpsd_env = env.Clone()
 gpsd_env.MergeFlags("-pthread")
@@ -912,11 +912,11 @@
     }
 
     python_env = env.Clone()
-    vars = sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'INCLUDEPY')
+    vars = sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'VERSION', 'INCLUDEPY')
     for i in range(len(vars)):
         if vars[i] is None:
             vars[i] = ""
-    (cc, cxx, opt, basecflags, ccshared, ldshared, so_ext, includepy) = vars
+    (cc, cxx, opt, basecflags, ccshared, ldshared, so_ext, pyver, includepy) = vars
     # in case CC/CXX was set to the scan-build wrapper,
     # ensure that we build the python modules with scan-build, too
     if env['CC'] is None or env['CC'].find('scan-build') < 0:
@@ -934,6 +934,7 @@
     python_env['SHLIBSUFFIX']=so_ext
     python_env['CPPPATH'] =[includepy]
     python_env['CPPFLAGS']=basecflags + " " + opt
+    python_env['LIBS'] = ['python'+pyver, 'm']
     python_objects={}
     python_compiled_libs = {}
     for ext, sources in python_extensions.iteritems():