mirror of
https://git.freebsd.org/ports.git
synced 2026-06-02 11:08:52 +00:00
x11/autorandr: update to 1.15
* contrib/autorandr_launcher patch was superseded by compiler define PR: 291016
This commit is contained in:
committed by
Mateusz Piotrowski
parent
27ef4b5def
commit
e04f3b551f
@@ -1,9 +1,6 @@
|
||||
PORTNAME= autorandr
|
||||
DISTVERSION= 1.12.1
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 1.15
|
||||
CATEGORIES= x11
|
||||
PATCH_SITES= https://github.com/phillipberndt/autorandr/commit/
|
||||
PATCHFILES= 2bc71d562765e2023b26a31c485769612e3eb91e.patch:-p1 # PR 282
|
||||
|
||||
MAINTAINER= 0mp@FreeBSD.org
|
||||
COMMENT= Auto-detect displays and configure them with xrandr
|
||||
@@ -15,7 +12,7 @@ LICENSE_FILE= ${WRKSRC}/gpl-3.0.txt
|
||||
BUILD_DEPENDS= gsed:textproc/gsed
|
||||
RUN_DEPENDS= xrandr:x11/xrandr
|
||||
|
||||
USES= gmake pkgconfig python:3.10 shebangfix xorg
|
||||
USES= gmake pkgconfig python shebangfix xorg
|
||||
# Use GitHub instead of MASTER_SITES=PYPI to get additional files like
|
||||
# the manual page and the license.
|
||||
USE_GITHUB= yes
|
||||
@@ -37,12 +34,13 @@ _EXTRA_BUILD_TARGETS= contrib/autorandr_launcher/autorandr-launcher
|
||||
_EXTRA_INSTALL_TARGETS= install_bash_completion install_launcher \
|
||||
install_manpage
|
||||
|
||||
CFLAGS+= -DAUTORANDR_PATH=${PREFIX}/bin/autorandr
|
||||
|
||||
# Regenerate the patches with:
|
||||
# make clean extract do-patch PATCHFILES=
|
||||
post-patch:
|
||||
${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' \
|
||||
${WRKSRC}/${PORTNAME}.py \
|
||||
${WRKSRC}/contrib/autorandr_launcher/autorandr_launcher.c
|
||||
|
||||
post-build:
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${BUILD_WRKSRC} ${MAKE_ARGS} \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
TIMESTAMP = 1647355348
|
||||
SHA256 (phillipberndt-autorandr-1.12.1_GH0.tar.gz) = 2fa2fa6e76a208dc6e2f3a5c743aef14b8b3fd0ed18132e25f79cde3a00b0309
|
||||
SIZE (phillipberndt-autorandr-1.12.1_GH0.tar.gz) = 45550
|
||||
TIMESTAMP = 1761161416
|
||||
SHA256 (phillipberndt-autorandr-1.15_GH0.tar.gz) = 1579b6b4d44669a0db22268524ea512f60da02eeecffddf81f7327aaf56485f5
|
||||
SIZE (phillipberndt-autorandr-1.15_GH0.tar.gz) = 49352
|
||||
SHA256 (2bc71d562765e2023b26a31c485769612e3eb91e.patch) = e3e7335d2cd2aebe9fe8b633f570bbd22ecf0b82ada392ee5c8da1a2e41f6b34
|
||||
SIZE (2bc71d562765e2023b26a31c485769612e3eb91e.patch) = 3801
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- autorandr.py.orig 2021-12-22 12:28:03 UTC
|
||||
--- autorandr.py.orig 2024-03-03 12:37:50 UTC
|
||||
+++ autorandr.py
|
||||
@@ -121,6 +121,8 @@ Usage: autorandr [options]
|
||||
@@ -150,6 +150,8 @@ def is_closed_lid(output):
|
||||
def is_closed_lid(output):
|
||||
if not re.match(r'(eDP(-?[0-9]\+)*|LVDS(-?[0-9]\+)*)', output):
|
||||
return False
|
||||
@@ -9,7 +9,7 @@
|
||||
lids = glob.glob("/proc/acpi/button/lid/*/state")
|
||||
if len(lids) == 1:
|
||||
state_file = lids[0]
|
||||
@@ -1114,7 +1116,7 @@ def exec_scripts(profile_path, script_name, meta_infor
|
||||
@@ -1212,7 +1214,7 @@ def exec_scripts(profile_path, script_name, meta_infor
|
||||
if profile_path:
|
||||
candidate_directories.append(profile_path)
|
||||
candidate_directories.append(user_profile_path)
|
||||
@@ -18,16 +18,16 @@
|
||||
candidate_directories.append(os.path.join(config_dir, "autorandr"))
|
||||
|
||||
for folder in candidate_directories:
|
||||
@@ -1191,6 +1193,8 @@ def dispatch_call_to_sessions(argv):
|
||||
sys.exit(1)
|
||||
os.waitpid(child_pid, 0)
|
||||
@@ -1299,6 +1301,8 @@ def dispatch_call_to_sessions(argv):
|
||||
if 'AUTORANDR_UID_MIN' in os.environ:
|
||||
uid_min = int(os.environ['AUTORANDR_UID_MIN'])
|
||||
|
||||
+ print("/proc is not supported on FreeBSD; aborting.", file=sys.stderr)
|
||||
+ sys.exit(1)
|
||||
for directory in os.listdir("/proc"):
|
||||
directory = os.path.join("/proc/", directory)
|
||||
if not os.path.isdir(directory):
|
||||
@@ -1321,7 +1325,7 @@ def main(argv):
|
||||
@@ -1453,7 +1457,7 @@ def main(argv):
|
||||
try:
|
||||
# Load profiles from each XDG config directory
|
||||
# The XDG spec says that earlier entries should take precedence, so reverse the order
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- contrib/autorandr_launcher/autorandr_launcher.c.orig 2022-03-15 15:02:37 UTC
|
||||
+++ contrib/autorandr_launcher/autorandr_launcher.c
|
||||
@@ -38,7 +38,7 @@ static int ar_launch()
|
||||
pid_t pid = fork();
|
||||
if (pid == 0) {
|
||||
static char *argv[] =
|
||||
- { "/usr/bin/autorandr", "--change", "--default", "default", NULL };
|
||||
+ { "%%PREFIX%%/bin/autorandr", "--change", "--default", "default", NULL };
|
||||
execve(argv[0], argv, environ);
|
||||
exit(127);
|
||||
} else {
|
||||
Reference in New Issue
Block a user