mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 06:26:57 +02:00
libcrypto++: add support for libcrypto++ 5.6.1 to portage-stable
Copied ebuilds and patches for libcrypto 5.6.1 from Gentoo portage TOT. This package is required for tegrarcm (new open source nvflash replacement) BUG=chromium-os:28175 TEST=emerged into x64 host system, commpiled tegrarcm against it and ran Change-Id: I14a6efd1e8c50d0b80cedd2c651df184c4ed369c Reviewed-on: https://gerrit.chromium.org/gerrit/18743 Tested-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Allen Martin <amartin@nvidia.com>
This commit is contained in:
parent
e3e3f95efa
commit
5390e95b22
1
sdk_container/src/third_party/portage-stable/dev-libs/crypto++/Manifest
vendored
Normal file
1
sdk_container/src/third_party/portage-stable/dev-libs/crypto++/Manifest
vendored
Normal file
@ -0,0 +1 @@
|
||||
DIST cryptopp561.zip 1069703 RMD160 a8a5b80c995c5d4ddafba228caf8866425212fbf SHA1 31dbb456c21f50865218c57b7eaf4c955a222ba1 SHA256 98e74d8cb17a38033354519ac8ba9c5d98a6dc00bf5d1ec3c533c2e8ec86f268
|
54
sdk_container/src/third_party/portage-stable/dev-libs/crypto++/crypto++-5.6.1-r1.ebuild
vendored
Normal file
54
sdk_container/src/third_party/portage-stable/dev-libs/crypto++/crypto++-5.6.1-r1.ebuild
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/crypto++/crypto++-5.6.1-r1.ebuild,v 1.6 2011/02/27 11:30:01 klausman Exp $
|
||||
|
||||
EAPI="3"
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs
|
||||
|
||||
DESCRIPTION="Crypto++ is a C++ class library of cryptographic schemes"
|
||||
HOMEPAGE="http://cryptopp.com"
|
||||
SRC_URI="mirror://sourceforge/cryptopp/cryptopp${PV//.}.zip"
|
||||
|
||||
LICENSE="cryptopp"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="app-arch/unzip"
|
||||
RDEPEND=""
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${P}-fix_build_system.patch" \
|
||||
"${FILESDIR}/${P}-sunos.patch"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Higher optimizations cause problems.
|
||||
replace-flags -O? -O1
|
||||
filter-flags -fomit-frame-pointer
|
||||
|
||||
emake -f GNUmakefile CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" \
|
||||
LIBDIR="$(get_libdir)" || die "emake failed"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Ensure that all test vectors have Unix line endings.
|
||||
local file
|
||||
for file in TestVectors/*; do
|
||||
edos2unix ${file}
|
||||
done
|
||||
|
||||
if ! emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" test; then
|
||||
eerror "Crypto++ self-tests failed."
|
||||
eerror "Try to remove some optimization flags and reemerge Crypto++."
|
||||
die "emake test failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install \
|
||||
|| die "emake install failed"
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
--- GNUmakefile
|
||||
+++ GNUmakefile
|
||||
@@ -1,3 +1,5 @@
|
||||
+LIBTOOL = libtool
|
||||
+LIBDIR = lib
|
||||
CXXFLAGS = -DNDEBUG -g -O2
|
||||
#CXXFLAGS = -g
|
||||
# -fPIC is supported. Please report any breakage of -fPIC as a bug.
|
||||
@@ -7,8 +9,9 @@
|
||||
# LDFLAGS += -Wl,--gc-sections
|
||||
ARFLAGS = -cr # ar needs the dash on OpenBSD
|
||||
RANLIB = ranlib
|
||||
-CP = cp
|
||||
+LN_S = ln -s
|
||||
MKDIR = mkdir
|
||||
+INSTALL = install
|
||||
EGREP = egrep
|
||||
UNAME = $(shell uname)
|
||||
ISX86 = $(shell uname -m | $(EGREP) -c "i.86|x86|i86|amd64")
|
||||
@@ -120,46 +123,45 @@
|
||||
SRCS = $(shell echo *.cpp)
|
||||
endif
|
||||
|
||||
-OBJS = $(SRCS:.cpp=.o)
|
||||
-# test.o needs to be after bench.o for cygwin 1.1.4 (possible ld bug?)
|
||||
-TESTOBJS = bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o
|
||||
+OBJS = $(SRCS:.cpp=.lo)
|
||||
+# test.lo needs to be after bench.lo for cygwin 1.1.4 (possible ld bug?)
|
||||
+TESTOBJS = bench.lo bench2.lo test.lo validat1.lo validat2.lo validat3.lo adhoc.lo datatest.lo regtest.lo fipsalgt.lo dlltest.lo
|
||||
LIBOBJS = $(filter-out $(TESTOBJS),$(OBJS))
|
||||
|
||||
DLLSRCS = algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp cryptlib.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp
|
||||
-DLLOBJS = $(DLLSRCS:.cpp=.export.o)
|
||||
-LIBIMPORTOBJS = $(LIBOBJS:.o=.import.o)
|
||||
-TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o)
|
||||
-DLLTESTOBJS = dlltest.dllonly.o
|
||||
+DLLOBJS = $(DLLSRCS:.cpp=.export.lo)
|
||||
+LIBIMPORTOBJS = $(LIBOBJS:.lo=.import.lo)
|
||||
+TESTIMPORTOBJS = $(TESTOBJS:.lo=.import.lo)
|
||||
+DLLTESTOBJS = dlltest.dllonly.lo
|
||||
|
||||
-all: cryptest.exe
|
||||
+all: libcrypto++.la
|
||||
|
||||
-test: cryptest.exe
|
||||
- ./cryptest.exe v
|
||||
+test: cryptest
|
||||
+ ./cryptest v
|
||||
|
||||
clean:
|
||||
- $(RM) cryptest.exe libcryptopp.a $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
|
||||
+ $(RM) -f .libs cryptest libcrypto++.* libcryptopp.* $(LIBOBJS) $(TESTOBJS) cryptopp.dll cryptest.import dlltest $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
|
||||
|
||||
install:
|
||||
- $(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
|
||||
- $(CP) *.h $(PREFIX)/include/cryptopp
|
||||
- $(CP) *.a $(PREFIX)/lib
|
||||
- $(CP) *.so $(PREFIX)/lib
|
||||
- $(CP) *.exe $(PREFIX)/bin
|
||||
+ $(MKDIR) -p $(DESTDIR)$(PREFIX)/include/crypto++ $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
||||
+ $(INSTALL) -m 644 *.h $(DESTDIR)$(PREFIX)/include/crypto++
|
||||
+ $(LN_S) crypto++ $(DESTDIR)$(PREFIX)/include/cryptopp
|
||||
+ $(LIBTOOL) --mode=install $(INSTALL) libcrypto++.la $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
||||
+ $(LN_S) libcrypto++.a $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.a
|
||||
+ $(LN_S) libcrypto++.so.0.0.0 $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.so
|
||||
+ $(LN_S) libcrypto++.so.0.0.0 $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.so.0
|
||||
+ $(LN_S) libcrypto++.so.0.0.0 $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.so.0.0.0
|
||||
|
||||
-libcryptopp.a: $(LIBOBJS)
|
||||
- $(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
||||
- $(RANLIB) $@
|
||||
-
|
||||
-libcryptopp.so: $(LIBOBJS)
|
||||
- $(CXX) -shared -o $@ $(LIBOBJS)
|
||||
+libcrypto++.la: $(LIBOBJS)
|
||||
+ $(LIBTOOL) --tag=CC --mode=link $(CXX) $(LDFLAGS) -rpath $(PREFIX)/$(LIBDIR) -o $@ $(LIBOBJS)
|
||||
|
||||
-cryptest.exe: libcryptopp.a $(TESTOBJS)
|
||||
- $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) -L. -lcryptopp $(LDFLAGS) $(LDLIBS)
|
||||
+cryptest: libcrypto++.la $(TESTOBJS)
|
||||
+ $(LIBTOOL) --tag=CC --mode=link $(CXX) $(LDFLAGS) -o $@ $(TESTOBJS) -L. -lcrypto++ $(LDLIBS)
|
||||
|
||||
nolib: $(OBJS) # makes it faster to test changes
|
||||
- $(CXX) -o ct $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
|
||||
+ $(LIBTOOL) --tag=CC --mode=link $(CXX) -o ct $(LDFLAGS) $(OBJS) $(LDLIBS)
|
||||
|
||||
-dll: cryptest.import.exe dlltest.exe
|
||||
+dll: cryptest.import dlltest
|
||||
|
||||
cryptopp.dll: $(DLLOBJS)
|
||||
$(CXX) -shared -o $@ $(CXXFLAGS) $(DLLOBJS) $(LDFLAGS) $(LDLIBS) -Wl,--out-implib=libcryptopp.dll.a
|
||||
@@ -168,10 +170,10 @@
|
||||
$(AR) $(ARFLAGS) $@ $(LIBIMPORTOBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
-cryptest.import.exe: cryptopp.dll libcryptopp.import.a $(TESTIMPORTOBJS)
|
||||
+cryptest.import: cryptopp.dll libcryptopp.import.a $(TESTIMPORTOBJS)
|
||||
$(CXX) -o $@ $(CXXFLAGS) $(TESTIMPORTOBJS) -L. -lcryptopp.dll -lcryptopp.import $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
-dlltest.exe: cryptopp.dll $(DLLTESTOBJS)
|
||||
+dlltest: cryptopp.dll $(DLLTESTOBJS)
|
||||
$(CXX) -o $@ $(CXXFLAGS) $(DLLTESTOBJS) -L. -lcryptopp.dll $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
adhoc.cpp: adhoc.cpp.proto
|
||||
@@ -181,14 +183,14 @@
|
||||
touch adhoc.cpp
|
||||
endif
|
||||
|
||||
-%.dllonly.o : %.cpp
|
||||
+%.dllonly.lo : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DLL_ONLY -c $< -o $@
|
||||
|
||||
-%.import.o : %.cpp
|
||||
+%.import.lo : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -DCRYPTOPP_IMPORTS -c $< -o $@
|
||||
|
||||
-%.export.o : %.cpp
|
||||
+%.export.lo : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -DCRYPTOPP_EXPORTS -c $< -o $@
|
||||
|
||||
-%.o : %.cpp
|
||||
- $(CXX) $(CXXFLAGS) -c $<
|
||||
+%.lo : %.cpp
|
||||
+ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(CXXFLAGS) -c $<
|
19
sdk_container/src/third_party/portage-stable/dev-libs/crypto++/files/crypto++-5.6.1-sunos.patch
vendored
Normal file
19
sdk_container/src/third_party/portage-stable/dev-libs/crypto++/files/crypto++-5.6.1-sunos.patch
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
--- GNUmakefile.orig 2010-11-04 18:18:03.000000000 +0100
|
||||
+++ GNUmakefile 2010-11-04 19:21:29.000000000 +0100
|
||||
@@ -102,8 +102,6 @@
|
||||
ifeq ($(UNAME),SunOS)
|
||||
LDLIBS += -lnsl -lsocket
|
||||
M32OR64 = -m$(shell isainfo -b)
|
||||
-endif
|
||||
-
|
||||
ifneq ($(IS_SUN_CC),0) # override flags for CC Sun C++ compiler
|
||||
CXXFLAGS = -DNDEBUG -O -g0 -native -template=no%extdef $(M32OR64)
|
||||
LDFLAGS =
|
||||
@@ -117,6 +115,7 @@
|
||||
CXXFLAGS += -DCRYPTOPP_INCLUDE_VECTOR_CC
|
||||
endif
|
||||
endif
|
||||
+endif
|
||||
|
||||
SRCS = $(wildcard *.cpp)
|
||||
ifeq ($(SRCS),) # workaround wildcard function bug in GNU Make 3.77
|
Loading…
Reference in New Issue
Block a user