Bug 177692 - New port: science/openkim
Summary: New port: science/openkim
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Thierry Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-07 17:00 UTC by Jason W. Bacon
Modified: 2014-02-21 15:50 UTC (History)
0 users

See Also:


Attachments
file.shar (2.71 KB, text/plain)
2013-04-07 17:00 UTC, Jason W. Bacon
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason W. Bacon freebsd_committer freebsd_triage 2013-04-07 17:00:00 UTC
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.

openkim is a prerequisite for science/lammps, which is currently being tested and will be submitted soon.

Fix: Patch attached with submission follows:
Comment 1 dfilter service freebsd_committer freebsd_triage 2014-02-21 15:40:06 UTC
Author: thierry
Date: Fri Feb 21 15:39:56 2014
New Revision: 345491
URL: http://svnweb.freebsd.org/changeset/ports/345491
QAT: https://qat.redports.org/buildarchive/r345491/

Log:
  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>

Added:
  head/science/openkim/
  head/science/openkim/Makefile   (contents, props changed)
  head/science/openkim/distinfo   (contents, props changed)
  head/science/openkim/files/
  head/science/openkim/files/patch-KIM_API__GNU_compiler_settings.mk   (contents, props changed)
  head/science/openkim/pkg-descr   (contents, props changed)
  head/science/openkim/pkg-plist   (contents, props changed)
Modified:
  head/science/Makefile

Modified: head/science/Makefile
==============================================================================
--- head/science/Makefile	Fri Feb 21 15:39:25 2014	(r345490)
+++ head/science/Makefile	Fri Feb 21 15:39:56 2014	(r345491)
@@ -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

Added: head/science/openkim/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/openkim/Makefile	Fri Feb 21 15:39:56 2014	(r345491)
@@ -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>

Added: head/science/openkim/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/openkim/distinfo	Fri Feb 21 15:39:56 2014	(r345491)
@@ -0,0 +1,2 @@
+SHA256 (openkim-api-v1.1.1.tgz) = 683bda8011754b2525e6f935f52909c141e9d39c2184cefb98babb9e4e5e0959
+SIZE (openkim-api-v1.1.1.tgz) = 1529043

Added: head/science/openkim/files/patch-KIM_API__GNU_compiler_settings.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/openkim/files/patch-KIM_API__GNU_compiler_settings.mk	Fri Feb 21 15:39:56 2014	(r345491)
@@ -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

Added: head/science/openkim/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/openkim/pkg-descr	Fri Feb 21 15:39:56 2014	(r345491)
@@ -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/

Added: head/science/openkim/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/openkim/pkg-plist	Fri Feb 21 15:39:56 2014	(r345491)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2014-06-01 07:55:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->thierry


Take it.
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2014-06-01 07:55:55 UTC
State Changed
From-To: open->closed


Committed, thanks! 

Remark: why don't you define KIM_DYNAMIC to build the shared lib?