diff options
author | Antonio Leal <antonioleal@yahoo.com> | 2023-08-26 18:29:01 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-08-26 18:29:01 +0700 |
commit | 16fcc1b0fbfaf5e1e98f19d54ed50f97e8c50ec1 (patch) | |
tree | b74699ede8232c7890ad606945fd8d8dbd976d8a | |
parent | 45e7fe02ba79d618fe33a361cc34447ed60a8374 (diff) |
development/qb64: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | development/qb64/README | 6 | ||||
-rw-r--r-- | development/qb64/qb64.SlackBuild | 59 | ||||
-rw-r--r-- | development/qb64/qb64.desktop | 4 |
3 files changed, 28 insertions, 41 deletions
diff --git a/development/qb64/README b/development/qb64/README index bf58b1ef5479..6ce775f7f5a4 100644 --- a/development/qb64/README +++ b/development/qb64/README @@ -16,5 +16,7 @@ adds a number of extensions, such as OpenGL and other modern features, providing the perfect blend of classic and modern program development. -This package installs to /opt/ but a user directory is -required in $HOME in order to run the program and its data. +On first run this package installs ~/.config/qb64-2.1 +in $HOME in order to run the program and its data. +You can delete this directory and rebuild you local configuration +by relaunching the program. diff --git a/development/qb64/qb64.SlackBuild b/development/qb64/qb64.SlackBuild index 7cfc69d3b60d..ae313042a230 100644 --- a/development/qb64/qb64.SlackBuild +++ b/development/qb64/qb64.SlackBuild @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=qb64 VERSION=${VERSION:-2.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -48,12 +48,26 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +mkdir -p $PRGNAM-$VERSION cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -62,49 +76,20 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -echo "Building library 'LibQB'" -pushd internal/c/libqb/os/lnx >/dev/null -rm -f libqb_setup.o -./setup_build.sh -popd >/dev/null - -echo "Building library 'FreeType'" -pushd internal/c/parts/video/font/ttf/os/lnx >/dev/null -rm -f src.o -./setup_build.sh -popd >/dev/null - -echo "Building library 'Core:FreeGLUT'" -pushd internal/c/parts/core/os/lnx >/dev/null -rm -f src.a -./setup_build.sh -popd >/dev/null - -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 -popd - -mkdir -p $PKG/opt/$PRGNAM-$VERSION $PKG/usr/share/pixmaps $PKG/usr/share/applications $PKG/usr/man/man1 $PKG/usr/bin -install -s -c -m 755 qb64 $PKG/opt/$PRGNAM-$VERSION/ -cat qb64.1 | gzip -c -f > $PKG/usr/man/man1/qb64.1.gz -cp -axu internal $PKG/opt/$PRGNAM-$VERSION/ -cp -axu licenses $PKG/opt/$PRGNAM-$VERSION/ -cp $CWD/run_qb64.sh $PKG/opt/$PRGNAM-$VERSION +mkdir -p $PKG/usr/bin $PKG/usr/src/$PRGNAM-$VERSION $PKG/usr/share/pixmaps $PKG/usr/share/applications $PKG/usr/man/man1 +cp $CWD/$PRGNAM-$VERSION.tar.gz $PKG/usr/src/$PRGNAM-$VERSION +cat $CWD/qb64.1 | gzip -c -f > $PKG/usr/man/man1/qb64.1.gz +cp $CWD/qb64-launcher $PKG/usr/bin cp $CWD/qb64.desktop $PKG/usr/share/applications -cp source/qb64.png $PKG/usr/share/pixmaps +cp $CWD/qb64.png $PKG/usr/share/pixmaps ( cd $PKG/usr/bin ; rm -rf qb64 ) -( cd $PKG/usr/bin ; ln -sf /opt/$PRGNAM-$VERSION/run_qb64.sh qb64 ) +( cd $PKG/usr/bin ; ln -s qb64-launcher qb64 ) #find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ # | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -cp CHANGELOG.md $PKG/usr/doc/$PRGNAM-$VERSION -cp README.md $PKG/usr/doc/$PRGNAM-$VERSION -cp SAMPLES.txt $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/development/qb64/qb64.desktop b/development/qb64/qb64.desktop index 9f0ad527b6b7..174e67f9cbb3 100644 --- a/development/qb64/qb64.desktop +++ b/development/qb64/qb64.desktop @@ -1,8 +1,8 @@ [Desktop Entry] Name=QB64 Programming IDE GenericName=QB64 Programming IDE -Exec=bash -c "/opt/qb64-2.1/run_qb64.sh" -Icon=qb64 +Exec=qb64-launcher "$@" +Icon=qb64.png Terminal=false Type=Application Categories=Development;IDE; |