void-packages/srcpkgs/gwenhywfar/patches/qt5-cross.patch
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```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

28 lines
987 B
Diff

--- a/m4/ax_have_qt.m4 2020-01-16 19:40:22.927813462 +0100
+++ b/m4/ax_have_qt.m4 2020-01-16 19:42:12.106436543 +0100
@@ -74,6 +74,12 @@
[QT_QMAKE="qmake"]
)
+ AC_ARG_WITH(qt5-config,
+ [ --with-qt5-config=FILE uses given qt configuration],
+ [QT_CONFIGURATION="$withval"],
+ [QT_CONFIGURATION=""]
+ )
+
AC_MSG_CHECKING(for Qt)
# If we have Qt5 or later in the path, we're golden
ver=`$QT_QMAKE --version | grep -o "Qt version ."`
@@ -122,7 +128,11 @@
percent.commands = @echo -n "\$(\$(@))\ "
QMAKE_EXTRA_TARGETS += percent
EOF
- $QT_QMAKE $am_have_qt_pro -o $am_have_qt_makefile
+ if test -z $QT_CONFIGURATION; then
+ $QT_QMAKE $am_have_qt_pro -o $am_have_qt_makefile
+ else
+ $QT_QMAKE $am_have_qt_pro -o $am_have_qt_makefile -qtconf $QT_CONFIGURATION
+ fi
QT_CXXFLAGS=`make -s -f $am_have_qt_makefile CXXFLAGS INCPATH`
QT_LIBS=`make -s -f $am_have_qt_makefile LIBS`
rm $am_have_qt_pro $am_have_qt_makefile