From nobody Sun Sep 24 18:58:52 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RtwJr5SQlz4vKN5; Sun, 24 Sep 2023 18:58:52 +0000 (UTC) (envelope-from git@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 4RtwJr4XFVz4DZj; Sun, 24 Sep 2023 18:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695581932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+OFswBfhefIsXj8s6bnHNOBqoCqVWIei6nb3X9Zktjs=; b=O2whb5Lt9SauZt9ofpNOW4GiNb+uWawZBxKji+EwsfnFTOGEVMRZvhaEkVad35MltbV3Y1 6CfvrKuAn0gUbXL5n63/EvbRtolcBN7P8wnBVstgEDvEbnapRXjVIST0KJvKdaEQzKs1WS M/D5PiAypKdPqRSdHmtSuRSECwnV+uyNC5UlFtUMENPY+t1Lse/ePApBFE0UezGUKo69JC cX/aHM67RHqu2/Rg3BygeaYM6PTm9NcsXTDdYQBOxuLVjdi4SibKxvxsNALzONJ/a1whvc kYd6LHP/rLVrxFb/SFYaxhK93mBfVnCCm9yx+kE4P8o5SDEHqqvMgxdc0JcQEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695581932; a=rsa-sha256; cv=none; b=Ef1j8jl9GjszTJsI/FjW5oJUpZU0O8S1D7XyeYiGrglHn8w7Hgyb9cJMT1Vj4VtU7TfKbG EkF/zEA+1zjGIui5XevrDOEb/p9f3322UxjrFmnuDZxWpacrq7UvJNUMEw0lkyx2gIsOpR Qb81XgMICeS28YoB510lZ/myM2L8FHfwf1O6NidAWPIFdkWVBeeWCVjkiLr4+QKTLzy9IR N/FfMgAUTZWpdTf4LFbr+wDnrFjFf0RMkL6KWPQmiy/1J5z2OyRkiFD7f9xewxkZm20Cmb lHqdbjy2ooP5EBVKS9Tv7MH1x9zN6ccNkSy0C3H4+ivEMHpmTsr9oSIQL1TcwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695581932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+OFswBfhefIsXj8s6bnHNOBqoCqVWIei6nb3X9Zktjs=; b=htBuRKLxaw78Y2ecBlVJR3ynEPJrjws71G8JScLD9ZmwJ5kPhOCEsiGePZ5t2xs1D5OnsQ B3IDz2q7QmNX7qK6adLUHK8XSbSb2MCjJ5+11RbKsiqhMPjrDSH2w/WfP0g+8ZIHBAevWA sEA9y9Kwyc1IT87uZPfEkYB7dnxhl76VMy7F55m9Zdyg17uuhTDpT3ieq9eeGo5ONAFPui McAVdNJKjQp4L/xGBJMfgkzimYTWzlJR7WHgV4x6DqRqKBBroEa/KMvG3xdnWwzKpXgeno KKjb0/WaPyp6Qgt8hm1liSMQEl/YCZC25W282IptGN9MiB3/ZIRP3SyJocLKMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtwJr3SnSzyQd; Sun, 24 Sep 2023 18:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OIwq38045758; Sun, 24 Sep 2023 18:58:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OIwqVa045755; Sun, 24 Sep 2023 18:58:52 GMT (envelope-from git) Date: Sun, 24 Sep 2023 18:58:52 GMT Message-Id: <202309241858.38OIwqVa045755@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 0816318fd77e - main - x11-wm/compton: use basic regex for compton-trans List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0816318fd77ec41759affa9e42aac2a2603186a1 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=0816318fd77ec41759affa9e42aac2a2603186a1 commit 0816318fd77ec41759affa9e42aac2a2603186a1 Author: Duane AuthorDate: 2023-09-22 19:39:29 +0000 Commit: Robert Clausecker CommitDate: 2023-09-24 18:57:14 +0000 x11-wm/compton: use basic regex for compton-trans The compton-trans script makes use of extended regex features sed(1) does not support. Patch it to use BREs only. While we are at it, do some housekeeping on the port Makefile. PR: 273319 Approved by: femc7488@gmail.com (maintainer timeout) --- x11-wm/compton/Makefile | 7 ++-- x11-wm/compton/files/patch-bin_compton-trans | 60 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/x11-wm/compton/Makefile b/x11-wm/compton/Makefile index 399d0c34e811..44abcce8f0b5 100644 --- a/x11-wm/compton/Makefile +++ b/x11-wm/compton/Makefile @@ -1,6 +1,6 @@ PORTNAME= compton -PORTVERSION= 20160907 -PORTREVISION= 6 +DISTVERSION= 20160907 +PORTREVISION= 7 CATEGORIES= x11-wm MAINTAINER= femc7488@gmail.com @@ -13,11 +13,10 @@ LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= xprop:x11/xprop \ xwininfo:x11/xwininfo +USES= gmake pkgconfig xorg USE_GITHUB= yes GH_ACCOUNT= chjj GH_TAGNAME= b7f43ee - -USES= gmake pkgconfig xorg USE_XORG= x11 xcomposite xdamage xext xfixes xrandr xrender MAKE_ARGS= COMPTON_VERSION=git-${PORTVERSION}-${GH_TAGNAME} \ diff --git a/x11-wm/compton/files/patch-bin_compton-trans b/x11-wm/compton/files/patch-bin_compton-trans new file mode 100644 index 000000000000..db6b7d7eee0d --- /dev/null +++ b/x11-wm/compton/files/patch-bin_compton-trans @@ -0,0 +1,60 @@ +--- bin/compton-trans.orig 2016-09-07 08:23:44 UTC ++++ bin/compton-trans +@@ -2,7 +2,7 @@ + + # + # compton-trans +-# transset in a bash script ++# transset in a sh script + # Copyright (c) 2011-2012, Christopher Jeffrey + # + +@@ -46,7 +46,7 @@ v= + + # Workaround: replace '-5' with '~5' so as not to confuse getopts. + for v in "$@"; do +- shift && set -- "$@" "$(echo "$v" | sed 's/^-\([0-9]\+%\?\)$/~\1/')" ++ shift && set -- "$@" "$(echo "$v" | sed 's/^-\([0-9]\{1,\}%\{0,1\}\)$/~\1/')" + done + + # This takes into account the fact that getopts stops on +@@ -69,7 +69,7 @@ while test $# -gt 0; do + OPTIND=$((OPTIND + 1)) + ;; + name=* | window=* | opacity=*) +- v=$(echo "$OPTARG" | sed 's/^[^=]\+=//') ++ v=$(echo "$OPTARG" | sed 's/^[^=]\{1,\}=//') + ;; + *) + echo "$0: illegal option $OPTARG" >& 2 +@@ -92,7 +92,7 @@ while test $# -gt 0; do + n) wprefix='-name'; window=$OPTARG ;; + w) wprefix='-id'; window=$OPTARG ;; + o) opacity=$OPTARG ;; +- \?) exit 1 ;; ++ \{0,1\}) exit 1 ;; + esac + done + +@@ -102,10 +102,10 @@ while test $# -gt 0; do + done + + # clean up opacity. xargs == a poor man's trim. +-opacity=$(echo "$opacity" | xargs | sed 's/%//g' | sed 's/^~\([0-9]\+\)$/-\1/') ++opacity=$(echo "$opacity" | xargs | sed 's/%//g' | sed 's/^~\([0-9]\{1,\}\)$/-\1/') + + # Validate opacity value +-if test -z "$action" && ! echo "$opacity" | grep -q '^[+-]\?[0-9]\+$'; then ++if test -z "$action" && ! echo "$opacity" | grep -q '^[+-]\{0,1\}[0-9]\{1,\}$'; then + echo "Invalid opacity specified: $opacity." + exit 1 + fi +@@ -184,7 +184,7 @@ fi + + # Get current opacity. + cur=$(xprop -id "$topmost" -notype _NET_WM_WINDOW_OPACITY \ +- | sed 's/^.*\b\([0-9]\+\).*$\|^.*$/\1/') ++ | sed -n 's/^\(.*^[_[:alnum:]]\)\{0,1\}\([0-9]\{1,\}\).*$/\2/p') + test -z "$cur" && cur=0xffffffff + cur=$((cur * 100 / 0xffffffff)) +