void-packages/srcpkgs/qtcreator/template
Đ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

69 lines
2.8 KiB
Bash

# Template file for 'qtcreator'
pkgname=qtcreator
version=4.15.1
revision=1
wrksrc="qt-creator-opensource-src-${version}"
build_style=qmake
make_install_args="INSTALL_ROOT=\${DESTDIR}/usr"
hostmakedepends="clang llvm perl pkg-config python3 which qt5-qmake
qt5-host-tools"
makedepends="qt5-declarative-devel qt5-script-devel qt5-tools-devel
qt5-quickcontrols clang llvm"
depends="qt5-declarative-devel qt5-quickcontrols qt5-plugin-sqlite"
short_desc="Cross-platform IDE for Qt developers"
maintainer="Piotr Wójcik <chocimier@tlen.pl>"
license="LGPL-3.0-or-later, custom:QtCompany-GPL-Exception-1.0"
homepage="https://wiki.qt.io/Category:Tools::QtCreator"
changelog="https://code.qt.io/cgit/qt-creator/qt-creator.git/plain/dist/changes-${version}.md"
distfiles="https://download.qt.io/official_releases/qtcreator/${version%.*}/${version}/${wrksrc}.tar.xz"
checksum=5ca9457987e7af0af929c310cc995496388076b6a0b9c429828c60bf0eec1b4d
replaces="qtcreator-data>=0"
python_version=3
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" libexecinfo-devel"
fi
pre_configure() {
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
vsed -i src/plugins/qmldesigner/qmldesignerplugin.pro \
src/plugins/clangformat/clangformat.pro \
-e "/LIBS += /aLIBS += -L${XBPS_CROSS_BASE}/usr/lib -lexecinfo"
vsed -i src/plugins/debugger/debugger.pro \
-e "/RESOURCES += /aLIBS += -L${XBPS_CROSS_BASE}/usr/lib -lexecinfo"
fi
}
post_install() {
# Install the license with the annotation for
# the Qt Company GPL Exception 1.0
vlicense LICENSE.GPL3-EXCEPT
}
qtcreator-full_package() {
short_desc+=" - full Qt5 dependencies"
depends="${sourcepkg}>=${version}_${revision} base-devel
qt5-3d-devel qt5-charts-devel qt5-connectivity-devel qt5-datavis3d-devel
qt5-declarative-devel qt5-gamepad-devel qt5-location-devel qt5-lottie-devel
qt5-multimedia-devel qt5-networkauth-devel qt5-purchasing-devel qt5-quickcontrols
qt5-quickcontrols2-devel qt5-remoteobjects-devel qt5-script-devel qt5-scxml-devel
qt5-sensors-devel qt5-serialbus-devel qt5-serialport-devel
qt5-speech-devel qt5-styleplugins-devel qt5-svg-devel
qt5-tools-devel qt5-virtualkeyboard-devel qt5-wayland-devel qt5-webchannel-devel
qt5-webglplugin-devel qt5-webkit-devel qt5-websockets-devel qt5-webview-devel
qt5-x11extras-devel qt5-xmlpatterns-devel qt5-host-tools
qt5-examples qt5-imageformats qt5-graphicaleffects qt5-translations
qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
# Not for big endian targets and not if word sizes of host and target differ
if [ "$XBPS_TARGET_ENDIAN" = "le" -a "$XBPS_TARGET_WORDSIZE" = "$XBPS_WORDSIZE" ]; then
# qt5-webengine cannot be built for armv5tel
case "$XBPS_TARGET_MACHINE" in
armv5tel*) ;;
*) depends+=" qt5-webengine-devel" ;;
esac
fi
build_style=meta
pkg_install() {
echo "Just the dependencies"
}
}