vamos-0.8.2-fix-buildsystem.patch 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. Fix buildsystem:
  2. * Prevent pollution of python site-packages root dir
  3. * Fix underlinking in modules
  4. * Remove broken AX_* macros
  5. * Add workaround for parallel install issue with automake
  6. --- a/body/Makefile.am
  7. +++ b/body/Makefile.am
  8. @@ -21,6 +21,10 @@
  9. Tire.cc \
  10. Transmission.cc \
  11. Wheel.cc
  12. +libvamos_body_la_LIBADD = \
  13. + -l$(BOOST_PYTHON_LIB) \
  14. + ../geometry/libvamos-geometry.la \
  15. + ../media/libvamos-media.la
  16. pkginclude_HEADERS = \
  17. Aerodynamic_Device.h \
  18. @@ -46,24 +50,23 @@
  19. EXTRA_DIST = $(pkginclude_HEADERS)
  20. -AM_CXXFLAGS = -fPIC -Wall -pedantic
  21. +AM_CXXFLAGS = -Wall -pedantic
  22. +AM_CPPFLAGS = $(PYTHON_CPPFLAGS)
  23. # Python Module
  24. if HAVE_PYTHON
  25. -pyexec_LTLIBRARIES = body.la
  26. +pkgpyexec_LTLIBRARIES = body.la
  27. else
  28. -pyexec_LTLIBRARIES =
  29. +pkgpyexec_LTLIBRARIES =
  30. endif
  31. body_la_SOURCES = bp-body.cc
  32. -body_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(PYTHON_INCLUDE_DIR)
  33. body_la_LDFLAGS = -avoid-version -module
  34. body_la_LIBADD = \
  35. - $(top_srcdir)/body/libvamos-body.la \
  36. - $(top_srcdir)/geometry/libvamos-geometry.la \
  37. - $(top_srcdir)/media/libvamos-media.la \
  38. - -l$(PYTHON_LIB) \
  39. - -l$(BOOST_PYTHON_LIB)
  40. + libvamos-body.la \
  41. + ../geometry/libvamos-geometry.la \
  42. + ../media/libvamos-media.la \
  43. + $(PYTHON_LIBS)
  44. if DO_UNIT_TESTS
  45. UNIT_TESTS = \
  46. @@ -81,7 +84,7 @@
  47. test_Aerodynamic_Device_SOURCES = test_Aerodynamic_Device.cc
  48. test_Aerodynamic_Device_CXXFLAGS = -DBOOST_TEST_DYN_LINK
  49. test_Aerodynamic_Device_LDADD = \
  50. - $(top_srcdir)/geometry/libvamos-geometry.la \
  51. + ../geometry/libvamos-geometry.la \
  52. Frame.lo \
  53. Particle.lo \
  54. Aerodynamic_Device.lo \
  55. @@ -89,35 +92,35 @@
  56. test_Car_SOURCES = test_Car.cc
  57. test_Car_CXXFLAGS = -DBOOST_TEST_DYN_LINK
  58. test_Car_LDADD = \
  59. - $(top_srcdir)/geometry/libvamos-geometry.la \
  60. - $(top_srcdir)/media/libvamos-media.la \
  61. - $(top_srcdir)/body/libvamos-body.la \
  62. + ../geometry/libvamos-geometry.la \
  63. + ../media/libvamos-media.la \
  64. + ../body/libvamos-body.la \
  65. -lboost_unit_test_framework
  66. test_Frame_SOURCES = test_Frame.cc
  67. test_Frame_CXXFLAGS = -DBOOST_TEST_DYN_LINK
  68. test_Frame_LDADD = \
  69. - $(top_srcdir)/geometry/libvamos-geometry.la \
  70. + ../geometry/libvamos-geometry.la \
  71. Frame.lo \
  72. -lboost_unit_test_framework
  73. test_Particle_SOURCES = test_Particle.cc
  74. test_Particle_CXXFLAGS = -DBOOST_TEST_DYN_LINK
  75. test_Particle_LDADD = \
  76. - $(top_srcdir)/geometry/libvamos-geometry.la \
  77. + ../geometry/libvamos-geometry.la \
  78. Frame.lo \
  79. Particle.lo \
  80. -lboost_unit_test_framework
  81. test_Rigid_Body_SOURCES = test_Rigid_Body.cc
  82. test_Rigid_Body_CXXFLAGS = -DBOOST_TEST_DYN_LINK
  83. test_Rigid_Body_LDADD = \
  84. - $(top_srcdir)/geometry/libvamos-geometry.la \
  85. - $(top_srcdir)/media/libvamos-media.la \
  86. - $(top_srcdir)/body/libvamos-body.la \
  87. + ../geometry/libvamos-geometry.la \
  88. + ../media/libvamos-media.la \
  89. + ../body/libvamos-body.la \
  90. -lboost_unit_test_framework
  91. if DO_UNIT_TESTS
  92. check-local: $(UNIT_TESTS)
  93. for test in $(UNIT_TESTS); do \
  94. echo $$test; \
  95. - $(top_srcdir)/body/$$test; \
  96. + ../body/$$test; \
  97. done
  98. endif
  99. --- a/configure.ac
  100. +++ b/configure.ac
  101. @@ -19,7 +19,7 @@
  102. AC_PROG_INSTALL
  103. AC_PROG_MAKE_SET
  104. -AC_PROG_LIBTOOL
  105. +LT_INIT
  106. AC_PATH_X
  107. @@ -28,9 +28,6 @@
  108. AC_CONFIG_FILES([vamos/vamos], [chmod +x vamos/vamos])
  109. -dnl Python
  110. -AX_PYTHON
  111. -
  112. dnl Boost
  113. AX_BOOST_BASE([1.46.0],, AC_MSG_ERROR([Boost >= v1.46.0 is required.]))
  114. AX_BOOST_PYTHON([1.46.0])
  115. --- a/geometry/Makefile.am
  116. +++ b/geometry/Makefile.am
  117. @@ -15,6 +15,7 @@
  118. Three_Vector.cc \
  119. Two_Vector.cc \
  120. Parameter.cc
  121. +libvamos_geometry_la_LIBADD = -l$(BOOST_PYTHON_LIB)
  122. pkginclude_HEADERS = \
  123. Calculations.h \
  124. @@ -39,22 +40,21 @@
  125. EXTRA_DIST = $(pkginclude_HEADERS)
  126. -AM_CXXFLAGS = -fPIC -Wall -pedantic
  127. +AM_CXXFLAGS = -Wall -pedantic
  128. +AM_CPPFLAGS = $(PYTHON_CPPFLAGS)
  129. # Python Module
  130. if HAVE_PYTHON
  131. -pyexec_LTLIBRARIES = geometry.la
  132. +pkgpyexec_LTLIBRARIES = geometry.la
  133. else
  134. -pyexec_LTLIBRARIES =
  135. +pkgpyexec_LTLIBRARIES =
  136. endif
  137. geometry_la_SOURCES = bp-geometry.cc
  138. -geometry_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(PYTHON_INCLUDE_DIR)
  139. geometry_la_LDFLAGS = -avoid-version -module
  140. geometry_la_LIBADD = \
  141. - $(top_srcdir)/geometry/libvamos-geometry.la \
  142. - -l$(PYTHON_LIB) \
  143. - -l$(BOOST_PYTHON_LIB)
  144. + libvamos-geometry.la \
  145. + $(PYTHON_LIBS)
  146. # Unit Tests
  147. if DO_UNIT_TESTS
  148. @@ -110,6 +110,6 @@
  149. check-local: $(UNIT_TESTS)
  150. for test in $(UNIT_TESTS); do \
  151. echo $$test; \
  152. - $(top_srcdir)/geometry/$$test; \
  153. + ../geometry/$$test; \
  154. done
  155. endif
  156. --- a/media/Makefile.am
  157. +++ b/media/Makefile.am
  158. @@ -7,6 +7,7 @@
  159. Texture_Image.cc \
  160. Two_D.cc \
  161. XML_Parser.cc
  162. +libvamos_media_la_LIBADD = ../geometry/libvamos-geometry.la
  163. pkginclude_HEADERS = \
  164. Ac3d.h \
  165. @@ -19,23 +20,27 @@
  166. EXTRA_DIST = $(pkginclude_HEADERS)
  167. -AM_CXXFLAGS = -fPIC -Wall -pedantic
  168. +AM_CXXFLAGS = -Wall -pedantic
  169. +AM_CPPFLAGS = $(PYTHON_CPPFLAGS)
  170. # Python Module
  171. if HAVE_PYTHON
  172. -pyexec_LTLIBRARIES = media.la
  173. +pkgpyexec_LTLIBRARIES = media.la
  174. else
  175. -pyexec_LTLIBRARIES =
  176. +pkgpyexec_LTLIBRARIES =
  177. endif
  178. media_la_SOURCES = bp-media.cc
  179. -media_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(PYTHON_INCLUDE_DIR)
  180. media_la_LDFLAGS = -avoid-version -module
  181. media_la_LIBADD = \
  182. - $(top_srcdir)/geometry/libvamos-geometry.la \
  183. - $(top_srcdir)/media/libvamos-media.la \
  184. - -l$(PYTHON_LIB) \
  185. - -l$(BOOST_PYTHON_LIB)
  186. + ../geometry/libvamos-geometry.la \
  187. + libvamos-media.la \
  188. + $(PYTHON_LIBS)
  189. +
  190. +# workaround for broken parallel install support in automake with LTLIBRARIES
  191. +# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328
  192. +install_pkgpyexecLTLIBRARIES = install-pkgpyexecLTLIBRARIES
  193. +$(install_pkgpyexecLTLIBRARIES): install-libLTLIBRARIES
  194. # Unit Tests
  195. if DO_UNIT_TESTS
  196. @@ -54,6 +59,6 @@
  197. check-local: $(UNIT_TESTS)
  198. for test in $(UNIT_TESTS); do \
  199. echo $$test; \
  200. - $(top_srcdir)/media/$$test; \
  201. + ../media/$$test; \
  202. done
  203. endif
  204. --- a/track/Makefile.am
  205. +++ b/track/Makefile.am
  206. @@ -6,6 +6,9 @@
  207. Road_Segment.cc \
  208. Strip_Track.cc \
  209. Strip_Track_Reader.cc
  210. +libvamos_track_la_LIBADD = \
  211. + ../geometry/libvamos-geometry.la \
  212. + ../media/libvamos-media.la
  213. pkginclude_HEADERS = \
  214. Gl_Road_Segment.h \
  215. @@ -17,24 +20,23 @@
  216. EXTRA_DIST = $(pkginclude_HEADERS)
  217. -AM_CXXFLAGS = -fPIC -Wall -pedantic
  218. +AM_CXXFLAGS = -Wall -pedantic
  219. +AM_CPPFLAGS = $(PYTHON_CPPFLAGS)
  220. # Python Module
  221. if HAVE_PYTHON
  222. -pyexec_LTLIBRARIES = track.la
  223. +pkgpyexec_LTLIBRARIES = track.la
  224. else
  225. -pyexec_LTLIBRARIES =
  226. +pkgpyexec_LTLIBRARIES =
  227. endif
  228. track_la_SOURCES = bp-track.cc
  229. -track_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(PYTHON_INCLUDE_DIR)
  230. track_la_LDFLAGS = -avoid-version -module
  231. track_la_LIBADD = \
  232. - $(top_srcdir)/geometry/libvamos-geometry.la \
  233. - $(top_srcdir)/media/libvamos-media.la \
  234. - $(top_srcdir)/track/libvamos-track.la \
  235. - -l$(PYTHON_LIB) \
  236. - -l$(BOOST_PYTHON_LIB)
  237. + ../geometry/libvamos-geometry.la \
  238. + ../media/libvamos-media.la \
  239. + libvamos-track.la \
  240. + $(PYTHON_LIBS)
  241. # Unit Tests
  242. if DO_UNIT_TESTS
  243. @@ -50,14 +52,14 @@
  244. test_Road_Segment_SOURCES = test_Road_Segment.cc
  245. test_Road_Segment_CXXFLAGS = -DBOOST_TEST_DYN_LINK
  246. test_Road_Segment_LDADD = \
  247. - $(top_srcdir)/geometry/libvamos-geometry.la \
  248. + ../geometry/libvamos-geometry.la \
  249. Road_Segment.lo \
  250. -lboost_unit_test_framework
  251. test_Strip_Track_SOURCES = test_Strip_Track.cc
  252. test_Strip_Track_CXXFLAGS = -DBOOST_TEST_DYN_LINK
  253. test_Strip_Track_LDADD = \
  254. - $(top_srcdir)/geometry/libvamos-geometry.la \
  255. - $(top_srcdir)/media/libvamos-media.la \
  256. + ../geometry/libvamos-geometry.la \
  257. + ../media/libvamos-media.la \
  258. Road_Segment.lo \
  259. Gl_Road_Segment.lo \
  260. Strip_Track.lo \
  261. @@ -68,6 +70,6 @@
  262. check-local: $(UNIT_TESTS)
  263. for test in $(UNIT_TESTS); do \
  264. echo $$test; \
  265. - $(top_srcdir)/track/$$test; \
  266. + ../track/$$test; \
  267. done
  268. endif
  269. --- a/vamos/Makefile.am
  270. +++ b/vamos/Makefile.am
  271. @@ -9,12 +9,12 @@
  272. EXTRA_DIST = Options.h
  273. cvamos_LDADD = \
  274. - $(top_srcdir)/world/libvamos-world.la \
  275. - $(top_srcdir)/body/libvamos-body.la \
  276. - $(top_srcdir)/track/libvamos-track.la \
  277. - $(top_srcdir)/geometry/libvamos-geometry.la \
  278. - $(top_srcdir)/media/libvamos-media.la \
  279. + ../world/libvamos-world.la \
  280. + ../body/libvamos-body.la \
  281. + ../track/libvamos-track.la \
  282. + ../geometry/libvamos-geometry.la \
  283. + ../media/libvamos-media.la \
  284. -lboost_system \
  285. -lboost_filesystem
  286. -AM_CXXFLAGS = -fPIC -Wall -pedantic -DDATADIR=\"$(pkgdatadir)\"
  287. +AM_CXXFLAGS = -Wall -pedantic -DDATADIR=\"$(pkgdatadir)\"
  288. --- a/world/Makefile.am
  289. +++ b/world/Makefile.am
  290. @@ -10,6 +10,10 @@
  291. Sounds.cc \
  292. Timing_Info.cc \
  293. World.cc
  294. +libvamos_world_la_LIBADD = \
  295. + ../geometry/libvamos-geometry.la \
  296. + ../track/libvamos-track.la \
  297. + ../body/libvamos-body.la
  298. pkginclude_HEADERS = \
  299. Atmosphere.h \
  300. @@ -26,26 +30,25 @@
  301. EXTRA_DIST = $(pkginclude_HEADERS)
  302. -AM_CXXFLAGS = -fPIC -Wall -pedantic
  303. +AM_CXXFLAGS = -Wall -pedantic
  304. +AM_CPPFLAGS = $(PYTHON_CPPFLAGS)
  305. # Python Module
  306. if HAVE_PYTHON
  307. -pyexec_LTLIBRARIES = world.la
  308. +pkgpyexec_LTLIBRARIES = world.la
  309. else
  310. -pyexec_LTLIBRARIES =
  311. +pkgpyexec_LTLIBRARIES =
  312. endif
  313. world_la_SOURCES = bp-world.cc
  314. -world_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(PYTHON_INCLUDE_DIR)
  315. world_la_LDFLAGS = -avoid-version -module
  316. world_la_LIBADD = \
  317. - $(top_srcdir)/body/libvamos-body.la \
  318. - $(top_srcdir)/geometry/libvamos-geometry.la \
  319. - $(top_srcdir)/media/libvamos-media.la \
  320. - $(top_srcdir)/track/libvamos-track.la \
  321. - $(top_srcdir)/world/libvamos-world.la \
  322. - -l$(PYTHON_LIB) \
  323. - -l$(BOOST_PYTHON_LIB)
  324. + ../body/libvamos-body.la \
  325. + ../geometry/libvamos-geometry.la \
  326. + ../media/libvamos-media.la \
  327. + ../track/libvamos-track.la \
  328. + libvamos-world.la \
  329. + $(PYTHON_LIBS)
  330. # Unit Tests
  331. if DO_UNIT_TESTS
  332. @@ -67,6 +70,6 @@
  333. check-local: $(UNIT_TESTS)
  334. for test in $(UNIT_TESTS); do \
  335. echo $$test; \
  336. - $(top_srcdir)/world/$$test; \
  337. + ../world/$$test; \
  338. done
  339. endif