From c222dbace702197660e280c3fe0fa76ecb3c69f0 Mon Sep 17 00:00:00 2001 From: Daniel Engberg Date: Sun, 30 Jun 2024 09:40:15 +0200 Subject: science/mmg: Improve port * Add patches to remove git build dependency * Remove "make test" target, test files aren't bundled and also also remove bash dependency * Patch perl script(s) using USES= shebangfix * Adjust Makefile to more closely follow Porters Handbook PR: 279935 --- science/mmg/Makefile | 12 +++++------- science/mmg/files/patch-CMakeLists.txt | 14 ++++++++++++++ science/mmg/files/patch-git__log__mmg.h | 9 +++++++++ 3 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 science/mmg/files/patch-CMakeLists.txt create mode 100644 science/mmg/files/patch-git__log__mmg.h diff --git a/science/mmg/Makefile b/science/mmg/Makefile index 66c4c5d53670..20acba012afe 100644 --- a/science/mmg/Makefile +++ b/science/mmg/Makefile @@ -1,6 +1,6 @@ PORTNAME= mmg -PORTVERSION= 5.7.3 DISTVERSIONPREFIX= v +DISTVERSION= 5.7.3 CATEGORIES= science MAINTAINER= ports@FreeBSD.org @@ -10,21 +10,19 @@ WWW= https://www.mmgtools.org/ LICENSE= LGPL3 LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= git:devel/git \ - bash:shells/bash LIB_DEPENDS= libscotch.so:cad/scotch \ - libElas.so:science/linearelasticity \ + libElas.so:science/linearelasticity \ libvtksys-${VTK_VER}.so:math/vtk${VTK_VER:R} -USES= cmake:testing perl5 shebangfix +USES= cmake perl5 shebangfix USE_PERL5= build -SHEBANG_FILES= scripts/*.sh +SHEBANG_FILES= scripts/*.pl +USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= MmgTools CMAKE_ON= BUILD_SHARED_LIBS -USE_LDCONFIG= yes .include <../../math/vtk9/Makefile.version> .include diff --git a/science/mmg/files/patch-CMakeLists.txt b/science/mmg/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..c7cb99ce1840 --- /dev/null +++ b/science/mmg/files/patch-CMakeLists.txt @@ -0,0 +1,14 @@ +--- CMakeLists.txt.orig 2024-04-25 08:15:24 UTC ++++ CMakeLists.txt +@@ -124,10 +124,7 @@ IF (NOT WIN32 OR MINGW) + IF (NOT WIN32 OR MINGW) + + ADD_CUSTOM_TARGET(GenerateGitHashMmg +- COMMAND ./git_log_mmg.sh ${PROJECT_SOURCE_DIR} ${MMGCOMMON_BINARY_DIR} +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/scripts/ +- COMMENT "Getting git commit hash" +- BYPRODUCTS ${MMGCOMMON_BINARY_DIR}/git_log_mmg.h ++ COMMAND cp ${PROJECT_SOURCE_DIR}/git_log_mmg.h ${MMGCOMMON_BINARY_DIR}/git_log_mmg.h + ) + ENDIF () + diff --git a/science/mmg/files/patch-git__log__mmg.h b/science/mmg/files/patch-git__log__mmg.h new file mode 100644 index 000000000000..4a8ec0ac0b8a --- /dev/null +++ b/science/mmg/files/patch-git__log__mmg.h @@ -0,0 +1,9 @@ +--- git_log_mmg.h.orig 2024-06-23 16:47:08 UTC ++++ git_log_mmg.h +@@ -0,0 +1,6 @@ ++#ifndef _GIT_LOG_MMG_H ++#define _GIT_LOG_MMG_H ++#define MMG_GIT_BRANCH "No git branch found" ++#define MMG_GIT_COMMIT "No git commit found" ++#define MMG_GIT_DATE "No git commit found" ++#endif -- cgit v1.2.3