Skip to contentSkip to conversation

cryptopp: add a recipe for version 8.9.0

PATCH Superseded Antonin Godard 2 participants 4 messages Nov 21, 2024

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cryptopp: add a recipe for version 8.9.0

cryptopp is a library of cryptographic schemes written in C++

---
 meta-oe/recipes-crypto/cryptopp/cryptopp_8.9.0.bb | 45 +++++++++++++++++++++++
 1 file changed, 45 insertions(+)
meta-oe/recipes-crypto/cryptopp/cryptopp_8.9.0.bb new file +45 -0
new file mode 100644
index 0000000000000000000000000000000000000000..06652a3449525ffe649c3af45ad2809b96332b0f
@@ -0,0 +1,45 @@
+SUMMARY = "A free C++ class library of cryptographic schemes"
+DESCRIPTION = "Crypto++ Library is a free C++ class library of cryptographic schemes"
+CVE_PRODUCT = "cryptopp"
+HOMEPAGE = "http://www.cryptopp.com/"
+SECTION = "libs"
+LICENSE = "BSL-1.0"
+LIC_FILES_CHKSUM = "file://License.txt;md5=ca6dacb7ef68b1ab5dfa3bed24c12003"
+
+SRC_URI = "git://github.com/weidai11/cryptopp.git;protocol=https;branch=master"
+SRCREV = "843d74c7c97f9e19a615b8ff3c0ca06599ca501b"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+CXXFLAGS:append = " -fPIC"
+# Avoid target mismatch error
+CXXFLAGS:append:aarch64 = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", " -DCRYPTOPP_DISABLE_ASM=1", "", d)}"
+EXTRA_OEMAKE += "HAS_SOLIB_VERSION=1"
+
+do_compile () {
+    oe_runmake -f GNUmakefile-cross libcryptopp.a libcryptopp.so cryptest.exe
+}
+
+do_install () {
+    DESTDIR="${D}" \
+        BINDIR="${bindir}" \
+        DATADIR="${datadir}" \
+        INCLUDEDIR="${includedir}" \
+        LIBDIR="${libdir}" \
+        oe_runmake install
+
+    # Rename cryptest.exe to cryptest
+    if [ -f "${D}${bindir}/cryptest.exe" ]; then
+        mv "${D}${bindir}/cryptest.exe" "${D}${bindir}/cryptest"
+    fi
+}
+
+PACKAGE_BEFORE_PN += "${PN}-cryptest ${PN}-testdata ${PN}-testvectors"
+
+FILES:${PN}-cryptest = "${bindir}/cryptest"
+FILES:${PN}-testdata = "${datadir}/cryptopp/TestData"
+FILES:${PN}-testvectors = "${datadir}/cryptopp/TestVectors"
+
+BBCLASSEXTEND = "native nativesdk"

---
base-commit: 575951815e3850cff8ed78ad2ef53b74e014a8c2
change-id: 20241121-add-cryptopp-f78794be963c

Best regards,

Signature · 1 line
Antonin Godard <[email protected]>
#1 lore raw
Quoted 15 lines · Antonin Godard

cryptopp is a library of cryptographic schemes written in C++

---
 meta-oe/recipes-crypto/cryptopp/cryptopp_8.9.0.bb | 45 +++++++++++++++++++++++
 1 file changed, 45 insertions(+)
meta-oe/recipes-crypto/cryptopp/cryptopp_8.9.0.bb new file +2 -0
new file mode 100644
index 0000000000000000000000000000000000000000..06652a3449525ffe649c3af45ad2809b96332b0f
@@ -0,0 +1,45 @@
+SUMMARY = "A free C++ class library of cryptographic schemes"
+DESCRIPTION = "Crypto++ Library is a free C++ class library of cryptographic schemes"

meta-oe/recipes-crypto/cryptopp/cryptopp_8.9.0.bb line 12

Quoted 10 lines
meta-oe/recipes-crypto/cryptopp/cryptopp_8.9.0.bb new file +10 -0
+CVE_PRODUCT = "cryptopp"
+HOMEPAGE = "http://www.cryptopp.com/"
+SECTION = "libs"
+LICENSE = "BSL-1.0"
+LIC_FILES_CHKSUM = "file://License.txt;md5=ca6dacb7ef68b1ab5dfa3bed24c12003"
+
+SRC_URI = "git://github.com/weidai11/cryptopp.git;protocol=https;branch=master"
+SRCREV = "843d74c7c97f9e19a615b8ff3c0ca06599ca501b"
+
+S = "${WORKDIR}/git"

Ha, I was working on Scarthgap and forgot. I will change this to UNPACKDIR.

Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

Hi,

Would be nice to have the reason why this is needed in oe-core in the commit message. As dependency to some usecase or recipe, for example.

Cheers,

-Mikko

#3 lore raw

Hi Mikko,

Quoted 4 lines · Mikko Rapeli

Hi,

Would be nice to have the reason why this is needed in oe-core in the commit message. As dependency to some usecase or recipe, for example.

I was aiming at meta-openembedded/meta-oe, I don't think it's needed in oe-core too. I wrote this recipe for a customer project, and since the project is somewhat popular and maintained I felt like sharing the recipe for others. I don't have any other specific reason to send it here.

Regards,
Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com