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

pkgbase=purc-git
pkgname=purc-git
pkgver=0.9.15.r33.g553ac0218
pkgrel=1
pkgdesc="The prime HVML interpreter for C/C++ Language."
arch=(x86_64
    aarch64
    riscv64
    mips64
    powerpc
    powerpc64le)
url="https://github.com/HVML/PurC"
license=('LGPL-3.0')
groups=(hvml-git
    hybridos2-git)
provides=(${pkgbase%-git}
    csseng
    domruler
    purc-fetcher
    libcsseng.so
    libpurc-dvobj-PY.so
    libpurc-dvobj-FS.so
    libpurc-dvobj-MATH.so
    libpurc-fetcher.so
    libdomruler.so
    libpurc.so)
conflicts=(${pkgbase%-git})
replaces=(domruler
    purc-fetcher)
depends=(glib2
    glibc)
makedepends=(bison
    cmake
#     cython
    flex
    git
    ninja
    ccache
    curl
#     gcc
    clang
    llvm
    gperf
    lua-lgi
    ncurses
    libgcrypt
    libjpeg-turbo
    libnotify
    libmanette
    libtasn1
    libsecret
    libseccomp
    libpsl
    libxml2
    libxslt
    libsoup
    icu
#     mariadb
    openssl
    sqlite
    systemd
    pkgconf
    python
    zlib)
checkdepends=(check
    gtest
    valgrind)
optdepends=('python-numpy: Scientific tools for Python'
    'webkit2gtk-hvml: Web content engine for GTK (HVML)'
    'webkit2gtk: Web content engine for GTK'
    'xguipro: xGUI (the X Graphics User Interface) Pro is a modern, cross-platform, and advanced HVML renderer which is based on tailored WebKit.')
source=("${pkgname%-git}::git+${url}.git")
sha256sums=('SKIP')
options=('!strip')

pkgver() {
    cd "${srcdir}/${pkgname%-git}/"
    git describe --long --tags | sed 's/ver.//g;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${srcdir}/${pkgname%-git}"

#     sed -i 's|0 9 14|0 9 15|g' CMakeLists.txt
# see´╝Ühttps://wiki.archlinux.org/title/CMake_package_guidelines
#     cmake -DCMAKE_BUILD_TYPE=Release \
# gcc build
#     cmake -DCMAKE_BUILD_TYPE=None \
#         -DPORT=Linux \
#         -DENABLE_CHINESE_NAMES=ON \
#         -DCMAKE_INSTALL_PREFIX=/usr \
#         -DCMAKE_INSTALL_LIBDIR=lib \
#         -DCMAKE_INSTALL_LIBEXECDIR=lib \
#         -B build \
#         -G Ninja

# clang llvm build
    cmake -DCMAKE_BUILD_TYPE=None \
        -DPORT=Linux \
        -DENABLE_CHINESE_NAMES=ON \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DCMAKE_INSTALL_LIBEXECDIR=lib \
        -DCMAKE_CXX_COMPILER=clang++ \
        -DCMAKE_C_COMPILER=clang \
        -B build \
        -G Ninja

    ninja -C build
}

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