svn commit: r352464 - in head/security/beecrypt: . files
Mikhail Teterin
mi at FreeBSD.org
Sun Apr 27 21:37:14 UTC 2014
Author: mi
Date: Sun Apr 27 21:37:13 2014
New Revision: 352464
URL: http://svnweb.freebsd.org/changeset/ports/352464
QAT: https://qat.redports.org/buildarchive/r352464/
Log:
When -march=FOO happens to be among CFLAGS, unexpected things could
occur (for example, -march=core2 used to break build). Not a FreeBSD
problem even -- Linux crowd was bitten by this too (and misdiagnosed
it). Our package-building does not include the flag, which is why
we haven't seen this before.
Attempt to help configure better detect the architecture and
CPU-capabilities -- and use assembler-implementations of various
routines, where possible. ("make check" is almost 30% faster now)
Ensure, SSE2-specific code builds properly with clang as well as gcc.
Ensure, the author's "make check" runs as regression-test.
Add another patch found on SourceForge.
(Attempt to) unbreak on PowerPC -- untested.
Bump PORTREVISION. Take maintainership for the time being, to deal
with any fallout.
Added:
head/security/beecrypt/files/patch-sha-sse (contents, props changed)
Modified:
head/security/beecrypt/Makefile
head/security/beecrypt/distinfo
head/security/beecrypt/files/patch-configure
Modified: head/security/beecrypt/Makefile
==============================================================================
--- head/security/beecrypt/Makefile Sun Apr 27 21:05:59 2014 (r352463)
+++ head/security/beecrypt/Makefile Sun Apr 27 21:37:13 2014 (r352464)
@@ -1,12 +1,14 @@
# Created by: Ying-Chieh Liao <ijliao at FreeBSD.org>
# $FreeBSD$
-
PORTNAME= beecrypt
PORTVERSION= 4.2.1
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= SF
+PATCHFILES= mpntrbits.patch
+PATCH_SITES= http://sourceforge.net/p/beecrypt/patches/_discuss/thread/bff89ba1/5387/attachment/
-MAINTAINER= ports at FreeBSD.org
+MAINTAINER= mi at aldan.algebra.com
COMMENT= BeeCrypt is an open source cryptography library
USE_AUTOTOOLS= libtool
@@ -25,10 +27,15 @@ CONFIGURE_ARGS+= --enable-openmp
CONFIGURE_ARGS+= --disable-openmp
.endif
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "powerpc"
-BROKEN= Does not compile on powerpc
+# Configure tries to guess our CPU-features using Linux-centric logic.
+# Help it here:
+.for o in sse3 sse2 sse mmx
+.if ${MACHINE_CPU:M$o} != ""
+CPPFLAGS+= -DOPTIMIZE_${o:U}
.endif
+.endfor
+
+regression-test test check: build
+ ${MAKE} -C ${WRKSRC} check
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Modified: head/security/beecrypt/distinfo
==============================================================================
--- head/security/beecrypt/distinfo Sun Apr 27 21:05:59 2014 (r352463)
+++ head/security/beecrypt/distinfo Sun Apr 27 21:37:13 2014 (r352464)
@@ -1,2 +1,4 @@
SHA256 (beecrypt-4.2.1.tar.gz) = 286f1f56080d1a6b1d024003a5fa2158f4ff82cae0c6829d3c476a4b5898c55d
SIZE (beecrypt-4.2.1.tar.gz) = 882758
+SHA256 (mpntrbits.patch) = aa313e42c85dfc653a443ca5eaf56691bb8155e612023d1b7d354141f44fd146
+SIZE (mpntrbits.patch) = 1213
Modified: head/security/beecrypt/files/patch-configure
==============================================================================
--- head/security/beecrypt/files/patch-configure Sun Apr 27 21:05:59 2014 (r352463)
+++ head/security/beecrypt/files/patch-configure Sun Apr 27 21:37:13 2014 (r352464)
@@ -1,13 +1,30 @@
$FreeBSD$
---- configure.orig Mon Nov 29 13:50:41 2004
-+++ configure Mon Nov 29 13:52:11 2004
-@@ -25861,6 +25861,8 @@
+--- configure Mon Nov 29 13:50:41 2004
++++ configure 2014-04-27 14:31:36.000000000 -0400
+@@ -3008,7 +3005,7 @@
+ sparc*)
+ bc_target_arch=sparc
+ ;;
+- x86_64)
++ x86_64|amd64)
+ bc_target_arch=x86_64
+ ;;
+ esac
+@@ -3120,7 +3121,4 @@
+ # Check for expert mode
+ if test "$ac_enable_expert_mode" = yes; then
+-
+- # try to get the architecture from CFLAGS
+- bc_target_arch=`echo $CFLAGS | awk '{for (i=1; i<=NF; i++) if (substr($i,0,7)=="-march=") print substr($i,8)}'`
+ # examine the other flags
+ for flag in `echo $CFLAGS`
+@@ -24015,6 +24012,8 @@
ac_cv_java_include="-I$java_include -I$java_include/osf" ;;
solaris*)
ac_cv_java_include="-I$java_include -I$java_include/solaris" ;;
+ freebsd*)
+ ac_cv_java_include="-I$java_include -I$java_include/freebsd" ;;
*)
- { echo "$as_me:$LINENO: WARNING: please add appropriate -I$java_include/<operating system> flag" >&5
- echo "$as_me: WARNING: please add appropriate -I$java_include/<operating system> flag" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: please add appropriate -I$java_include/<operating system> flag" >&5
+ $as_echo "$as_me: WARNING: please add appropriate -I$java_include/<operating system> flag" >&2;}
Added: head/security/beecrypt/files/patch-sha-sse
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/beecrypt/files/patch-sha-sse Sun Apr 27 21:37:13 2014 (r352464)
@@ -0,0 +1,21 @@
+Fix the SSE2-specific code for clang -- it differs from GCC in this.
+--- sha384.c 2009-06-18 05:14:35.000000000 -0400
++++ sha384.c 2014-04-27 17:15:13.000000000 -0400
+@@ -131,6 +131,6 @@
+ #ifdef OPTIMIZE_SSE2
+
+- # if defined(_MSC_VER) || defined (__INTEL_COMPILER)
+- static const __m64 MASK = { 0x00FF00FF00FF00FF00 };
++ # if defined(_MSC_VER) || defined (__INTEL_COMPILER) || defined(__clang__)
++ static const __m64 MASK = { 0x00FF00FF00FF00FF };
+ # elif defined(__GNUC__)
+ static const __m64 MASK = { 0x00FF00FF, 0x00FF00FF };
+--- sha512.c 2009-06-18 05:15:57.000000000 -0400
++++ sha512.c 2014-04-27 17:15:47.000000000 -0400
+@@ -131,5 +131,5 @@
+ {
+ #ifdef OPTIMIZE_SSE2
+- # if defined(_MSC_VER) || defined(__INTEL_COMPILER)
++ # if defined(_MSC_VER) || defined(__INTEL_COMPILER) || defined(__clang__)
+ static const __m64 MASK = { 0x00FF00FF00FF00FF };
+ # elif defined(__GNUC__)
More information about the svn-ports-head
mailing list