svn commit: r561406 - in head/science: gchemutils kalzium luscus molsketch xdrawchem xdrawchem/files

Yuri Victorovich yuri at FreeBSD.org
Wed Jan 13 00:31:41 UTC 2021


Author: yuri
Date: Wed Jan 13 00:31:38 2021
New Revision: 561406
URL: https://svnweb.freebsd.org/changeset/ports/561406

Log:
  science/openbabel: Upgrade 2.4.1 -> 3.1.1
  
  PR:		252309
  Submitted by:	thierry

Added:
  head/science/xdrawchem/files/
  head/science/xdrawchem/files/patch-xdrawchem.pro   (contents, props changed)
  head/science/xdrawchem/files/patch-xdrawchem_ioiface.cpp   (contents, props changed)
  head/science/xdrawchem/files/patch-xdrawchem_ioiface.h   (contents, props changed)
  head/science/xdrawchem/files/patch-xdrawchem_molecule.h   (contents, props changed)
  head/science/xdrawchem/files/patch-xdrawchem_molecule__obmol.cpp   (contents, props changed)
  head/science/xdrawchem/files/patch-xdrawchem_molecule__smiles.cpp   (contents, props changed)
Modified:
  head/science/gchemutils/Makefile
  head/science/kalzium/Makefile
  head/science/luscus/Makefile
  head/science/molsketch/Makefile
  head/science/molsketch/distinfo
  head/science/molsketch/pkg-plist
  head/science/xdrawchem/Makefile

Modified: head/science/gchemutils/Makefile
==============================================================================
--- head/science/gchemutils/Makefile	Wed Jan 13 00:29:40 2021	(r561405)
+++ head/science/gchemutils/Makefile	Wed Jan 13 00:31:38 2021	(r561406)
@@ -3,7 +3,7 @@
 
 PORTNAME=	gchemutils
 PORTVERSION=	0.14.16
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	science
 MASTER_SITES=	SAVANNAH/${PORTNAME}/${PORTVERSION:R}
 DISTNAME=	gnome-chemistry-utils-${PORTVERSION}
@@ -62,8 +62,9 @@ PLIST_SUB+=	GNUMERIC=""
 PLIST_SUB+=	GNUMERIC="@comment "
 .endif
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|-ldl||g' ${WRKSRC}/libs/gcp/Makefile.in
+pre-configure:
+	${REINPLACE_CMD} -e 's|-ldl||g' ${WRKSRC}/libs/gcp/Makefile.in
+	${REINPLACE_CMD} -e 's|openbabel-2.0|openbabel-3|' ${WRKSRC}/${CONFIGURE_SCRIPT}
 
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so.*

Modified: head/science/kalzium/Makefile
==============================================================================
--- head/science/kalzium/Makefile	Wed Jan 13 00:29:40 2021	(r561405)
+++ head/science/kalzium/Makefile	Wed Jan 13 00:31:38 2021	(r561406)
@@ -2,14 +2,18 @@
 
 PORTNAME=	kalzium
 DISTVERSION=	${KDE_APPLICATIONS_VERSION}
+PORTREVISION=	1
 CATEGORIES=	science education kde kde-applications
 
 PATCH_SITES=	https://invent.kde.org/education/kalzium/commit/
 PATCHFILES=	2b9ebd85.diff:-p1
 
 MAINTAINER=	kde at FreeBSD.org
-COMMENT=	Periodic table of elements for KDE 4
+COMMENT=	Periodic table of elements for KDE
 
+LICENSE=	GPLv2 LGPL20 GFDL
+LICENSE_COMB=	multi
+
 LIB_DEPENDS=	libopenbabel.so:science/openbabel \
 		libAvogadroCore.so:science/avogadrolibs
 BUILD_DEPENDS=	${LOCALBASE}/lib/ocaml/facile/facile.a:math/facile \
@@ -33,6 +37,19 @@ USE_QT=		concurrent core dbus declarative gui network 
 
 USE_LDCONFIG=	yes
 
