From 65a8fc65907e7e31a013ad4ddce5ed2c35124eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= Date: Fri, 19 Jan 2024 18:56:14 +0100 Subject: [PATCH] [new-package] nauty 2.8.8 --- .../001-fix-install-destinations.patch | 31 +++++++++++ mingw-w64-nauty/PKGBUILD | 51 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 mingw-w64-nauty/001-fix-install-destinations.patch create mode 100644 mingw-w64-nauty/PKGBUILD diff --git a/mingw-w64-nauty/001-fix-install-destinations.patch b/mingw-w64-nauty/001-fix-install-destinations.patch new file mode 100644 index 0000000000..88e60a2988 --- /dev/null +++ b/mingw-w64-nauty/001-fix-install-destinations.patch @@ -0,0 +1,31 @@ +--- a/makefile.in ++++ b/makefile.in +@@ -17,7 +17,7 @@ + bindir=@bindir@ + libdir=@libdir@ + includedir=@includedir@ +-pkgconfigexecdir=${prefix}/libdata/pkgconfig ++pkgconfigexecdir=${prefix}/lib/pkgconfig + + INSTALL=@INSTALL@ + INSTALL_DATA=@INSTALL_DATA@ +@@ -789,9 +789,9 @@ + done + + install: +- ${MKDIR_P} ${DESTDIR}${bindir} ${DESTDIR}${includedir} ${DESTDIR}${libdir} ${DESTDIR}${pkgconfigexecdir} ++ ${MKDIR_P} ${DESTDIR}${bindir} ${DESTDIR}${includedir}/nauty ${DESTDIR}${libdir} ${DESTDIR}${pkgconfigexecdir} + ${INSTALL} ${GTOOLS} ${DESTDIR}${bindir} +- ${INSTALL_DATA} ${GTOOLSH} ${DESTDIR}${includedir} ++ ${INSTALL_DATA} ${GTOOLSH} ${DESTDIR}${includedir}/nauty + ${INSTALL} ${GLIBS} ${DESTDIR}${libdir} + for lib in ${GLIBS} ; do \ + mv -f ${DESTDIR}${libdir}/$${lib} ${DESTDIR}${libdir}/lib$${lib} ; \ +--- a/nauty-pc.in ++++ b/nauty-pc.in +@@ -8,4 +8,4 @@ + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} LIBS + Libs.private: +-Cflags: -I${includedir} CFLGS ++Cflags: -I${includedir}/nauty CFLGS diff --git a/mingw-w64-nauty/PKGBUILD b/mingw-w64-nauty/PKGBUILD new file mode 100644 index 0000000000..6c74c1633c --- /dev/null +++ b/mingw-w64-nauty/PKGBUILD @@ -0,0 +1,51 @@ +# Contributor: Mehdi Chinoune + +_realname=nauty +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=2.8.8 +pkgrel=1 +pkgdesc="Programs for computing automorphism groups of graphs and digraphs. (mingw-w64)" +arch=('any') +mingw_arch=('ucrt64' 'clang64' 'clangarm64') +url='https://pallini.di.uniroma1.it/' +msys2_references=( + 'archlinux: nauty' +) +license=('spdx:Apache-2.0') +makedepends=("${MINGW_PACKAGE_PREFIX}-cc" + "${MINGW_PACKAGE_PREFIX}-autotools") +source=("https://pallini.di.uniroma1.it/nauty${pkgver//./_}.tar.gz" + 001-fix-install-destinations.patch) +sha256sums=('159d2156810a6bb240410cd61eb641add85088d9f15c888cdaa37b8681f929ce' + '827ad94474d8913967dbbe93bd69a0d89dfa01bd523b586afbc27afab1d1b98e') + +prepare() { + cd nauty${pkgver//./_} + patch -p1 -i "${srcdir}"/001-fix-install-destinations.patch +} + +build() { + rm -rf "build-${MSYSTEM}" + cp -r "nauty${pkgver//./_}" "build-${MSYSTEM}" && cd "build-${MSYSTEM}" + + ./configure \ + --prefix="${MINGW_PREFIX}" \ + --enable-generic + + make +} + +check() { + cd "${srcdir}/build-${MSYSTEM}" + + make check || true +} + +package() { + cd "${srcdir}/build-${MSYSTEM}" + + make install DESTDIR="${pkgdir}" + + install -Dm644 "${srcdir}/nauty${pkgver//./_}/LICENSE-2.0.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +}