From e97603704269ac4cbc062a0be2e7edd204d69914 Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Wed, 24 Oct 2018 05:36:11 +0000 Subject: [PATCH] New port: science/molsketch: 2D molecule editor --- science/Makefile | 1 + science/molsketch/Makefile | 30 +++++++ science/molsketch/distinfo | 3 + science/molsketch/files/patch-CMakeLists.txt | 29 +++++++ science/molsketch/files/patch-buildvariables | 10 +++ .../files/patch-molsketch_programversion.cpp | 15 ++++ .../files/patch-molsketch_programversion.h | 13 +++ science/molsketch/pkg-descr | 4 + science/molsketch/pkg-plist | 86 +++++++++++++++++++ 9 files changed, 191 insertions(+) create mode 100644 science/molsketch/Makefile create mode 100644 science/molsketch/distinfo create mode 100644 science/molsketch/files/patch-CMakeLists.txt create mode 100644 science/molsketch/files/patch-buildvariables create mode 100644 science/molsketch/files/patch-molsketch_programversion.cpp create mode 100644 science/molsketch/files/patch-molsketch_programversion.h create mode 100644 science/molsketch/pkg-descr create mode 100644 science/molsketch/pkg-plist diff --git a/science/Makefile b/science/Makefile index 6a1e6bd98244..b78f09184b78 100644 --- a/science/Makefile +++ b/science/Makefile @@ -146,6 +146,7 @@ SUBDIR += mmtf SUBDIR += mol2ps SUBDIR += molgif + SUBDIR += molsketch SUBDIR += mpb SUBDIR += mpqc SUBDIR += msms diff --git a/science/molsketch/Makefile b/science/molsketch/Makefile new file mode 100644 index 000000000000..eb0ef09b0f69 --- /dev/null +++ b/science/molsketch/Makefile @@ -0,0 +1,30 @@ +# $FreeBSD$ + +PORTNAME= molsketch +DISTVERSION= 0.5.2 +DISTVERSIONSUFFIX= -src +CATEGORIES= science +MASTER_SITES= SF/${PORTNAME}/Molsketch/Boron-11%20${DISTVERSION}/ +DISTNAME= Molsketch-${DISTVERSIONFULL} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= 2D molecule editor + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS= libopenbabel.so:science/openbabel + +USES= cmake:outsource desktop-file-utils localbase:ldflags pkgconfig qt:5 shared-mime-info +USE_QT= core gui network printsupport svg widgets buildtools_build qmake_build +USE_LDCONFIG= ${PREFIX}/lib/molsketch + +CMAKE_ARGS= -DMSK_PREFIX:STRING=${PREFIX} + +WRKSRC= ${WRKDIR}/Molsketch-${DISTVERSION} + +OPTIONS_DEFINE= DOCS + +PORTDOCS= * + +.include diff --git a/science/molsketch/distinfo b/science/molsketch/distinfo new file mode 100644 index 000000000000..b3c2fd23765e --- /dev/null +++ b/science/molsketch/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1540350640 +SHA256 (Molsketch-0.5.2-src.tar.gz) = 87a4382c2cac8eb280f69ea2f7bd26f945adbce6012a347684f24304b1c491ae +SIZE (Molsketch-0.5.2-src.tar.gz) = 1670642 diff --git a/science/molsketch/files/patch-CMakeLists.txt b/science/molsketch/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..cd357db38265 --- /dev/null +++ b/science/molsketch/files/patch-CMakeLists.txt @@ -0,0 +1,29 @@ +--- CMakeLists.txt.orig 2018-08-15 17:18:23 UTC ++++ CMakeLists.txt +@@ -39,7 +39,7 @@ configure_file("${CMAKE_MODULE_PATH}/cma + add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") + + # Enabling debugging symbols +-set(CMAKE_BUILD_TYPE Debug) ++#set(CMAKE_BUILD_TYPE Debug) + + # Enabling shared libraries + set(BUILD_SHARED_LIBS ON) +@@ -119,7 +119,7 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT + endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT APPLE ) + + if(NOT FORCEQt4) +- set(QTVERSIONSUFFIX "-qt5") ++ set(QTVERSIONSUFFIX "") + endif(NOT FORCEQt4) + + set(OBABEL_IFACE_NAME "libobabeliface${QTVERSIONSUFFIX}.so") +@@ -130,7 +130,7 @@ endif(WIN32 OR WIN64) + + add_definitions(-DOBABEL_IFACE_LOCATION="\\\"${MSK_INSTALL_LIBS}/${OBABEL_IFACE_NAME}\\\"") + +-set(CMAKE_INSTALL_PREFIX ${MSK_PREFIX}) ++#set(CMAKE_INSTALL_PREFIX ${MSK_PREFIX}) + + ################ Adding subdirs + add_subdirectory(libmolsketch) diff --git a/science/molsketch/files/patch-buildvariables b/science/molsketch/files/patch-buildvariables new file mode 100644 index 000000000000..ce8d1cc1f811 --- /dev/null +++ b/science/molsketch/files/patch-buildvariables @@ -0,0 +1,10 @@ +--- buildvariables.orig 2018-10-24 03:59:40 UTC ++++ buildvariables +@@ -2,6 +2,6 @@ + "Executable destination dir";MSK_INSTALL_BINS;/bin;/bin + "Headers destination dir";MSK_INSTALL_INCLUDES;/include;/include + "Documentation destination dir";MSK_INSTALL_DOCS;/share/doc/molsketch;/doc +-"Libraries (64bit) destination dir";MSK_INSTALL_LIBS64;/lib64/molsketch;/lib ++"Libraries (64bit) destination dir";MSK_INSTALL_LIBS64;/lib/molsketch;/lib + "Libraries (32bit) destination dir";MSK_INSTALL_LIBS;/lib/molsketch;/lib + "Build OpenBabel interface";MSK_OBABELIFACE;true;true diff --git a/science/molsketch/files/patch-molsketch_programversion.cpp b/science/molsketch/files/patch-molsketch_programversion.cpp new file mode 100644 index 000000000000..a8eb0872cee8 --- /dev/null +++ b/science/molsketch/files/patch-molsketch_programversion.cpp @@ -0,0 +1,15 @@ +--- molsketch/programversion.cpp.orig 2018-10-24 03:35:50 UTC ++++ molsketch/programversion.cpp +@@ -88,10 +88,10 @@ QString ProgramVersion::toString() const + return QString("%1.%2.%3.%4").arg(d->major).arg(d->minor).arg(d->patch).arg(d->build); + } + +-unsigned int ProgramVersion::minor() const { ++unsigned int ProgramVersion::minorx() const { + return d->minor; + } + +-unsigned int ProgramVersion::major() const { ++unsigned int ProgramVersion::majorx() const { + return d->major; + } diff --git a/science/molsketch/files/patch-molsketch_programversion.h b/science/molsketch/files/patch-molsketch_programversion.h new file mode 100644 index 000000000000..235c7f084274 --- /dev/null +++ b/science/molsketch/files/patch-molsketch_programversion.h @@ -0,0 +1,13 @@ +--- molsketch/programversion.h.orig 2018-10-24 03:35:24 UTC ++++ molsketch/programversion.h +@@ -30,8 +30,8 @@ public: + ProgramVersion(const QString& version = ""); + ProgramVersion(int major, int minor = 0, int patch = 0, int build = 0); + ~ProgramVersion(); +- unsigned int major() const; +- unsigned int minor() const; ++ unsigned int majorx() const; ++ unsigned int minorx() const; + unsigned int patch() const; + unsigned int build() const; + bool operator ==(const ProgramVersion& other) const; diff --git a/science/molsketch/pkg-descr b/science/molsketch/pkg-descr new file mode 100644 index 000000000000..42fe18706520 --- /dev/null +++ b/science/molsketch/pkg-descr @@ -0,0 +1,4 @@ +Molsketch is a 2D molecular editing tool. +Its goal is to help you draw molecules quick and easily. + +WWW: https://molsketch.sourceforge.net/ diff --git a/science/molsketch/pkg-plist b/science/molsketch/pkg-plist new file mode 100644 index 000000000000..eea93969bb87 --- /dev/null +++ b/science/molsketch/pkg-plist @@ -0,0 +1,86 @@ +bin/molsketch +include/libmolsketch/TextInputItem.h +include/libmolsketch/abstractxmlobject.h +include/libmolsketch/actions/abstractitemaction.h +include/libmolsketch/actions/abstractrecursiveitemaction.h +include/libmolsketch/actions/alignmentaction.h +include/libmolsketch/actions/arrowtypeaction.h +include/libmolsketch/actions/arrowtypewidget.h +include/libmolsketch/actions/bondtypeaction.h +include/libmolsketch/actions/bondtypewidget.h +include/libmolsketch/actions/coloraction.h +include/libmolsketch/actions/deleteaction.h +include/libmolsketch/actions/drawaction.h +include/libmolsketch/actions/flipbondaction.h +include/libmolsketch/actions/flipstereobondsaction.h +include/libmolsketch/actions/frameaction.h +include/libmolsketch/actions/frametypeaction.h +include/libmolsketch/actions/frametypewidget.h +include/libmolsketch/actions/genericaction.h +include/libmolsketch/actions/incdecaction.h +include/libmolsketch/actions/itemgrouptypeaction.h +include/libmolsketch/actions/itemtypeaction.h +include/libmolsketch/actions/itemtypeselectionaction.h +include/libmolsketch/actions/itemtypewidget.h +include/libmolsketch/actions/linewidthaction.h +include/libmolsketch/actions/mechanismarrowaction.h +include/libmolsketch/actions/multiaction.h +include/libmolsketch/actions/periodictablewidget.h +include/libmolsketch/actions/reactionarrowaction.h +include/libmolsketch/actions/ringaction.h +include/libmolsketch/actions/rotateaction.h +include/libmolsketch/actions/textaction.h +include/libmolsketch/actions/transformcommand.h +include/libmolsketch/arrow.h +include/libmolsketch/arrowpopup.h +include/libmolsketch/atom.h +include/libmolsketch/atompopup.h +include/libmolsketch/bond.h +include/libmolsketch/boundingboxlinker.h +include/libmolsketch/colorbutton.h +include/libmolsketch/commands.h +include/libmolsketch/constants.h +include/libmolsketch/coordinatedelegate.h +include/libmolsketch/coordinatemodel.h +include/libmolsketch/coordinatetableview.h +include/libmolsketch/electronsystem.h +include/libmolsketch/element.h +include/libmolsketch/fileio.h +include/libmolsketch/fontchooser.h +include/libmolsketch/frame.h +include/libmolsketch/generics.h +include/libmolsketch/graphicsitem.h +include/libmolsketch/grid.h +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/propertiesdock.h +include/libmolsketch/propertieswidget.h +include/libmolsketch/qtversionmacros.h +include/libmolsketch/radicalelectron.h +include/libmolsketch/scenepropertieswidget.h +include/libmolsketch/scenesettings.h +include/libmolsketch/settingsconnector.h +include/libmolsketch/settingsfacade.h +include/libmolsketch/settingsitem.h +include/libmolsketch/stringify.h +include/libmolsketch/textitem.h +include/libmolsketch/xmlobjectinterface.h +lib/molsketch/libmolsketch.so +lib/molsketch/libobabeliface.so +share/applications/molsketch.desktop +share/icons/hicolor/scalable/apps/molsketch.svg +share/icons/hicolor/scalable/mimetypes/application-x-molsketch.svg +share/metainfo/net.sourceforge.molsketch.appdata.xml +share/mime/packages/molsketch.xml +share/pixmaps/molsketch.xpm