+CMF=		. compoundviewer compoundviewer/widgets src
+
 OPTIONS_DEFINE=	DOCS
+
+post-patch:
+	${CP} ${WRKSRC}/cmake/modules/FindOpenBabel2.cmake \
+		${WRKSRC}/cmake/modules/FindOpenBabel3.cmake
+	${REINPLACE_CMD} -e 's|OPENBABEL2|OPENBABEL3|g;s|OpenBabel2|OpenBabel3|' \
+		-e 's|openbabel-2.0|openbabel-3|;s|openbabel-2|openbabel-3|' \
+		${WRKSRC}/cmake/modules/FindOpenBabel3.cmake
+.for c in ${CMF}
+	${REINPLACE_CMD} -e 's|OpenBabel2|OpenBabel3|;s|OPENBABEL2|OPENBABEL3|;s|OpenBabel3_|OPENBABEL3_|;s|OPENBABEL3_INCLUDE_DIRS|OPENBABEL3_INCLUDE_DIR|;s|OPENBABEL2_|OPENBABEL3_|' \
+		${WRKSRC}/${c}/CMakeLists.txt
+.endfor
 
 .include <bsd.port.mk>

Modified: head/science/luscus/Makefile
==============================================================================
--- head/science/luscus/Makefile	Wed Jan 13 00:29:40 2021	(r561405)
+++ head/science/luscus/Makefile	Wed Jan 13 00:31:38 2021	(r561406)
@@ -2,7 +2,7 @@
 
 PORTNAME=	luscus
 DISTVERSION=	0.8.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	science
 MASTER_SITES=	SF/${PORTNAME}/
 DISTNAME=	${PORTNAME}_${DISTVERSION}
@@ -19,7 +19,7 @@ LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 		libfreetype.so:print/freetype2 \
 		libgdkglext-x11-1.0.so:x11-toolkits/gtkglext
 RUN_DEPENDS=	bash:shells/bash \
-		babel:science/openbabel
+		obabel:science/openbabel # see https://sourceforge.net/p/luscus/tickets/5/
 
 USES=		cmake compiler:c++11-lang gettext-runtime gl gnome pkgconfig \
 		shebangfix xorg

Modified: head/science/molsketch/Makefile
==============================================================================
--- head/science/molsketch/Makefile	Wed Jan 13 00:29:40 2021	(r561405)
+++ head/science/molsketch/Makefile	Wed Jan 13 00:31:38 2021	(r561406)
@@ -1,11 +1,10 @@
 # $FreeBSD$
 
 PORTNAME=	molsketch
-DISTVERSION=	0.6.0
-PORTREVISION=	1
+DISTVERSION=	0.7.0
 DISTVERSIONSUFFIX=	-src
 CATEGORIES=	science
-MASTER_SITES=	SF/${PORTNAME}/Molsketch/Nitrogen%20${DISTVERSION}/
+MASTER_SITES=	SF/${PORTNAME}/Molsketch/Oxygen%20${DISTVERSION}/
 DISTNAME=	Molsketch-${DISTVERSIONFULL}
 
 MAINTAINER=	yuri at FreeBSD.org

Modified: head/science/molsketch/distinfo
==============================================================================
--- head/science/molsketch/distinfo	Wed Jan 13 00:29:40 2021	(r561405)
+++ head/science/molsketch/distinfo	Wed Jan 13 00:31:38 2021	(r561406)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1552970968
-SHA256 (Molsketch-0.6.0-src.tar.gz) = 999751d0dca25fe5c0b117dddd8a43f2583bb9e2df7fd14cddfa859896389537
-SIZE (Molsketch-0.6.0-src.tar.gz) = 1680065
+TIMESTAMP = 1609181842
+SHA256 (Molsketch-0.7.0-src.tar.gz) = 2a8b181793f6df8892c55399c13674ecf688403ad402c9fead20f4916715bb9d
+SIZE (Molsketch-0.7.0-src.tar.gz) = 1874764

