From owner-svn-ports-all@freebsd.org Thu Mar 22 05:48:26 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED8E9F6BB1D; Thu, 22 Mar 2018 05:48:25 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96B8580C1D; Thu, 22 Mar 2018 05:48:25 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 917095751; Thu, 22 Mar 2018 05:48:25 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2M5mPfM051162; Thu, 22 Mar 2018 05:48:25 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2M5mPYP051160; Thu, 22 Mar 2018 05:48:25 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <201803220548.w2M5mPYP051160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Thu, 22 Mar 2018 05:48:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r465257 - in head/science/py-pymol: . files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/science/py-pymol: . files X-SVN-Commit-Revision: 465257 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 05:48:26 -0000 Author: yuri Date: Thu Mar 22 05:48:25 2018 New Revision: 465257 URL: https://svnweb.freebsd.org/changeset/ports/465257 Log: science/py-pymol: Add GUI options QT5 and TK; Add missing dependency NUMPY Now QT5 is the default, while Tk is still available as a second choice. Added: head/science/py-pymol/files/patch-modules_pymol_Qt_____init____.py (contents, props changed) Modified: head/science/py-pymol/Makefile Modified: head/science/py-pymol/Makefile ============================================================================== --- head/science/py-pymol/Makefile Thu Mar 22 04:45:38 2018 (r465256) +++ head/science/py-pymol/Makefile Thu Mar 22 05:48:25 2018 (r465257) @@ -4,6 +4,7 @@ PORTNAME= pymol DISTVERSIONPREFIX= v DISTVERSION= 2.1.0 +PORTREVISION= 1 CATEGORIES= science biology python MASTER_SITES= SF/pymol/pymol/2/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -16,11 +17,13 @@ LICENSE_NAME= Open-Source PyMOL Copyright LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack-python>0:devel/py-msgpack-python@${FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}Pmw>0:x11-toolkits/py-Pmw@${FLAVOR} +BUILD_DEPENDS= ${PYNUMPY} LIB_DEPENDS= libfreetype.so:print/freetype2 \ libpng.so:graphics/png \ libmsgpackc.so:devel/msgpack +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack-python>0:devel/py-msgpack-python@${FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Pmw>0:x11-toolkits/py-Pmw@${FLAVOR} \ + ${PYNUMPY} USES= compiler:c++11-lang python:2.7 shebangfix tar:bz2 USE_GL= gl glew glu glut @@ -29,6 +32,19 @@ USE_PYTHON= distutils concurrent # autoplist is broken SHEBANG_FILES= test/show test/run test/cyg WRKSRC= ${WRKDIR}/pymol + +OPTIONS_SINGLE= GUI +OPTIONS_SINGLE_GUI= QT5 TK +OPTIONS_DEFAULT= QT5 + +QT5_USES= pyqt:5 +QT5_USE= PYQT=core_run,gui_run,opengl_run + +post-patch-TK-on: + @${REINPLACE_CMD} -e ' \ + 23s|if not PYQT_NAME:|if False:| ; \ + s|from PyQt5 import|from X import|' \ + ${WRKSRC}/modules/pymol/Qt/__init__.py post-install: @${REINPLACE_CMD} -i '' -e 's|#!/bin/bash|#!/bin/sh|' ${STAGEDIR}${PREFIX}/bin/pymol Added: head/science/py-pymol/files/patch-modules_pymol_Qt_____init____.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/py-pymol/files/patch-modules_pymol_Qt_____init____.py Thu Mar 22 05:48:25 2018 (r465257) @@ -0,0 +1,20 @@ +--- modules/pymol/Qt/__init__.py.orig 2018-03-22 05:10:42 UTC ++++ modules/pymol/Qt/__init__.py +@@ -28,7 +28,7 @@ if not PYQT_NAME: + if DEBUG: + print('import PyQt5 failed') + +-if not PYQT_NAME: ++if False: + try: + __import__("sip").setapi("QString", 2) + from PyQt4 import QtGui, QtCore, QtOpenGL +@@ -37,7 +37,7 @@ if not PYQT_NAME: + if DEBUG: + print('import PyQt4 failed') + +-if not PYQT_NAME: ++if False: + try: + from PySide import QtGui, QtCore, QtOpenGL + PYQT_NAME = 'PySide'