Evrouter from AUR needs PKGBULD wizard

It’s been many years that the package evrouter AUR (en) - evrouter is not able to build from AUR. It was building properly at the end of 2019, early 2020, but nowadays it would not. As a workaround I keep my built package from 2020 but that is not ideal.

Can some AUR wizard have a look at it and basically fix it so we can build the package again?

Here are the errors I get when trying to build it manually or from Pamac:

==> Making package: evrouter 0.4-4 (jeu. 24 févr. 2022 09:05:53)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading evrouter_0.4.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
100  379k  100  379k    0     0  65683      0  0:00:05  0:00:05 --:--:-- 2954k
==> Validating source files with md5sums...
    evrouter_0.4.tar.gz ... Passed
==> Extracting sources...
  -> Extracting evrouter_0.4.tar.gz with bsdtar
==> Starting build()...
acinclude.m4:9: warning: underquoted definition of jm_CHECK_TYPE_STRUCT_UTIMBUF
acinclude.m4:9:   run info Automake 'Extending aclocal'
acinclude.m4:9:   or see https://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
configure.ac:46: error: AM_INIT_AUTOMAKE expanded multiple times
/usr/share/aclocal-1.16/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
configure.ac:29: the top level
/usr/share/aclocal-1.16/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
configure.ac:46: the top level
autom4te: error: /usr/bin/m4 failed with exit status: 1
aclocal: error: autom4te failed with exit status: 1
==> ERROR: A failure occurred in build().
    Aborting...

I would appreciate if someone comes with a solution, and maybe we can fix it in AUR directly too.

well if the software itself got not updated for years the project is more or less dead

Indeed the package doesn’t receive updates since a long time, however I still use it every day and this is why I’m asking for a volunteer AUR wizard who could sort the building issue as it is out of my competence.

There’s nothing wrong with the PKGBUILD, the problem is upstream. Since it will probably never be updated to build with current tools, you could create an evrouter-bin PKGBUILD using the .deb from the homepage. It may or may not work as it may look for older libraries, but it’s worth a shot.

Here a modded pkgbuild that does build.
Note that I did not try to install or run it…

# Maintainer: Jonathan Liu <net147@gmail.com>
pkgname=evrouter
pkgver=0.4
pkgrel=4
pkgdesc="An Input Event Router for Linux"
arch=('i686' 'x86_64')
url="http://www.bedroomlan.org/projects/evrouter"
license=('GPL2')
depends=('libxtst')
makedepends=('automake>=1.10.1')
source=(http://debian.bedroomlan.org/debian/pool/main/e/${pkgname}/${pkgname}_${pkgver}.tar.gz)
md5sums=('eef1b9d8e3b545c330eb025670ffa3e8')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i '87d' ./src/evrouter.c
  sed -i '46d' ./configure.ac
  aclocal
  automake --add-missing
  ./configure --prefix=/usr --without-xmms
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -D -m644 README "${pkgdir}/usr/share/doc/${pkgname}/README"
  install -D -m644 debian/changelog "${pkgdir}/usr/share/doc/${pkgname}/changelog"
  install -D -m644 debian/copyright "${pkgdir}/usr/share/doc/${pkgname}/copyright"
  install -D -m755 src/example "${pkgdir}/usr/share/doc/${pkgname}/examples/example"
}

Cheers,
MO

2 Likes

Thank you very much, I will try that :wink:

//EDIT: nice, it builds, and works as intended!

Moson is a proper AUR wizard!

:mage: :magic_wand:

//EDIT: I eventually found a tool a week later trying to help someone else here, called Input Remapper, that allows to do basically the same thing I was doing for my mouse, so thank again Moson for helping, but in the end I think I will now use this tool to remap mouse button and make mouse profiles for different use. It even works better as I had issues with imwheel for game specific profile I had to think backwards to have various profiles for various app. Now I can load profiles on the fly.

1 Like

Here something with a “proper” patch.
A bit nicer than those ugly “sed’s” :wink:

PKGBUILD
# Maintainer: Jonathan Liu <net147@gmail.com>
pkgname=evrouter
pkgver=0.4
pkgrel=5
pkgdesc="An Input Event Router for Linux"
arch=('i686' 'x86_64')
url="http://www.bedroomlan.org/projects/evrouter"
license=('GPL2')
depends=('libxtst')
makedepends=('automake>=1.10.1')
source=("http://debian.bedroomlan.org/debian/pool/main/e/${pkgname}/${pkgname}_${pkgver}.tar.gz"
		"buildfix.patch")
md5sums=('eef1b9d8e3b545c330eb025670ffa3e8'
         'd4fe1cc6e4ba4305a652ced7063b7a01')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 < ../buildfix.patch
  aclocal
  automake --add-missing
  ./configure --prefix=/usr --without-xmms
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -D -m644 README "${pkgdir}/usr/share/doc/${pkgname}/README"
  install -D -m644 debian/changelog "${pkgdir}/usr/share/doc/${pkgname}/changelog"
  install -D -m644 debian/copyright "${pkgdir}/usr/share/doc/${pkgname}/copyright"
  install -D -m755 src/example "${pkgdir}/usr/share/doc/${pkgname}/examples/example"
}
buildfix.patch
diff -bur evrouter-0.4/configure.ac evrouter-0.4_fix/configure.ac
--- evrouter-0.4/configure.ac	2009-03-03 01:01:42.000000000 +0100
+++ evrouter-0.4_fix/configure.ac	2022-02-24 20:13:15.193890870 +0100
@@ -43,8 +43,6 @@
 dnl Every other copy of the package version number gets its value from
 dnl here (BUT NOT the files in debian/)
 
-AM_INIT_AUTOMAKE(evrouter, $PACKAGE_VERSION)
-
 dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
 AM_CONFIG_HEADER(config.h)
 
diff -bur evrouter-0.4/src/evrouter.c evrouter-0.4_fix/src/evrouter.c
--- evrouter-0.4/src/evrouter.c	2009-03-10 00:09:29.000000000 +0100
+++ evrouter-0.4_fix/src/evrouter.c	2022-02-24 20:13:27.690511694 +0100
@@ -84,7 +84,6 @@
 #include "parser.h"
 #include "cmdline.h"
 
-char * progname;
 
 
 #define NEV 64
2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.