2023-01-03 12:18:02 +08:00
|
|
|
_pkgname=RedPanda-CPP
|
|
|
|
pkgname=${_pkgname,,}-git
|
2023-11-19 08:48:58 +08:00
|
|
|
pkgver=__VERSION__
|
2023-01-03 12:18:02 +08:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc='A fast, lightweight, open source, and cross platform C++ IDE (development version)'
|
2023-08-13 20:56:46 +08:00
|
|
|
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64' 'riscv64')
|
2023-01-03 12:18:02 +08:00
|
|
|
url="https://github.com/royqh1979/$_pkgname"
|
|
|
|
license=('GPL3')
|
|
|
|
depends=(qt5-base qt5-svg gcc gdb)
|
2023-11-19 08:48:58 +08:00
|
|
|
makedepends=(qt5-tools)
|
2024-01-18 16:14:36 +08:00
|
|
|
makedepends_x86_64=(mingw-w64-gcc)
|
2023-01-03 12:18:02 +08:00
|
|
|
optdepends=(
|
2023-03-04 18:44:39 +08:00
|
|
|
'clang: C/C++ compiler (alternative)'
|
2023-01-03 12:18:02 +08:00
|
|
|
)
|
2024-01-18 16:14:36 +08:00
|
|
|
optdepends_x86_64=(
|
|
|
|
'mingw-w64-gcc: Windows C/C++ compiler'
|
|
|
|
'wine: run Windows executable'
|
|
|
|
'aarch64-linux-gnu-gcc: AArch64 C/C++ compiler'
|
|
|
|
'qemu-user-static: run AArch64 executable'
|
|
|
|
'qemu-user-static-binfmt: run AArch64 executable'
|
|
|
|
)
|
2023-01-03 12:18:02 +08:00
|
|
|
conflicts=("${_pkgname,,}")
|
|
|
|
provides=("${_pkgname,,}")
|
2024-01-18 16:14:36 +08:00
|
|
|
source=(
|
|
|
|
"$_pkgname.tar.gz"
|
|
|
|
'compiler_hint.lua'
|
|
|
|
)
|
|
|
|
sha256sums=(
|
|
|
|
'SKIP'
|
|
|
|
'SKIP'
|
|
|
|
)
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
sed -i '/CONFIG += ENABLE_LUA_ADDON/ { s/^#\s*// }' RedPanda-CPP/RedPandaIDE/RedPandaIDE.pro
|
|
|
|
}
|
2023-01-03 12:18:02 +08:00
|
|
|
|
|
|
|
build() {
|
2024-01-18 16:14:36 +08:00
|
|
|
local _utf8dir="$srcdir/$_pkgname/platform/windows/utf8"
|
|
|
|
if [[ "$CARCH" == 'x86_64' ]]; then
|
|
|
|
x86_64-w64-mingw32-gcc -Os -fno-exceptions -nodefaultlibs -nostdlib -c -o utf8init.x86_64.o "$_utf8dir/utf8init.cpp"
|
|
|
|
x86_64-w64-mingw32-windres -O coff -o utf8manifest.x86_64.o "$_utf8dir/utf8manifest.rc"
|
|
|
|
i686-w64-mingw32-gcc -Os -fno-exceptions -nodefaultlibs -nostdlib -c -o utf8init.i686.o "$_utf8dir/utf8init.cpp"
|
|
|
|
i686-w64-mingw32-windres -O coff -o utf8manifest.i686.o "$_utf8dir/utf8manifest.rc"
|
|
|
|
fi
|
|
|
|
|
2023-01-03 12:18:02 +08:00
|
|
|
mkdir redpanda-build
|
|
|
|
cd redpanda-build
|
|
|
|
qmake \
|
|
|
|
PREFIX='/usr' \
|
|
|
|
LIBEXECDIR='/usr/lib' \
|
2023-01-19 20:56:59 +08:00
|
|
|
XDG_ADAPTIVE_ICON=ON \
|
2023-01-03 12:18:02 +08:00
|
|
|
"$srcdir/$_pkgname/Red_Panda_CPP.pro"
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2024-01-18 16:14:36 +08:00
|
|
|
local _libexecdir="$pkgdir/usr/lib/RedPandaCPP"
|
|
|
|
install -Dm644 "compiler_hint.lua" "$_libexecdir/compiler_hint.lua"
|
|
|
|
|
|
|
|
if [[ "$CARCH" == 'x86_64' ]]; then
|
|
|
|
install -Dm644 "utf8init.x86_64.o" "$_libexecdir/x86_64-w64-mingw32/utf8init.o"
|
|
|
|
install -Dm644 "utf8manifest.x86_64.o" "$_libexecdir/x86_64-w64-mingw32/utf8manifest.o"
|
|
|
|
install -Dm644 "utf8init.i686.o" "$_libexecdir/i686-w64-mingw32/utf8init.o"
|
|
|
|
install -Dm644 "utf8manifest.i686.o" "$_libexecdir/i686-w64-mingw32/utf8manifest.o"
|
|
|
|
fi
|
|
|
|
|
2023-01-03 12:18:02 +08:00
|
|
|
cd redpanda-build
|
|
|
|
make INSTALL_ROOT="$pkgdir" install
|
|
|
|
}
|