Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pysvn/files/, dev-python/pysvn/
Date: Sun, 01 Mar 2020 13:56:45
Message-Id: 1583070987.123ed4399dbe917c4e5dae1bee44e6e63bc094c8.sping@gentoo
1 commit: 123ed4399dbe917c4e5dae1bee44e6e63bc094c8
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 1 13:52:52 2020 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 1 13:56:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=123ed439
7
8 dev-python/pysvn: 1.9.11 + EAPI 7 + py37/py38
9
10 Closes: https://bugs.gentoo.org/602152
11 Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
12 Package-Manager: Portage-2.3.84, Repoman-2.3.20
13
14 dev-python/pysvn/Manifest | 1 +
15 .../pysvn/files/pysvn-1.9.11-respect-flags.patch | 124 +++++++++++++++++++++
16 dev-python/pysvn/pysvn-1.9.11.ebuild | 59 ++++++++++
17 3 files changed, 184 insertions(+)
18
19 diff --git a/dev-python/pysvn/Manifest b/dev-python/pysvn/Manifest
20 index 340ef8cb793..ed402f4d9d5 100644
21 --- a/dev-python/pysvn/Manifest
22 +++ b/dev-python/pysvn/Manifest
23 @@ -1 +1,2 @@
24 DIST pysvn-1.8.0.tar.gz 366583 BLAKE2B b7aae274bd2387901df4075ffa70d73e4462a127aa6690aecc406288a9e8dc2f31599297480cfc5fef14ef39c47daa3c309b6c61f49d781abb4d8c0f9a9fcb12 SHA512 14a70b910be986eba638a903edde5046c93314fedb08a7c15d464dc51da1c7efeb87147cc68c00ff9ac1b4ca506d099d3aedf7e4d86f92642c7304ef9540653b
25 +DIST pysvn-1.9.11.tar.gz 624408 BLAKE2B 2ca13388717cc82b68509843e3b1780bceb5c088c41fadc81206c909eb185ec7c73d0a7453fc4e0c1a78a5186e21d382c79af0fb666edce7f5e72c0cf63e25db SHA512 078dc0e19a1f29d40571de002734943415594bcbe132a4d0e6bf8e8781175345ca1b3a4967a183a15efb1462871a40d8e3879a22c913a649555ca593fb99db89
26
27 diff --git a/dev-python/pysvn/files/pysvn-1.9.11-respect-flags.patch b/dev-python/pysvn/files/pysvn-1.9.11-respect-flags.patch
28 new file mode 100644
29 index 00000000000..9a9bcd7f44e
30 --- /dev/null
31 +++ b/dev-python/pysvn/files/pysvn-1.9.11-respect-flags.patch
32 @@ -0,0 +1,124 @@
33 +From 73655a682b69fd514f7060eb67e60ecb617c5f27 Mon Sep 17 00:00:00 2001
34 +From: Sebastian Pipping <sebastian@×××××××.org>
35 +Date: Sun, 1 Mar 2020 14:16:13 +0100
36 +Subject: [PATCH] Respect CC, CXX, LDFLAGS
37 +
38 +---
39 + Patches/test_proplist.mak | 4 ++--
40 + Source/setup_configure.py | 24 ++++++++++--------------
41 + 2 files changed, 12 insertions(+), 16 deletions(-)
42 +
43 +diff --git a/Patches/test_proplist.mak b/Patches/test_proplist.mak
44 +index 9d9a58a..02e7a68 100644
45 +--- a/Patches/test_proplist.mak
46 ++++ b/Patches/test_proplist.mak
47 +@@ -2,7 +2,7 @@ CCCFLAGS=-fPIC -fexceptions -frtti -I$(SVN_INC) -I$(APR_INC)
48 + LDLIBS=-L$(SVN_LIB) -lsvn_client-1 -lapr-0
49 +
50 + test_proplist: test_proplist.o
51 +- g++ -g -o test_proplist test_proplist.o $(LDLIBS)
52 ++ $(CXX) $(LDFLAGS) -o test_proplist test_proplist.o $(LDLIBS)
53 +
54 + test_proplist.o: test_proplist.cpp
55 +- g++ -c -g $(CCCFLAGS) -o $@ $<
56 ++ $(CXX) -c $(LDFLAGS) $(CCCFLAGS) -o $@ $<
57 +diff --git a/Source/setup_configure.py b/Source/setup_configure.py
58 +index e02a6a5..bbe7ec7 100644
59 +--- a/Source/setup_configure.py
60 ++++ b/Source/setup_configure.py
61 +@@ -900,8 +900,8 @@ class CompilerGCC(Compiler):
62 + def __init__( self, setup ):
63 + Compiler.__init__( self, setup )
64 +
65 +- self._addVar( 'CCC', 'g++' )
66 +- self._addVar( 'CC', 'gcc' )
67 ++ self._addVar( 'CCC', '$(CXX)' )
68 ++ self._addVar( 'CC', '$(CC)' )
69 +
70 + def getPythonExtensionFileExt( self ):
71 + return '.so'
72 +@@ -1037,8 +1037,8 @@ class MacOsxCompilerGCC(CompilerGCC):
73 + else:
74 + arch_options = ''
75 +
76 +- self._addVar( 'CCC', 'g++ %s' % (arch_options,) )
77 +- self._addVar( 'CC', 'gcc %s' % (arch_options,) )
78 ++ self._addVar( 'CCC', '$(CXX) %s' % (arch_options,) )
79 ++ self._addVar( 'CC', '$(CC) %s' % (arch_options,) )
80 +
81 + self._find_paths_pycxx_dir = [
82 + '../Import/pycxx-%d.%d.%d' % min_pycxx_version,
83 +@@ -1104,11 +1104,10 @@ class MacOsxCompilerGCC(CompilerGCC):
84 +
85 + def setupUtilities( self ):
86 + self._addVar( 'CCCFLAGS',
87 +- '-g '
88 + '-Wall -fPIC -fexceptions -frtti '
89 + '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s '
90 + '-D%(DEBUG)s' )
91 +- self._addVar( 'LDEXE', '%(CCC)s -g' )
92 ++ self._addVar( 'LDEXE', '%(CCC)s $(LDFLAGS)' )
93 +
94 + def setupPySvn( self ):
95 + # Support building in a virtualenv.
96 +@@ -1132,7 +1131,6 @@ class MacOsxCompilerGCC(CompilerGCC):
97 + self._addVar( 'PYTHON_INC', distutils.sysconfig.get_python_inc() )
98 +
99 + py_cflags_list = [
100 +- '-g',
101 + '-Wall -fPIC',
102 + '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s',
103 + '-DPYCXX_PYTHON_2TO3 -I%(PYCXX)s -I%(PYCXX_SRC)s -I%(PYTHON_INC)s',
104 +@@ -1166,7 +1164,7 @@ class MacOsxCompilerGCC(CompilerGCC):
105 +
106 + if self.options.hasOption( '--link-python-framework-via-dynamic-lookup' ):
107 + # preferred link method on homebrew for pysvn
108 +- self._addVar( 'LDSHARED', '%(CCC)s -bundle -g '
109 ++ self._addVar( 'LDSHARED', '%(CCC)s -bundle $(LDFLAGS) '
110 + '-framework System '
111 + '-framework CoreFoundation '
112 + '-framework Kerberos '
113 +@@ -1174,7 +1172,7 @@ class MacOsxCompilerGCC(CompilerGCC):
114 + '-undefined dynamic_lookup '
115 + '%(LDLIBS)s' )
116 + else:
117 +- self._addVar( 'LDSHARED', '%(CCC)s -bundle -g '
118 ++ self._addVar( 'LDSHARED', '%(CCC)s -bundle $(LDFLAGS) '
119 + '-framework System '
120 + '%(PYTHON_FRAMEWORK)s '
121 + '-framework CoreFoundation '
122 +@@ -1247,11 +1245,10 @@ class UnixCompilerGCC(CompilerGCC):
123 +
124 + def setupUtilities( self ):
125 + self._addVar( 'CCCFLAGS',
126 +- '-g '
127 + '-Wall -fPIC -fexceptions -frtti '
128 + '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s '
129 + '-D%(DEBUG)s' )
130 +- self._addVar( 'LDEXE', '%(CCC)s -g' )
131 ++ self._addVar( 'LDEXE', '%(CCC)s $(LDFLAGS)' )
132 +
133 + def setupPySvn( self ):
134 + self._pysvnModuleSetup()
135 +@@ -1279,8 +1276,7 @@ class UnixCompilerGCC(CompilerGCC):
136 + py_cflags_list.extend( self._getDefines( '-D%s' ) )
137 +
138 + if self.options.hasOption( '--enable-debug' ):
139 +- print( 'Info: Debug enabled' )
140 +- py_cflags_list.append( '-g' )
141 ++ print( 'Info: --enable-debug ignored' )
142 +
143 + if self.options.hasOption( '--disable-deprecated-functions-warnings' ):
144 + print( 'Info: Disable deprecated functions warnings' )
145 +@@ -1289,7 +1285,7 @@ class UnixCompilerGCC(CompilerGCC):
146 + self._addVar( 'CCFLAGS', ' '.join( py_cflags_list ) )
147 + self._addVar( 'CCCFLAGS', ' '.join( py_cflags_list+['-fexceptions -frtti'] ) )
148 + self._addVar( 'LDLIBS', ' '.join( self._getLdLibs() ) )
149 +- self._addVar( 'LDSHARED', '%(CCC)s -shared -g' )
150 ++ self._addVar( 'LDSHARED', '%(CCC)s -shared $(LDFLAGS)' )
151 +
152 + #--------------------------------------------------------------------------------
153 + class LinuxCompilerGCC(UnixCompilerGCC):
154 +--
155 +2.24.1
156 +
157
158 diff --git a/dev-python/pysvn/pysvn-1.9.11.ebuild b/dev-python/pysvn/pysvn-1.9.11.ebuild
159 new file mode 100644
160 index 00000000000..2e18b73b9b4
161 --- /dev/null
162 +++ b/dev-python/pysvn/pysvn-1.9.11.ebuild
163 @@ -0,0 +1,59 @@
164 +# Copyright 1999-2020 Gentoo Authors
165 +# Distributed under the terms of the GNU General Public License v2
166 +
167 +EAPI=7
168 +PYTHON_COMPAT=( python3_{6,7,8} )
169 +
170 +inherit eutils distutils-r1 toolchain-funcs
171 +
172 +DESCRIPTION="Object-oriented python bindings for subversion"
173 +HOMEPAGE="https://pysvn.sourceforge.io/"
174 +SRC_URI="mirror://sourceforge/project/pysvn/pysvn/V${PV}/${P}.tar.gz"
175 +
176 +LICENSE="Apache-1.1"
177 +SLOT="0"
178 +KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
179 +IUSE="doc examples"
180 +
181 +DEPEND="
182 + >=dev-python/pycxx-7.0.2[${PYTHON_USEDEP}]
183 + >=dev-vcs/subversion-1.9"
184 +RDEPEND="${DEPEND}"
185 +
186 +PATCHES=( "${FILESDIR}"/${P}-respect-flags.patch )
187 +
188 +DISTUTILS_IN_SOURCE_BUILD=true
189 +
190 +python_prepare_all() {
191 + # Don't use internal copy of dev-python/pycxx.
192 + rm -r Import || die
193 +
194 + distutils-r1_python_prepare_all
195 +}
196 +
197 +python_configure() {
198 + cd Source || die
199 + # all config options from 1.7.6 are all already set
200 + esetup.py configure
201 +}
202 +
203 +python_compile() {
204 + cd Source || die
205 + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)"
206 +}
207 +
208 +python_test() {
209 + cd Tests || die
210 + emake
211 +}
212 +
213 +python_install() {
214 + cd Source || die
215 + python_domodule pysvn
216 +}
217 +
218 +python_install_all() {
219 + use doc && local HTML_DOCS=( Docs/. )
220 + use examples && local EXAMPLES=( Examples/Client/. )
221 + distutils-r1_python_install_all
222 +}