summaryrefslogblamecommitdiff
path: root/user/mbedtls/APKBUILD
blob: 8029464314b0af486259f9e88c759219c58e2e29 (plain) (tree)
1
2
3
4


                                                           
            










                                                                                                     






                      























                                                                                          
                                                                                                                                                                   
# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=mbedtls
pkgver=3.3.0
pkgrel=0
pkgdesc="Lightweight TLS library"
url="https://tls.mbed.org"
arch="all"
license="Apache-2.0"
depends=""
checkdepends="python3"
makedepends="cmake"
subpackages="$pkgname-dev"
source="mbedtls-$pkgver.tar.gz::https://github.com/ARMmbed/mbedtls/archive/refs/tags/v$pkgver.tar.gz"

# secfixes:
#   3.3.0-r0:
#     - CVE-2021-45451
#     - CVE-2022-35409
#     - CVE-2022-46392
#     - CVE-2022-46393

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC" \
		-DCMAKE_C_FLAGS="$CFLAGS -fPIC" \
		${CMAKE_CROSSOPTS} \
		.
	make
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="c7f59973a77566f5ffc20cb315af5dce774e51c8cb90ad28b1d48bfa4714165617c46aba307523b4f3efa765fb7b8e0f0855d91d52ce7b8607d4a5aa85f5f71a  mbedtls-3.3.0.tar.gz"