diff options
author | Adriaan de Groot <adridg@FreeBSD.org> | 2021-02-24 20:45:14 +0000 |
---|---|---|
committer | Adriaan de Groot <adridg@FreeBSD.org> | 2021-02-24 20:45:14 +0000 |
commit | 2e6999b9c0aff4bbd6d029536aa73eb94fb83345 (patch) | |
tree | 170762af3fc314b5e167a88ca8796ead4fc6f656 | |
parent | 33be1686eda6522d76c0746b2508ef93a5b83cef (diff) | |
download | ports-2e6999b9c0aff4bbd6d029536aa73eb94fb83345.tar.gz ports-2e6999b9c0aff4bbd6d029536aa73eb94fb83345.zip |
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
Notes
Notes:
svn path=/head/; revision=566508
-rw-r--r-- | Mk/Uses/qt-dist.mk | 7 | ||||
-rw-r--r-- | devel/qt5-core/Makefile | 2 | ||||
-rw-r--r-- | devel/qt5/files/pkg-change.in | 59 |
3 files changed, 35 insertions, 33 deletions
diff --git a/Mk/Uses/qt-dist.mk b/Mk/Uses/qt-dist.mk index 6b91e0fc313e..9b2d76cfe104 100644 --- a/Mk/Uses/qt-dist.mk +++ b/Mk/Uses/qt-dist.mk @@ -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,@install,,' -e 's,@deinstall,##,' ${WRKDIR}/pkg-change.tmp | ${SED} -e '/##/d' > ${PKGINSTALL} @${SED} -e 's,@install,##,' -e 's,@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 \ diff --git a/devel/qt5-core/Makefile b/devel/qt5-core/Makefile index a32575b0fb2e..a07717f694cd 100644 --- a/devel/qt5-core/Makefile +++ b/devel/qt5-core/Makefile @@ -2,7 +2,7 @@ PORTNAME= core DISTVERSION= ${QT5_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel PKGNAMEPREFIX= qt5- diff --git a/devel/qt5/files/pkg-change.in b/devel/qt5/files/pkg-change.in index 58298d8affee..a6634795e865 100644 --- a/devel/qt5/files/pkg-change.in +++ b/devel/qt5/files/pkg-change.in @@ -14,10 +14,11 @@ ## 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 @@ -40,15 +41,15 @@ ## ## On deinstall, we need QT_INCDIR separately, so define variables $qi and $qc ## differently from install (which needs only $qc). -@deinstall qi="%%QT_INCDIR%%" -@deinstall qc="$qi/QtCore/qconfig-modules.h" -@install qc="%%QT_INCDIR%%/QtCore/qconfig-modules.h" - qm="%%QT_MODNAME%%" +@deinstall qi="%%QT_INCDIR%%" +@deinstall qc="$qi/QtCore/qconfig-modules.h" +@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 -@install POST-INSTALL) + case $2 in +@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. ## -@install@need_add { echo "#include <QtCore/modules/qconfig-$qm.h>" -@install@need_add [ -f "$qc" ] && /bin/cat "$qc" -@install@need_add } | /usr/bin/sort -u -o "$qc.new" -@install@need_add /bin/mv "$qc.new" "$qc" +@install@need_add { echo "#include <QtCore/modules/qconfig-$qm.h>" +@install@need_add [ -f "$qc" ] && /bin/cat "$qc" +@install@need_add } | /usr/bin/sort -u -o "$qc.new" +@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) ## -@install@need_remove [ \! -e "$qc" ] && touch "$qc" -@install@need_remove sed -i "" "/qconfig-$qm\.h/ d" "$qc" +@install@need_remove [ \! -e "$qc" ] && touch "$qc" +@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) ## -@install@need_bin { type update-qtchooser-wrapper && update-qtchooser-wrapper ; } >/dev/null 2>&1 -@install ;; -@deinstall POST-DEINSTALL) +@install@need_bin { type update-qtchooser-wrapper && update-qtchooser-wrapper ; } >/dev/null 2>&1 +@install ;; +@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) ## -@deinstall [ \! -e "$qc" ] && touch "$qc" -@deinstall sed -i "" "/qconfig-$qm\.h/ d" "$qc" +@deinstall [ \! -e "$qc" ] && touch "$qc" +@deinstall sed -i "" "/qconfig-$qm\.h/ d" "$qc" ## ## When qtcore is removed, the whole config dir can go away as well. ## -@deinstall [ \! -e "$qi/QtCore/qconfig.h" ] && \ -@deinstall [ \! -s "$qc" ] && ( -@deinstall rm -f "$qc" -@deinstall rmdir "$qi/QtCore" -@deinstall rmdir "$qi" -@deinstall ) > /dev/null 2>&1 +@deinstall [ \! -e "$qi/QtCore/qconfig.h" ] && \ +@deinstall [ \! -s "$qc" ] && ( +@deinstall rm -f "$qc" +@deinstall rmdir "$qi/QtCore" +@deinstall rmdir "$qi" +@deinstall ) > /dev/null 2>&1 ## ## If there are binaries, and qtchooser is installed, update it. ## (This code is identical in install- and deinstall-scripts) ## -@deinstall@need_bin { type update-qtchooser-wrapper && update-qtchooser-wrapper ; } >/dev/null 2>&1 -@deinstall ;; - esac +@deinstall@need_bin { type update-qtchooser-wrapper && update-qtchooser-wrapper ; } >/dev/null 2>&1 +@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. - : + : |