From 4deb13ef23a3a3a31b00cac566c7254bb43e6152 Mon Sep 17 00:00:00 2001 From: Ben Woods Date: Sun, 8 Mar 2020 03:11:46 +0000 Subject: [PATCH] Add new port x11/lightdm-gtk-greeter-settings Just a small dialog to make it easier for users to modify the settings of lightdm-gtk-greeter. WWW: https://launchpad.net/lightdm-gtk-greeter-settings --- x11/Makefile | 1 + x11/lightdm-gtk-greeter-settings/Makefile | 40 +++++++++++++++++++ x11/lightdm-gtk-greeter-settings/distinfo | 3 ++ ...ch-bin_lightdm-gtk-greeter-settings-pkexec | 18 +++++++++ ...lightdm__gtk__greeter__settings_helpers.py | 13 ++++++ .../files/patch-setup.py | 11 +++++ x11/lightdm-gtk-greeter-settings/pkg-descr | 4 ++ 7 files changed, 90 insertions(+) create mode 100644 x11/lightdm-gtk-greeter-settings/Makefile create mode 100644 x11/lightdm-gtk-greeter-settings/distinfo create mode 100644 x11/lightdm-gtk-greeter-settings/files/patch-bin_lightdm-gtk-greeter-settings-pkexec create mode 100644 x11/lightdm-gtk-greeter-settings/files/patch-lightdm__gtk__greeter__settings_helpers.py create mode 100644 x11/lightdm-gtk-greeter-settings/files/patch-setup.py create mode 100644 x11/lightdm-gtk-greeter-settings/pkg-descr diff --git a/x11/Makefile b/x11/Makefile index 2794c307d4fd..bb2bbea0728a 100644 --- a/x11/Makefile +++ b/x11/Makefile @@ -183,6 +183,7 @@ SUBDIR += libxshmfence SUBDIR += lightdm SUBDIR += lightdm-gtk-greeter + SUBDIR += lightdm-gtk-greeter-settings SUBDIR += lilyterm SUBDIR += linux-c7-libxkbcommon SUBDIR += linux-c7-pixman diff --git a/x11/lightdm-gtk-greeter-settings/Makefile b/x11/lightdm-gtk-greeter-settings/Makefile new file mode 100644 index 000000000000..977af05141b0 --- /dev/null +++ b/x11/lightdm-gtk-greeter-settings/Makefile @@ -0,0 +1,40 @@ +# Created by: Ben Woods +# $FreeBSD$ + +PORTNAME= lightdm-gtk-greeter-settings +PORTVERSION= 1.2.2 +CATEGORIES= x11 +MASTER_SITES= https://launchpad.net/${PORTNAME}/${PORTVERSION:R}/${PORTVERSION}/+download/ + +MAINTAINER= woodsb02@FreeBSD.org +COMMENT= Settings editor for LightDM GTK+ Greeter + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= lightdm-gtk-greeter:x11/lightdm-gtk-greeter \ + ${PYTHON_PKGNAMEPREFIX}python-distutils-extra>=2.38:devel/py-python-distutils-extra@${PY_FLAVOR} +LIB_DEPENDS= liblightdm-gobject-1.so:x11/lightdm + +USES= gettext-tools gnome python +USE_GNOME= intltool pygobject3 +USE_PYTHON= autoplist distutils noflavors + +NO_ARCH= yes +PLIST_FILES= ${PYTHON_SITELIBDIR}/lightdm_gtk_greeter_settings/installation_config.py +PYDISTUTILS_INSTALLARGS+= --xfce-integration + +post-patch: + @${RM} ${WRKSRC}/bin/lightdm-gtk-greeter-settings-pkexec.orig + @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" \ + -e "s,%%LOCALBASE%%,${LOCALBASE},g" \ + ${WRKSRC}/bin/lightdm-gtk-greeter-settings-pkexec \ + ${WRKSRC}/lightdm_gtk_greeter_settings/helpers.py \ + ${WRKSRC}/setup.py + +.include + +# PYDISTUTILS_INSTALLNOSINGLE is deprecated so... +PYDISTUTILS_INSTALLARGS:= ${PYDISTUTILS_INSTALLARGS:N--single-version-externally-managed} + +.include diff --git a/x11/lightdm-gtk-greeter-settings/distinfo b/x11/lightdm-gtk-greeter-settings/distinfo new file mode 100644 index 000000000000..76914865e4a2 --- /dev/null +++ b/x11/lightdm-gtk-greeter-settings/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1583629250 +SHA256 (lightdm-gtk-greeter-settings-1.2.2.tar.gz) = 4364d8b25b23d2ef4856d19724fd6c67de9a2d3c1b3833f7a5441145fd39dcb7 +SIZE (lightdm-gtk-greeter-settings-1.2.2.tar.gz) = 127123 diff --git a/x11/lightdm-gtk-greeter-settings/files/patch-bin_lightdm-gtk-greeter-settings-pkexec b/x11/lightdm-gtk-greeter-settings/files/patch-bin_lightdm-gtk-greeter-settings-pkexec new file mode 100644 index 000000000000..efc754183a81 --- /dev/null +++ b/x11/lightdm-gtk-greeter-settings/files/patch-bin_lightdm-gtk-greeter-settings-pkexec @@ -0,0 +1,18 @@ +--- bin/lightdm-gtk-greeter-settings-pkexec.orig 2017-09-19 09:52:09 UTC ++++ bin/lightdm-gtk-greeter-settings-pkexec +@@ -1,13 +1,5 @@ +-#!/bin/bash ++#!/bin/sh + +-APP_PATH="/usr/bin/lightdm-gtk-greeter-settings" +- +-# Check for "socket" argument +-for i in "$@"; do +- if [[ "$i" == "-s="* ]] || [[ "$i" == "--socket-id="* ]]; then +- pkexec "${APP_PATH}" "$@" || "${APP_PATH}" "$@" +- exit $? +- fi +-done ++APP_PATH="%%PREFIX%%/bin/lightdm-gtk-greeter-settings" + + pkexec "${APP_PATH}" "$@" diff --git a/x11/lightdm-gtk-greeter-settings/files/patch-lightdm__gtk__greeter__settings_helpers.py b/x11/lightdm-gtk-greeter-settings/files/patch-lightdm__gtk__greeter__settings_helpers.py new file mode 100644 index 000000000000..1cacddbfb103 --- /dev/null +++ b/x11/lightdm-gtk-greeter-settings/files/patch-lightdm__gtk__greeter__settings_helpers.py @@ -0,0 +1,13 @@ +--- lightdm_gtk_greeter_settings/helpers.py.orig 2020-03-08 02:41:40 UTC ++++ lightdm_gtk_greeter_settings/helpers.py +@@ -184,8 +184,8 @@ def check_path_accessibility(path, file=True, executab + try: + uid, gids = check_path_accessibility.id_cached_data + except AttributeError: +- files = glob.glob('/etc/lightdm/lightdm.d/*.conf') +- files += ['/etc/lightdm/lightdm.conf'] ++ files = glob.glob('%%LOCALBASE%%/etc/lightdm/lightdm.d/*.conf') ++ files += ['%%LOCALBASE%%/etc/lightdm/lightdm.conf'] + config = configparser.RawConfigParser(strict=False) + config.read(files) + username = config.get('LightDM', 'greeter-user', fallback='lightdm') diff --git a/x11/lightdm-gtk-greeter-settings/files/patch-setup.py b/x11/lightdm-gtk-greeter-settings/files/patch-setup.py new file mode 100644 index 000000000000..04e9cc5747c2 --- /dev/null +++ b/x11/lightdm-gtk-greeter-settings/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2020-03-08 02:41:05 UTC ++++ setup.py +@@ -63,7 +63,7 @@ class InstallAndUpdateDataDirectory(DistUtilsExtra.aut + + values = {'__data_directory__': "'%s'" % (target_pkgdata), + '__version__': "'%s'" % self.distribution.get_version(), +- '__config_path__': '"/etc/lightdm/lightdm-gtk-greeter.conf"'} ++ '__config_path__': '"%%LOCALBASE%%/etc/lightdm/lightdm-gtk-greeter.conf"'} + write_config(self.install_lib, values) + + desktop_file_path = os.path.join(self.install_data, 'share', 'applications', diff --git a/x11/lightdm-gtk-greeter-settings/pkg-descr b/x11/lightdm-gtk-greeter-settings/pkg-descr new file mode 100644 index 000000000000..d01730f81b07 --- /dev/null +++ b/x11/lightdm-gtk-greeter-settings/pkg-descr @@ -0,0 +1,4 @@ +Just a small dialog to make it easier for users to modify the settings of +lightdm-gtk-greeter. + +WWW: https://launchpad.net/lightdm-gtk-greeter-settings