aboutsummaryrefslogtreecommitdiffstats
path: root/science
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2014-02-21 23:39:56 +0800
committerthierry <thierry@FreeBSD.org>2014-02-21 23:39:56 +0800
commitf5e18bfe42d120437ffcb91d78f61fe978a97332 (patch)
tree0d86cd5bf671c46b63cf1e485badd73cedf5b058 /science
parent9788d9d7d8a41d3e07a26e5d960035d497f319b1 (diff)
downloadfreebsd-ports-graphics-f5e18bfe42d120437ffcb91d78f61fe978a97332.tar.gz
freebsd-ports-graphics-f5e18bfe42d120437ffcb91d78f61fe978a97332.tar.zst
freebsd-ports-graphics-f5e18bfe42d120437ffcb91d78f61fe978a97332.zip
Adding OpenKIM, an application programming interface (API) for
coupling atomistic simulation codes and interatomic potential subroutines. PR: ports/177692 Submitted by: Jason Bacon <jwbacon (at) tds.net>
Diffstat (limited to 'science')
-rw-r--r--science/Makefile1
-rw-r--r--science/openkim/Makefile51
-rw-r--r--science/openkim/distinfo2
-rw-r--r--science/openkim/files/patch-KIM_API__GNU_compiler_settings.mk10
-rw-r--r--science/openkim/pkg-descr6
-rw-r--r--science/openkim/pkg-plist9
6 files changed, 79 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile
index b5ae437c111..a4b0d299bf7 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -110,6 +110,7 @@
SUBDIR += netcdf4
SUBDIR += nifticlib
SUBDIR += openbabel
+ SUBDIR += openkim
SUBDIR += p5-Algorithm-SVMLight
SUBDIR += p5-Chemistry-3DBuilder
SUBDIR += p5-Chemistry-Bond-Find
diff --git a/science/openkim/Makefile b/science/openkim/Makefile
new file mode 100644
index 00000000000..c4053c59b34
--- /dev/null
+++ b/science/openkim/Makefile
@@ -0,0 +1,51 @@
+# Created by: Jason Bacon
+# $FreeBSD$
+
+PORTNAME= openkim
+PORTVERSION= 1.1.1
+CATEGORIES= science
+MASTER_SITES= http://s3.openkim.org/openkim-api/
+DISTNAME= ${PORTNAME}-api-v${PORTVERSION}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= jwbacon@tds.net
+COMMENT= Knowledgebase of Interatomic Models
+
+LICENSE= CDDL
+
+MAKE_ENV+= KIM_DIR=${WRKSRC}
+
+USES= gmake fortran
+
+MAKE_JOBS_UNSAFE=yes
+
+.include <bsd.port.options.mk>
+
+# Is there a better way to detect 32-bit systems?
+.if ${ARCH} == "i386" || ${ARCH} == "powerpc"
+MAKE_ENV+= KIM_SYSTEM32="yes"
+.endif
+
+post-patch:
+ ${REINPLACE_CMD} \
+ -e "s|gcc|${CC}|g" \
+ -e "s|g++|${CXX}|g" \
+ -e "s|= gfortran|= ${FC}|g" \
+ -e "s|-O3|${CFLAGS}|g" \
+ -e "s|LINKLIBFLAG =|LINKLIBFLAG = ${LDFLAGS}|" \
+ ${WRKSRC}/KIM_API/GNU_compiler_settings.mk
+
+# Required for main build to succeed
+pre-build:
+ (cd ${WRKSRC} && ${MAKE_CMD} KIM_DIR=${WRKSRC} examples)
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/lib ${STAGEDIR}${PREFIX}/include/KIM_API
+ ${INSTALL_DATA} ${WRKSRC}/KIM_API/libkim.a ${STAGEDIR}${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/KIM_API/*.h ${STAGEDIR}${PREFIX}/include/KIM_API
+
+regression-test:
+ (cd ${WRKSRC}/TESTs/ex_test_Ar_free_cluster_CLUSTER_F90 && \
+ ${ECHO_CMD} "ex_model_Ar_P_MLJ_CLUSTER_C" | ./ex_test_Ar_free_cluster_CLUSTER_F90)
+
+.include <bsd.port.mk>
diff --git a/science/openkim/distinfo b/science/openkim/distinfo
new file mode 100644
index 00000000000..997ab7791ad
--- /dev/null
+++ b/science/openkim/distinfo
@@ -0,0 +1,2 @@
+SHA256 (openkim-api-v1.1.1.tgz) = 683bda8011754b2525e6f935f52909c141e9d39c2184cefb98babb9e4e5e0959
+SIZE (openkim-api-v1.1.1.tgz) = 1529043
diff --git a/science/openkim/files/patch-KIM_API__GNU_compiler_settings.mk b/science/openkim/files/patch-KIM_API__GNU_compiler_settings.mk
new file mode 100644
index 00000000000..6c4a5caeef3
--- /dev/null
+++ b/science/openkim/files/patch-KIM_API__GNU_compiler_settings.mk
@@ -0,0 +1,10 @@
+--- KIM_API/GNU_compiler_settings.mk.orig 2012-08-19 23:13:47.000000000 +0200
++++ KIM_API/GNU_compiler_settings.mk 2014-02-21 16:11:02.000000000 +0100
+@@ -53,7 +53,3 @@
+ # Add libforgranbegin if needed.
+ LINKLIBFLAG += -lgfortranbegin
+ endif
+-ifdef KIM_DYNAMIC
+- # Add libdl if dynamic linking is being used
+- LINKLIBFLAG += -ldl
+-endif
diff --git a/science/openkim/pkg-descr b/science/openkim/pkg-descr
new file mode 100644
index 00000000000..5ab2ea06428
--- /dev/null
+++ b/science/openkim/pkg-descr
@@ -0,0 +1,6 @@
+An online resource for standardized testing and long-term warehousing of
+interatomic models and data. This includes the development of application
+programming interface (API) standards for coupling atomistic simulation
+codes and interatomic potential subroutines.
+
+WWW: https://openkim.org/
diff --git a/science/openkim/pkg-plist b/science/openkim/pkg-plist
new file mode 100644
index 00000000000..3a9a89f7828
--- /dev/null
+++ b/science/openkim/pkg-plist
@@ -0,0 +1,9 @@
+include/KIM_API/KIM_API.h
+include/KIM_API/KIM_API_C.h
+include/KIM_API/KIM_API_status.h
+include/KIM_API/KIM_AUX.h
+include/KIM_API/Unit_Handling.h
+include/KIM_API/model_init_include.h
+include/KIM_API/model_kim_str_include.h
+lib/libkim.a
+@dirrm include/KIM_API