Skip to content

Commit

Permalink
New port: science/opsin: Open Parser for Systematic IUPAC Nomenclatur…
Browse files Browse the repository at this point in the history
…e of chemical names
  • Loading branch information
yurivict committed Feb 14, 2019
1 parent 55c5fb7 commit 6dadefa
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 0 deletions.
1 change: 1 addition & 0 deletions science/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
SUBDIR += openmx
SUBDIR += opensim-core
SUBDIR += openstructure
SUBDIR += opsin
SUBDIR += p5-Algorithm-SVMLight
SUBDIR += p5-Chemistry-3DBuilder
SUBDIR += p5-Chemistry-Bond-Find
Expand Down
62 changes: 62 additions & 0 deletions science/opsin/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# $FreeBSD$

PORTNAME= opsin
DISTVERSION= 3.0.20190208
CATEGORIES= science java
MASTER_SITES= https://bitbucket.org/${BB_ACCOUNT}/${PORTNAME}/get/${BB_COMMIT}${EXTRACT_SUFX}?dummy=/:src
DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}:src

MAINTAINER= [email protected]
COMMENT= Open Parser for Systematic IUPAC Nomenclature of chemical names

LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt

BUILD_DEPENDS= mvn:devel/maven

USE_JAVA= yes

NO_ARCH= yes

BB_ACCOUNT= dan2097
BB_COMMIT= 6688e0cedfcc

WRKSRC= ${WRKDIR}/${BB_ACCOUNT}-${PORTNAME}-${BB_COMMIT}
SUB_FILES= ${PORTNAME}
SUB_LIST= JAVA=${JAVA} PORTNAME=${PORTNAME} PORTVERSION=${PORTVERSION}

PLIST_FILES= bin/${PORTNAME} \
${JAVAJARDIR}/${PORTNAME}-${PORTVERSION}-jar-with-dependencies.jar

# to rebuild the deps archive:
# 1. set DEV_UPDATE_MODE=yes
# 2. make makesum build
# 3. upload the *-deps archive
# 4. set DEV_UPDATE_MODE=no
# 5. make clean makesum

DEV_UPDATE_MODE= no

.if (${DEV_UPDATE_MODE} == "yes")
post-build:
@cd ${WRKDIR} && ${TAR} czf ${DISTDIR}/${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX} .m2
@${ECHO} "(!!!) Please upload the maven deps archive: ${DISTDIR}/${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX}"
.else
MASTER_SITES+= LOCAL/yuri/:maven
DISTFILES+= ${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX}:maven
MVN_ARGS= --offline
.endif

do-build:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${LOCALBASE}/bin/mvn ${MVN_ARGS} \
-fae install \
-Dmaven.test.skip=true \
-Duser.home=${WRKDIR} \
package assembly:assembly

do-install:
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/target/${PORTNAME}-*-jar-with-dependencies.jar ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}-${PORTVERSION}-jar-with-dependencies.jar

.include <bsd.port.mk>
5 changes: 5 additions & 0 deletions science/opsin/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TIMESTAMP = 1550104217
SHA256 (opsin-3.0.20190208.tar.gz) = d37222168a0ffb412109095212152f31b0b909abdaa14158561424651426df8f
SIZE (opsin-3.0.20190208.tar.gz) = 1795278
SHA256 (opsin-3.0.20190208-deps.tar.gz) = b42bfc011571d7e12fbc4e051653d19edaef6b7d04aaa146c817e1309dc4cba2
SIZE (opsin-3.0.20190208-deps.tar.gz) = 20394666
5 changes: 5 additions & 0 deletions science/opsin/files/opsin.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

export LC_ALL=en_US.UTF-8

%%JAVA%% -jar %%JAVAJARDIR%%/%%PORTNAME%%-%%PORTVERSION%%-jar-with-dependencies.jar "$@"
6 changes: 6 additions & 0 deletions science/opsin/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OPSIN is a Java library for IUPAC name-to-structure conversion offering high
recall and precision on organic chemical nomenclature.
Supported outputs are SMILES, CML (Chemical Markup Language) and InChI (IUPAC
International Chemical Identifier).

WWW: https://bitbucket.org/dan2097/opsin/src/default/

0 comments on commit 6dadefa

Please sign in to comment.