summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b8ac4d5df8b983000e20cb34ce01aab6ad20d0fa (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Maintainer: taotieren <admin@taotieren.com>

pkgbase=scopehal-apps
pkgname=scopehal-apps
_tagname=0.2.2
pkgver=${_tagname//-/+}
pkgrel=5
epoch=
pkgdesc="ngscopeclient and other client applications for libscopehal"
arch=($CARCH)
url="https://github.com/ngscopeclient/scopehal-apps"
license=('BSD-3-Clause')
provides=(${pkgname})
conflicts=(${pkgname})
groups=()
depends=(
    glib2
    glibc
    gtk3
    libgcc
    libgomp
    liblxi
    libpng
    libsigc++-3.0
    libstdc++
    libwayland-client.so
    libz.so
    glfw
    glslang 
    hicolor-icon-theme
    hidapi
    vulkan-icd-loader
    yaml-cpp
)
makedepends=(
    cmake
    git
    ninja
    catch2
    fftw
    lsb-release
    nvtx
    openmp
    pkgconf
    shaderc
    vulkan-headers
    wayland
)
checkdepends=()
optdepends=(
    spirv-tools
    linux-gpib
)
replaces=()
backup=()
options=()
install=${pkgname}.install
changelog=
source=(
    "${pkgname}.install"
    "${pkgname}::git+${url}.git#tag=v${_tagname}"
    "lib::git+https://github.com/ngscopeclient/scopehal.git"
    "xptools::git+https://github.com/ngscopeclient/xptools.git"
    "log::git+https://github.com/ngscopeclient/logtools.git"
    "VkFFT::git+https://github.com/ngscopeclient/VkFFT.git"
    "canvas_ity::git+https://github.com/a-e-k/canvas_ity.git"
    "doc::git+https://github.com/ngscopeclient/scopehal-docs.git"
    "imgui::git+https://github.com/ngscopeclient/imgui.git"
    "imgui-node-editor::git+https://github.com/ngscopeclient/imgui-node-editor.git"
    "ImGuiFileDialog::git+https://github.com/aiekick/ImGuiFileDialog.git"
    "nativefiledialog-extended::git+https://github.com/btzy/nativefiledialog-extended.git"
    "wayland-protocols::git+https://gitlab.freedesktop.org/wayland/wayland-protocols.git"
    "imgui_markdown::git+https://github.com/juliettef/imgui_markdown.git"
)
sha256sums=('625fffb174a1fcc1fac27fde302d08220262b574acb72d7ac52f82d1f3b7f0d8'
            '0cf732ca404794deecff51c73def0ad64765ed5daa31b2cd2f069f9627cac5ae'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')
# validpgpkeys=()
# noextract=()

prepare() {
    git -C "${srcdir}/${pkgname}" clean -dfx
    git -C "${srcdir}/lib" clean -dfx
    git -C "${srcdir}/nativefiledialog-extended" clean -dfx
    
    cd "${srcdir}/${pkgname}"
    git submodule init
    git config submodule.lib.url "$srcdir/lib"
    git config submodule.doc.url "$srcdir/doc"
    git config submodule.src/imgui.url "$srcdir/imgui"
    git config submodule.src/imgui-node-editor.url "$srcdir/imgui-node-editor"
    git config submodule.src/ImGuiFileDialog.url "$srcdir/ImGuiFileDialog"
    git config submodule.src/nativefiledialog-extended.url "$srcdir/nativefiledialog-extended"
    git config submodule.src/imgui_markdown.url "$srcdir/imgui_markdown"
    git -c protocol.file.allow=always submodule update
    
    cd "${srcdir}/${pkgname}/lib"
    git submodule init
    git config submodule.xptools.url "$srcdir/xptools"
    git config submodule.log.url "$srcdir/log"
    git config submodule.VkFFT.url "$srcdir/VkFFT"
    git config submodule.canvas_ity.url "$srcdir/canvas_ity"
    git -c protocol.file.allow=always submodule update

    cd "${srcdir}/${pkgname}/src/nativefiledialog-extended"
    git submodule init
    git config submodule.3ps/wayland-protocols.url "$srcdir/wayland-protocols"
    git -c protocol.file.allow=always submodule update
}

build() {
    export CFLAGS+=" ${CPPFLAGS}"
    export CXXFLAGS+=" ${CPPFLAGS}"
    export LDFLAGS+=" ${LDFLAGS}"

    cmake -S ${srcdir}/${pkgname} \
        -Bbuild -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        -GNinja \
        -Wno-author
        # -DBUILD_DOC=ON \

    ninja -C ${srcdir}/build
}

package() {
  install -Dm0644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  DESTDIR="${pkgdir}" ninja -C "${srcdir}/build" install
}