0002-build-system.patch 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. Fix build with BR2_ENABLE_DEBUG=yes, no need for expert mode anymore
  2. Otherwise configure issues this error message:
  3. configure: error: --enable-debug cannot be used in conjunction with --enable-expert-mode
  4. Downloaded from Gentoo:
  5. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/beecrypt/files/beecrypt-4.2.1-build-system.patch?revision=1.2&view=markup
  6. This patch also removes the hard-coded CFLAGS provided by beecrypt in favour
  7. of the CFLAGS provided by buildroot.
  8. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  9. --- beecrypt-4.2.1/configure.ac
  10. +++ beecrypt-4.2.1/configure.ac
  11. @@ -11,7 +11,7 @@
  12. # Checks for package options
  13. AC_ARG_ENABLE(expert-mode, [ --enable-expert-mode follow user-defined CFLAGS settings [[default=no]]],[
  14. - ac_enable_expert_mode=yes
  15. + ac_enable_expert_mode=$enableval
  16. ],[
  17. if test "X$CFLAGS" != "X"; then
  18. echo "enabling expert mode"
  19. @@ -25,7 +25,7 @@
  20. if test "$ac_enable_expert_mode" = yes; then
  21. AC_MSG_ERROR([--enable-debug cannot be used in conjunction with --enable-expert-mode])
  22. fi
  23. - ac_enable_debug=yes
  24. + ac_enable_debug=$enableval
  25. ],[
  26. ac_enable_debug=no
  27. ])
  28. @@ -456,7 +456,7 @@
  29. ac_cv_python_include="-I`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()'`"
  30. ])
  31. AC_CACHE_CHECK([where to install python libraries], ac_cv_python_libdir, [
  32. - ac_cv_python_libdir=`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()'`
  33. + ac_cv_python_libdir=`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, 0)'`
  34. ])
  35. fi
  36. fi
  37. --- beecrypt-4.2.1/acinclude.m4
  38. +++ beecrypt-4.2.1/acinclude.m4
  39. @@ -498,15 +498,6 @@ AC_DEFUN([BEE_GNU_CC],[
  40. AC_SUBST(OPENMP_LIBS,"-lgomp")
  41. fi
  42. case $bc_target_arch in
  43. - x86_64 | athlon64 | athlon-fx | k8 | opteron | em64t | nocona)
  44. - CC="$CC -m64"
  45. - ;;
  46. - i[[3456]]86 | \
  47. - pentium* | \
  48. - athlon*)
  49. - CC="$CC -m32"
  50. - CCAS="$CCAS -m32"
  51. - ;;
  52. ia64)
  53. case $target_os in
  54. # HP/UX on Itanium needs to be told that a long is 64-bit!
  55. @@ -525,17 +516,8 @@ AC_DEFUN([BEE_GNU_CC],[
  56. aix*)
  57. CC="$CC -maix64"
  58. ;;
  59. - linux*)
  60. - CC="$CC -m64"
  61. - ;;
  62. esac
  63. ;;
  64. - sparc | sparcv8*)
  65. - CC="$CC -m32"
  66. - ;;
  67. - sparc64 | sparcv9*)
  68. - CC="$CC -m64"
  69. - ;;
  70. esac
  71. # Certain platforms needs special flags for multi-threaded code
  72. if test "$ac_enable_threads" = yes; then
  73. @@ -646,14 +646,6 @@ dnl BEE_GNU_CXX
  74. AC_DEFUN([BEE_GNU_CXX],[
  75. AC_REQUIRE([AC_PROG_CXX])
  76. case $bc_target_arch in
  77. - x86_64 | athlon64 | athlon-fx | k8 | opteron | em64t | nocona | core2)
  78. - CXX="$CXX -m64"
  79. - ;;
  80. - i[[3456]]86 | \
  81. - pentium* | \
  82. - athlon*)
  83. - CXX="$CXX -m32"
  84. - ;;
  85. ia64)
  86. case $target_os in
  87. # HP/UX on Itanium needs to be told that a long is 64-bit!
  88. @@ -672,17 +664,8 @@ AC_DEFUN([BEE_GNU_CXX],[
  89. aix*)
  90. CXX="$CXX -maix64"
  91. ;;
  92. - linux*)
  93. - CXX="$CXX -m64"
  94. - ;;
  95. esac
  96. ;;
  97. - sparc | sparcv8*)
  98. - CXX="$CXX -m32"
  99. - ;;
  100. - sparc64 | sparcv9*)
  101. - CXX="$CXX -m64"
  102. - ;;
  103. esac
  104. # Certain platforms needs special flags for multi-threaded code
  105. if test "$ac_enable_threads" = yes; then
  106. --- beecrypt-4.2.1/java/Makefile.am
  107. +++ beecrypt-4.2.1/java/Makefile.am
  108. @@ -26,7 +26,7 @@
  109. INCLUDES = -I$(top_srcdir)/include
  110. -libaltdir=$(prefix)/lib@LIBALT@
  111. +libaltdir=$(libdir)
  112. libalt_LTLIBRARIES = libbeecrypt_java.la
  113. --- beecrypt-4.2.1/acinclude.m4
  114. +++ beecrypt-4.2.1/acinclude.m4
  115. @@ -1589,20 +1589,5 @@
  116. AC_SUBST(TYPEDEF_BC_THREADID_T,$bc_typedef_bc_threadid_t)
  117. ])
  118. -
  119. -AH_BOTTOM([
  120. -#if ENABLE_THREADS
  121. -# ifndef _REENTRANT
  122. -# define _REENTRANT
  123. -# endif
  124. -# if LINUX
  125. -# define _LIBC_REENTRANT
  126. -# endif
  127. -#else
  128. -# ifdef _REENTRANT
  129. -# undef _REENTRANT
  130. -# endif
  131. -#endif
  132. -])
  133. dnl BEE_THREAD_LOCAL_STORAGE
  134. @@ -1623,7 +1609,5 @@
  135. ])
  136. AH_BOTTOM([
  137. -#if !ENABLE_THREAD_LOCAL_STORAGE
  138. -# define __thread
  139. -#endif
  140. +#include "config.threads.h"
  141. ])
  142. --- beecrypt-4.2.1/config.threads.h
  143. +++ beecrypt-4.2.1/config.threads.h
  144. @@ -0,0 +1,16 @@
  145. +#if ENABLE_THREADS
  146. +# ifndef _REENTRANT
  147. +# define _REENTRANT
  148. +# endif
  149. +# if LINUX
  150. +# define _LIBC_REENTRANT
  151. +# endif
  152. +#else
  153. +# ifdef _REENTRANT
  154. +# undef _REENTRANT
  155. +# endif
  156. +#endif
  157. +
  158. +#if !ENABLE_THREAD_LOCAL_STORAGE
  159. +# define __thread
  160. +#endif