-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
49 lines (44 loc) · 1.78 KB
/
template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Template file for 'hobbits'
pkgname=hobbits
version=0.53.1
revision=1
_pffft_commit=233c26659185ff55958e96e4c25f3fcafe249a65
_pffft_dir="jpommier-pffft-${_pffft_commit:0:12}"
create_wrksrc=yes
build_wrksrc="hobbits-${version}"
build_style=cmake
configure_args="-DPFFFT_ROOT=../${_pffft_dir}"
hostmakedepends="pkg-config qt5-host-tools qt5-qmake python3"
makedepends="libusb-devel libpcap-devel python3-devel qt5-devel"
short_desc="Multi-platform GUI for bit-based analysis, processing and visualization"
maintainer="classabbyamp <dev@kb6.ee>"
license="MIT, custom:FFTPACK"
homepage="https://mahlet-inc.github.io"
changelog="https://raw.githubusercontent.com/Mahlet-Inc/hobbits/master/CHANGELOG.md"
distfiles="https://github.com/Mahlet-Inc/hobbits/archive/refs/tags/v${version}.tar.gz
https://bitbucket.org/jpommier/pffft/get/${_pffft_commit}.tar.gz"
checksum="e63c51228c3f00f56a2ebf79fec1975544b1c6c986d58dff69643da46148316b
@c1df1ae9d807f2e0fc2391bd8e714ac5bfc76a54b20ef3de3d82acb026c79f74"
case "$XBPS_TARGET_MACHINE" in
arm*|aarch64*|ppc*) CXXFLAGS+=" -fsigned-char"
esac
case "$XBPS_TARGET_MACHINE" in
arm*) broken="requires NEON instructions" ;;
aarch64*) PFFFT_CFLAGS= ;;
*) PFFFT_CFLAGS="-msse -mfpmath=sse" ;;
esac
pre_configure() {
# upstream provides no way to set the version through configure_args
echo "${version}" > .version
msg_normal "pffft-${_pffft_commit:0:12}: building ...\n"
cd "../$_pffft_dir"
${CC} ${CFLAGS} ${PFFFT_CFLAGS} -lm -O3 -Wall -c pffft.c -o pffft.o
${AR} rcs libpffft.a pffft.o
sed -e '/\*\//,$d; 1s/\/\* //; s/^ //' pffft.c > LICENSE.pffft
msg_normal "pffft-${_pffft_commit:0:12}: finished\n"
}
post_install() {
vinstall src/hobbits-gui/images/icons/HobbitsRingSmall.png 644 usr/share/pixmaps
vlicense LICENSE.txt
vlicense ../${_pffft_dir}/LICENSE.pffft
}