mirror of
https://github.com/termux/termux-packages
synced 2024-06-13 04:26:38 +00:00
new package: qb64
This commit is contained in:
parent
a0833271d5
commit
08d37a502c
59
x11-packages/qb64/build.sh
Normal file
59
x11-packages/qb64/build.sh
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
TERMUX_PKG_HOMEPAGE=https://www.qb64.org/
|
||||||
|
TERMUX_PKG_DESCRIPTION="BASIC for the modern era."
|
||||||
|
TERMUX_PKG_LICENSE="MIT"
|
||||||
|
TERMUX_PKG_LICENSE_FILE="licenses/COPYING.TXT"
|
||||||
|
TERMUX_PKG_MAINTAINER="@termux"
|
||||||
|
TERMUX_PKG_VERSION=2.0.2
|
||||||
|
TERMUX_PKG_SRCURL=https://github.com/QB64Team/qb64/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz
|
||||||
|
TERMUX_PKG_SHA256=ba4ce7a7a7574ff065707f85c8d5cb741063eae7f7b7e55eb79f9037f300e991
|
||||||
|
TERMUX_PKG_DEPENDS="glu, clang"
|
||||||
|
TERMUX_PKG_ANTI_BUILD_DEPENDS="clang"
|
||||||
|
TERMUX_PKG_BUILD_IN_SRC=true
|
||||||
|
|
||||||
|
termux_step_post_get_source() {
|
||||||
|
rm -rf internal/c/mingw{32,64}
|
||||||
|
}
|
||||||
|
|
||||||
|
termux_step_pre_configure() {
|
||||||
|
local d=$TERMUX_PKG_TMPDIR/path
|
||||||
|
mkdir $d
|
||||||
|
PATH="$d:$PATH"
|
||||||
|
|
||||||
|
cat <<-EOF > $d/gcc
|
||||||
|
exec $TERMUX_STANDALONE_TOOLCHAIN/bin/$CC -I$TERMUX_PREFIX/include "\$@"
|
||||||
|
EOF
|
||||||
|
chmod +x $d/gcc
|
||||||
|
|
||||||
|
cat <<-EOF > $d/g++
|
||||||
|
exec $TERMUX_STANDALONE_TOOLCHAIN/bin/$CXX -I$TERMUX_PREFIX/include "\$@"
|
||||||
|
EOF
|
||||||
|
chmod +x $d/g++
|
||||||
|
|
||||||
|
_QB64_DIR=$TERMUX_PREFIX/share/qb64
|
||||||
|
}
|
||||||
|
|
||||||
|
termux_step_make() {
|
||||||
|
install -d $TERMUX_PREFIX/share/applications/
|
||||||
|
_pwd=$_QB64_DIR bash -e setup_lnx.sh
|
||||||
|
|
||||||
|
rm internal/source/*
|
||||||
|
mv internal/temp/* internal/source/
|
||||||
|
find . -type f -iname "*.a" -exec rm {} \;
|
||||||
|
find . -type f -iname "*.o" -exec rm {} \;
|
||||||
|
}
|
||||||
|
|
||||||
|
termux_step_make_install() {
|
||||||
|
rm -rf $_QB64_DIR
|
||||||
|
install -Dt $_QB64_DIR ./qb64 ./run_qb64.sh
|
||||||
|
cp -r internal licenses source $_QB64_DIR
|
||||||
|
ln -s $_QB64_DIR/qb64 $TERMUX_PREFIX/bin/qb64
|
||||||
|
}
|
||||||
|
|
||||||
|
termux_step_create_debscripts() {
|
||||||
|
cat <<- EOF > postrm
|
||||||
|
#!$TERMUX_PREFIX/bin/sh
|
||||||
|
if [ "\$1" = purge ]; then
|
||||||
|
rm -rf $_QB64_DIR
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
}
|
14
x11-packages/qb64/no-no-pie.patch
Normal file
14
x11-packages/qb64/no-no-pie.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
diff -uNr a/internal/c/makeline_lnx.txt b/internal/c/makeline_lnx.txt
|
||||||
|
--- a/internal/c/makeline_lnx.txt 2021-11-07 05:58:58.000000000 +0900
|
||||||
|
+++ b/internal/c/makeline_lnx.txt 2023-03-02 14:11:01.004700550 +0900
|
||||||
|
@@ -1,2 +1,2 @@
|
||||||
|
-g++ -no-pie -w qbx.cpp parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -o
|
||||||
|
+g++ -w qbx.cpp parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -o
|
||||||
|
|
||||||
|
diff -uNr a/internal/c/makeline_lnx_nogui.txt b/internal/c/makeline_lnx_nogui.txt
|
||||||
|
--- a/internal/c/makeline_lnx_nogui.txt 2021-11-07 05:58:58.000000000 +0900
|
||||||
|
+++ b/internal/c/makeline_lnx_nogui.txt 2023-03-02 14:11:05.580980037 +0900
|
||||||
|
@@ -1,2 +1,2 @@
|
||||||
|
-g++ -no-pie -w qbx.cpp parts/core/os/lnx/src.a -lpthread -ldl -lrt -D FREEGLUT_STATIC -o
|
||||||
|
+g++ -w qbx.cpp parts/core/os/lnx/src.a -lpthread -ldl -lrt -D FREEGLUT_STATIC -o
|
||||||
|
|
58
x11-packages/qb64/setup_lnx.sh.patch
Normal file
58
x11-packages/qb64/setup_lnx.sh.patch
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
diff -uNr a/setup_lnx.sh b/setup_lnx.sh
|
||||||
|
--- a/setup_lnx.sh 2021-11-07 05:58:58.000000000 +0900
|
||||||
|
+++ b/setup_lnx.sh 2023-03-02 16:21:38.915372974 +0900
|
||||||
|
@@ -38,10 +38,7 @@
|
||||||
|
|
||||||
|
DISTRO=
|
||||||
|
|
||||||
|
-lsb_command=`which lsb_release 2> /dev/null`
|
||||||
|
-if [ -z "$lsb_command" ]; then
|
||||||
|
- lsb_command=`which lsb_release 2> /dev/null`
|
||||||
|
-fi
|
||||||
|
+lsb_command=
|
||||||
|
|
||||||
|
#Outputs from lsb_command:
|
||||||
|
|
||||||
|
@@ -70,6 +67,8 @@
|
||||||
|
DISTRO=centos
|
||||||
|
fi
|
||||||
|
|
||||||
|
+DISTRO=termux
|
||||||
|
+
|
||||||
|
#Find and install packages
|
||||||
|
if [ "$DISTRO" == "arch" ]; then
|
||||||
|
echo "ArchLinux detected."
|
||||||
|
@@ -136,22 +135,21 @@
|
||||||
|
echo "Building 'QB64'"
|
||||||
|
cp -r ./internal/source/* ./internal/temp/
|
||||||
|
pushd internal/c >/dev/null
|
||||||
|
-g++ -no-pie -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -o ../../qb64
|
||||||
|
+g++ -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a $LDFLAGS -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -o ../../qb64
|
||||||
|
popd
|
||||||
|
|
||||||
|
if [ -e "./qb64" ]; then
|
||||||
|
echo "Done compiling!!"
|
||||||
|
|
||||||
|
echo "Creating ./run_qb64.sh script..."
|
||||||
|
- _pwd=`pwd`
|
||||||
|
- echo "#!/bin/sh" > ./run_qb64.sh
|
||||||
|
+ echo "#!@TERMUX_PREFIX@/bin/sh" > ./run_qb64.sh
|
||||||
|
echo "cd $_pwd" >> ./run_qb64.sh
|
||||||
|
echo "./qb64 &" >> ./run_qb64.sh
|
||||||
|
|
||||||
|
chmod +x ./run_qb64.sh
|
||||||
|
#chmod -R 777 ./
|
||||||
|
echo "Adding QB64 menu entry..."
|
||||||
|
- cat > ~/.local/share/applications/qb64.desktop <<EOF
|
||||||
|
+ cat > @TERMUX_PREFIX@/share/applications/qb64.desktop <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=QB64 Programming IDE
|
||||||
|
GenericName=QB64 Programming IDE
|
||||||
|
@@ -165,7 +163,6 @@
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Running QB64..."
|
||||||
|
- ./qb64 &
|
||||||
|
echo "QB64 is located in this folder:"
|
||||||
|
echo "`pwd`"
|
||||||
|
echo "There is a ./run_qb64.sh script in this folder that should let you run qb64 if using the executable directly isn't working."
|
Loading…
Reference in New Issue
Block a user