aports/community/dpdk/APKBUILD
2023-10-14 17:33:02 +00:00

287 lines
4.1 KiB
Plaintext

# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=dpdk
pkgver=23.07
pkgrel=2
_majorver=${pkgver%%.*}
pkgdesc="Data Plane Development Kit"
url="https://dpdk.org/"
# s390x, riscv64 is not supported, 32bit not supported
arch="aarch64 ppc64le x86_64"
license="BSD-3-Clause AND GPL-2.0-only"
makedepends="
bsd-compat-headers
dtc-dev
isa-l-dev
libpcap-dev
linux-headers
meson
numactl-dev
openssl-dev
py3-elftools
rdma-core-dev
zlib-dev
"
subpackages="$pkgname-static $pkgname-dev $pkgname-utils"
source="https://fast.dpdk.org/rel/dpdk-$pkgver.tar.xz
lfs64.patch
"
# at least half tests fail on each platform
options="!check"
_libs="
acl
baseband_acc
baseband_fpga_5gnr_fec
baseband_fpga_lte_fec
baseband_la12xx
baseband_null
baseband_turbo_sw
bbdev
bitratestats
bpf
bus_auxiliary
bus_cdx
bus_dpaa
bus_fslmc
bus_ifpga
bus_pci
bus_platform
bus_vdev
bus_vmbus
cfgfile
cmdline
common_cnxk
common_cpt
common_dpaax
common_iavf
common_idpf
common_mlx5
common_octeontx
common_qat
compress_isal
compress_mlx5
compress_octeontx
compress_zlib
compressdev
crypto_bcmfs
crypto_caam_jr
crypto_ccp
crypto_cnxk
crypto_dpaa2_sec
crypto_dpaa_sec
crypto_mlx5
crypto_nitrox
crypto_null
crypto_octeontx
crypto_openssl
crypto_scheduler
crypto_virtio
cryptodev
distributor
dma_cnxk
dma_dpaa
dma_dpaa2
dma_skeleton
dmadev
eal
efd
ethdev
event_cnxk
event_dpaa
event_dpaa2
event_dsw
event_octeontx
event_opdl
event_skeleton
event_sw
eventdev
fib
gpudev
graph
gro
gso
hash
ip_frag
ipsec
jobstats
kvargs
latencystats
lpm
mbuf
member
mempool
mempool_bucket
mempool_cnxk
mempool_dpaa
mempool_dpaa2
mempool_octeontx
mempool_ring
mempool_stack
meter
metrics
ml_cnxk
mldev
net
net_af_packet
net_ark
net_atlantic
net_avp
net_axgbe
net_bnx2x
net_bnxt
net_bond
net_cnxk
net_cpfl
net_cxgbe
net_dpaa
net_dpaa2
net_e1000
net_ena
net_enetc
net_enetfec
net_enic
net_failsafe
net_fm10k
net_gve
net_hinic
net_i40e
net_iavf
net_ice
net_idpf
net_igc
net_ionic
net_ipn3ke
net_ixgbe
net_memif
net_mlx4
net_mlx5
net_netvsc
net_nfp
net_ngbe
net_null
net_octeon_ep
net_octeontx
net_pcap
net_pfe
net_qede
net_ring
net_softnic
net_tap
net_thunderx
net_txgbe
net_vdev_netvsc
net_vhost
net_virtio
net_vmxnet3
node
pcapng
pci
pdcp
pdump
pipeline
port
power
raw_cnxk_bphy
raw_cnxk_gpio
raw_dpaa2_cmdif
raw_ifpga
raw_ntb
raw_skeleton
rawdev
rcu
regex_cn9k
regex_mlx5
regexdev
reorder
rib
ring
sched
security
stack
table
telemetry
timer
vdpa_ifc
vdpa_mlx5
vhost
"
_x86_64_libs="
common_sfc_efx
dma_ioat
dma_idxd
dma_hisilicon
event_dlb2
net_hns3
net_mana
net_sfc
vdpa_sfc
"
_aarch64_libs="
common_sfc_efx
dma_hisilicon
net_hns3
net_sfc
vdpa_sfc
"
case $CARCH in
x86_64)
_libs="$_libs $_x86_64_libs"
;;
aarch64)
_libs="$_libs $_aarch64_libs"
;;
esac
for _lib in $_libs; do
subpackages="$subpackages $pkgname-${_lib//_/-}:splitlib"
done
build() {
abuild-meson \
--default-library=shared \
-Denable_docs=false \
-Dmbuf_refcnt_atomic=false \
-Dtests="$(want_check && echo true || echo false)" \
-Dplatform=generic \
. output
meson compile -C output
}
check() {
meson test --no-rebuild --print-errorlogs -C output
}
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
rm -rf "$pkgdir"/usr/bin/dpdk-test*
rm -r "$pkgdir"/usr/share/dpdk/examples
}
dev() {
default_dev
amove usr/lib/dpdk/pmds-*/*.so
}
utils() {
pkgdesc="command line utilities for $pkgname"
depends="python3"
amove usr/bin
}
splitlib() {
pkgdesc="DPDK library: $subpkgname"
local libname="${subpkgname#"$pkgname"-}"
libname=${libname//-/_}
local _real=$(readlink "$pkgdir"/usr/lib/librte_$libname.so.$_majorver)
if echo $_real | grep -q pmds; then
amove usr/lib/$_real*
fi
amove usr/lib/librte_$libname.so.*
}
sha512sums="
4859469efe2cc744bddb25ec27efb164f2e4979cce2ffc049566e40e0e6fc797c9c87aeec67ef81293dda0268a97da700ebcdd8110f9d578cb723145c2c0cff7 dpdk-23.07.tar.xz
be6c61ff8b29317e3948bd98e75f08aaf58cded700b18bccef4c77ca68b22906f70b80e57dc203beb45a07e197872b41762b858f674563d752bd73d7f6d53d5a lfs64.patch
"