git: e5c6ec80c6c0 - main - devel/iscd-commons: new port, common codes used for ISCD softwares
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 23 Jun 2024 12:59:57 UTC
The branch main has been updated by thierry:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e5c6ec80c6c0e8f01ce866367182b5b46d3d1d38
commit e5c6ec80c6c0e8f01ce866367182b5b46d3d1d38
Author: Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2024-06-22 17:29:20 +0000
Commit: Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2024-06-23 12:58:40 +0000
devel/iscd-commons: new port, common codes used for ISCD softwares
Used by Elas.
---
devel/Makefile | 1 +
devel/iscd-commons/Makefile | 22 ++++++++++++++++
devel/iscd-commons/distinfo | 3 +++
devel/iscd-commons/files/patch-CMakeLists.txt | 34 +++++++++++++++++++++++++
devel/iscd-commons/files/patch-sources_lplib3.c | 20 +++++++++++++++
devel/iscd-commons/pkg-descr | 4 +++
devel/iscd-commons/pkg-plist | 8 ++++++
7 files changed, 92 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index d3ef97a20da3..f66194726676 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1020,6 +1020,7 @@
SUBDIR += ipython
SUBDIR += ireport
SUBDIR += isa-l
+ SUBDIR += iscd-commons
SUBDIR += isfreedesktop
SUBDIR += isl
SUBDIR += ispc
diff --git a/devel/iscd-commons/Makefile b/devel/iscd-commons/Makefile
new file mode 100644
index 000000000000..49ecb821aa94
--- /dev/null
+++ b/devel/iscd-commons/Makefile
@@ -0,0 +1,22 @@
+PORTNAME= Commons
+PORTVERSION= 1.0.0
+DISTVERSIONPREFIX= v
+CATEGORIES= devel science
+PKGNAMEPREFIX= ISCD-
+
+MAINTAINER= thierry@FreeBSD.org
+COMMENT= Common code shared by many ISCD softwares
+WWW= https://github.com/ISCDtoolbox/Commons
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= cmake:testing
+
+USE_GITHUB= yes
+GH_ACCOUNT= ISCDtoolbox
+
+CFLAGS+= -funroll-loops
+USE_LDCONFIG= yes
+
+.include <bsd.port.mk>
diff --git a/devel/iscd-commons/distinfo b/devel/iscd-commons/distinfo
new file mode 100644
index 000000000000..da5dec473dba
--- /dev/null
+++ b/devel/iscd-commons/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1719075163
+SHA256 (ISCDtoolbox-Commons-v1.0.0_GH0.tar.gz) = d230f8a786bf8f6a14db21243c71ccb9c5d408da5da89ae6f334d1339c10f83e
+SIZE (ISCDtoolbox-Commons-v1.0.0_GH0.tar.gz) = 48376
diff --git a/devel/iscd-commons/files/patch-CMakeLists.txt b/devel/iscd-commons/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..f3bf03aa1b7a
--- /dev/null
+++ b/devel/iscd-commons/files/patch-CMakeLists.txt
@@ -0,0 +1,34 @@
+--- CMakeLists.txt.orig 2021-07-23 10:27:28 UTC
++++ CMakeLists.txt
+@@ -1,6 +1,4 @@ cmake_minimum_required(VERSION 2.8)
+ cmake_minimum_required(VERSION 2.8)
+-set(CMAKE_BUILD_TYPE "Release")
+-SET(CMAKE_C_FLAGS "-w -g -O3 -funroll-loops")
+ set(CMAKE_MACOSX_RPATH 1)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+
+@@ -17,7 +15,7 @@ FIND_LIBRARY( M_LIB m)
+ endif()
+ endif()
+ FIND_LIBRARY( M_LIB m)
+-SET( LIBRARIES ${M_LIB} "-lpthread")
++SET( LIBRARIES ${M_LIB} "-pthread")
+
+ #Commons library
+ SET( SOURCES_DIR sources)
+@@ -25,11 +23,12 @@ add_library( Commons SHARED ${source_files})
+ file( GLOB_RECURSE header_files ${SOURCES_DIR}/*.h)
+ include_directories( ${SOURCES_DIR})
+ add_library( Commons SHARED ${source_files})
++set_target_properties( Commons PROPERTIES VERSION 0.0.0 SOVERSION 0)
+ TARGET_LINK_LIBRARIES( Commons ${LIBRARIES})
+
+ INSTALL(
+ TARGETS Commons
+- RUNTIME DESTINATION "$ENV{HOME}/lib"
+- LIBRARY DESTINATION "$ENV{HOME}/lib")
++ RUNTIME DESTINATION ${Commons_BINARY_DIR}
++ LIBRARY DESTINATION lib${LIB_SUFFIX})
+
+-INSTALL( FILES ${header_files} DESTINATION "$ENV{HOME}/include")
++INSTALL( FILES ${header_files} DESTINATION include/ISCD)
diff --git a/devel/iscd-commons/files/patch-sources_lplib3.c b/devel/iscd-commons/files/patch-sources_lplib3.c
new file mode 100644
index 000000000000..ecf6c7f91bf4
--- /dev/null
+++ b/devel/iscd-commons/files/patch-sources_lplib3.c
@@ -0,0 +1,20 @@
+--- sources/lplib3.c.orig 2021-07-23 10:27:28 UTC
++++ sources/lplib3.c
+@@ -30,6 +30,9 @@
+ #include <assert.h>
+ #include <errno.h>
+ #include <unistd.h>
++#ifdef __FreeBSD__
++#include <pmc.h>
++#endif
+ #include "lplib3.h"
+
+
+@@ -1251,6 +1254,7 @@ void qsort_mt(void *a, size_t n, size_t es, cmp_t *cmp
+ * NPROC environment variable (BSD/OS, CrayOS)
+ * sysctl hw.ncpu or kern.smp.cpus
+ */
++ uint32_t ncpu;
+ if (pmc_init() == 0 && (ncpu = pmc_ncpu()) != -1)
+ maxthreads = ncpu;
+ else
diff --git a/devel/iscd-commons/pkg-descr b/devel/iscd-commons/pkg-descr
new file mode 100644
index 000000000000..4ba6e5f5b5be
--- /dev/null
+++ b/devel/iscd-commons/pkg-descr
@@ -0,0 +1,4 @@
+This port contains common codes used for ISCD softwares (Linear algebra, Chrono,
+I/O...).
+
+See also <https://iscd.sorbonne-universite.fr/resources/>.
diff --git a/devel/iscd-commons/pkg-plist b/devel/iscd-commons/pkg-plist
new file mode 100644
index 000000000000..70655f7a1c2f
--- /dev/null
+++ b/devel/iscd-commons/pkg-plist
@@ -0,0 +1,8 @@
+include/ISCD/chrono.h
+include/ISCD/eigen.h
+include/ISCD/libmesh5.h
+include/ISCD/lplib3.h
+include/ISCD/sparse.h
+lib/libCommons.so
+lib/libCommons.so.0
+lib/libCommons.so.0.0.0