gnupg and deps in main

This commit is contained in:
Ertuğrul Erata
2015-08-21 10:26:26 +03:00
parent d1559b9776
commit 17a55ca6a4
26 changed files with 1021 additions and 0 deletions
@@ -0,0 +1,20 @@
Index: pinentry-0.8.0/configure.ac
===================================================================
--- pinentry-0.8.0.orig/configure.ac
+++ pinentry-0.8.0/configure.ac
@@ -434,11 +434,11 @@ AM_CONDITIONAL(BUILD_PINENTRY_W32, test
# Please change the order only after verifying that the preferred
# pinentry really is better (more feature-complete and more secure).
-if test "$pinentry_gtk_2" = "yes"; then
- PINENTRY_DEFAULT=pinentry-gtk-2
+if test "$pinentry_qt4" = "yes"; then
+ PINENTRY_DEFAULT=pinentry-qt4
else
- if test "$pinentry_gtk" = "yes"; then
- PINENTRY_DEFAULT=pinentry-gtk
+ if test "$pinentry_gtk2" = "yes"; then
+ PINENTRY_DEFAULT=pinentry-gtk-2
else
if test "$pinentry_qt" = "yes"; then
PINENTRY_DEFAULT=pinentry-qt
@@ -0,0 +1,11 @@
diff -ru pinentry-0.7.2/qt/secqlineedit.cpp pinentry-0.7.2.new/qt/secqlineedit.cpp
--- pinentry-0.7.2/qt/secqlineedit.cpp 2004-01-18 19:10:04.000000000 +0100
+++ pinentry-0.7.2.new/qt/secqlineedit.cpp 2006-06-26 18:49:35.000000000 +0200
@@ -536,6 +536,7 @@
{
d->echoMode = mode;
d->updateTextLayout();
+ setInputMethodEnabled (mode == Normal);
update();
}
@@ -0,0 +1,11 @@
--- autopatch-dummy/secmem/secmem.c
+++ autopatch-dummy/secmem/secmem.c 2004/07/13 14:34:02
@@ -85,7 +85,7 @@
# define MAP_ANONYMOUS MAP_ANON
#endif
-#define DEFAULT_POOLSIZE 16384
+#define DEFAULT_POOLSIZE 16384*4
typedef struct memblock_struct MEMBLOCK;
struct memblock_struct {
@@ -0,0 +1,41 @@
--- m4/curses.m4
+++ m4/curses.m4
@@ -28,7 +28,7 @@
AC_ARG_ENABLE(ncurses, [ --disable-ncurses don't prefer -lncurses over -lcurses],
, enable_ncurses=yes)
if test "$enable_ncurses" = yes; then
- AC_CHECK_LIB(ncurses, initscr, LIBNCURSES="-lncurses")
+ AC_CHECK_LIB(ncursesw, initscr, LIBNCURSES="-lncursesw")
if test "$LIBNCURSES"; then
# Use ncurses header files instead of the ordinary ones, if possible;
# is there a better way of doing this, that avoids looking in specific
--- pinentry/pinentry-curses.c
+++ pinentry/pinentry-curses.c
@@ -546,6 +545,14 @@
SCREEN *screen = 0;
int done = 0;
char *pin_utf8;
+ char *old_ctype = NULL;
+
+
+ if (pinentry->lc_ctype)
+ {
+ old_ctype = strdup (setlocale (LC_CTYPE, NULL));
+ setlocale (LC_CTYPE, pinentry->lc_ctype);
+ }
/* Open the desired terminal if necessary. */
if (tty_name)
@@ -684,6 +690,12 @@
if (screen)
delscreen (screen);
+ if (old_ctype)
+ {
+ setlocale (LC_CTYPE, old_ctype);
+ free(old_ctype);
+ }
+
if (ttyfi)
fclose (ttyfi);
if (ttyfo)
@@ -0,0 +1,48 @@
Index: pinentry-0.7.6/qt/main.cpp
===================================================================
--- pinentry-0.7.6.orig/qt/main.cpp
+++ pinentry-0.7.6/qt/main.cpp
@@ -71,23 +71,23 @@ qt_cmd_handler (pinentry_t pe)
PinEntryDialog pinentry (parent, NULL, true, !!pe->quality_bar);
pinentry.setPinentryInfo (pe);
- pinentry.setPrompt (QString::fromUtf8 (pe->prompt));
- pinentry.setDescription (QString::fromUtf8 (pe->description));
+ pinentry.setPrompt (QString::fromLocal8Bit (pe->prompt));
+ pinentry.setDescription (QString::fromLocal8Bit (pe->description));
/* If we reuse the same dialog window. */
#if 0
pinentry.setText (SecQString::null);
#endif
if (pe->ok)
- pinentry.setOkText (QString::fromUtf8 (pe->ok));
+ pinentry.setOkText (QString::fromLocal8Bit (pe->ok));
if (pe->cancel)
- pinentry.setCancelText (QString::fromUtf8 (pe->cancel));
+ pinentry.setCancelText (QString::fromLocal8Bit (pe->cancel));
if (pe->error)
- pinentry.setError (QString::fromUtf8 (pe->error));
+ pinentry.setError (QString::fromLocal8Bit (pe->error));
if (pe->quality_bar)
- pinentry.setQualityBar (QString::fromUtf8 (pe->quality_bar));
+ pinentry.setQualityBar (QString::fromLocal8Bit (pe->quality_bar));
if (pe->quality_bar_tt)
- pinentry.setQualityBarTT (QString::fromUtf8 (pe->quality_bar_tt));
+ pinentry.setQualityBarTT (QString::fromLocal8Bit (pe->quality_bar_tt));
bool ret = pinentry.exec ();
if (!ret)
@@ -113,9 +113,9 @@ qt_cmd_handler (pinentry_t pe)
}
else
{
- QString desc = QString::fromUtf8 (pe->description? pe->description :"");
- QString ok = QString::fromUtf8 (pe->ok ? pe->ok : "OK");
- QString can = QString::fromUtf8 (pe->cancel ? pe->cancel : "Cancel");
+ QString desc = QString::fromLocal8Bit (pe->description? pe->description :"");
+ QString ok = QString::fromLocal8Bit (pe->ok ? pe->ok : "OK");
+ QString can = QString::fromLocal8Bit (pe->cancel ? pe->cancel : "Cancel");
bool ret;
ret = QMessageBox::information (parent, "", desc, ok, can );
@@ -0,0 +1,77 @@
#!/bin/sh
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2009 Fedora Project
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# Anna Bernathova <anicka@novell.com> 2006
# Pavel Nemec <pnemec@novell.com> 2006
# Rex Dieter <rdieter@fedoraproject.org> 2009
#
# use proper binary (pinentry-qt, pinentry-gtk-2 or pinentry-curses)
if [ -z "$PINENTRY_BINARY" ]; then
kde_running=
if [ -n "$KDE_FULL_SESSION" ]; then
kde_running=1
elif [ -n "$DISPLAY" ]; then
xprop -root | grep "^KDE_FULL_SESSION" >/dev/null 2>/dev/null
if test $? -eq 0; then
kde_running=1
fi
else
arg=
display=
for opt in "$@"; do
if [ "$opt" = "--display" ]; then
arg=1
elif [ -n "$arg" ]; then
display="$opt"
else
arg=
fi
done
if [ -n "$display" ]; then
DISPLAY="$display" xprop -root | grep "^KDE_FULL_SESSION" >/dev/null 2>/dev/null
if test $? -eq 0; then
kde_running=1
fi
fi
fi
# if KDE is detected and pinentry-qt exists, use pinentry-qt
if [ -n "$kde_running" -a -x /usr/bin/pinentry-qt ]
then
export PINENTRY_BINARY="/usr/bin/pinentry-qt"
# otherwise test if pinentry-gtk-2 is installed
elif [ -x /usr/bin/pinentry-gtk-2 ]
then
export PINENTRY_BINARY="/usr/bin/pinentry-gtk-2"
# otherwise test if pinentry-qt3 is installed
elif [ -x /usr/bin/pinentry-qt3 ]
then
export PINENTRY_BINARY="/usr/bin/pinentry-qt"
# otherwise test if pinentry-qt exists although KDE is not detected
elif [ -x /usr/bin/pinentry-qt ]
then
export PINENTRY_BINARY="/usr/bin/pinentry-qt3"
# pinentry-curses is installed by default
else
#test if gui binary is required
for opt in "$@"; do
if [ "x$opt" = "x--display" ]; then
# should not happen because of package dependencies
echo "Please install pinentry-gui" >&2
exit 1
fi
done
export PINENTRY_BINARY="/usr/bin/pinentry-curses"
fi
fi
exec $PINENTRY_BINARY "$@"