devel/iscd-commons: new port, common codes used for ISCD softwares

Used by Elas.
This commit is contained in:
Thierry Thomas 2024-06-22 19:29:20 +02:00
parent dc9b94b0e0
commit e5c6ec80c6
7 changed files with 92 additions and 0 deletions

View file

@ -1020,6 +1020,7 @@
SUBDIR += ipython
SUBDIR += ireport
SUBDIR += isa-l
SUBDIR += iscd-commons
SUBDIR += isfreedesktop
SUBDIR += isl
SUBDIR += ispc

View file

@ -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>

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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/>.

View file

@ -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