summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 38b6d98a8bf598b5c4e41c54f21ffeaca0047b32 (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
# Maintainer: taotieren <admin@taotieren.com>

pkgname=qucs-s-git
pkgver=25.1.1.r6.g565efd3b
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 --exclude 'continuous_build' --long 2>/dev/null | 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
}