From owner-svn-ports-head@freebsd.org Thu Oct 31 16:30:54 2019 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 B173315EFCA; Thu, 31 Oct 2019 16:30:54 +0000 (UTC) (envelope-from 0mp@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 473rRL2M80z4XfB; Thu, 31 Oct 2019 16:30:54 +0000 (UTC) (envelope-from 0mp@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 35973255D3; Thu, 31 Oct 2019 16:30:54 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9VGUsf8082776; Thu, 31 Oct 2019 16:30:54 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9VGUr76082770; Thu, 31 Oct 2019 16:30:53 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201910311630.x9VGUr76082770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu, 31 Oct 2019 16:30:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r516174 - in head/x11: . run_scaled run_scaled/files X-SVN-Group: ports-head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in head/x11: . run_scaled run_scaled/files X-SVN-Commit-Revision: 516174 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.29 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: Thu, 31 Oct 2019 16:30:54 -0000 Author: 0mp Date: Thu Oct 31 16:30:52 2019 New Revision: 516174 URL: https://svnweb.freebsd.org/changeset/ports/516174 Log: New port: x11/run_scaled: Run an X application scaled via Xpra (useful on HiDPI screens) run_scaled is a Bash script that simplifies scaling graphical X applications on HiDPI displays (using Xpra). WWW: https://github.com/kaueraal/run_scaled Added: head/x11/run_scaled/ head/x11/run_scaled/Makefile (contents, props changed) head/x11/run_scaled/distinfo (contents, props changed) head/x11/run_scaled/files/ head/x11/run_scaled/files/patch-run__scaled (contents, props changed) head/x11/run_scaled/pkg-descr (contents, props changed) Modified: head/x11/Makefile Modified: head/x11/Makefile ============================================================================== --- head/x11/Makefile Thu Oct 31 15:10:46 2019 (r516173) +++ head/x11/Makefile Thu Oct 31 16:30:52 2019 (r516174) @@ -285,6 +285,7 @@ SUBDIR += roxterm SUBDIR += rsibreak SUBDIR += rubygem-gnome + SUBDIR += run_scaled SUBDIR += rxvt SUBDIR += rxvt-unicode SUBDIR += sakura Added: head/x11/run_scaled/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/run_scaled/Makefile Thu Oct 31 16:30:52 2019 (r516174) @@ -0,0 +1,32 @@ +# $FreeBSD$ + +PORTNAME= run_scaled +DISTVERSION= g20181209 +CATEGORIES= x11 + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= Run an X application scaled via Xpra (useful on HiDPI screens) + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= bash:shells/bash \ + xpra:x11/xpra \ + xrandr:x11/xrandr \ + Xvfb:x11-servers/xorg-vfbserver + +USES= shebangfix +USE_GITHUB= yes +GH_ACCOUNT= kaueraal +GH_TAGNAME= 669993429863a9f6aa53560171ef1fc57f8546f9 +SHEBANG_FILES= ${PORTNAME} + +NO_ARCH= yes +NO_BUILD= yes + +PLIST_FILES= bin/${PORTNAME} + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + +.include Added: head/x11/run_scaled/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/run_scaled/distinfo Thu Oct 31 16:30:52 2019 (r516174) @@ -0,0 +1,3 @@ +TIMESTAMP = 1572524979 +SHA256 (kaueraal-run_scaled-g20181209-669993429863a9f6aa53560171ef1fc57f8546f9_GH0.tar.gz) = e9101587c67bf8ae35f400f30428a377e371ca8ff2276069651493f246f90e9d +SIZE (kaueraal-run_scaled-g20181209-669993429863a9f6aa53560171ef1fc57f8546f9_GH0.tar.gz) = 2325 Added: head/x11/run_scaled/files/patch-run__scaled ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/run_scaled/files/patch-run__scaled Thu Oct 31 16:30:52 2019 (r516174) @@ -0,0 +1,19 @@ +--- run_scaled.orig 2019-10-31 16:00:04 UTC ++++ run_scaled +@@ -65,12 +65,13 @@ done + + declare -i UNSCALED_RESOLUTION_X + declare -i UNSCALED_RESOLUTION_Y +-UNSCALED_RESOLUTION_X=`xrandr | sed -n -e 's/Screen 0:.*current \([0-9]\+\) x \([0-9]\+\).*/\1/p'` +-UNSCALED_RESOLUTION_Y=`xrandr | sed -n -e 's/Screen 0:.*current \([0-9]\+\) x \([0-9]\+\).*/\2/p'` ++UNSCALED_RESOLUTION_X=`xrandr | sed -n -e 's/Screen 0:.*current \([0-9][0-9]*\) x \([0-9][0-9]*\).*/\1/p'` ++UNSCALED_RESOLUTION_Y=`xrandr | sed -n -e 's/Screen 0:.*current \([0-9][0-9]*\) x \([0-9][0-9]*\).*/\2/p'` + + UNSCALED_RESOLUTION="$( bc <<<"$UNSCALED_RESOLUTION_X / $SCALING_FACTOR" )x$( bc <<<"$UNSCALED_RESOLUTION_Y / $SCALING_FACTOR" )" + +-DISPLAYNUM=:`shuf -i 10000-99999999 -n 1` ++# sysutils/shuf is significantly slower than jot(1). ++DISPLAYNUM=:`jot -r 1 10000 99999999` + ESCAPED_PARAMS=`printf '%q ' "$@"` + xpra start "$DISPLAYNUM" --xvfb="Xvfb +extension Composite -screen 0 ${UNSCALED_RESOLUTION}x24+32 -nolisten tcp -noreset -auth \$XAUTHORITY" --env=GDK_SCALE=1 --env=GDK_DPI_SCALE=1 --start-child="$ESCAPED_PARAMS" --exit-with-children + sleep "$SLEEPTIME" Added: head/x11/run_scaled/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/run_scaled/pkg-descr Thu Oct 31 16:30:52 2019 (r516174) @@ -0,0 +1,4 @@ +run_scaled is a Bash script that simplifies scaling graphical X applications on +HiDPI displays (using Xpra). + +WWW: https://github.com/kaueraal/run_scaled