11_pkgname=RedPanda-CPP
22pkgname=${_pkgname,,}
3- pkgver=2.25
3+ pkgver=2.26
44pkgrel=1
55pkgdesc=' A fast, lightweight, open source, and cross platform C/C++/GNU Assembly IDE'
66arch=(' i686' ' pentium4' ' x86_64' ' arm' ' armv6h' ' armv7h' ' aarch64' ' riscv64' )
77url=" https://github.com/royqh1979/$_pkgname "
88license=(' GPL3' )
99depends=(qt5-base qt5-svg gcc gdb)
1010makedepends=(qt5-tools)
11+ makedepends_x86_64=(mingw-w64-gcc)
1112optdepends=(
1213 ' clang: C/C++ compiler (alternative)'
1314)
14- source=(" $_pkgname -$pkgver .tar.gz::https://github.com/royqh1979/$_pkgname /archive/refs/tags/$pkgver .tar.gz" )
15- sha256sums=(' 8e655b1522695618de7d973df6e732c853b4f8eabdc3efbea15a8820d97acc32' )
15+ optdepends_x86_64=(
16+ ' mingw-w64-gcc: Windows C/C++ compiler'
17+ ' wine: run Windows executable'
18+ ' aarch64-linux-gnu-gcc: AArch64 C/C++ compiler'
19+ ' qemu-user-static: run AArch64 executable'
20+ ' qemu-user-static-binfmt: run AArch64 executable'
21+ )
22+ source=(
23+ " $_pkgname -$pkgver .tar.gz::https://github.com/royqh1979/$_pkgname /archive/refs/tags/$pkgver .tar.gz"
24+ ' compiler_hint.lua'
25+ )
26+ sha256sums=(' 8f8a5d131c4155c0af23bf2a1faa9ad1899d092b598010d43ebb2d8f0604942c'
27+ ' 65647471f5360648800aaa6027a8d8be3e2121ce0c470b99b8cace6f1654f20d' )
28+
29+ prepare () {
30+ sed -i ' /CONFIG += ENABLE_LUA_ADDON/ { s/^#\s*// }' " $srcdir /$_pkgname -$pkgver /RedPandaIDE/RedPandaIDE.pro"
31+ }
1632
1733build () {
34+ local _utf8dir=" $srcdir /$_pkgname -$pkgver /platform/windows/utf8"
35+ if [[ " $CARCH " == ' x86_64' ]]; then
36+ x86_64-w64-mingw32-gcc -Os -fno-exceptions -nodefaultlibs -nostdlib -c -o utf8init.x86_64.o " $_utf8dir /utf8init.cpp"
37+ x86_64-w64-mingw32-windres -O coff -o utf8manifest.x86_64.o " $_utf8dir /utf8manifest.rc"
38+ i686-w64-mingw32-gcc -Os -fno-exceptions -nodefaultlibs -nostdlib -c -o utf8init.i686.o " $_utf8dir /utf8init.cpp"
39+ i686-w64-mingw32-windres -O coff -o utf8manifest.i686.o " $_utf8dir /utf8manifest.rc"
40+ fi
41+
1842 mkdir redpanda-build
1943 cd redpanda-build
2044 qmake \
@@ -26,6 +50,16 @@ build() {
2650}
2751
2852package () {
53+ local _libexecdir=" $pkgdir /usr/lib/RedPandaCPP"
54+ install -Dm644 " compiler_hint.lua" " $_libexecdir /compiler_hint.lua"
55+
56+ if [[ " $CARCH " == ' x86_64' ]]; then
57+ install -Dm644 " utf8init.x86_64.o" " $_libexecdir /x86_64-w64-mingw32/utf8init.o"
58+ install -Dm644 " utf8manifest.x86_64.o" " $_libexecdir /x86_64-w64-mingw32/utf8manifest.o"
59+ install -Dm644 " utf8init.i686.o" " $_libexecdir /i686-w64-mingw32/utf8init.o"
60+ install -Dm644 " utf8manifest.i686.o" " $_libexecdir /i686-w64-mingw32/utf8manifest.o"
61+ fi
62+
2963 cd redpanda-build
3064 make INSTALL_ROOT=" $pkgdir " install
3165}
0 commit comments