-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
57 lines (53 loc) · 1.97 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
50
51
52
53
54
55
56
57
# Template file for 'hobbits'
pkgname=hobbits
version=0.53.1
revision=1
_pffft_commit=7914df2127c206ae501a6cb2950ee65a94662215
_pffft_dir="jpommier-pffft-${_pffft_commit:0:12}"
create_wrksrc=yes
build_wrksrc="hobbits-${version}"
build_style=cmake
configure_args="-DBUILD_VERSION=${version}"
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 <void@placeviolette.net>"
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
@0b9f0e99ace190e607961f72953394aa0f0387826d4e478027111d71d56839a8"
case "$XBPS_TARGET_MACHINE" in
arm*|aarch64*|ppc*) CXXFLAGS+=" -fsigned-char"
esac
case "$XBPS_TARGET_MACHINE" in
aarch64*)
configure_args+=" -DPFFFT_ENABLE_SIMD=ON"
;;
ppc64*)
configure_args+=" -DPFFFT_ENABLE_SIMD=ON"
CFLAGS+=" -maltivec -mabi=altivec"
;;
x86_64*|i686*)
configure_args+=" -DPFFFT_ENABLE_SIMD=ON"
CFLAGS+=" -msse -mfpmath=sse"
;;
*) # don't use SIMD on unsupported platforms
;;
esac
post_extract() {
# until upstream merges Mahlet-Inc/hobbits#143 and releases a new version,
# the directory must be added, instead of removing the submodule
# rm -rf ${build_wrksrc}/external/pffft
mkdir ${build_wrksrc}/external
mv ${_pffft_dir} ${build_wrksrc}/external/pffft
}
post_install() {
vinstall src/hobbits-gui/images/icons/HobbitsRingSmall.png 644 usr/share/pixmaps
# capture the FFTPACK license from the header comment of pffft.c
sed -E '/\*\//,$d; 1s/\/\* //; s/^[[:blank:]]+//' external/pffft/pffft.c > LICENSE.pffft
vlicense LICENSE.pffft
vlicense LICENSE.txt
}