]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
beecrypt: Fix build (with openmp and threads).
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 16 Dec 2011 13:55:05 +0000 (14:55 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 16 Dec 2011 13:56:00 +0000 (14:56 +0100)
beecrypt/beecrypt.nm
beecrypt/patches/beecrypt-4.2.1-build-system.patch [new file with mode: 0644]

index 0235e07973489b3367b5181bb5c32cbb7f872432..3f1e8a199c5f182dd7127ee2a943e594e382e032 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = beecrypt
 version    = 4.2.1
-release    = 1
+release    = 2
 
 groups     = System/Libraries
 url        = http://beecrypt.sourceforge.net/
@@ -27,8 +27,6 @@ build
                automake
                gcc-c++
                libtool
-
-               perl-Carp
        end
 
        prepare_cmds
@@ -36,11 +34,17 @@ build
                autoreconf
        end
 
+       # Getting weird linking errors without --disable-threads.
        configure_options += \
+               --disable-expert-mode \
+               --disable-threads \
+               --enable-openmp \
                --with-cplusplus=no \
                --with-java=no \
                --with-python=no
 
+       make_build_targets += OPENMP_LIBS="-lgomp"
+
        test
                make check
        end
diff --git a/beecrypt/patches/beecrypt-4.2.1-build-system.patch b/beecrypt/patches/beecrypt-4.2.1-build-system.patch
new file mode 100644 (file)
index 0000000..b2bd64a
--- /dev/null
@@ -0,0 +1,91 @@
+--- beecrypt-4.2.1/configure.ac
++++ beecrypt-4.2.1/configure.ac
+@@ -11,7 +11,7 @@
+ # Checks for package options
+ AC_ARG_ENABLE(expert-mode, [  --enable-expert-mode      follow user-defined CFLAGS settings [[default=no]]],[
+-  ac_enable_expert_mode=yes
++  ac_enable_expert_mode=$enableval
+   ],[
+   if test "X$CFLAGS" != "X"; then
+     echo "enabling expert mode"
+@@ -25,7 +25,7 @@
+   if test "$ac_enable_expert_mode" = yes; then
+     AC_MSG_ERROR([--enable-debug cannot be used in conjunction with --enable-expert-mode])
+   fi
+-  ac_enable_debug=yes
++  ac_enable_debug=$enableval
+   ],[
+   ac_enable_debug=no
+   ])
+@@ -456,7 +456,7 @@
+       ac_cv_python_include="-I`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()'`"
+     ])
+     AC_CACHE_CHECK([where to install python libraries], ac_cv_python_libdir, [
+-      ac_cv_python_libdir=`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()'`
++      ac_cv_python_libdir=`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, 0)'`
+     ])
+   fi
+ fi
+--- beecrypt-4.2.1/java/Makefile.am
++++ beecrypt-4.2.1/java/Makefile.am
+@@ -26,7 +26,7 @@
+ INCLUDES = -I$(top_srcdir)/include
+-libaltdir=$(prefix)/lib@LIBALT@
++libaltdir=$(libdir)
+ libalt_LTLIBRARIES = libbeecrypt_java.la
+--- beecrypt-4.2.1/acinclude.m4
++++ beecrypt-4.2.1/acinclude.m4
+@@ -1589,20 +1589,5 @@
+   AC_SUBST(TYPEDEF_BC_THREADID_T,$bc_typedef_bc_threadid_t)
+   ])
+-
+-AH_BOTTOM([
+-#if ENABLE_THREADS
+-# ifndef _REENTRANT
+-#  define _REENTRANT
+-# endif
+-# if LINUX
+-#  define _LIBC_REENTRANT
+-# endif
+-#else
+-# ifdef _REENTRANT
+-#  undef _REENTRANT
+-# endif
+-#endif
+-])
+ dnl  BEE_THREAD_LOCAL_STORAGE
+@@ -1623,7 +1609,5 @@
+   ])
+ AH_BOTTOM([
+-#if !ENABLE_THREAD_LOCAL_STORAGE
+-# define __thread
+-#endif
++#include "config.threads.h"
+ ])
+--- beecrypt-4.2.1/config.threads.h
++++ beecrypt-4.2.1/config.threads.h
+@@ -0,0 +1,16 @@
++#if ENABLE_THREADS
++# ifndef _REENTRANT
++#  define _REENTRANT
++# endif
++# if LINUX
++#  define _LIBC_REENTRANT
++# endif
++#else
++# ifdef _REENTRANT
++#  undef _REENTRANT
++# endif
++#endif
++
++#if !ENABLE_THREAD_LOCAL_STORAGE
++# define __thread
++#endif