svn commit: r566508 - in head: Mk/Uses devel/qt5-core devel/qt5/files
Adriaan de Groot
adridg at FreeBSD.org
Wed Feb 24 20:45:15 UTC 2021
Author: adridg
Date: Wed Feb 24 20:45:14 2021
New Revision: 566508
URL: https://svnweb.freebsd.org/changeset/ports/566508
Log:
Fix Qt5 ports
Thanks to antoine@ for figuring out that ${REINPLACE_CMD} does not
handle '\t' in all supported versions -- so replacing the tabs in
the script kept the tabs, but called /usr/bin/ca and /usr/bin/sor
instead. Switched to indenting with spaces instead, so and only
strip leading spaces at that, so the scripts can be slightly
easier to indent / layout. Add comment pointing out how to
easily read the shellscript among all the minifying-magic.
danfe@ pointed to a naming mix-up; because the variables were
used consistently, this had no effect but a weirdly-named temporary
file in ${WRKSRC}. Swapped the names the right way around.
Bump PORTREVISION on qt5-core again to force another round of
rebuilds.
Reported by: danfe, antoine
Modified:
head/Mk/Uses/qt-dist.mk
head/devel/qt5-core/Makefile
head/devel/qt5/files/pkg-change.in
Modified: head/Mk/Uses/qt-dist.mk
==============================================================================
--- head/Mk/Uses/qt-dist.mk Wed Feb 24 20:41:23 2021 (r566507)
+++ head/Mk/Uses/qt-dist.mk Wed Feb 24 20:45:14 2021 (r566508)
@@ -197,8 +197,8 @@ QT_CONFIG?= # For *.pri files QT_CONFIG flags.
. if ${QT_DEFINES}
QMAKE_ARGS+= DEFINES+="${QT_DEFINES:O:u:C/^([^-])/QT_\1/:C/^-/QT_NO_/:O}"
. endif # ${QT_DEFINES}
-PKGDEINSTALL= ${WRKDIR}/pkg-install
-PKGINSTALL= ${WRKDIR}/pkg-deinstall
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+PKGINSTALL= ${WRKDIR}/pkg-install
. if ${QT_CONFIG:N-*}
QMAKE_ARGS+= QT_CONFIG+="${QT_CONFIG:N-*:O:u}"
. endif
@@ -391,7 +391,8 @@ qt-post-install:
${WRKDIR}/pkg-change.tmp
@${SED} -e 's, at install,,' -e 's, at deinstall,##,' ${WRKDIR}/pkg-change.tmp | ${SED} -e '/##/d' > ${PKGINSTALL}
@${SED} -e 's, at install,##,' -e 's, at deinstall,,' ${WRKDIR}/pkg-change.tmp | ${SED} -e '/##/d' > ${PKGDEINSTALL}
- @${REINPLACE_CMD} 's/\t//g' ${PKGINSTALL} ${PKGDEINSTALL}
+ # Drop all leading spaces in the script, to minify
+ @${REINPLACE_CMD} 's/^ *//' ${PKGINSTALL} ${PKGDEINSTALL}
. if ${QT_DEFINES:N-*}
@${MKDIR} ${STAGEDIR}${QT_INCDIR}/QtCore/modules
@${ECHO_CMD} -n \
Modified: head/devel/qt5-core/Makefile
==============================================================================
--- head/devel/qt5-core/Makefile Wed Feb 24 20:41:23 2021 (r566507)
+++ head/devel/qt5-core/Makefile Wed Feb 24 20:45:14 2021 (r566508)
@@ -2,7 +2,7 @@
PORTNAME= core
DISTVERSION= ${QT5_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel
PKGNAMEPREFIX= qt5-
Modified: head/devel/qt5/files/pkg-change.in
==============================================================================
--- head/devel/qt5/files/pkg-change.in Wed Feb 24 20:41:23 2021 (r566507)
+++ head/devel/qt5/files/pkg-change.in Wed Feb 24 20:45:14 2021 (r566508)
@@ -14,12 +14,13 @@
## multiple @tags are read as "and", so the **rest** of the line
## only ends up in the resulting script when all the @tags are true.
##
-## The file is formatted for 8-wide tab stops with hard tabs,
+## The file is formatted with lots of spaces between the @tags and script
## so that the shell-script itself can be read in column 24,
## e.g. v--- here
-## take care not to insert tabs in the actual shell commands.
##
+## To read the script, try `grep -v '##' pkg-change.in | cut -c 25-`
##
+##
## ### ABOUT
##
## A Qt module should be listed in QtCore/qconfig-modules.h only once,
@@ -40,15 +41,15 @@
##
## On deinstall, we need QT_INCDIR separately, so define variables $qi and $qc
## differently from install (which needs only $qc).
- at deinstall qi="%%QT_INCDIR%%"
- at deinstall qc="$qi/QtCore/qconfig-modules.h"
- at install qc="%%QT_INCDIR%%/QtCore/qconfig-modules.h"
- qm="%%QT_MODNAME%%"
+ at deinstall qi="%%QT_INCDIR%%"
+ at deinstall qc="$qi/QtCore/qconfig-modules.h"
+ at install qc="%%QT_INCDIR%%/QtCore/qconfig-modules.h"
+ qm="%%QT_MODNAME%%"
##
## Distinguish the pkg step and call the relevant shell functions defined above.
##
- case $2 in
- at install POST-INSTALL)
+ case $2 in
+ at install POST-INSTALL)
##
## Add the line #include qconfig-<this module>.h to the global
## qconfig-modules.h; afterwards that global file exists.
@@ -56,49 +57,49 @@
## We might be adding to a non-existent file, which is why there
## is the slightly-weird construction with a subshell piping to sort.
##
- at install@need_add { echo "#include <QtCore/modules/qconfig-$qm.h>"
- at install@need_add [ -f "$qc" ] && /bin/cat "$qc"
- at install@need_add } | /usr/bin/sort -u -o "$qc.new"
- at install@need_add /bin/mv "$qc.new" "$qc"
+ at install@need_add { echo "#include <QtCore/modules/qconfig-$qm.h>"
+ at install@need_add [ -f "$qc" ] && /bin/cat "$qc"
+ at install@need_add } | /usr/bin/sort -u -o "$qc.new"
+ at install@need_add /bin/mv "$qc.new" "$qc"
##
## This removes the line that #includes qconfig-<this module>.h
## from the global qconfig-modules.h; afterwards, that global file exists
## although it may be empty.
## (This code is identical in install- and deinstall-scripts, unconditional in deinstall)
##
- at install@need_remove [ \! -e "$qc" ] && touch "$qc"
- at install@need_remove sed -i "" "/qconfig-$qm\.h/ d" "$qc"
+ at install@need_remove [ \! -e "$qc" ] && touch "$qc"
+ at install@need_remove sed -i "" "/qconfig-$qm\.h/ d" "$qc"
##
## If there are binaries, and qtchooser is installed, update it.
## (This code is identical in install- and deinstall-scripts)
##
- at install@need_bin { type update-qtchooser-wrapper && update-qtchooser-wrapper ; } >/dev/null 2>&1
- at install ;;
- at deinstall POST-DEINSTALL)
+ at install@need_bin { type update-qtchooser-wrapper && update-qtchooser-wrapper ; } >/dev/null 2>&1
+ at install ;;
+ at deinstall POST-DEINSTALL)
##
## This removes the line that #includes qconfig-<this module>.h
## from the global qconfig-modules.h; afterwards, that global file exists
## although it may be empty.
## (This code is identical in install- and deinstall-scripts, unconditional in deinstall)
##
- at deinstall [ \! -e "$qc" ] && touch "$qc"
- at deinstall sed -i "" "/qconfig-$qm\.h/ d" "$qc"
+ at deinstall [ \! -e "$qc" ] && touch "$qc"
+ at deinstall sed -i "" "/qconfig-$qm\.h/ d" "$qc"
##
## When qtcore is removed, the whole config dir can go away as well.
##
- at deinstall [ \! -e "$qi/QtCore/qconfig.h" ] && \
- at deinstall [ \! -s "$qc" ] && (
- at deinstall rm -f "$qc"
- at deinstall rmdir "$qi/QtCore"
- at deinstall rmdir "$qi"
- at deinstall ) > /dev/null 2>&1
+ at deinstall [ \! -e "$qi/QtCore/qconfig.h" ] && \
+ at deinstall [ \! -s "$qc" ] && (
+ at deinstall rm -f "$qc"
+ at deinstall rmdir "$qi/QtCore"
+ at deinstall rmdir "$qi"
+ at deinstall ) > /dev/null 2>&1
##
## If there are binaries, and qtchooser is installed, update it.
## (This code is identical in install- and deinstall-scripts)
##
- at deinstall@need_bin { type update-qtchooser-wrapper && update-qtchooser-wrapper ; } >/dev/null 2>&1
- at deinstall ;;
- esac
+ at deinstall@need_bin { type update-qtchooser-wrapper && update-qtchooser-wrapper ; } >/dev/null 2>&1
+ at deinstall ;;
+ esac
## Avoid exit code from any of the commands-above (e.g. checking for
## qtchooser updates) from leaking out of this script: be true.
- :
+ :
More information about the svn-ports-head
mailing list