Modified: head/science/molsketch/pkg-plist
==============================================================================
--- head/science/molsketch/pkg-plist	Wed Jan 13 00:29:40 2021	(r561405)
+++ head/science/molsketch/pkg-plist	Wed Jan 13 00:31:38 2021	(r561406)
@@ -22,6 +22,7 @@ include/libmolsketch/actions/itemgrouptypeaction.h
 include/libmolsketch/actions/itemtypeaction.h
 include/libmolsketch/actions/itemtypeselectionaction.h
 include/libmolsketch/actions/itemtypewidget.h
+include/libmolsketch/actions/lineupaction.h
 include/libmolsketch/actions/linewidthaction.h
 include/libmolsketch/actions/mechanismarrowaction.h
 include/libmolsketch/actions/multiaction.h
@@ -46,6 +47,7 @@ include/libmolsketch/coordinatemodel.h
 include/libmolsketch/coordinatetableview.h
 include/libmolsketch/electronsystem.h
 include/libmolsketch/element.h
+include/libmolsketch/elementalignment.h
 include/libmolsketch/fileio.h
 include/libmolsketch/fontchooser.h
 include/libmolsketch/frame.h
@@ -56,15 +58,14 @@ include/libmolsketch/helptextemptydock.h
 include/libmolsketch/helptextonemptylabel.h
 include/libmolsketch/librarymodel.h
 include/libmolsketch/libraryview.h
-include/libmolsketch/lineupaction.h
 include/libmolsketch/lonepair.h
 include/libmolsketch/math2d.h
-include/libmolsketch/mimemolecule.h
 include/libmolsketch/molecule.h
 include/libmolsketch/moleculemodelitem.h
 include/libmolsketch/moleculepopup.h
 include/libmolsketch/molscene.h
 include/libmolsketch/molview.h
+include/libmolsketch/neighboralignment.h
 include/libmolsketch/propertiesdock.h
 include/libmolsketch/propertieswidget.h
 include/libmolsketch/qtversionmacros.h

Modified: head/science/xdrawchem/Makefile
==============================================================================
--- head/science/xdrawchem/Makefile	Wed Jan 13 00:29:40 2021	(r561405)
+++ head/science/xdrawchem/Makefile	Wed Jan 13 00:31:38 2021	(r561406)
@@ -2,7 +2,7 @@
 
 PORTNAME=	xdrawchem
 DISTVERSION=	1.10.2-1
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	science
 
 MAINTAINER=	yuri at FreeBSD.org
@@ -20,6 +20,10 @@ USE_QT=		core gui network printsupport widgets xml bui
 USE_GL=		gl
 
 WRKSRC_SUBDIR=	${PORTNAME}-qt5
+
+pre-configure:
+	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|'	\
+		${WRKSRC}/xdrawchem.pro
 
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}

