diff --git a/srcpkgs/python3-cysignals/patches/fix-cross.patch b/srcpkgs/python3-cysignals/patches/fix-cross.patch new file mode 100644 index 00000000000..8d08c516e0e --- /dev/null +++ b/srcpkgs/python3-cysignals/patches/fix-cross.patch @@ -0,0 +1,23 @@ +diff --git a/configure.ac b/configure.ac +index d0624ec..f5a6786 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -48,7 +48,7 @@ fi + AC_MSG_CHECKING([for emms instruction]) + # We add the "leal" instruction to reduce false positives in case some + # non-x86 architecture also has an "emms" instruction. +-AC_RUN_IFELSE([AC_LANG_PROGRAM([[]], [[asm("leal (%eax), %eax; emms");]])], ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[asm("leal (%eax), %eax; emms");]])], + dnl YES + [AC_MSG_RESULT([yes])] + AC_DEFINE(HAVE_EMMS, 1, [Define to 1 if your processor understands the "emms" instruction.]) +@@ -84,6 +84,9 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM( + , + dnl NO + [AC_MSG_RESULT([no])] ++ , ++ [AC_MSG_RESULT([cross, assume yes])] ++ sigsetjmp=yes + ) + + AC_MSG_CHECKING([for GNU libc]) diff --git a/srcpkgs/python3-cysignals/template b/srcpkgs/python3-cysignals/template index da80babe1fc..6cd461880c9 100644 --- a/srcpkgs/python3-cysignals/template +++ b/srcpkgs/python3-cysignals/template @@ -1,19 +1,33 @@ # Template file for 'python3-cysignals' pkgname=python3-cysignals -version=1.11.3 +version=1.11.4 revision=1 -build_style=python3-module -hostmakedepends="python3-setuptools python3-Cython autoconf" +# need gnu-configure build style to support cross build +build_style=gnu-configure +build_helper=python3 +hostmakedepends="python3-setuptools python3-wheel python3-Cython + python3-build python3-installer autoconf" makedepends="python3-devel pari-devel" depends="python3" short_desc="Interrupt and signal handling for Cython" maintainer="Gonzalo TornarĂ­a " license="LGPL-3.0-or-later" homepage="https://github.com/sagemath/cysignals" +changelog="https://github.com/sagemath/cysignals/releases" distfiles="${PYPI_SITE}/c/cysignals/cysignals-${version}.tar.gz" -checksum=c2c01f666e5904948952a2250548d8c36ccedd640383791feacf26ea2b958365 -nocross=yes # runs binaries built for target +checksum=0f1e321e55a07f901c86a36a1e4497f6ff9dfe700681d0130a38c36e4eb238c3 -do_check() { - make check +post_patch() { + # run autoconf because we patched configure.ac + autoconf +} + +do_build() { + # build as in python3-pep517 build style + python3 -m build --no-isolation --wheel . +} + +do_install() { + # install as in python3-pep517 build style + python3 -m installer --destdir ${DESTDIR} --no-compile-bytecode dist/*.whl }