From f7eb3d59871e5410b5860312ae380faf3fb40fc7 Mon Sep 17 00:00:00 2001 From: Manfred Usselmann Date: Sun, 20 Sep 2020 11:36:43 +0200 Subject: [PATCH] New package: imwheel-1.0.0 Closes: #24991 [via git-merge-pr] --- .../imwheel/patches/fix-jax-intptr_t.patch | 26 +++++++ srcpkgs/imwheel/patches/no-imwheel-gpm.patch | 73 +++++++++++++++++++ srcpkgs/imwheel/template | 20 +++++ 3 files changed, 119 insertions(+) create mode 100644 srcpkgs/imwheel/patches/fix-jax-intptr_t.patch create mode 100644 srcpkgs/imwheel/patches/no-imwheel-gpm.patch create mode 100644 srcpkgs/imwheel/template diff --git a/srcpkgs/imwheel/patches/fix-jax-intptr_t.patch b/srcpkgs/imwheel/patches/fix-jax-intptr_t.patch new file mode 100644 index 00000000000..0cacc7681bb --- /dev/null +++ b/srcpkgs/imwheel/patches/fix-jax-intptr_t.patch @@ -0,0 +1,26 @@ +--- jax/jax.c 2004-06-10 03:41:50.000000000 +0200 ++++ jax/jax.c 2020-09-20 17:22:42.245080921 +0200 +@@ -1,4 +1,5 @@ + #include ++#include + #include "jax.h" + + /*****************************************************************************/ +@@ -49,7 +49,7 @@ + (jax->options[j].name2 && !strcmp(jax->options[j].name2, argv[i]))) + { + c++; +- if((int)(*jax->options[j].str)>1) ++ if((intptr_t)(*jax->options[j].str)>1) + { + if (*argc>i+1) + { +@@ -65,7 +65,7 @@ + } + else + { +- *jax->options[j].str=(char*)(((int)(*jax->options[j].str+1))%2); ++ *jax->options[j].str=(char*)(((intptr_t)(*jax->options[j].str+1))%2); + JAXshiftopts(i, 1, argc, argv); + j=-1; + } diff --git a/srcpkgs/imwheel/patches/no-imwheel-gpm.patch b/srcpkgs/imwheel/patches/no-imwheel-gpm.patch new file mode 100644 index 00000000000..d45ef5dd253 --- /dev/null +++ b/srcpkgs/imwheel/patches/no-imwheel-gpm.patch @@ -0,0 +1,73 @@ +--- configure.in 2004-08-29 12:29:09.000000000 +0200 ++++ configure.in 2020-09-20 17:17:33.079064972 +0200 +@@ -206,66 +206,10 @@ + AC_SUBST(extras) + AC_SUBST(extras_dist) + +- +-dnl Check for gpm-imwheel source. +-NO_GPM_DOC= +-GPM_DIR="gpm-1.19.3" +-AC_SUBST(GPM_DIR) +-AC_CHECK_FILE($GPM_DIR/gpm.c,HAVE_GPM_SRC=yes,HAVE_GPM_SRC=no) +-AC_SUBST(HAVE_GPM_SRC) +-AC_MSG_CHECKING(if we build gpm-imwheel) +-gpm_enabled=no +-gpm_doc=no +-gpm_imwheel=$GPM_DIR +-AC_ARG_ENABLE(gpm, +-changequote({, })dnl +-{ --enable-gpm build gpm-imwheel [build if source present]}, +-changequote([, ])dnl +-[case "$enableval" in +- yes) gpm_imwheel="$GPM_DIR" +- gpm_enabled=yes ;; +- no) gpm_imwheel= ;; +- *) AC_MSG_ERROR([bad value $enableval for --enable-gpm]) ;; +-esac],[gpm_imwheel=]) +-AC_ARG_ENABLE(gpm_doc, +-changequote({, })dnl +-{ --enable-gpm-doc build in gpm/doc [build if source present]}, +-changequote([, ])dnl +-[case "$enableval" in +- yes) no_gpm_doc=true ;; +- no) no_gpm_doc=false ;; +- *) AC_MSG_ERROR([bad value $enableval for --enable-gpm-doc]) ;; +-esac],[no_gpm_doc=true]) +-if [[ "x$HAVE_GPM_SRC" = "$Good" ]] +-then +- if [[ "x$gpm_imwheel" = "x$GPM_DIR" ]] +- then +- AC_MSG_RESULT(yes) +- AC_CONFIG_SUBDIRS(gpm-1.19.3) +- AC_DEFINE_UNQUOTED(HAVE_GPM_SRC,1,[Define only if you are building the imwheel version of gpm. ]) +- AM_CONDITIONAL(NO_GPM_DOC, $no_gpm_doc) +- else +- AC_MSG_RESULT(no) +- AM_CONDITIONAL(NO_GPM_DOC, false) +- fi +-else +- gpm_imwheel= +- if [[ "x$gpm_enabled" = "xyes" ]] +- then +- AC_MSG_RESULT(unable) +- AM_CONDITIONAL(NO_GPM_DOC, false) +- AC_MSG_WARN([$GPM_DIR building disabled, source not present!]) +- Warnings=`expr $Warnings + 1` +- else +- AC_MSG_RESULT(no) +- AM_CONDITIONAL(NO_GPM_DOC, false) +- fi +-fi +-gpm_dist="$GPM_DIR" +-AC_SUBST(gpm_imwheel) +-AC_SUBST(gpm_dist) +- +- ++AC_SUBST(gpm_imwheel) ++AC_SUBST(gpm_dist) ++AC_DEFINE_UNQUOTED(HAVE_GPM_SRC,,[Define only if you are building the imwheel version of gpm. ]) ++AM_CONDITIONAL(NO_GPM_DOC, true) + dnl Checks for X. + AC_PATH_X + AC_PATH_XTRA diff --git a/srcpkgs/imwheel/template b/srcpkgs/imwheel/template new file mode 100644 index 00000000000..85496586c7d --- /dev/null +++ b/srcpkgs/imwheel/template @@ -0,0 +1,20 @@ +# Template file for 'imwheel' +pkgname=imwheel +version=1.0.0 +revision=1 +wrksrc="${pkgname}-${version}pre12" +build_style=gnu-configure +configure_args="--disable-gpm --disable-gpm-doc" +hostmakedepends="automake libtool pkg-config" +makedepends="libX11-devel libXtst-devel libXmu-devel" +short_desc="Universial mouse wheel and stick translator for X11" +maintainer="ManfredU " +license="GPL-2.0-only" +homepage="http://imwheel.sourceforge.net/" +distfiles="https://sourceforge.net/projects/${pkgname}/files/${pkgname}-source/${version}pre12/${pkgname}-${version}pre12.tar.gz" +checksum=2320ed019c95ca4d922968e1e1cbf0c075a914e865e3965d2bd694ca3d57cfe3 + +pre_configure() { + mv configure.{in,ac} + autoreconf -fi +}