void-packages/srcpkgs/qscintilla-qt5/patches/configure.py-objdir-support.patch
Đoàn Trần Công Danh 635e9da391 srcpkgs/q*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

42 lines
1.7 KiB
Diff

02_configure.dpatch by Torsten Marek <shlomme@debian.org>
Updated for Qscintilla 2.8.2 configure.py changes by Scott Kitterman
<scott@kitterman.com>
patch the configure script for the Python bindings to support object dir
builds
Index: Python/configure.py
===================================================================
--- a/Python/configure.py 2014-07-05 10:02:02.318834374 -0400
+++ b/Python/configure.py 2014-07-05 10:02:02.306834375 -0400
@@ -31,6 +31,8 @@
import optparse
import sys
+src_dir = os.path.dirname(os.path.abspath(__file__))
+
###############################################################################
# You shouldn't need to modify anything above this line.
@@ -210,6 +212,8 @@
"The QScintilla version number could not be determined by "
"reading %s." % sciglobal)
+ return # Debian: do not check for the installed version, we're good this way.
+
lib_dir = target_configuration.qsci_lib_dir
if lib_dir is None:
lib_dir = target_configuration.qt_lib_dir
@@ -264,7 +268,12 @@
the target configuration.
"""
- return 'sip/qscimod5.sip' if target_configuration.pyqt_package == 'PyQt5' else 'sip/qscimod4.sip'
+ if target_configuration.pyqt_package == 'PyQt5':
+ return os.path.join(src_dir, 'sip/qscimod5.sip')
+ else:
+ return os.path.join(src_dir, 'sip/qscimod4.sip')
+
+ #return 'sip/qscimod5.sip' if target_configuration.pyqt_package == 'PyQt5' else 'sip/qscimod4.sip'
def get_sip_installs(self, target_configuration):
""" Return a tuple of the installation directory of the module's .sip