aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-06-27 21:03:12 +0800
committered <ed@FreeBSD.org>2008-06-27 21:03:12 +0800
commit45af88b3713d0ea47f20746c5ce55ca296909a78 (patch)
tree03a396124cb697fa86489545b3ceafba3ee74c0e /x11
parent3338a31d295dc3338e84f952931610ffa332060b (diff)
downloadfreebsd-ports-gnome-45af88b3713d0ea47f20746c5ce55ca296909a78.tar.gz
freebsd-ports-gnome-45af88b3713d0ea47f20746c5ce55ca296909a78.tar.zst
freebsd-ports-gnome-45af88b3713d0ea47f20746c5ce55ca296909a78.zip
Prevent the usage of the CTRL() macro.
After my change to the CTRL() macro, the kpty code sets improper values to various control keys. Change the kpty code to use the constants from <sys/ttydefaults.h>. Approved by: philip (mentor)
Diffstat (limited to 'x11')
-rw-r--r--x11/kdelibs3/Makefile2
-rw-r--r--x11/kdelibs3/files/patch-kdecore-kpty.cpp34
-rw-r--r--x11/kdelibs4/Makefile2
-rw-r--r--x11/kdelibs4/files/patch-kdecore-kpty.cpp34
4 files changed, 70 insertions, 2 deletions
diff --git a/x11/kdelibs3/Makefile b/x11/kdelibs3/Makefile
index 5b36357ce24c..7772d47a51a7 100644
--- a/x11/kdelibs3/Makefile
+++ b/x11/kdelibs3/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdelibs
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde ipv6
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
diff --git a/x11/kdelibs3/files/patch-kdecore-kpty.cpp b/x11/kdelibs3/files/patch-kdecore-kpty.cpp
new file mode 100644
index 000000000000..1ac88614386d
--- /dev/null
+++ b/x11/kdelibs3/files/patch-kdecore-kpty.cpp
@@ -0,0 +1,34 @@
+--- kdecore/kpty.cpp
++++ kdecore/kpty.cpp
+@@ -127,9 +127,15 @@
+ #include <kdebug.h>
+ #include <kstandarddirs.h> // locate
+
+-// not defined on HP-UX for example
+-#undef CTRL
+-#define CTRL(x) ((x) & 037)
++#ifndef CINTR
++#define CINTR 0x03
++#endif
++#ifndef CQUIT
++#define CQUIT 0x1c
++#endif
++#ifndef CERASE
++#define CERASE 0x7f
++#endif
+
+ #define TTY_GROUP "tty"
+
+@@ -333,9 +339,9 @@
+ ttmode.c_iflag |= IUTF8;
+ #endif
+
+- ttmode.c_cc[VINTR] = CTRL('C' - '@');
+- ttmode.c_cc[VQUIT] = CTRL('\\' - '@');
+- ttmode.c_cc[VERASE] = 0177;
++ ttmode.c_cc[VINTR] = CINTR;
++ ttmode.c_cc[VQUIT] = CQUIT;
++ ttmode.c_cc[VERASE] = CERASE;
+
+ _tcsetattr(d->slaveFd, &ttmode);
+
diff --git a/x11/kdelibs4/Makefile b/x11/kdelibs4/Makefile
index 5b36357ce24c..7772d47a51a7 100644
--- a/x11/kdelibs4/Makefile
+++ b/x11/kdelibs4/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdelibs
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde ipv6
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
diff --git a/x11/kdelibs4/files/patch-kdecore-kpty.cpp b/x11/kdelibs4/files/patch-kdecore-kpty.cpp
new file mode 100644
index 000000000000..1ac88614386d
--- /dev/null
+++ b/x11/kdelibs4/files/patch-kdecore-kpty.cpp
@@ -0,0 +1,34 @@
+--- kdecore/kpty.cpp
++++ kdecore/kpty.cpp
+@@ -127,9 +127,15 @@
+ #include <kdebug.h>
+ #include <kstandarddirs.h> // locate
+
+-// not defined on HP-UX for example
+-#undef CTRL
+-#define CTRL(x) ((x) & 037)
++#ifndef CINTR
++#define CINTR 0x03
++#endif
++#ifndef CQUIT
++#define CQUIT 0x1c
++#endif
++#ifndef CERASE
++#define CERASE 0x7f
++#endif
+
+ #define TTY_GROUP "tty"
+
+@@ -333,9 +339,9 @@
+ ttmode.c_iflag |= IUTF8;
+ #endif
+
+- ttmode.c_cc[VINTR] = CTRL('C' - '@');
+- ttmode.c_cc[VQUIT] = CTRL('\\' - '@');
+- ttmode.c_cc[VERASE] = 0177;
++ ttmode.c_cc[VINTR] = CINTR;
++ ttmode.c_cc[VQUIT] = CQUIT;
++ ttmode.c_cc[VERASE] = CERASE;
+
+ _tcsetattr(d->slaveFd, &ttmode);
+