gpsd-3.15-dynamic-libs.patch 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. From ac48583654e97ef04e8cbb52c2ae77a617c7add3 Mon Sep 17 00:00:00 2001
  2. From: Mike Frysinger <vapier@gentoo.org>
  3. Date: Sun, 7 Jun 2015 01:08:39 -0400
  4. Subject: [PATCH] reenable dynamic libs
  5. Upstream decided to staticly link their own programs against their libs
  6. instead of using the shared ones. Restore dynamic linking to save space
  7. and such.
  8. ---
  9. SConstruct | 64 ++++++++++++++++++++++++++++++++++----------------------------
  10. 1 file changed, 35 insertions(+), 29 deletions(-)
  11. diff --git a/SConstruct b/SConstruct
  12. index 28cebf0..a050f38 100644
  13. --- a/SConstruct
  14. +++ b/SConstruct
  15. @@ -961,6 +961,9 @@ if qt_env:
  16. gpsflags = ["-lm"] + rtlibs + dbusflags
  17. gpsdflags = usbflags + bluezflags + gpsflags
  18. +gpslibs = ["-lgps"] + gpsflags
  19. +gpsdlibs = ["-lgpsd"] + gpsdflags + gpslibs
  20. +
  21. # Source groups
  22. gpsd_sources = ['gpsd.c','timehint.c', 'shmexport.c','dbusexport.c']
  23. @@ -983,38 +986,41 @@ gpsmon_sources = [
  24. ## Production programs
  25. gpsd = env.Program('gpsd', gpsd_sources,
  26. - LIBS=['gpsd', 'gps_static'], LIBPATH='.',
  27. - parse_flags=gpsdflags+gpsflags)
  28. + LIBS=['gpsd'], parse_flags=gpsdflags+gpslibs)
  29. +env.Depends(gpsd, [compiled_gpslib])
  30. +
  31. gpsdecode = env.Program('gpsdecode', ['gpsdecode.c'],
  32. - LIBS=['gpsd', 'gps_static'], LIBPATH='.',
  33. - parse_flags=gpsdflags+gpsflags)
  34. + LIBS=['gpsd'], parse_flags=gpsdflags+gpslibs)
  35. +env.Depends(gpsdecode, [compiled_gpslib])
  36. +
  37. gpsctl = env.Program('gpsctl', ['gpsctl.c'],
  38. - LIBS=['gpsd', 'gps_static'], LIBPATH='.',
  39. - parse_flags=gpsdflags+gpsflags)
  40. + LIBS=['gpsd'], parse_flags=gpsdflags+gpslibs)
  41. +env.Depends(gpsctl, [compiled_gpslib])
  42. +
  43. gpsmon = env.Program('gpsmon', gpsmon_sources,
  44. - LIBS=['gpsd', 'gps_static'], LIBPATH='.',
  45. - parse_flags=gpsdflags + gpsflags + ncurseslibs)
  46. -gpsdctl = env.Program('gpsdctl', ['gpsdctl.c'],
  47. - LIBS=['gps_static'], LIBPATH='.',
  48. - parse_flags=gpsflags)
  49. -gpspipe = env.Program('gpspipe', ['gpspipe.c'],
  50. - LIBS=['gps_static'], LIBPATH='.',
  51. - parse_flags=gpsflags)
  52. -gps2udp = env.Program('gps2udp', ['gps2udp.c'],
  53. - LIBS=['gps_static'], LIBPATH='.',
  54. - parse_flags=gpsflags)
  55. -gpxlogger = env.Program('gpxlogger', ['gpxlogger.c'],
  56. - LIBS=['gps_static'], LIBPATH='.',
  57. - parse_flags=gpsflags)
  58. -lcdgps = env.Program('lcdgps', ['lcdgps.c'],
  59. - LIBS=['gps_static'], LIBPATH='.',
  60. - parse_flags=gpsflags)
  61. -cgps = env.Program('cgps', ['cgps.c'],
  62. - LIBS=['gps_static'], LIBPATH='.',
  63. - parse_flags=gpsflags + ncurseslibs)
  64. -ntpshmmon = env.Program('ntpshmmon', ['ntpshmmon.c'],
  65. - LIBS=['gps_static'], LIBPATH='.',
  66. - parse_flags=gpsflags)
  67. + LIBS=['gpsd'], parse_flags=gpsdflags+gpslibs + ncurseslibs)
  68. +env.Depends(gpsmon, [compiled_gpslib])
  69. +
  70. +gpsdctl = env.Program('gpsdctl', ['gpsdctl.c'], parse_flags=gpslibs)
  71. +env.Depends(gpsdctl, compiled_gpslib)
  72. +
  73. +gpspipe = env.Program('gpspipe', ['gpspipe.c'], parse_flags=gpslibs)
  74. +env.Depends(gpspipe, compiled_gpslib)
  75. +
  76. +gps2udp = env.Program('gps2udp', ['gps2udp.c'], parse_flags=gpslibs)
  77. +env.Depends(gps2udp, compiled_gpslib)
  78. +
  79. +gpxlogger = env.Program('gpxlogger', ['gpxlogger.c'], parse_flags=gpslibs)
  80. +env.Depends(gpxlogger, compiled_gpslib)
  81. +
  82. +lcdgps = env.Program('lcdgps', ['lcdgps.c'], parse_flags=gpslibs)
  83. +env.Depends(lcdgps, compiled_gpslib)
  84. +
  85. +cgps = env.Program('cgps', ['cgps.c'], parse_flags=gpslibs + ncurseslibs)
  86. +env.Depends(cgps, compiled_gpslib)
  87. +
  88. +ntpshmmon = env.Program('ntpshmmon', ['ntpshmmon.c'], parse_flags=gpslibs)
  89. +env.Depends(ntpshmmon, compiled_gpslib)
  90. binaries = [gpsd, gpsdecode, gpsctl, gpsdctl, gpspipe, gps2udp, gpxlogger, lcdgps, ntpshmmon]
  91. if env["ncurses"]:
  92. --
  93. 2.4.1