diff options
author | greg2010 | 2022-03-15 02:04:31 -0400 |
---|---|---|
committer | greg2010 | 2022-03-15 02:04:31 -0400 |
commit | 403d3be3df6c9a770aad297878fb0e2da997a75a (patch) | |
tree | 589c8c6f0b8c2119afc277ad6d0c08797d251ddf | |
download | aur-403d3be3df6c9a770aad297878fb0e2da997a75a.tar.gz |
initial working arch build
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | gcc10.patch | 39 | ||||
-rw-r--r-- | guile22.patch | 61 |
5 files changed, 176 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..aae6367d39ab --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = xbindjoy-git + pkgdesc = Tool for making your joysticks and gamepads more useful + pkgver = r93.e599772 + pkgrel = 1 + url = https://github.com/saulrh/XBindJoy + arch = x86_64 + license = GPL3 + makedepends = git + depends = libev + depends = libxtst + depends = guile + provides = xbindjoy-git + conflicts = xbindjoy-git + source = git+https://github.com/saulrh/XBindJoy.git + source = gcc10.patch + source = guile22.patch + sha256sums = SKIP + sha256sums = fe60cd4f60ad3406e86e13951706766e499cfc2602fae188c76cec215918c838 + sha256sums = 7a4cc5332bc6257c768c5482711e286f6aed57f100b39cc88320c8c4092471b6 + +pkgname = xbindjoy-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..a304540bfe9d --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +#Ignore everything +* + +#But not these files... +!.gitignore +!PKGBUILD +!.SRCINFO +!*.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1cca187d8de9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Grigory Romodanovskiy <greg2008200 at gmail dot com> +pkgname=xbindjoy-git +_gitname=XBindJoy +pkgver=r93.e599772 +pkgrel=1 +pkgdesc="Tool for making your joysticks and gamepads more useful" +arch=(x86_64) +url="https://github.com/saulrh/XBindJoy" +license=('GPL3') +groups=() +depends=('libev' 'libxtst' 'guile') +makedepends=('git') # 'bzr', 'git', 'mercurial' or 'subversion' +provides=("${pkgname%-VCS}") +conflicts=("${pkgname%-VCS}") +replaces=() +backup=() +options=() +install= +source=("git+${url}.git" 'gcc10.patch' 'guile22.patch') +noextract=() +sha256sums=('SKIP' + 'fe60cd4f60ad3406e86e13951706766e499cfc2602fae188c76cec215918c838' + '7a4cc5332bc6257c768c5482711e286f6aed57f100b39cc88320c8c4092471b6') + +pkgver() { + cd ${_gitname} + + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + +} + +prepare() { + cd "${_gitname}" + git apply "${srcdir}/gcc10.patch" + git apply "${srcdir}/guile22.patch" +} + +build() { + cd ${_gitname} + make +} + + +package() { + cd ${_gitname} + make DESTDIR="$pkgdir" install +} diff --git a/gcc10.patch b/gcc10.patch new file mode 100644 index 000000000000..e94ae903d825 --- /dev/null +++ b/gcc10.patch @@ -0,0 +1,39 @@ +diff --git a/src/xbindjoy.c b/src/xbindjoy.c +index 70d5b66..f1021e1 100644 +--- a/src/xbindjoy.c ++++ b/src/xbindjoy.c +@@ -40,6 +40,9 @@ + // ///////////////////////////////////////////////////////////////////////////// + // variables + ++int verbose; ++Display* display; ++ + // the file descriptor for our joystick + int jsfd; + +@@ -79,7 +82,7 @@ static void timer_callback(EV_P_ ev_timer* w, int revents) { + last_time.tv_nsec = cur_time.tv_nsec; + } + +-static void sigint_callback(EV_P_ ev_timer* w, int revents) { ++static void sigint_callback(EV_P_ ev_signal* w, int revents) { + ev_break(loop, EVBREAK_ALL); + } + +diff --git a/src/xbindjoy.h b/src/xbindjoy.h +index 7d257dc..ff4b848 100644 +--- a/src/xbindjoy.h ++++ b/src/xbindjoy.h +@@ -21,8 +21,9 @@ + + #include<X11/Xlib.h> + +-int verbose; +-Display* display; ++extern int verbose; ++extern Display* display; ++ + + typedef enum { + PRESS, diff --git a/guile22.patch b/guile22.patch new file mode 100644 index 000000000000..77977971e997 --- /dev/null +++ b/guile22.patch @@ -0,0 +1,61 @@ +diff --git a/Makefile b/Makefile +index a89ceda..b426a14 100644 +--- a/Makefile ++++ b/Makefile +@@ -28,12 +28,12 @@ src := $(wildcard src/*.c) + obj := $(src:.c=.o) + dep := $(obj:.o=.d) + mod := saulrh/xbindjoy.scm +-solib := libguilexbindjoy.so ++solib := guile-xbindjoy.so + + # compiler flags. we use pkg-config to get the includes for guile. set the variable dbg if we want + # to compile with debug flags (default to none). ldflags pull in the libraries we need. +-CFLAGS := -std=c11 `pkg-config --cflags guile-2.0` -fPIC $(dbg) +-LDFLAGS := -lX11 -lXtst -lev `pkg-config --libs guile-2.0` ++CFLAGS += -std=c11 `pkg-config --cflags guile-2.2` -fPIC $(dbg) ++LDFLAGS += -lX11 -lXtst -lev `pkg-config --libs guile-2.2` + + # our final shared library. + $(solib): $(obj) +@@ -55,8 +55,14 @@ test: $(solib) + run: $(solib) + @LD_LIBRARY_PATH=. rlwrap guile -L . -x "saulrh xbindjoy" -- + ++install: $(solib) ++ install -d $(DESTDIR)$(PREFIX)/lib/guile/2.2/extensions/ ++ install -m 644 $(solib) $(DESTDIR)$(PREFIX)/lib/guile/2.2/extensions/ ++ install -d $(DESTDIR)$(PREFIX)/share/guile/site/2.2/saulrh/ ++ install -m 644 $(mod) $(DESTDIR)$(PREFIX)/share/guile/site/2.2/saulrh/ ++ + # clean out object files and compilation products + .PHONY: clean + clean: +- rm -f $(obj) libguilexbindjoy.so ++ rm -f $(obj) $(solib) + rm -f $(dep) +diff --git a/examples/generic.scm b/examples/generic.scm +index 53168c8..53b6e44 100755 +--- a/examples/generic.scm ++++ b/examples/generic.scm +@@ -35,7 +35,6 @@ + ;;; but we're not going to do that, because this is an example that we want people to be able to + ;;; run right after they grab the code. so we just use the first joystick that's plugged in. + (define jsd "/dev/input/js0") +- + (define naxes (get-js-num-axes jsd)) + (define nbuttons (get-js-num-buttons jsd)) + (init-xbindjoy nbuttons naxes) +diff --git a/saulrh/xbindjoy.scm b/saulrh/xbindjoy.scm +index 856d79d..0803471 100644 +--- a/saulrh/xbindjoy.scm ++++ b/saulrh/xbindjoy.scm +@@ -50,7 +50,7 @@ + )) + + ;;; load up the library that provides the low-level stuff +-(load-extension "libguilexbindjoy.so" "init_xbindjoy") ++(load-extension "guile-xbindjoy.so" "init_xbindjoy") + + + ;;; |