0003-Don-t-link-against-libfl.patch 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. From e48b9097dce7bc2bfbb9e9c542124d3b5cebab39 Mon Sep 17 00:00:00 2001
  2. From: Paul Barker <paul@paulbarker.me.uk>
  3. Date: Wed, 5 Mar 2014 13:39:14 +0000
  4. Subject: [PATCH] Don't link against libfl
  5. We can remove all references to yywrap by adding "%option noyywrap" statements
  6. to each flex source file that doesn't override yywrap. After this, we no longer
  7. need to link against libfl and so no longer get errors about undefined
  8. references to yylex.
  9. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
  10. Upstream-status: Submitted 2014-03-11
  11. see http://sourceforge.net/p/ipsec-tools/mailman/ipsec-tools-devel/thread/CANyK_8ewmxGA3vBVJW6s1APXPmxPR%2BDFWZ61EL8pCt288aKQ6w%40mail.gmail.com/#msg32088797
  12. Downloaded from
  13. http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-Don-t-link-against-libfl.patch
  14. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  15. ---
  16. src/libipsec/Makefile.am | 1 -
  17. src/racoon/Makefile.am | 2 +-
  18. src/racoon/cftoken.l | 2 ++
  19. src/setkey/Makefile.am | 1 -
  20. src/setkey/token.l | 2 ++
  21. 5 files changed, 5 insertions(+), 3 deletions(-)
  22. diff --git a/src/libipsec/Makefile.am b/src/libipsec/Makefile.am
  23. index 6a4e3b3..df1e106 100644
  24. --- a/src/libipsec/Makefile.am
  25. +++ b/src/libipsec/Makefile.am
  26. @@ -26,7 +26,6 @@ libipsec_la_SOURCES = \
  27. # version is current:revision:age.
  28. # See: http://www.gnu.org/manual/libtool-1.4.2/html_chapter/libtool_6.html#SEC32
  29. libipsec_la_LDFLAGS = -version-info 0:1:0
  30. -libipsec_la_LIBADD = $(LEXLIB)
  31. noinst_HEADERS = ipsec_strerror.h
  32. diff --git a/src/racoon/Makefile.am b/src/racoon/Makefile.am
  33. index dbaded9..0662957 100644
  34. --- a/src/racoon/Makefile.am
  35. +++ b/src/racoon/Makefile.am
  36. @@ -38,7 +38,7 @@ racoon_SOURCES = \
  37. cftoken.l cfparse.y prsa_tok.l prsa_par.y
  38. EXTRA_racoon_SOURCES = isakmp_xauth.c isakmp_cfg.c isakmp_unity.c throttle.c \
  39. isakmp_frag.c nattraversal.c security.c $(MISSING_ALGOS)
  40. -racoon_LDADD = $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) $(LEXLIB) \
  41. +racoon_LDADD = $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) \
  42. $(SECCTX_OBJS) vmbuf.o sockmisc.o misc.o ../libipsec/libipsec.la
  43. racoon_DEPENDENCIES = \
  44. $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) $(SECCTX_OBJS) \
  45. diff --git a/src/racoon/cftoken.l b/src/racoon/cftoken.l
  46. index 490242c..1701922 100644
  47. --- a/src/racoon/cftoken.l
  48. +++ b/src/racoon/cftoken.l
  49. @@ -106,6 +106,8 @@ static int incstackp = 0;
  50. static int yy_first_time = 1;
  51. %}
  52. +%option noyywrap
  53. +
  54. /* common seciton */
  55. nl \n
  56. ws [ \t]+
  57. diff --git a/src/setkey/Makefile.am b/src/setkey/Makefile.am
  58. index 746c1f1..389e6cf 100644
  59. --- a/src/setkey/Makefile.am
  60. +++ b/src/setkey/Makefile.am
  61. @@ -13,7 +13,6 @@ setkey_SOURCES = \
  62. setkey_LDFLAGS = ../libipsec/libipsec.la
  63. setkey_DEPENDENCIES = ../libipsec/libipsec.la
  64. -setkey_LDADD = $(LEXLIB)
  65. noinst_HEADERS = vchar.h extern.h
  66. man8_MANS = setkey.8
  67. diff --git a/src/setkey/token.l b/src/setkey/token.l
  68. index ad3d843..eb23b76 100644
  69. --- a/src/setkey/token.l
  70. +++ b/src/setkey/token.l
  71. @@ -88,6 +88,8 @@
  72. #endif
  73. %}
  74. +%option noyywrap
  75. +
  76. /* common section */
  77. nl \n
  78. ws [ \t]+
  79. --
  80. 1.9.0