update xsel to git head (originally done to fix a segfault when running
on empty input file), from Brennan Vincent, input kn@ gnezdo@
This commit is contained in:
parent
2a0fc9d1ed
commit
f5cdbfc178
@ -1,21 +1,29 @@
|
||||
# $OpenBSD: Makefile,v 1.11 2019/07/12 20:51:30 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.12 2021/03/23 15:07:27 sthen Exp $
|
||||
|
||||
COMMENT= command-line program for managing X selection contents
|
||||
|
||||
DISTNAME= xsel-1.2.0
|
||||
REVISION= 2
|
||||
V= 1.2.0.20200526
|
||||
DISTNAME= xsel-${V}
|
||||
CATEGORIES= x11
|
||||
HOMEPAGE= http://www.vergenet.net/~conrad/software/xsel/
|
||||
|
||||
GH_ACCOUNT= kfish
|
||||
GH_PROJECT= xsel
|
||||
GH_COMMIT= 062e6d373537c60829fa9b5dcddbcd942986b3c3
|
||||
|
||||
# BSD-style
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
||||
WANTLIB= X11 c
|
||||
|
||||
MASTER_SITES= http://www.vergenet.net/~conrad/software/xsel/download/
|
||||
# releases normally at
|
||||
#MASTER_SITES= http://www.vergenet.net/~conrad/software/xsel/download/
|
||||
|
||||
SEPARATE_BUILD= Yes
|
||||
CONFIGURE_STYLE=gnu
|
||||
CONFIGURE_STYLE=autoreconf
|
||||
CONFIGURE_ENV= LDFLAGS="-L${X11BASE}/lib"
|
||||
|
||||
AUTOCONF_VERSION=2.69
|
||||
AUTOMAKE_VERSION=1.16
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (xsel-1.2.0.tar.gz) = uSfOCNyC9MMBQCI5WbkM9l4QdvAAzpXlIEGewy9bFBw=
|
||||
SIZE (xsel-1.2.0.tar.gz) = 169155
|
||||
SHA256 (xsel-1.2.0.20200526-062e6d37.tar.gz) = /bbOutWP4waggDGs54epLE9Oi3W4Nt0zlY0UCmZrH5E=
|
||||
SIZE (xsel-1.2.0.20200526-062e6d37.tar.gz) = 51364
|
||||
|
@ -1,15 +0,0 @@
|
||||
$OpenBSD: patch-configure,v 1.2 2014/07/07 08:22:52 sthen Exp $
|
||||
|
||||
-Wdeclaration-after-statement is gcc 4-only.
|
||||
|
||||
--- configure.orig Mon Mar 24 15:27:33 2008
|
||||
+++ configure Mon Jul 7 09:22:18 2014
|
||||
@@ -5880,7 +5880,7 @@ fi
|
||||
|
||||
# Error out on compile warnings
|
||||
if test "x$ac_cv_c_compiler_gnu" = xyes ; then
|
||||
- CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Werror -g -std=gnu99 -Wdeclaration-after-statement -Wno-unused"
|
||||
+ CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Werror -g -std=gnu99 -Wno-unused"
|
||||
fi
|
||||
|
||||
# Checks for header files.
|
16
x11/xsel/patches/patch-configure_ac
Normal file
16
x11/xsel/patches/patch-configure_ac
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.1 2021/03/23 15:07:28 sthen Exp $
|
||||
|
||||
-Wdeclaration-after-statement is gcc 4-only.
|
||||
|
||||
Index: configure.ac
|
||||
--- configure.ac.orig
|
||||
+++ configure.ac
|
||||
@@ -24,7 +24,7 @@ AC_SEARCH_LIBS([XOpenDisplay], [X11], [], [AC_MSG_ERRO
|
||||
dnl Add some useful warnings if we have gcc.
|
||||
dnl changequote(,)dnl
|
||||
if test "x$ac_cv_prog_gcc" = xyes ; then
|
||||
- CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Werror -g -std=gnu99 -Wdeclaration-after-statement -Wno-unused"
|
||||
+ CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Werror -g -std=gnu99 -Wno-unused"
|
||||
fi
|
||||
dnl changequote([,])dnl
|
||||
|
@ -1,52 +0,0 @@
|
||||
$OpenBSD: patch-xsel_c,v 1.2 2014/07/07 08:25:16 sthen Exp $
|
||||
|
||||
- Format "32" properties use "long", not "int", even on LP64 platforms.
|
||||
- ensure NUM_TARGETS does not exceed MAX_NUM_TARGETS.
|
||||
- plug a memory leak in handle_targets()
|
||||
|
||||
--- xsel.c.orig Mon Jun 30 00:10:19 2014
|
||||
+++ xsel.c Mon Jun 30 00:20:50 2014
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
+#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
@@ -1300,14 +1301,16 @@ handle_targets (Display * display, Window requestor, A
|
||||
Atom selection, Time time, MultTrack * mparent)
|
||||
{
|
||||
Atom * targets_cpy;
|
||||
+ HandleResult r;
|
||||
|
||||
targets_cpy = malloc (sizeof (supported_targets));
|
||||
memcpy (targets_cpy, supported_targets, sizeof (supported_targets));
|
||||
|
||||
- return
|
||||
- change_property (display, requestor, property, XA_ATOM, 32,
|
||||
+ r = change_property (display, requestor, property, XA_ATOM, 32,
|
||||
PropModeReplace, (unsigned char *)targets_cpy,
|
||||
NUM_TARGETS, selection, time, mparent);
|
||||
+ free(targets_cpy);
|
||||
+ return r;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2078,7 +2081,6 @@ main(int argc, char *argv[])
|
||||
|
||||
/* Get the NULL atom */
|
||||
null_atom = XInternAtom (display, "NULL", False);
|
||||
- NUM_TARGETS++;
|
||||
|
||||
/* Get the TEXT atom */
|
||||
text_atom = XInternAtom (display, "TEXT", False);
|
||||
@@ -2096,6 +2098,8 @@ main(int argc, char *argv[])
|
||||
|
||||
supported_targets[s++] = XA_STRING;
|
||||
NUM_TARGETS++;
|
||||
+
|
||||
+ assert(NUM_TARGETS <= MAX_NUM_TARGETS);
|
||||
|
||||
/* Get the COMPOUND_TEXT atom.
|
||||
* NB. We do not currently serve COMPOUND_TEXT; we can retrieve it but
|
Loading…
Reference in New Issue
Block a user