OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
4.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../lua-pcre/compile-fix.patch
  5. # Copyright (C) 2006 The OpenSDE Project
  6. # Copyright (C) 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This patch file is dual-licensed. It is available under the license the
  11. # patched project is licensed under, as long as it is an OpenSource license
  12. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  13. # of the GNU General Public License as published by the Free Software
  14. # Foundation; either version 2 of the License, or (at your option) any later
  15. # version.
  16. # --- SDE-COPYRIGHT-NOTE-END ---
  17. diff -ur lrexlib-1.19/Makefile lrexlib-1.19-t2/Makefile
  18. --- lrexlib-1.19/Makefile 2004-12-19 01:19:00.000000000 +0100
  19. +++ lrexlib-1.19-t2/Makefile 2006-02-09 00:29:24.000000000 +0100
  20. @@ -2,8 +2,8 @@
  21. include ./config
  22. -NAM_POSIX= libluarex_posix
  23. -NAM_PCRE= libluarex_pcre
  24. +NAM_POSIX= rx
  25. +NAM_PCRE= pcre
  26. INC_POSIX += $(INC_LUA)
  27. INC_PCRE += $(INC_LUA)
  28. @@ -36,14 +36,8 @@
  29. @echo This Makefile requires its targets to be explicitly specified.
  30. @echo Example: make ar_posix so_posix ar_pcre so_pcre
  31. -# static POSIX regexp library binding
  32. -ar_posix: $(TRG_POSIX_AR)
  33. -
  34. # dynamic POSIX regexp library binding
  35. -so_posix: $(TRG_POSIX_SO)
  36. -
  37. -# static PCRE regexp library binding
  38. -ar_pcre: $(TRG_PCRE_AR)
  39. +so_rx: $(TRG_POSIX_SO)
  40. # dynamic PCRE regexp library binding
  41. so_pcre: $(TRG_PCRE_SO)
  42. @@ -57,12 +51,10 @@
  43. $(AR) $@ $<
  44. $(TRG_POSIX_SO): $(OBJ_POSIX_SO)
  45. - ld -o $@.$V -shared $< $(LIB_POSIX)
  46. - ln -fs $@.$V $@
  47. + ld -o $@ -shared $< $(LIB_POSIX)
  48. $(TRG_PCRE_SO): $(OBJ_PCRE_SO)
  49. - ld -o $@.$V -shared $< $(LIB_PCRE)
  50. - ln -fs $@.$V $@
  51. + ld -o $@ -shared $< $(LIB_PCRE)
  52. .INTERMEDIATE: $(SRC_INTERM_ALL)
  53. diff -ur lrexlib-1.19/README lrexlib-1.19-t2/README
  54. --- lrexlib-1.19/README 2004-12-19 01:19:00.000000000 +0100
  55. +++ lrexlib-1.19-t2/README 2006-02-09 00:17:16.000000000 +0100
  56. @@ -1,3 +1,19 @@
  57. +This is a modified version of the lrexlib 1.19.
  58. +The changes made mainly concern the function naming.
  59. +The following changes were made (original function -> new function name)
  60. +
  61. +rex.newPOSIX -> rx.new
  62. +rex.flagsPOSIX -> rx.flags
  63. +
  64. +rex.newPCRE -> pcre.new
  65. +rex.flagsPCRE -> pcre.flags
  66. +rex.versionPCRE -> pcre.version
  67. +
  68. +Additionally, the constructor (as stated at the end of the file) were
  69. +added by default.
  70. +
  71. +The original README follows:
  72. +
  73. Lua rexlib release 1.19
  74. -----------------------
  75. diff -ur lrexlib-1.19/config lrexlib-1.19-t2/config
  76. --- lrexlib-1.19/config 2004-12-19 01:19:00.000000000 +0100
  77. +++ lrexlib-1.19-t2/config 2006-02-08 23:36:29.000000000 +0100
  78. @@ -1,12 +1,12 @@
  79. # lrexlib configuration file.
  80. # These are default values. See the explanations below.
  81. -INC_LUA=
  82. -LIB_LUA=
  83. -INC_POSIX=
  84. -LIB_POSIX=
  85. -INC_PCRE=
  86. -LIB_PCRE= -lpcre
  87. +INC_LUA = -I$(shell pkg-config --variable includedir lua)
  88. +LIB_LUA = $(shell pkg-config --libs lua)
  89. +INC_POSIX =
  90. +LIB_POSIX =
  91. +INC_PCRE =
  92. +LIB_PCRE = -lpcre
  93. # If the default settings don't work for your system,
  94. # try to uncomment and edit the settings below.
  95. diff -ur lrexlib-1.19/lrexlib.c lrexlib-1.19-t2/lrexlib.c
  96. --- lrexlib-1.19/lrexlib.c 2004-12-19 01:19:00.000000000 +0100
  97. +++ lrexlib-1.19-t2/lrexlib.c 2006-02-09 00:04:58.000000000 +0100
  98. @@ -625,29 +625,39 @@
  99. static const luaL_reg rexlib[] = {
  100. #ifdef LREXLIB_POSIX
  101. - {"newPOSIX", posix_comp},
  102. - {"flagsPOSIX", posix_get_flags},
  103. + {"new", posix_comp},
  104. + {"flags", posix_get_flags},
  105. #endif
  106. #ifdef LREXLIB_PCRE
  107. - {"newPCRE", Lpcre_comp},
  108. - {"flagsPCRE", Lpcre_get_flags},
  109. - {"versionPCRE", Lpcre_vers},
  110. + {"new", Lpcre_comp},
  111. + {"flags", Lpcre_get_flags},
  112. + {"version", Lpcre_vers},
  113. #endif
  114. {NULL, NULL}
  115. };
  116. +#if defined(LREXLIB_POSIX)
  117. +LUALIB_API int luaopen_lrx(lua_State *L)
  118. +#elif defined(LREXLIB_PCRE)
  119. +LUALIB_API int luaopen_lpcre(lua_State *L)
  120. +#else
  121. LUALIB_API int luaopen_rex(lua_State *L)
  122. +#endif
  123. {
  124. -#ifdef LREXLIB_POSIX
  125. +#if defined(LREXLIB_POSIX)
  126. createmeta(L, posix_handle);
  127. luaL_openlib(L, NULL, posixmeta, 0);
  128. lua_pop(L, 1);
  129. -#endif
  130. -#ifdef LREXLIB_PCRE
  131. +
  132. + luaL_openlib(L, "rx", rexlib, 0);
  133. +#elif defined(LREXLIB_PCRE)
  134. createmeta(L, pcre_handle);
  135. luaL_openlib(L, NULL, pcremeta, 0);
  136. lua_pop(L, 1);
  137. -#endif
  138. +
  139. + luaL_openlib(L, "pcre", rexlib, 0);
  140. +#else
  141. luaL_openlib(L, "rex", rexlib, 0);
  142. +#endif
  143. return 1;
  144. }