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

pkgbase=purc-git
pkgname=purc-git
pkgver=0.9.19.r26.g1e47c60c2
pkgrel=2
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-only')
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=(
    gcc-libs
    glib2
    glibc
    libgcrypt
    libsoup3
    libxml2
    ncurses
    sqlite
    openssl
    python
    zlib)
makedepends=(
    #     avahi
    bison
    cmake
    flex
    git
    ninja
    ccache
    curl
    #     gcc
    clang
    llvm
    gperf
    lua-lgi
    libjpeg-turbo
    libnotify
    libmanette
    libtasn1
    libsecret
    libseccomp
    libpsl
    libxslt
    linux-api-headers
    icu
    #     libmariadbclient
    systemd
    pkgconf
    xorgproto)
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+${url}.git")
sha256sums=('SKIP')
options=()

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

prepare() {
    git -C "${srcdir}/${pkgname}" clean -dfx
}

build() {
    export LDFLAGS="-L/lib64"
    if test -n "$LD_LIBRARY_PATH"; then
        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/lib64"
    else
        export LD_LIBRARY_PATH=/lib64
    fi
    cd "${srcdir}/${pkgname}"

    #     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 \
        -Wno-dev \
        -B build \
        -G Ninja

    ninja -C build
}

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