From nobody Sun May 19 13:38:50 2024 X-Original-To: dev-commits-ports-all@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 4Vj1xr0pfLz5K3GR; Sun, 19 May 2024 13:38:56 +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 4Vj1xq59Pyz4Jtr; Sun, 19 May 2024 13:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716125935; 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=q9Wnc87vsIrzDLwwB7vklxMukU9oEVHOWrTmSzXiJps=; b=y3Z0N4nYQM30dBXYHCmJxXE67upZbL5iFbeA1vb94BqWtpjDENOiZPTbbJnQ+9mp0EuJce f4aBCirbR9Ybv5Bl40FDIc2ry9Iooly2V5N+gjZ+tEuqAZkFVq3TQ52yfyd1uh/uZvevz0 3Nu1iYfJmf7Sf97iEpkRzKazXvGEAnZ0K5n6fvP70RXYk7fYcK9xZPALdEkimsObEUpnb4 2TuKwhAhRsE7nX3tSapLjz5NoqzOYRncTle5JBZrvPp5JklJRorCoJtIG/reDLPtukQBqu vXsZwPlqYg7pAOCZRKgru4v6XlyTn6vjxsiLhlot/8WJ48l4Gr+yG8zJPZlUQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716125935; a=rsa-sha256; cv=none; b=WfMwnI72wgtczTKm+hPqE3AOLL4G0xdiuCOQiJc0rEZJVt4hz0Ve4EzTuYIGRnUMadgt8m IReLy33vpirmVWeREwiH/6F5j9CF6KBAlN+gpzRW8b+27kaq1vGyU/AWyUIxqpVsyO/zSZ u+672iY5C3gPiReP1qmBqjcsvrV3wNU/v/UkcSYfROmyIRcwVsj/YB+EECPAscqhjX8B8N tL+71Wf4C5vScJhGVnCxPTaOGtm9oRMRdbP8XTYjgY5ySfYY2daj1/sDffcra8nZMsldge NlDeq+p5r0KVA4x5gJX2lPFFh0L7MrENhnz0GiCvUyRxkShNVxINpu9EnZEE/Q== 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=1716125935; 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=q9Wnc87vsIrzDLwwB7vklxMukU9oEVHOWrTmSzXiJps=; b=YklKP0xh+r7T+v/spB7CtagL5CenZgWniWfkN19pHUWCCjalgdEuSIREBhwNBk2c80486P Tgu+QHRuFrhrvzj1mtRsA/LKSVlk+BWrcQpO0orX4EopKY4E/2f8TFKFg698dID80TPz59 ntijYi7nqQQUcKc95qpkrhpkw5yD4/Rs9yrSSzumX6HvSJqhZF/MVUSo8F1SQIcuqFqwjQ GliMKnLN51bJviLkcrhW0gWAzivWsdWyzqva5VvJtsl7v9gaKVrXSJdo7ujLDfn8op7uv0 04EDNkNWngQdTMqrijfJmZqVooVOVh92sCPSNLdfvQtc2xU5LMQJvpXGemzjTw== 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 4Vj1xk6Pysz1BTx; Sun, 19 May 2024 13:38:50 +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 44JDcohL063782; Sun, 19 May 2024 13:38:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44JDcogO063779; Sun, 19 May 2024 13:38:50 GMT (envelope-from git) Date: Sun, 19 May 2024 13:38:50 GMT Message-Id: <202405191338.44JDcogO063779@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Jason W. Bacon" Subject: git: 83ca8e890206 - main - x11/lumina-core: Update to 1.6.2_10 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jwb X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83ca8e8902066e1fe92d098f790b0c5030e17c91 Auto-Submitted: auto-generated The branch main has been updated by jwb: URL: https://cgit.FreeBSD.org/ports/commit/?id=83ca8e8902066e1fe92d098f790b0c5030e17c91 commit 83ca8e8902066e1fe92d098f790b0c5030e17c91 Author: Jason W. Bacon AuthorDate: 2024-05-19 13:36:14 +0000 Commit: Jason W. Bacon CommitDate: 2024-05-19 13:36:14 +0000 x11/lumina-core: Update to 1.6.2_10 Add patch for new mixer UI in FreeBSD 14 Old system reports levels as 0 to 100, new 0 to 1 --- x11/lumina-core/Makefile | 2 +- x11/lumina-core/files/patch-core.pro | 12 ++- .../files/patch-libLumina_LuminaOS-FreeBSD.cpp | 120 ++++++++++++++++++++- .../files/patch-lumina-desktop_LSession.cpp | 20 ++-- ...-lumina-desktop_src-screensaver_LLockScreen.cpp | 3 +- 5 files changed, 145 insertions(+), 12 deletions(-) diff --git a/x11/lumina-core/Makefile b/x11/lumina-core/Makefile index 50e3c70b4bc8..642a3a84afe5 100644 --- a/x11/lumina-core/Makefile +++ b/x11/lumina-core/Makefile @@ -1,7 +1,7 @@ PORTNAME= lumina-core DISTVERSIONPREFIX= v DISTVERSION= 1.6.2 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= x11 MAINTAINER= jwb@FreeBSD.org diff --git a/x11/lumina-core/files/patch-core.pro b/x11/lumina-core/files/patch-core.pro index 8c3c237bb5bb..5e92cecb6e61 100644 --- a/x11/lumina-core/files/patch-core.pro +++ b/x11/lumina-core/files/patch-core.pro @@ -1,6 +1,14 @@ ---- core.pro.orig 2022-03-03 00:56:25 UTC +--- core.pro.orig 2021-12-26 02:33:45 UTC +++ core.pro -@@ -10,8 +10,8 @@ SUBDIRS+= lumina-desktop \ +@@ -4,14 +4,16 @@ include("../OS-detect.pri") + TEMPLATE = subdirs + CONFIG += recursive + ++# lumina-checkpass is needed for 1.6.2, since code replacing ++# xscreensaver is enabled + SUBDIRS+= lumina-desktop \ + lumina-session \ + lumina-open \ lumina-info \ lumina-pingcursor \ $${PWD}/../../icon-theme \ diff --git a/x11/lumina-core/files/patch-libLumina_LuminaOS-FreeBSD.cpp b/x11/lumina-core/files/patch-libLumina_LuminaOS-FreeBSD.cpp index 9b27e4817de2..3c14fd95cf75 100644 --- a/x11/lumina-core/files/patch-libLumina_LuminaOS-FreeBSD.cpp +++ b/x11/lumina-core/files/patch-libLumina_LuminaOS-FreeBSD.cpp @@ -1,14 +1,130 @@ --- libLumina/LuminaOS-FreeBSD.cpp.orig 2021-12-26 02:33:45 UTC +++ libLumina/LuminaOS-FreeBSD.cpp -@@ -9,6 +9,7 @@ +@@ -9,6 +9,8 @@ #include #include #include ++#include // __FreeBSD_version +#include #include //can't read xbrightness settings - assume invalid until set -@@ -289,31 +290,53 @@ void LOS::systemSuspend(){ +@@ -171,10 +173,29 @@ int LOS::audioVolume(){ //Returns: audio volume as a p + audiovolume = out; + }else{ + //probe the system for the current volume (other utils could be changing it) ++ // mixer interface changed in FreeBSD 14 ++ // 13 and prior: mixer -S vol outputs ++ // vol:50:50 ++ // 14 and later, there is no -S flag, and vol is a fraction, not a % ++ // mixer -o vol outputs ++ // vol.volume=0.75:0.75 ++ // vol.mute=0 ++ // Might be better to use the mixer API instead ++#if __FreeBSD_version < 1400000 + QString info = LUtils::getCmdOutput("mixer -S vol").join(":").simplified(); //ignores any other lines + if(!info.isEmpty()){ + int L = info.section(":",1,1).toInt(); + int R = info.section(":",2,2).toInt(); ++#else ++ // Produce something like vol.volume=0.26:0.26=vol.mute=0= ++ // Multiple lines are joined, separated by '=' ++ QString info = LUtils::getCmdOutput("mixer -o vol").join("=").simplified(); ++ if(!info.isEmpty()){ ++ int L = info.section(QRegularExpression("[=:]"),1,1).toDouble() * 100.0; ++ int R = info.section(QRegularExpression("[=:]"),2,2).toDouble() * 100.0; ++#endif ++ ++ + if(L>R){ out = L; } + else{ out = R; } + if(out != audiovolume){ +@@ -195,10 +216,27 @@ void LOS::setAudioVolume(int percent){ + if(remoteSession){ + LUtils::runCmd(QString("pactl set-sink-volume @DEFAULT_SINK@ ")+QString::number(percent)+"%"); + }else{ +- QString info = LUtils::getCmdOutput("mixer -S vol").join(":").simplified(); //ignores any other lines +- if(!info.isEmpty()){ +- int L = info.section(":",1,1).toInt(); +- int R = info.section(":",2,2).toInt(); ++ // mixer interface changed in FreeBSD 14 ++ // 13 and prior: mixer -S vol outputs ++ // vol:50:50 ++ // 14 and later, there is no -S flag, and vol is a fraction, not a % ++ // mixer -o vol outputs ++ // vol.volume=0.75:0.75 ++ // vol.mute=0 ++ // Might be better to use the mixer API instead ++#if __FreeBSD_version < 1400000 ++ QString info = LUtils::getCmdOutput("mixer -S vol").join(":").simplified(); //ignores any other lines ++ if(!info.isEmpty()){ ++ int L = info.section(":",1,1).toInt(); ++ int R = info.section(":",2,2).toInt(); ++#else ++ // Produce something like vol.volume=0.26:0.26=vol.mute=0= ++ // Multiple lines are joined, separated by '=' ++ QString info = LUtils::getCmdOutput("mixer -o vol").join("=").simplified(); ++ if(!info.isEmpty()){ ++ int L = info.section(QRegularExpression("[=:]"),1,1).toDouble() * 100.0; ++ int R = info.section(QRegularExpression("[=:]"),2,2).toDouble() * 100.0; ++#endif + int diff = L-R; + if((percent == L) && (L==R)){ return; } //already set to that volume + if(diff<0){ R=percent; L=percent+diff; } //R Greater +@@ -207,7 +245,11 @@ void LOS::setAudioVolume(int percent){ + if(L<0){L=0;}else if(L>100){L=100;} + if(R<0){R=0;}else if(R>100){R=100;} + //Run Command ++#if __FreeBSD_version < 1400000 + LUtils::runCmd("mixer vol "+QString::number(L)+":"+QString::number(R)); ++#else ++ LUtils::runCmd("mixer vol="+QString::number(L/100.0)+":"+QString::number(R/100.0)); ++#endif + } + } + audiovolume = percent; //save for checking later +@@ -220,15 +262,36 @@ void LOS::changeAudioVolume(int percentdiff){ + if(remoteSession){ + LUtils::runCmd(QString("pactl set-sink-volume @DEFAULT_SINK@ ")+((percentdiff>0)?"+" : "") + QString::number(percentdiff)+"%"); + }else{ +- QString info = LUtils::getCmdOutput("mixer -S vol").join(":").simplified(); //ignores any other lines +- if(!info.isEmpty()){ +- int L = info.section(":",1,1).toInt() + percentdiff; +- int R = info.section(":",2,2).toInt() + percentdiff; ++ // mixer interface changed in FreeBSD 14 ++ // 13 and prior: mixer -S vol outputs ++ // vol:50:50 ++ // 14 and later, there is no -S flag, and vol is a fraction, not a % ++ // mixer -o vol outputs ++ // vol.volume=0.75:0.75 ++ // vol.mute=0 ++ // Might be better to use the mixer API instead ++#if __FreeBSD_version < 1400000 ++ QString info = LUtils::getCmdOutput("mixer -S vol").join(":").simplified(); //ignores any other lines ++ if(!info.isEmpty()){ ++ int L = info.section(":",1,1).toInt(); ++ int R = info.section(":",2,2).toInt(); ++#else ++ // Produce something like vol.volume=0.26:0.26=vol.mute=0= ++ // Multiple lines are joined, separated by '=' ++ QString info = LUtils::getCmdOutput("mixer -o vol").join("=").simplified(); ++ if(!info.isEmpty()){ ++ int L = info.section(QRegularExpression("[=:]"),1,1).toDouble() * 100.0; ++ int R = info.section(QRegularExpression("[=:]"),2,2).toDouble() * 100.0; ++#endif + //Check bounds + if(L<0){L=0;}else if(L>100){L=100;} + if(R<0){R=0;}else if(R>100){R=100;} + //Run Command ++#if __FreeBSD_version < 1400000 + LUtils::runCmd("mixer vol "+QString::number(L)+":"+QString::number(R)); ++#else ++ LUtils::runCmd("mixer vol="+QString::number(L/100.0)+":"+QString::number(R/100.0)); ++#endif + } + } + } +@@ -289,31 +352,53 @@ void LOS::systemSuspend(){ } //Battery Availability diff --git a/x11/lumina-core/files/patch-lumina-desktop_LSession.cpp b/x11/lumina-core/files/patch-lumina-desktop_LSession.cpp index 36cdb7a67984..9756e078310a 100644 --- a/x11/lumina-core/files/patch-lumina-desktop_LSession.cpp +++ b/x11/lumina-core/files/patch-lumina-desktop_LSession.cpp @@ -1,6 +1,6 @@ --- lumina-desktop/LSession.cpp.orig 2021-12-26 02:33:45 UTC +++ lumina-desktop/LSession.cpp -@@ -97,46 +97,96 @@ LSession::~LSession(){ +@@ -97,46 +97,100 @@ LSession::~LSession(){ //Static function so everything can get the same icon name QString LSession::batteryIconName(int charge, bool charging){ int icon = -1; @@ -11,16 +11,20 @@ - else if (charge > 0 ) { icon = 0; } - if(charging){ icon = icon+10; } + -+ // Add 5% in order to round to nearest 10% -+ // E.g. 85% to 94% will show 90% icon -+ icon = (charge + 5) / 10; -+ ++ // Old code with only a few different battery levels shown + //if (charge > 90) { icon = 4; } + //else if (charge > 70) { icon = 3; } + //else if (charge > 20) { icon = 2; } + //else if (charge > 5) { icon = 1; } + //else if (charge > 0 ) { icon = 0; } + ++ // New code with battery levels for every 10% difference shown ++ // Add 5% in order to round to nearest 10% ++ // E.g. 85% to 94% will show 90% icon ++ // Note: icon is an arbitrary integer used in a case statement later ++ // 0 - 10 are for discharging states, 11+ are for charging ++ icon = (charge + 5) / 10; ++ + if(charging){ icon += 11; } + + // Some icons may not be available for some themes, so build a list @@ -112,7 +116,7 @@ if(charge==100){ iconList << "battery-full-charged"; } iconList << "battery-100-charging" << "battery-full-charging" << "battery-charging-100" << "battery-charging-full"; -@@ -644,9 +694,12 @@ void LSession::adjustWindowGeom(WId win, bool maximize +@@ -644,11 +698,16 @@ void LSession::adjustWindowGeom(WId win, bool maximize if(DEBUG){ qDebug() << "Y-Diff:" << diff; } if(diff < 0){ diff = -diff; } //need a positive value if( (fgeom.height()+ diff)< desk.height()){ @@ -127,4 +131,8 @@ + fgeom.moveBottom(desk.bottom()); }else if(geom.height() > diff){ //window bigger than the difference //Need to resize the window - keeping the origin point the same ++ //This should only happen if the window is taller than the screen ++ //e.g. the screen size has shrunk geom.setHeight( geom.height()-diff-1 ); //shrink it by the difference (need an extra pixel somewhere) + fgeom.setHeight( fgeom.height()-diff ); + } diff --git a/x11/lumina-core/files/patch-lumina-desktop_src-screensaver_LLockScreen.cpp b/x11/lumina-core/files/patch-lumina-desktop_src-screensaver_LLockScreen.cpp index 238a58300a19..b5ac66749d8f 100644 --- a/x11/lumina-core/files/patch-lumina-desktop_src-screensaver_LLockScreen.cpp +++ b/x11/lumina-core/files/patch-lumina-desktop_src-screensaver_LLockScreen.cpp @@ -11,12 +11,13 @@ QTemporaryFile *TF = new QTemporaryFile(".XXXXXXXXXX"); TF->setAutoRemove(true); bool ok = false; -@@ -90,7 +92,7 @@ void LLockScreen::TryUnlock(){ +@@ -90,7 +92,8 @@ void LLockScreen::TryUnlock(){ if(DEBUG){ qDebug() << "Trying to unlock session:" << getlogin(); } LUtils::runCommand(ok, "lumina-checkpass",QStringList() << "-f" << TF->fileName() ); if(DEBUG){ qDebug() << " - Success:" << ok; } - ok = true; //bypass for the moment + // ok = true; //bypass if lumina-checkpass is not working ++ //Results in any password being accepted to unlock } delete TF; //ensure the temporary file is removed **right now** for security purposes if(ok){