Added: head/science/xdrawchem/files/patch-xdrawchem.pro
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/xdrawchem/files/patch-xdrawchem.pro	Wed Jan 13 00:31:38 2021	(r561406)
@@ -0,0 +1,13 @@
+--- xdrawchem.pro.orig	2017-01-09 12:25:32 UTC
++++ xdrawchem.pro
+@@ -6,8 +6,8 @@ exists(/usr/include/openbabel-2.0/openbabel/mol.h) {
+ INCLUDEPATH += /usr/include/openbabel-2.0
+ LIBS += -lopenbabel
+ }
+-exists(/usr/local/include/openbabel-2.0/openbabel/mol.h) {
+-INCLUDEPATH += /usr/local/include/openbabel-2.0
++exists(%%LOCALBASE%%/include/openbabel3/openbabel/mol.h) {
++INCLUDEPATH += %%LOCALBASE%%/include/openbabel3
+ LIBS += -lopenbabel
+ }
+ exists(/Developer/openbabel-2.4.1/include/openbabel/mol.h) {

Added: head/science/xdrawchem/files/patch-xdrawchem_ioiface.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/xdrawchem/files/patch-xdrawchem_ioiface.cpp	Wed Jan 13 00:31:38 2021	(r561406)
@@ -0,0 +1,38 @@
+--- xdrawchem/ioiface.cpp.orig	2017-01-09 12:25:32 UTC
++++ xdrawchem/ioiface.cpp
+@@ -193,7 +193,7 @@ void IOIface::convertToChemData()
+         int bondorder = bond->GetBondOrder();
+ 
+         //set elements
+-        if ( !atom1->IsCarbon() ) {
++        if ( atom1->GetAtomicNum() != 6 ) {
+             QString str( "<element>" );
+             str += IOIface::symbol[atom1->GetAtomicNum() - 1];
+             str += "</element>";
+@@ -201,7 +201,7 @@ void IOIface::convertToChemData()
+ 
+         }
+ 
+-        if ( !atom2->IsCarbon() ) {
++        if ( atom2->GetAtomicNum() != 6 ) {
+             QString str( "<element>" );
+ 
+             str += IOIface::symbol[atom2->GetAtomicNum() - 1];
+@@ -216,7 +216,7 @@ void IOIface::convertToChemData()
+ 
+         //label atoms if not Carbon
+ 
+-        if ( !atom1->IsCarbon() ) {
++        if ( atom1->GetAtomicNum() != 6 ) {
+ 
+             text = new Text( chemdata->getRender2D() );
+             QString str = IOIface::symbol[atom1->GetAtomicNum() - 1];
+@@ -229,7 +229,7 @@ void IOIface::convertToChemData()
+             //qDebug() << "ioiface(1) text:" << str;
+         }
+ 
+-        if ( !atom2->IsCarbon() ) {
++        if ( atom2->GetAtomicNum() != 6 ) {
+ 
+             text = new Text( chemdata->getRender2D() );
+             QString str = IOIface::symbol[atom2->GetAtomicNum() - 1];

Added: head/science/xdrawchem/files/patch-xdrawchem_ioiface.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/xdrawchem/files/patch-xdrawchem_ioiface.h	Wed Jan 13 00:31:38 2021	(r561406)
@@ -0,0 +1,12 @@
+--- xdrawchem/ioiface.h.orig	2017-01-09 12:25:32 UTC
++++ xdrawchem/ioiface.h
+@@ -20,6 +20,9 @@
+ 
+ #include "chemdata.h"
+ 
++#include <openbabel/atom.h>
++#include <openbabel/bond.h>
++#include <openbabel/math/vector3.h>
+ #include <openbabel/mol.h>
+ 
+ using namespace OpenBabel;

Added: head/science/xdrawchem/files/patch-xdrawchem_molecule.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/xdrawchem/files/patch-xdrawchem_molecule.h	Wed Jan 13 00:31:38 2021	(r561406)
@@ -0,0 +1,13 @@
+--- xdrawchem/molecule.h.orig	2017-01-09 12:25:32 UTC
++++ xdrawchem/molecule.h
+@@ -3,6 +3,10 @@
+ #ifndef MOLECULE_H
+ #define MOLECULE_H
+ 
++#include <openbabel/atom.h>
++#include <openbabel/bond.h>
++#include <openbabel/elements.h>
++#include <openbabel/math/vector3.h>
+ #include <openbabel/mol.h>
+ #include <openbabel/obconversion.h>
+ 

Added: head/science/xdrawchem/files/patch-xdrawchem_molecule__obmol.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/xdrawchem/files/patch-xdrawchem_molecule__obmol.cpp	Wed Jan 13 00:31:38 2021	(r561406)
@@ -0,0 +1,47 @@
+--- xdrawchem/molecule_obmol.cpp.orig	2017-01-09 12:25:32 UTC
++++ xdrawchem/molecule_obmol.cpp
+@@ -58,7 +58,7 @@ bool Molecule::convertFromOBMol( OBMol * obmol )
+     Point point;
+     Text *text;
+ 
+-    std::vector < OBEdgeBase * >::iterator bonditr;
++    std::vector < OBBond * >::iterator bonditr;
+     std::map < Point, DPoint *, pt_cmp > points;
+     std::map < Point, DPoint *, pt_cmp >::iterator itr;
+ 
+@@ -133,7 +133,7 @@ bool Molecule::convertFromOBMol( OBMol * obmol )
+         int bondorder = bond->GetBondOrder();
+ 
+         //set elements
+-        if ( !atom1->IsCarbon() ) {
++        if ( atom1->GetAtomicNum() != 6 ) {
+             QString str( "<element>" );
+ 
+             str += symbol[atom1->GetAtomicNum() - 1];
+@@ -142,7 +142,7 @@ bool Molecule::convertFromOBMol( OBMol * obmol )
+ 
+         }
+ 
+-        if ( !atom2->IsCarbon() ) {
++        if ( atom2->GetAtomicNum() != 6 ) {
+             QString str( "<element>" );
+ 
+             str += symbol[atom2->GetAtomicNum() - 1];
+@@ -155,7 +155,7 @@ bool Molecule::convertFromOBMol( OBMol * obmol )
+ 
+         //label atoms if not Carbon
+ 
+-        if ( !atom1->IsCarbon() ) {
++        if ( atom1->GetAtomicNum() != 6 ) {
+ 
+             text = new Text( r );
+             QString str = symbol[atom1->GetAtomicNum() - 1];
+@@ -167,7 +167,7 @@ bool Molecule::convertFromOBMol( OBMol * obmol )
+             addText( text );
+         }
+ 
+-        if ( !atom2->IsCarbon() ) {
++        if ( atom2->GetAtomicNum() != 6 ) {
+ 
+             text = new Text( r );
+             QString str = symbol[atom2->GetAtomicNum() - 1];

Added: head/science/xdrawchem/files/patch-xdrawchem_molecule__smiles.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/xdrawchem/files/patch-xdrawchem_molecule__smiles.cpp	Wed Jan 13 00:31:38 2021	(r561406)
@@ -0,0 +1,32 @@
+--- xdrawchem/molecule_smiles.cpp.orig	2017-01-09 12:25:32 UTC
++++ xdrawchem/molecule_smiles.cpp
+@@ -254,8 +254,6 @@ void Molecule::FromSMILES( QString sm )
+ 
+     DPoint *thisDPoint;
+ 
+-    OpenBabel::OBElementTable etable;
+-
+     std::vector < OpenBabel::OBNodeBase * >::iterator ait;
+ 
+     std::map < OpenBabel::OBAtom *, DPoint * >hashit;
+@@ -265,9 +263,9 @@ void Molecule::FromSMILES( QString sm )
+ 
+         qInfo() << "Adding OBAtom: " << i++ << " of element#: " <<
+           thisAtom->GetAtomicNum() << " type: " <<
+-          etable.GetSymbol(thisAtom->GetAtomicNum()) ;
++          OBElements::GetSymbol(thisAtom->GetAtomicNum()) ;
+         thisDPoint = new DPoint;
+-        tmp_element = etable.GetSymbol( thisAtom->GetAtomicNum() );
++        tmp_element = OBElements::GetSymbol( thisAtom->GetAtomicNum() );
+ 
+         tmp_element_mask = tmp_element;
+         tmp_element_mask.fill( ' ' );   // fix the mask characters
+@@ -292,7 +290,7 @@ void Molecule::FromSMILES( QString sm )
+ 
+     OpenBabel::OBBond * thisBond;
+ 
+-    std::vector < OpenBabel::OBEdgeBase * >::iterator bit;
++    std::vector < OpenBabel::OBBond * >::iterator bit;
+     for ( thisBond = myMol.BeginBond( bit ); thisBond; thisBond = myMol.NextBond( bit ) ) {
+         addBond( hashit[thisBond->GetBeginAtom()], hashit[thisBond->GetEndAtom()], 1, thisBond->GetBondOrder(), QColor( 0, 0, 0 ), true );
+     }


More information about the svn-ports-all mailing list