aboutsummaryrefslogblamecommitdiffstats
path: root/main/botan/APKBUILD
blob: deb13b99f94ab96ff386873038fd0d9d006e8a2d (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                     
                                                   
             
             
        

                                  
          
                      
                                                                        
                                  
                                                     

                                                                  
 
           

                      
             
                      
             
                      
             
                     
             
                     
 
              
                                                                           

    
         

                                                                     
                                


                                         


                               

                                


                                             
 



            
                                                


           



                                        
                                                                                                                                                                  
# Contributor: tcely <tcely@users.noreply.github.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=botan
pkgver=2.17.3
pkgrel=2
pkgdesc="Crypto and TLS for C++11"
url="https://botan.randombit.net/"
arch="all"
license="BSD-2-Clause"
depends_dev="boost-dev bzip2-dev openssl-dev sqlite-dev xz-dev zlib-dev"
makedepends="$depends_dev python3"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="https://botan.randombit.net/releases/Botan-$pkgver.tar.xz"
builddir="$srcdir/Botan-$pkgver"

# secfixes:
#   2.17.3-r0:
#     - CVE-2021-24115
#   2.9.0-r0:
#     - CVE-2018-20187
#   2.7.0-r0:
#     - CVE-2018-12435
#   2.6.0-r0:
#     - CVE-2018-9860
#   2.5.0-r0:
#     - CVE-2018-9127

case $CARCH in
	ppc64le|armhf|armv7) options="$options !check" ;; # 3 tests timeout
esac

build() {
	# botan benefits from -O3. Upstream is using it when testing.
	CXXFLAGS="$CXXFLAGS -O3" \
	python3 ./configure.py \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--with-boost \
		--with-bzip2 \
		--with-lzma \
		--with-openmp \
		--with-openssl \
		--with-sqlite3 \
		--with-zlib \
		--with-os-feature=getrandom \
		--disable-static

	make
}

check() {
	LD_LIBRARY_PATH="$builddir" ./botan-test
}

package() {
	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/lib/python*
}

sha512sums="ead0f144dfb9eca66d0e81e376d0d49f4b0b6bc1599f8cf52299e1753645b5b20100efa004ef5f9571f7bea88958f35db38367fc26f2603890f8f199cc890dbc  Botan-2.17.3.tar.xz"