aboutsummaryrefslogtreecommitdiff
path: root/libraries/agar
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-05-25 23:24:37 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-05-27 08:08:48 +0700
commit4355ab5e59f08012426389466d1d85e907c144d3 (patch)
tree3796f4d32df0bc2e4e6219687e476adb09514fc4 /libraries/agar
parente3d880ce4ec798c076bf3b1d7b77099c27d9cb44 (diff)
libraries/agar: Added (GUI toolkit)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/agar')
-rw-r--r--libraries/agar/463ea0a-sdl_hint_mouse_auto_capture.diff33
-rw-r--r--libraries/agar/README8
-rw-r--r--libraries/agar/agar.SlackBuild121
-rw-r--r--libraries/agar/agar.info10
-rw-r--r--libraries/agar/slack-desc19
5 files changed, 191 insertions, 0 deletions
diff --git a/libraries/agar/463ea0a-sdl_hint_mouse_auto_capture.diff b/libraries/agar/463ea0a-sdl_hint_mouse_auto_capture.diff
new file mode 100644
index 000000000000..8d84249a2efc
--- /dev/null
+++ b/libraries/agar/463ea0a-sdl_hint_mouse_auto_capture.diff
@@ -0,0 +1,33 @@
+diff --git a/gui/drv_sdl2mw.c b/gui/drv_sdl2mw.c
+index a196e1e4e..ddf89d537 100644
+--- a/gui/drv_sdl2mw.c
++++ b/gui/drv_sdl2mw.c
+@@ -150,10 +150,11 @@ SDL2MW_Open(void *_Nonnull obj, const char *_Nullable spec)
+ drv->flags |= AG_DRIVER_WINDOW_BG;
+
+ if (nDrivers == 0) { /* Root driver instance */
++#ifdef SDL_HINT_MOUSE_AUTO_CAPTURE
+ if (AG_Defined(drv, "noAutoCapture") &&
+ AG_GetInt(drv, "noAutoCapture"))
+ SDL_SetHint(SDL_HINT_MOUSE_AUTO_CAPTURE, "0");
+-
++#endif
+ /* Enable the joystick subsystem if requested. */
+ if (AG_Defined(drv, "ctrl")) {
+ Uint32 sdlFlags = SDL_INIT_GAMECONTROLLER;
+@@ -753,6 +754,7 @@ SDL2MW_SetWindowMaxSize(AG_Window *_Nonnull win, int w, int h)
+ static void
+ SDL2MW_SetMouseAutoCapture(void *_Nonnull obj, int state)
+ {
++#ifdef SDL_HINT_MOUSE_AUTO_CAPTURE
+ if (state == 0) {
+ SDL_SetHint(SDL_HINT_MOUSE_AUTO_CAPTURE, "0");
+ } else if (state == -1) {
+@@ -760,6 +762,7 @@ SDL2MW_SetMouseAutoCapture(void *_Nonnull obj, int state)
+ } else {
+ SDL_SetHint(SDL_HINT_MOUSE_AUTO_CAPTURE, "1");
+ }
++#endif
+ }
+
+ #if defined(AG_WIDGETS) && defined(AG_DEBUG)
diff --git a/libraries/agar/README b/libraries/agar/README
new file mode 100644
index 000000000000..1f181c1770ac
--- /dev/null
+++ b/libraries/agar/README
@@ -0,0 +1,8 @@
+agar (GUI toolkit)
+
+agar is an open source GUI toolkit, a set of software libraries for
+building graphical user interfaces. It works with a wide variety
+of platforms and graphics systems, from modern desktops to classic
+consoles and embedded devices. Its low-level layers are modular,
+extensible and easily ported to new hardware platforms and graphics
+systems.
diff --git a/libraries/agar/agar.SlackBuild b/libraries/agar/agar.SlackBuild
new file mode 100644
index 000000000000..df525e1d14a4
--- /dev/null
+++ b/libraries/agar/agar.SlackBuild
@@ -0,0 +1,121 @@
+#!/bin/bash
+
+# Slackware build script for agar
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Notes: This thing chooses to build itself with clang rather than
+# gcc. Unless that actually causes a problem, I'm not overriding it.
+# If you really want to build with gcc, use: export CC=gcc
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=agar
+SRCNAM=libagar
+VERSION=${VERSION:-1.7.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+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"
+elif [ "$ARCH" = "aarch64" ]; 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 $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# patch from upstream git, dike out some code that requires a newer
+# sdl2 than we have on 15.0 (needs 2.0.22, we have 2.0.20).
+patch -p1 < $CWD/463ea0a-sdl_hint_mouse_auto_capture.diff
+
+# 'make install' is slightly broken, this directory must already
+# exist:
+mkdir -p $PKG/usr/bin
+
+# prevent 'make install' from running ldconfig multiple times (or at all).
+sed -i 's,/sbin/ldconfig;,/bin/true;,' mk/build.lib.mk
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make
+make -j1 install DESTDIR=$PKG # yes, the -j1 is needed.
+
+strip $PKG/usr/lib*/*.so.*.*.* # no 'make install-strip'.
+
+# since we couldn't stop static libs from being installed, delete them here,
+# along with useless .la files.
+rm -f $PKG/usr/lib*/*.{a,la}
+
+if [ "$LIBDIRSUFFIX" = "64" ]; then
+ # fix the pkg-config stuff...
+ mv $PKG/usr/lib/pkgconfig $PKG/usr/lib64/pkgconfig
+ rmdir $PKG/usr/lib
+ sed -i '/^libdir/s,/lib,/lib64,g' $PKG/usr/lib64/pkgconfig/*.pc
+fi
+
+# it creates all the man subdirs, even though it uses only one of them.
+find $PKG/usr/man -type d -a -empty | xargs rmdir
+gzip -9 $PKG/usr/man/man*/*
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+rm -f INSTALL.md
+mkdir -p $PKGDOC
+cp -a LICENSE* OFL.txt *.md $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/libraries/agar/agar.info b/libraries/agar/agar.info
new file mode 100644
index 000000000000..bf7812ab86a4
--- /dev/null
+++ b/libraries/agar/agar.info
@@ -0,0 +1,10 @@
+PRGNAM="agar"
+VERSION="1.7.0"
+HOMEPAGE="https://github.com/JulNadeauCA/libagar"
+DOWNLOAD="https://github.com/JulNadeauCA/libagar/archive/v1.7.0/libagar-1.7.0.tar.gz"
+MD5SUM="688fd6311c1ebcc239efe917b17c1836"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/libraries/agar/slack-desc b/libraries/agar/slack-desc
new file mode 100644
index 000000000000..37b16ef883f0
--- /dev/null
+++ b/libraries/agar/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+agar: agar (GUI toolkit)
+agar:
+agar: agar is an open source GUI toolkit, a set of software libraries for
+agar: building graphical user interfaces. It works with a wide variety
+agar: of platforms and graphics systems, from modern desktops to classic
+agar: consoles and embedded devices. Its low-level layers are modular,
+agar: extensible and easily ported to new hardware platforms and graphics
+agar: systems.
+agar:
+agar:
+agar: