summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0b64f87b0e3a2728b7b78942bdabcb36f015842a (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Maintainer: taotieren <admin@taotieren.com>

pkgname=qucs-s-git
pkgver=r5691.0fe4bc4
pkgrel=1
epoch=
pkgdesc="Qucs-S provides GUI for different circuit simulation kernels. "
arch=($CARCH)
url="https://github.com/ra3xdh/qucs_s"
license=('GPL-2.0-only')
_qt=qt6
groups=()
depends=(
    sh
    gcc-libs
    glibc
    graphicsmagick
    hicolor-icon-theme
    imagemagick
    ngspice
    python
    python-numpy
    python-matplotlib
    #     python-parse
    $_qt-base
    $_qt-charts
    $_qt-svg
    octave)
makedepends=(
    cmake
    dos2unix
    ninja
    git
    autoconf
    automake
    perl-gd
    perl-xml-libxml
    gperf
    libcups
    libtool
    mesa
    flex
    bison
    $_qt-tools
)
optdepends=(
    'ngspice: Mixed-level/Mixed-signal circuit simulator based on Spice3f5, Ciber1b1, and Xspice'
    'spiceopus: Spice Opus is a free general purpose circuit simulator specially suited for optimization loops'
    'qucsator: An integrated circuit simulator'
    'qucs: for Qucsator simulation backend'
    'freehdl: to permit digital circuit simulation'
    'asco: to enable circuit optimization'
    'openvaf: A Next-Generation Verilog-A compiler https://openvaf.semimod.de/'
    'qucs-rflayout: Export Qucs RF schematics to KiCad layouts & OpenEMS scripts')
checkdepends=()
optdepends=()
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
replaces=()
backup=()
options=('!makeflags')
install=
changelog=
source=("${pkgname}::git+${url}.git"
    "qucsator_rf::git+https://github.com/ra3xdh/qucsator_rf.git")
noextract=()
sha256sums=('SKIP'
    'SKIP')
validpgpkeys=()

pkgver() {
    cd "${srcdir}/${pkgname}"
    (
        set -o pipefail
        git describe --long --tag --abbrev=7 -match='[0-9]*.[0-9]*.[0-9]*' 2>/dev/null |
            grep -v 'continuous_build' |
            sed 's/^v//g;s/\([^-]*-g\)/r\1/;s/-/./g' ||
            printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
    )
}

prepare() {
    git -C "${srcdir}/${pkgname}" clean -dfx
    cd "${srcdir}/${pkgname}"
    git submodule init
    git config submodule.qucsator_rf.url "$srcdir/qucsator_rf"
    git -c protocol.file.allow=always submodule update
}

build() {
    cd "${srcdir}/${pkgname}"

    cmake -D CMAKE_INSTALL_PREFIX=/usr \
        -DWITH_QT6=ON \
        -B build \
        -G Ninja

    ninja -C build
}

package() {
    cd "${srcdir}/${pkgname}"
    DESTDIR="${pkgdir}" ninja -C "${srcdir}"/${pkgname}/build install
}