Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Feb 2021 20:45:14 +0000 (UTC)
From:      Adriaan de Groot <adridg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r566508 - in head: Mk/Uses devel/qt5-core devel/qt5/files
Message-ID:  <202102242045.11OKjEpT075754@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,@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 \

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).
-@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.
-			:
+                        :



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102242045.11OKjEpT075754>