1
0
mirror of https://github.com/gryf/gryf-overlay.git synced 2026-04-03 20:13:31 +02:00

Added new version of xlockmore

This commit is contained in:
2026-03-31 15:19:26 +02:00
parent 802eab519f
commit 73adf3206b
7 changed files with 305 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
--- a/configure.ac
+++ b/configure.ac
@@ -1912,7 +1912,7 @@
AC_DEFUN([AC_PATH_FREETYPE_DIRECT],
[test -z "$freetype_direct_test_library" && freetype_direct_test_library=freetype
test -z "$freetype_direct_test_function" && freetype_direct_test_function=FT_Init_FreeType
-test -z "$freetype_direct_test_include" && freetype_direct_test_include=freetype2/freetype.h
+test -z "$freetype_direct_test_include" && freetype_direct_test_include=freetype2/ft2build.h
for ac_dir in \
/usr/X11R6.5.1/include \
/usr/X11R6.4/include \

View File

@@ -0,0 +1,28 @@
Clang16 will not allow assigning imcompatbile function pointer types.
Therefore this patch adds casts to the function pointers.
Bug: https://bugs.gentoo.org/880909
This patch has been sent to upstream via mail.
Pascal Jäger <pascal.jaeger@leimstift.de> (2022-12-07)
--- a/xlock/vtlock_proc.c
+++ b/xlock/vtlock_proc.c
@@ -188,7 +188,7 @@ find_x_proc(int disp_nr, dev_t lxdev, ino_t lxino)
lencmd = strlen(xcmd_ref);
if ( stat( PROCDIR, &stbuf ) == -1 ) return( (pid_t)-1 );
namelist = (struct dirent **) malloc(sizeof (struct dirent *));
- if ((names = scan_dir(PROCDIR, &namelist, proc_dir_select, alphasort)) == -1 )
+ if ((names = scan_dir(PROCDIR, &namelist, proc_dir_select, (int (*)(const void *, const void *))alphasort)) == -1 )
{
free(namelist);
return( (pid_t)-1 );
@@ -301,7 +301,7 @@ scan_x_fds( struct inode_ref *inotab, int ln_ttys, pid_t proc )
(void) sprintf(xfddir, PROCDIR "/%d/fd", proc);
namelist = (struct dirent **) malloc(sizeof (struct dirent *));
- if (scan_dir(xfddir, &namelist, NULL, alphasort) == -1) {
+ if (scan_dir(xfddir, &namelist, NULL, (int (*)(const void *, const void *))alphasort) == -1) {
free(namelist);
return 0;
}

View File

@@ -0,0 +1,19 @@
--- xlockmore_orig/configure.ac 2026-03-31 14:30:19.287648907 +0200
+++ xlockmore/configure.ac 2026-03-31 14:31:45.479457046 +0200
@@ -71,11 +71,11 @@
dnl Check if C++ compiler is present. If not set CXX to the C-compiler used
dnl for the other compilations.
-if test "$CC" = gcc; then
- AC_CHECK_PROGS(CXX, $CCC g++ CC C++ c++ cxx cc++ xlC $CC, gcc)
-else
- AC_CHECK_PROGS(CXX, $CCC CC C++ g++ c++ cxx cc++ xlC $CC, gcc)
-fi
+dnl if test "$CC" = gcc; then
+dnl AC_CHECK_PROGS(CXX, $CCC g++ CC C++ c++ cxx cc++ xlC $CC, gcc)
+dnl else
+dnl AC_CHECK_PROGS(CXX, $CCC CC C++ g++ c++ cxx cc++ xlC $CC, gcc)
+dnl fi
AC_PROG_CXX
if test "${CXX}" = "xlC" ; then
CXXFLAGS="${CXXFLAGS} -+"

View File

@@ -0,0 +1,51 @@
--- xlockmore_orig/xglock/xglock.c 2026-03-31 14:30:19.287648907 +0200
+++ xlockmore/xglock/xglock.c 2026-03-31 14:33:42.738353309 +0200
@@ -105,6 +105,8 @@
/*static GtkWidget *font_sel_entry =(GtkWidget *)NULL;*/
static GtkTooltips *tooltips=(GtkTooltips *)NULL;
+# define NeedFunctionsPrototypes 1
+
/* Prototypes */
#if defined( __ANSI_C__ ) || defined( NeedFunctionsPrototypes )
# define __PROTO( name, args ) name args
@@ -114,14 +116,14 @@
#define STD_CB_ARGS (GtkWidget *, gpointer)
-static void *__PROTO( secured_malloc, (size_t) );
-static void *__PROTO( secured_calloc, (int, size_t) );
+static void *__PROTO( secured_malloc, (gulong) );
+static void *__PROTO( secured_calloc, (gulong, gulong) );
static void *__PROTO( secured_realloc, (void *, size_t) );
static gchar *__PROTO( check_quotes, (gchar *str) );
static void __PROTO( mode_list_item_select_cb, STD_CB_ARGS );
static void __PROTO( mode_list_item_unselect_cb, STD_CB_ARGS );
-static void __PROTO( compose_xlock_command, (char *) );
+static void __PROTO( compose_xlock_command, (gchar ***, gulong *, gulong *) );
static void __PROTO( kill_xlock_cb, STD_CB_ARGS );
static void __PROTO( launch_xlock, STD_CB_ARGS );
static void __PROTO( exit_xglock, STD_CB_ARGS );
@@ -140,7 +142,7 @@
static void __PROTO( file_selection_cancel_cb, STD_CB_ARGS );
static void __PROTO( file_selection_ok_cb, STD_CB_ARGS );
-static void __PROTO( create_file_selection_dialog, STD_CB_ARGS );
+static void __PROTO( create_file_selection_dialog, (GtkWidget *, struct_option_fntcol *) );
static void __PROTO( contextual_help_dialog, STD_CB_ARGS );
static void __PROTO( window_help_dialog, STD_CB_ARGS );
@@ -151,9 +153,9 @@
static GtkWidget * __PROTO( create_file_menu, (GtkWidget *) );
static GtkWidget * __PROTO( create_help_menu, (GtkWidget *) );
-static void __PROTO( create_fntColorOptions_entries, (GtkWidget *) );
-static void __PROTO( create_genOptions_entries, (GtkWidget *) );
-static void __PROTO( create_boolOptions_buttons, (GtkWidget *) );
+static void __PROTO( create_fntColorOptions_entries, (GtkScrolledWindow *) );
+static void __PROTO( create_genOptions_entries, (GtkScrolledWindow *) );
+static void __PROTO( create_boolOptions_buttons, (GtkScrolledWindow *) );
#if GTK_CHECK_VERSION(2,0,0)
/* GTK+ 2.x differences */

View File

@@ -0,0 +1,64 @@
--- xlockmore_orig/configure.ac 2026-03-31 14:30:19.287648907 +0200
+++ xlockmore/configure.ac 2026-03-31 14:33:12.213872945 +0200
@@ -5034,7 +5034,7 @@
BITMAPTYPE="bsd"
PIXMAPTYPE="bsd"
FORTUNE=""
- INSTPGMFLAGS="-s -o root -m 4111"
+ INSTPGMFLAGS="-o root -m 4111"
cpp_name=`echo $CC | cut -f1 -d' '`
if test "$cpp_name" = "gcc"; then
dirname=`which gcc`
@@ -5105,7 +5105,6 @@
;;
esac
fi
- INSTPGMFLAGS="-s $INSTPGMFLAGS"
BITMAPTYPE="linux"
PIXMAPTYPE="linux"
dnl if Shadow and not elf
@@ -5132,7 +5131,7 @@
AC_SUBST(OSF1_ENH_SEC)
XLOCKLIBS="${XLOCKLIBS} -lsecurity"
# SETGID auth may not be enough for Tru64 5.x.
- INSTPGMFLAGS="-s -g auth -m 2111"
+ INSTPGMFLAGS="-g auth -m 2111"
else
AC_MSG_RESULT(no)
fi
@@ -5158,7 +5157,7 @@
PIXMAPTYPE="sol"
;;
esac
- INSTPGMFLAGS="-s -o root -m 4111"
+ INSTPGMFLAGS="-o root -m 4111"
AC_DEFINE([HAVE_SHADOW], [1], [Shadow passwording])
AC_DEFINE([SYSV], [1], [System 5])
AC_DEFINE([SVR4], [1], [System 5 Release 4])
@@ -5187,7 +5186,7 @@
;;
*-*-sysv5* )
- INSTPGMFLAGS="-s -o root -m 4111"
+ INSTPGMFLAGS="-o root -m 4111"
AC_DEFINE([HAVE_SHADOW], [1], [Shadow passwording])
AC_DEFINE([SYSV], [1], [System 5])
AC_DEFINE([SVR4], [1], [System 5 Release 4])
@@ -5965,7 +5964,7 @@
case ${canonical} in
*-*-linux*)
if test "$vtlock" = "yes"; then
- INSTPGMFLAGS="-s -o root -g bin -m 4111"
+ INSTPGMFLAGS="-o root -g bin -m 4111"
AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS" for vtlock])
echo "experimental: Big buffer overrun security risk"
else
@@ -5983,7 +5982,7 @@
case ${canonical} in
*-*-linux*)
if test "$vtlock" = "yes"; then
- INSTPGMFLAGS="-s -o root -g bin -m 4111"
+ INSTPGMFLAGS="-o root -g bin -m 4111"
AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS" for vtlock])
else
AC_MSG_RESULT([defining install options (setuid/setgid) = "$INSTPGMFLAGS"])