From owner-svn-ports-all@freebsd.org Fri Mar 20 11:39:30 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92999263C8D; Fri, 20 Mar 2020 11:39:30 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48kMJ23T3zz4Y20; Fri, 20 Mar 2020 11:39:30 +0000 (UTC) (envelope-from madpilot@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 6E00722F13; Fri, 20 Mar 2020 11:39:30 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02KBdU33003824; Fri, 20 Mar 2020 11:39:30 GMT (envelope-from madpilot@FreeBSD.org) Received: (from madpilot@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02KBdUhQ003822; Fri, 20 Mar 2020 11:39:30 GMT (envelope-from madpilot@FreeBSD.org) Message-Id: <202003201139.02KBdUhQ003822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: madpilot set sender to madpilot@FreeBSD.org using -f From: Guido Falsi Date: Fri, 20 Mar 2020 11:39:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r528772 - head/deskutils/calibre X-SVN-Group: ports-head X-SVN-Commit-Author: madpilot X-SVN-Commit-Paths: head/deskutils/calibre X-SVN-Commit-Revision: 528772 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.29 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: Fri, 20 Mar 2020 11:39:30 -0000 Author: madpilot Date: Fri Mar 20 11:39:29 2020 New Revision: 528772 URL: https://svnweb.freebsd.org/changeset/ports/528772 Log: - Enable compiling calibre with python 3 - Add options to choose which python version to depend on - Make the deprecation warning conditional on which option is selected Due to upstreaam support for python3 being experimental, leave the default at python 2. Plan is to switch the default to python 3 after 2020Q2 is branched to expose it to more testing. Modified: head/deskutils/calibre/Makefile head/deskutils/calibre/pkg-plist Modified: head/deskutils/calibre/Makefile ============================================================================== --- head/deskutils/calibre/Makefile Fri Mar 20 09:54:59 2020 (r528771) +++ head/deskutils/calibre/Makefile Fri Mar 20 11:39:29 2020 (r528772) @@ -12,9 +12,6 @@ COMMENT= Ebook management application LICENSE= GPLv3 -DEPRECATED= Uses deprecated version of python -EXPIRATION_DATE= 2020-09-15 - LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ libpoppler-qt5.so:graphics/poppler-qt5 \ libwmflite.so:graphics/libwmf \ @@ -27,7 +24,6 @@ LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ libhyphen.so:textproc/hyphen BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dateutil>=0:devel/py-dateutil@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pillow6>=0:graphics/py-pillow6@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}lxml>=0:devel/py-lxml@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}css-parser>=1.0.4:www/py-css-parser@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}apsw>=0:databases/py-apsw@${PY_FLAVOR} \ @@ -39,7 +35,6 @@ RUN_DEPENDS= xdg-open:devel/xdg-utils \ ${PYTHON_PKGNAMEPREFIX}dnspython>=0:dns/py-dnspython@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dateutil>=0:devel/py-dateutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}beautifulsoup>=0:www/py-beautifulsoup@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pillow6>=0:graphics/py-pillow6@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}lxml>=0:devel/py-lxml@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mechanize>=0:www/py-mechanize@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR} \ @@ -55,7 +50,7 @@ RUN_DEPENDS= xdg-open:devel/xdg-utils \ pdftohtml:graphics/poppler-utils USES= desktop-file-utils gettext-runtime gl gnome localbase:ldflags \ - pkgconfig python:2.7 pyqt:5 qt:5 shared-mime-info shebangfix \ + pkgconfig pyqt:5 qt:5 shared-mime-info shebangfix \ ssl tar:xz xorg USE_RC_SUBR= calibre USE_PYQT= core gui network sip svg webengine widgets xmlpatterns @@ -67,7 +62,7 @@ USE_XORG= xrender xext x11 EXTRACT_BEFORE_ARGS= -x -s '/^calibre/~-src/' -f SHEBANG_GLOB= *.sh *.py *.recipe python_OLD_CMD= "/usr/bin/env python2" "/usr/bin/env python2" "/usr/bin/env python" /bin/python2 \ - /usr/bin/python2 /usr/local/bin/python2 + /usr/bin/python2 ${PYTHON_BIN} WRKSRC= ${WRKDIR}/${PORTNAME}-src-${PORTVERSION} MAKE_ENV+= FC_INC_DIR="${LOCALBASE}/include/fontconfig" \ FC_LIB_DIR="${LOCALBASE}/lib" \ @@ -84,6 +79,26 @@ MAKE_ENV+= FC_INC_DIR="${LOCALBASE}/include/fontconfig SIP_BIN=${SIP} \ SIP_DIR=${PYQT_SIPDIR} +OPTIONS_SINGLE= PYTHON +OPTIONS_SINGLE_PYTHON= PYTHON2 PYTHON3 +OPTIONS_DEFAULT= PYTHON2 +OPTINS_SUB= yes + +PYTHON2_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow6>=0:graphics/py-pillow6@${PY_FLAVOR} +PYTHON2_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow6>=0:graphics/py-pillow6@${PY_FLAVOR} +PYTHON2_USES= python:2.7 +PYTHON2_VARS= PYTHON_BIN=${LOCALBASE}/bin/python2 \ + DEPRECATED="Uses deprecated version of python" \ + EXPIRATION_DATE=2020-09-15 +PYTHON2_PLIST_SUB= SODIR="" + +PYTHON3_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>=0:graphics/py-pillow@${PY_FLAVOR} +PYTHON3_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>=0:graphics/py-pillow@${PY_FLAVOR} +PYTHON3_USES= python:3.5+ +PYTHON3_VARS= PYTHON_BIN=${LOCALBASE}/bin/python3 +PYTHON3_MAKE_ENV= CALIBRE_PY3_PORT=1 +PYTHON3_PLIST_SUB= SODIR="3/" + post-patch: @${REINPLACE_CMD} -e "s|#!/usr/bin/env python{py_major_version}|#!${PYTHON_CMD}|" \ -e "s|#!/usr/bin/env python2|#!${PYTHON_CMD}|" \ @@ -111,6 +126,11 @@ do-install: @${RM} ${STAGEDIR}${PREFIX}/bin/calibre-uninstall \ ${STAGEDIR}${PREFIX}/share/applications/defaults.list @${RMDIR} ${STAGEDIR}${PREFIX}/share/desktop-directories + +do-install-PYTHON2-on: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/calibre/calibre/plugins/* + +do-install-PYTHON3-on: + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/calibre/calibre/plugins/3/* .include Modified: head/deskutils/calibre/pkg-plist ============================================================================== --- head/deskutils/calibre/pkg-plist Fri Mar 20 09:54:59 2020 (r528771) +++ head/deskutils/calibre/pkg-plist Fri Mar 20 11:39:29 2020 (r528772) @@ -1139,34 +1139,34 @@ lib/calibre/calibre/library/schema_upgrades.py lib/calibre/calibre/library/sqlite.py lib/calibre/calibre/libunzip.py lib/calibre/calibre/linux.py -lib/calibre/calibre/plugins/_patiencediff_c.so -lib/calibre/calibre/plugins/bzzdec.so -lib/calibre/calibre/plugins/cPalmdoc.so -lib/calibre/calibre/plugins/certgen.so -lib/calibre/calibre/plugins/chmlib.so -lib/calibre/calibre/plugins/freetype.so -lib/calibre/calibre/plugins/html_as_json.so -lib/calibre/calibre/plugins/html_syntax_highlighter.so -lib/calibre/calibre/plugins/hunspell.so -lib/calibre/calibre/plugins/hyphen.so -lib/calibre/calibre/plugins/icu.so -lib/calibre/calibre/plugins/imageops.so -lib/calibre/calibre/plugins/libheadless.so -lib/calibre/calibre/plugins/libmtp.so -lib/calibre/calibre/plugins/libusb.so -lib/calibre/calibre/plugins/lzma_binding.so -lib/calibre/calibre/plugins/lzx.so -lib/calibre/calibre/plugins/matcher.so -lib/calibre/calibre/plugins/monotonic.so -lib/calibre/calibre/plugins/msdes.so -lib/calibre/calibre/plugins/pictureflow.so -lib/calibre/calibre/plugins/podofo.so -lib/calibre/calibre/plugins/progress_indicator.so -lib/calibre/calibre/plugins/speedup.so -lib/calibre/calibre/plugins/sqlite_custom.so -lib/calibre/calibre/plugins/tokenizer.so -lib/calibre/calibre/plugins/unicode_names.so -lib/calibre/calibre/plugins/zlib2.so +lib/calibre/calibre/plugins/%%SODIR%%_patiencediff_c.so +lib/calibre/calibre/plugins/%%SODIR%%bzzdec.so +lib/calibre/calibre/plugins/%%SODIR%%cPalmdoc.so +lib/calibre/calibre/plugins/%%SODIR%%certgen.so +lib/calibre/calibre/plugins/%%SODIR%%chmlib.so +lib/calibre/calibre/plugins/%%SODIR%%freetype.so +lib/calibre/calibre/plugins/%%SODIR%%html_as_json.so +lib/calibre/calibre/plugins/%%SODIR%%html_syntax_highlighter.so +lib/calibre/calibre/plugins/%%SODIR%%hunspell.so +lib/calibre/calibre/plugins/%%SODIR%%hyphen.so +lib/calibre/calibre/plugins/%%SODIR%%icu.so +lib/calibre/calibre/plugins/%%SODIR%%imageops.so +lib/calibre/calibre/plugins/%%SODIR%%libheadless.so +lib/calibre/calibre/plugins/%%SODIR%%libmtp.so +lib/calibre/calibre/plugins/%%SODIR%%libusb.so +lib/calibre/calibre/plugins/%%SODIR%%lzma_binding.so +lib/calibre/calibre/plugins/%%SODIR%%lzx.so +lib/calibre/calibre/plugins/%%SODIR%%matcher.so +%%PYTHON2%%lib/calibre/calibre/plugins/monotonic.so +lib/calibre/calibre/plugins/%%SODIR%%msdes.so +lib/calibre/calibre/plugins/%%SODIR%%pictureflow.so +lib/calibre/calibre/plugins/%%SODIR%%podofo.so +lib/calibre/calibre/plugins/%%SODIR%%progress_indicator.so +lib/calibre/calibre/plugins/%%SODIR%%speedup.so +lib/calibre/calibre/plugins/%%SODIR%%sqlite_custom.so +lib/calibre/calibre/plugins/%%SODIR%%tokenizer.so +lib/calibre/calibre/plugins/%%SODIR%%unicode_names.so +%%PYTHON2%%lib/calibre/calibre/plugins/zlib2.so lib/calibre/calibre/ptempfile.py lib/calibre/calibre/rpdb.py lib/calibre/calibre/spell/__init__.py