Sunday, May 31, 2020

Re: python3 flavour for devel/subversion

On Sat, May 30, 2020 at 06:15:42PM +0100, Stuart Henderson wrote:
> I think this has all the pieces needed, ok?

Certainly Ok with me. Thanks for getting this off my back :)

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/subversion/Makefile,v
> retrieving revision 1.180
> diff -u -p -r1.180 Makefile
> --- Makefile 28 May 2020 12:25:27 -0000 1.180
> +++ Makefile 30 May 2020 17:15:12 -0000
> @@ -1,4 +1,4 @@
> -# $OpenBSD: Makefile,v 1.180 2020/05/28 12:25:27 stsp Exp $
> +# $OpenBSD: Makefile,v 1.179 2020/05/15 14:47:40 ajacoutot Exp $
>
> COMMENT-main= subversion revision control system
> COMMENT-perl= perl interface to subversion
> @@ -8,12 +8,13 @@ COMMENT-ap2= apache2 subversion modules
> COMMENT-gnome-keyring= GNOME keyring support for subversion
>
> VERSION= 1.14.0
> +REVISION= 0
> DISTNAME= subversion-${VERSION:S/rc/-rc/}
> PKGNAME-main= subversion-${VERSION}
> +FULLPKGNAME-main= subversion-${VERSION}${FLAVOR_EXT:S/-python3//}
> +FULLPKGPATH-main= devel/subversion,-main${FLAVOR_EXT:S/-python3//:S/-/,/g}
> FULLPKGNAME-perl= p5-SVN-${VERSION}
> FULLPKGPATH-perl= devel/subversion,-perl
> -FULLPKGNAME-python= py-subversion-${VERSION}
> -FULLPKGPATH-python= devel/subversion,-python
> FULLPKGNAME-ruby= ruby${MODRUBY_BINREV}-subversion-${VERSION}
> FULLPKGPATH-ruby= devel/subversion,-ruby
> FULLPKGNAME-ap2= ap2-subversion-${VERSION}
> @@ -25,10 +26,6 @@ MODRUBY_REV ?= 2.7
> # Work around for SHARED_LIBS not picking up MODRUBY_BINREV from ruby module
> MODRUBY_BINREV= ${MODRUBY_REV:S/.//}
>
> -# Subversion supports either python2 or python3 bindings. Consumers in the
> -# ports tree are not yet ready for python3. So keep using python 2.7 for now.
> -MODPY_VERSION ?= 2.7
> -
> SO_VERSION= 6.0
> SVN_LIBS= svn_client-1 svn_delta-1 svn_diff-1 svn_fs-1 \
> svn_fs_base-1 svn_fs_fs-1 svn_fs_util-1 svn_fs_x-1 \
> @@ -57,12 +54,24 @@ MASTER_SITES= ${MASTER_SITE_APACHE:=subv
> EXTRACT_SUFX= .tar.bz2
>
> PSEUDO_FLAVORS= no_bindings no_ap2 no_perl no_python no_ruby no_gnome-keyring
> -FLAVORS= maintainer_mode
> +FLAVORS= maintainer_mode python3
> FLAVOR?=
> .if ${FLAVOR:Mno_bindings}
> FLAVOR += no_perl no_python no_ruby
> .endif
>
> +.if ${FLAVOR:Mpython3}
> +FULLPKGNAME-python= py3-subversion-${VERSION}
> +FULLPKGPATH-python= devel/subversion,python3,-python
> +# py-subversion and py3-subversion both install libsvn_swig_py-1;
> +# conflict with the other flavour
> +PY_CONFLICT= py-subversion-*
> +.else
> +FULLPKGNAME-python= py-subversion-${VERSION}
> +FULLPKGPATH-python= devel/subversion,-python
> +PY_CONFLICT= py3-subversion-*
> +.endif
> +
> MODULES= lang/python
>
> WANTLIB= expat iconv intl lz4 m pthread z
> @@ -196,7 +205,8 @@ CONFIGURE_ARGS+=--without-gnome-keyring
>
> TEST_DEPENDS=${MODPY_RUN_DEPENDS}
> TEST_DEPENDS+= ${FULLPKGNAME-gnome-keyring}:${BUILD_PKGPATH},-gnome-keyring
> -SUBST_VARS+= LOCALBASE SO_VERSION MODRUBY_BINREV LIBsvn_swig_ruby-1_VERSION
> +SUBST_VARS+= LOCALBASE SO_VERSION MODRUBY_BINREV
> +SUBST_VARS+= LIBsvn_swig_ruby-1_VERSION MODPY_WANTLIB PY_CONFLICT
>
> pre-patch:
> @ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
> Index: patches/patch-Makefile_in
> ===================================================================
> RCS file: /cvs/ports/devel/subversion/patches/patch-Makefile_in,v
> retrieving revision 1.19
> diff -u -p -r1.19 patch-Makefile_in
> --- patches/patch-Makefile_in 28 May 2020 12:25:27 -0000 1.19
> +++ patches/patch-Makefile_in 30 May 2020 17:15:12 -0000
> @@ -1,4 +1,4 @@
> -$OpenBSD: patch-Makefile_in,v 1.19 2020/05/28 12:25:27 stsp Exp $
> +$OpenBSD: patch-Makefile_in,v 1.18 2019/11/06 15:04:23 stsp Exp $
> Index: Makefile.in
> --- Makefile.in.orig
> +++ Makefile.in
> @@ -24,7 +24,7 @@ Index: Makefile.in
> -SWIG_PY_LINK = @SWIG_PY_LINK@
> -SWIG_PY_LIBS = @SWIG_PY_LIBS@
> +SWIG_PY_LINK = @SWIG_PY_LINK@ -L@libdir@
> -+SWIG_PY_LIBS = -lpython${MODPY_VERSION}
> ++SWIG_PY_LIBS = -l${MODPY_WANTLIB}
> SWIG_PY_ERRMSG = @SWIG_PY_ERRMSG@
> SWIG_PL_INCLUDES = @SWIG_PL_INCLUDES@
> SWIG_PL_ERRMSG = @SWIG_PL_ERRMSG@
> Index: pkg/PLIST-main
> ===================================================================
> RCS file: /cvs/ports/devel/subversion/pkg/PLIST-main,v
> retrieving revision 1.22
> diff -u -p -r1.22 PLIST-main
> --- pkg/PLIST-main 15 May 2020 14:47:40 -0000 1.22
> +++ pkg/PLIST-main 30 May 2020 17:15:12 -0000
> @@ -122,8 +122,6 @@ lib/libsvn_subr-1.la
> @static-lib lib/libsvn_wc-1.a
> lib/libsvn_wc-1.la
> @lib lib/libsvn_wc-1.so.${LIBsvn_wc-1_VERSION}
> -@comment lib/python${MODPY_VERSION}/
> -@comment lib/python${MODPY_VERSION}/site-packages/
> @man man/man1/svn.1
> @man man/man1/svnadmin.1
> @man man/man1/svndumpfilter.1
> Index: pkg/PLIST-python
> ===================================================================
> RCS file: /cvs/ports/devel/subversion/pkg/PLIST-python,v
> retrieving revision 1.11
> diff -u -p -r1.11 PLIST-python
> --- pkg/PLIST-python 15 May 2020 14:47:40 -0000 1.11
> +++ pkg/PLIST-python 30 May 2020 17:15:12 -0000
> @@ -1,11 +1,21 @@
> @comment $OpenBSD: PLIST-python,v 1.11 2020/05/15 14:47:40 ajacoutot Exp $
> +@conflict ${PY_CONFLICT}
> @pkgpath devel/subversion,-python,gnome_keyring
> -@static-lib lib/libsvn_swig_${MODPY_PY_PREFIX}1.a
> -lib/libsvn_swig_${MODPY_PY_PREFIX}1.la
> -@lib lib/libsvn_swig_${MODPY_PY_PREFIX}1.so.${LIBsvn_swig_${MODPY_PY_PREFIX}1_VERSION}
> +@static-lib lib/libsvn_swig_py-1.a
> +lib/libsvn_swig_py-1.la
> +@lib lib/libsvn_swig_py-1.so.${LIBsvn_swig_py-1_VERSION}
> lib/python${MODPY_VERSION}/site-packages/libsvn/
> lib/python${MODPY_VERSION}/site-packages/libsvn/__init__.py
> -lib/python${MODPY_VERSION}/site-packages/libsvn/__init__.pyc
> +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/libsvn/${MODPY_PYCACHE}/
> +lib/python${MODPY_VERSION}/site-packages/libsvn/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/libsvn/${MODPY_PYCACHE}client.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/libsvn/${MODPY_PYCACHE}core.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/libsvn/${MODPY_PYCACHE}delta.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/libsvn/${MODPY_PYCACHE}diff.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/libsvn/${MODPY_PYCACHE}fs.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/libsvn/${MODPY_PYCACHE}ra.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/libsvn/${MODPY_PYCACHE}repos.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/libsvn/${MODPY_PYCACHE}wc.${MODPY_PYC_MAGIC_TAG}pyc
> lib/python${MODPY_VERSION}/site-packages/libsvn/_client.a
> lib/python${MODPY_VERSION}/site-packages/libsvn/_client.la
> @so lib/python${MODPY_VERSION}/site-packages/libsvn/_client.so
> @@ -31,37 +41,30 @@ lib/python${MODPY_VERSION}/site-packages
> lib/python${MODPY_VERSION}/site-packages/libsvn/_wc.la
> @so lib/python${MODPY_VERSION}/site-packages/libsvn/_wc.so
> lib/python${MODPY_VERSION}/site-packages/libsvn/client.py
> -lib/python${MODPY_VERSION}/site-packages/libsvn/client.pyc
> lib/python${MODPY_VERSION}/site-packages/libsvn/core.py
> -lib/python${MODPY_VERSION}/site-packages/libsvn/core.pyc
> lib/python${MODPY_VERSION}/site-packages/libsvn/delta.py
> -lib/python${MODPY_VERSION}/site-packages/libsvn/delta.pyc
> lib/python${MODPY_VERSION}/site-packages/libsvn/diff.py
> -lib/python${MODPY_VERSION}/site-packages/libsvn/diff.pyc
> lib/python${MODPY_VERSION}/site-packages/libsvn/fs.py
> -lib/python${MODPY_VERSION}/site-packages/libsvn/fs.pyc
> lib/python${MODPY_VERSION}/site-packages/libsvn/ra.py
> -lib/python${MODPY_VERSION}/site-packages/libsvn/ra.pyc
> lib/python${MODPY_VERSION}/site-packages/libsvn/repos.py
> -lib/python${MODPY_VERSION}/site-packages/libsvn/repos.pyc
> lib/python${MODPY_VERSION}/site-packages/libsvn/wc.py
> -lib/python${MODPY_VERSION}/site-packages/libsvn/wc.pyc
> lib/python${MODPY_VERSION}/site-packages/svn/
> lib/python${MODPY_VERSION}/site-packages/svn/__init__.py
> -lib/python${MODPY_VERSION}/site-packages/svn/__init__.pyc
> +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/svn/${MODPY_PYCACHE}/
> +lib/python${MODPY_VERSION}/site-packages/svn/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/svn/${MODPY_PYCACHE}client.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/svn/${MODPY_PYCACHE}core.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/svn/${MODPY_PYCACHE}delta.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/svn/${MODPY_PYCACHE}diff.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/svn/${MODPY_PYCACHE}fs.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/svn/${MODPY_PYCACHE}ra.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/svn/${MODPY_PYCACHE}repos.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/svn/${MODPY_PYCACHE}wc.${MODPY_PYC_MAGIC_TAG}pyc
> lib/python${MODPY_VERSION}/site-packages/svn/client.py
> -lib/python${MODPY_VERSION}/site-packages/svn/client.pyc
> lib/python${MODPY_VERSION}/site-packages/svn/core.py
> -lib/python${MODPY_VERSION}/site-packages/svn/core.pyc
> lib/python${MODPY_VERSION}/site-packages/svn/delta.py
> -lib/python${MODPY_VERSION}/site-packages/svn/delta.pyc
> lib/python${MODPY_VERSION}/site-packages/svn/diff.py
> -lib/python${MODPY_VERSION}/site-packages/svn/diff.pyc
> lib/python${MODPY_VERSION}/site-packages/svn/fs.py
> -lib/python${MODPY_VERSION}/site-packages/svn/fs.pyc
> lib/python${MODPY_VERSION}/site-packages/svn/ra.py
> -lib/python${MODPY_VERSION}/site-packages/svn/ra.pyc
> lib/python${MODPY_VERSION}/site-packages/svn/repos.py
> -lib/python${MODPY_VERSION}/site-packages/svn/repos.pyc
> lib/python${MODPY_VERSION}/site-packages/svn/wc.py
> -lib/python${MODPY_VERSION}/site-packages/svn/wc.pyc
>
>

No comments:

Post a Comment