diff --git a/community/libsemigroups/PKGBUILD b/community/libsemigroups/PKGBUILD new file mode 100644 index 000000000..8fc9f9ad5 --- /dev/null +++ b/community/libsemigroups/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Antonio Rojas + +# ALARM: Kevin Mihelich +# - strip -mavx from configure and Makefile + +pkgname=libsemigroups +pkgver=1.0.0 +pkgrel=1 +pkgdesc="C++ library for semigroups and monoids" +url="https://libsemigroups.github.io/libsemigroups/" +arch=(x86_64) +license=(GPL3) +depends=(gcc-libs) +makedepends=(fmt) +source=(https://github.com/libsemigroups/libsemigroups/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz + system-fmt.patch) +sha256sums=('db58bddf29ef58b4caeba42fa7cf5e1b52406c6b5c5c6c23c7e9d571b3f3de48' + '86c0ae8613df2959924d86c16874ee8d72288b10f87225c3909132b1d2a83fdf') + +prepare() { + cd $pkgname-$pkgver + patch -p1 -i ../system-fmt.patch + rm -r extern/fmt-* + sed -i 's/-mavx//g' configure.ac Makefile.am + autoreconf -fi +} + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr + make +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install +} diff --git a/community/libsemigroups/system-fmt.patch b/community/libsemigroups/system-fmt.patch new file mode 100644 index 000000000..dd9cec33b --- /dev/null +++ b/community/libsemigroups/system-fmt.patch @@ -0,0 +1,38 @@ +diff --git a/Makefile.am b/Makefile.am +index 761a772..0a8391b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -108,17 +108,6 @@ pkginclude_HEADERS += extern/HPCombi/include/vect_generic.hpp + endif + + fmtincludedir = $(includedir)/fmt +-fmtinclude_HEADERS = extern/fmt-5.3.0/include/fmt/chrono.h +-fmtinclude_HEADERS += extern/fmt-5.3.0/include/fmt/color.h +-fmtinclude_HEADERS += extern/fmt-5.3.0/include/fmt/core.h +-fmtinclude_HEADERS += extern/fmt-5.3.0/include/fmt/format-inl.h +-fmtinclude_HEADERS += extern/fmt-5.3.0/include/fmt/format.h +-fmtinclude_HEADERS += extern/fmt-5.3.0/include/fmt/locale.h +-fmtinclude_HEADERS += extern/fmt-5.3.0/include/fmt/ostream.h +-fmtinclude_HEADERS += extern/fmt-5.3.0/include/fmt/posix.h +-fmtinclude_HEADERS += extern/fmt-5.3.0/include/fmt/printf.h +-fmtinclude_HEADERS += extern/fmt-5.3.0/include/fmt/ranges.h +-fmtinclude_HEADERS += extern/fmt-5.3.0/include/fmt/time.h + + lib_LTLIBRARIES = libsemigroups.la + +diff --git a/configure.ac b/configure.ac +index c40acdb..832d8a3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -212,11 +212,5 @@ AS_IF([test "x$enable_hpcombi" = xyes], + AM_CONDITIONAL([HPCOMBI_CONSTEXPR_FUN_ARGS], + [test "x$hpcombi_constexpr_fun_args" = xyes]) + +-AC_CHECK_FILE([$srcdir/extern/fmt-5.3.0/README.rst], +- [], +- [] +- [AC_MSG_ERROR([fmt-5.3.0 is not available, please download fmt-5.3.0 from https://fmt.dev/ and put the unpacked archive in the libsemigroups/extern directory])]) +-dnl Output configured files +- + AC_CONFIG_FILES([Makefile libsemigroups.pc]) + AC_OUTPUT