From owner-svn-ports-head@freebsd.org Wed Feb 24 20:45:15 2021 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A565548D7A; Wed, 24 Feb 2021 20:45:15 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dm7GM40d2z4cXW; Wed, 24 Feb 2021 20:45:15 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C4F42F18; Wed, 24 Feb 2021 20:45:15 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 11OKjFK5075757; Wed, 24 Feb 2021 20:45:15 GMT (envelope-from adridg@FreeBSD.org) Received: (from adridg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 11OKjEpT075754; Wed, 24 Feb 2021 20:45:14 GMT (envelope-from adridg@FreeBSD.org) Message-Id: <202102242045.11OKjEpT075754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adridg set sender to adridg@FreeBSD.org using -f From: Adriaan de Groot Date: Wed, 24 Feb 2021 20:45:14 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: adridg X-SVN-Commit-Paths: in head: Mk/Uses devel/qt5-core devel/qt5/files X-SVN-Commit-Revision: 566508 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2021 20:45:15 -0000 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-.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 " -@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 " +@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-.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-.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. - : + :