mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Update to 0.7.6
Add new frontend: pinentry-qt4
This commit is contained in:
parent
46c33b2f11
commit
ac1b0c5c74
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=236576
10 changed files with 90 additions and 194 deletions
|
@ -11,9 +11,8 @@ COMMENT= Curses version of the gnupg password dialog
|
|||
|
||||
CONFLICTS= pinentry-[0-9]*
|
||||
|
||||
PINENTRY_CURSES=yes
|
||||
|
||||
PKGNAMESUFFIX= -curses
|
||||
PINENTRY_SLAVE= -curses
|
||||
WITH_NCURSES= yes
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../pinentry
|
||||
|
||||
|
|
|
@ -11,9 +11,8 @@ COMMENT= GTK version of the gnupg password dialog
|
|||
|
||||
CONFLICTS= pinentry-[0-9]*
|
||||
|
||||
PINENTRY_GTK= yes
|
||||
|
||||
PKGNAMESUFFIX= -gtk
|
||||
PINENTRY_SLAVE= -gtk
|
||||
WITH_GTK= yes
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../pinentry
|
||||
|
||||
|
|
|
@ -11,9 +11,8 @@ COMMENT= GTK+ 2.0 version of the GnuPG password dialog
|
|||
|
||||
CONFLICTS= pinentry-[0-9]*
|
||||
|
||||
PINENTRY_GTK2= yes
|
||||
|
||||
PKGNAMESUFFIX= -gtk2
|
||||
PINENTRY_SLAVE= -gtk2
|
||||
WITH_GTK2= yes
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../pinentry
|
||||
|
||||
|
|
|
@ -7,13 +7,12 @@
|
|||
|
||||
PORTNAME= pinentry
|
||||
|
||||
COMMENT= QT version of the gnupg password dialog
|
||||
COMMENT= QT3 version of the gnupg password dialog
|
||||
|
||||
CONFLICTS= pinentry-[0-9]*
|
||||
|
||||
PINENTRY_QT= yes
|
||||
|
||||
PKGNAMESUFFIX= -qt
|
||||
PINENTRY_SLAVE= -qt3
|
||||
WITH_QT3= yes
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../pinentry
|
||||
|
||||
|
|
19
security/pinentry-qt4/Makefile
Normal file
19
security/pinentry-qt4/Makefile
Normal file
|
@ -0,0 +1,19 @@
|
|||
# New ports collection makefile for: pinentry-qt4
|
||||
# Date created: 2009-06-23
|
||||
# Whom: Max Brazhnikov <makc@FreeBSD.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= pinentry
|
||||
|
||||
COMMENT= QT4 version of the gnupg password dialog
|
||||
|
||||
CONFLICTS= pinentry-[0-9]*
|
||||
|
||||
PINENTRY_SLAVE= -qt4
|
||||
WITH_QT4= yes
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../pinentry
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
|
@ -6,8 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= pinentry
|
||||
PORTVERSION= 0.7.5
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 0.7.6
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= ${MASTER_SITE_GNUPG}
|
||||
MASTER_SITE_SUBDIR= pinentry
|
||||
|
@ -21,59 +20,74 @@ LIB_DEPENDS= gcrypt.16:${PORTSDIR}/security/libgcrypt \
|
|||
CONFLICTS?= pinentry-[a-z]*-[0.9]*
|
||||
|
||||
USE_ICONV= yes
|
||||
WANT_GNOME= yes
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
USE_LDCONFIG= yes
|
||||
INFO= pinentry
|
||||
|
||||
CONFIGURE_ARGS+=--with-libiconv-prefix=${LOCALBASE}
|
||||
CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
|
||||
|
||||
.if defined(PINENTRY_QT) || defined(PINENTRY_GTK) || defined(PINENTRY_GTK2) || defined(PINENTRY_CURSES)
|
||||
.if defined(PINENTRY_QT)
|
||||
USE_QT_VER= 3
|
||||
PLIST_SUB+= WITH_QT=""
|
||||
|
||||
pre-configure:
|
||||
@${REINPLACE_CMD} -e "s@-lpthread@${PTHREAD_LIBS}@g" \
|
||||
${WRKSRC}/acinclude.m4 ${WRKSRC}/configure
|
||||
.if !defined(PINENTRY_SLAVE)
|
||||
OPTIONS= NCURSES "Curses frontend" on \
|
||||
GTK "Gtk+1 frontend" on \
|
||||
GTK2 "Gtk+2 frontend" on \
|
||||
QT3 "Qt3 frontend" on \
|
||||
QT4 "Qt4 frontend" on
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-pinentry-qt
|
||||
PLIST_SUB+= WITH_QT="@comment "
|
||||
PKGNAMESUFFIX= ${PINENTRY_SLAVE}
|
||||
.endif
|
||||
|
||||
.if defined(PINENTRY_GTK)
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if defined(WITH_QT3)
|
||||
USE_QT_VER= 3
|
||||
PLIST_SUB+= WITH_QT3=""
|
||||
MOC3= ${LOCALBASE}/bin/moc
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-pinentry-qt
|
||||
PLIST_SUB+= WITH_QT3="@comment "
|
||||
.endif
|
||||
|
||||
.if defined(WITH_QT4)
|
||||
#USE_QT_VER= 4
|
||||
#QT_COMPONENTS= gui moc_build
|
||||
.include "${PORTSDIR}/Mk/bsd.qt.mk"
|
||||
BUILD_DEPENDS+= moc-qt4:${PORTSDIR}/devel/qt4-moc
|
||||
LIB_DEPENDS+= QtGui.4:${PORTSDIR}/x11-toolkits/qt4-gui
|
||||
PLIST_SUB+= WITH_QT4=""
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-pinentry-qt4
|
||||
PLIST_SUB+= WITH_QT4="@comment "
|
||||
.endif
|
||||
|
||||
.if defined(WITH_GTK)
|
||||
USE_GNOME+= gtk12
|
||||
PLIST_SUB+= WITH_GTK=""
|
||||
CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-pinentry-gtk
|
||||
PLIST_SUB+= WITH_GTK="@comment "
|
||||
.endif
|
||||
|
||||
.if defined(PINENTRY_GTK2)
|
||||
.if defined(WITH_GTK2)
|
||||
USE_GNOME+= gtk20
|
||||
PLIST_SUB+= WITH_GTK2=""
|
||||
CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-pinentry-gtk2
|
||||
PLIST_SUB+= WITH_GTK2="@comment "
|
||||
.endif
|
||||
|
||||
.if defined(PINENTRY_CURSES)
|
||||
PLIST_SUB+= WITH_CURSES=""
|
||||
CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
|
||||
.if defined(WITH_NCURSES)
|
||||
PLIST_SUB+= WITH_NCURSES=""
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-pinentry-curses
|
||||
PLIST_SUB+= WITH_CURSES="@comment "
|
||||
PLIST_SUB+= WITH_NCURSES="@comment "
|
||||
.endif
|
||||
.else
|
||||
USE_QT_VER= 3
|
||||
USE_GNOME+= gtk12 gtk20
|
||||
PLIST_SUB+= WITH_QT=""
|
||||
PLIST_SUB+= WITH_GTK=""
|
||||
PLIST_SUB+= WITH_GTK2=""
|
||||
PLIST_SUB+= WITH_CURSES=""
|
||||
|
||||
pre-configure:
|
||||
${REINPLACE_CMD} -e "s@-lpthread@${PTHREAD_LIBS}@g" \
|
||||
${WRKSRC}/m4/qt.m4 ${WRKSRC}/configure
|
||||
.if defined(WITH_QT3)
|
||||
${REINPLACE_CMD} -e "/^MOC/s,@MOC@,${MOC3}," \
|
||||
${WRKSRC}/qt/Makefile.in
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
MD5 (pinentry-0.7.5.tar.gz) = ca492afbbb59cd19f1c875533f18b269
|
||||
SHA256 (pinentry-0.7.5.tar.gz) = cb269ac058793b2df343a12a65e3402abc4b68503e105b12e4ca903d8d8e3172
|
||||
SIZE (pinentry-0.7.5.tar.gz) = 422801
|
||||
MD5 (pinentry-0.7.6.tar.gz) = 5a4f676375fa882009da02013d77210f
|
||||
SHA256 (pinentry-0.7.6.tar.gz) = 14670c18f4a042ffcbd7a937aa3f15de392816c56b472588383d8378f65b42ab
|
||||
SIZE (pinentry-0.7.6.tar.gz) = 475101
|
||||
|
|
|
@ -1,145 +0,0 @@
|
|||
--- gtk+-2/gtksecentry.c.orig 2007-11-19 16:20:50.000000000 +0500
|
||||
+++ gtk+-2/gtksecentry.c 2008-04-26 22:52:13.000000000 +0600
|
||||
@@ -256,7 +256,7 @@
|
||||
|
||||
static GtkWidgetClass *parent_class = NULL;
|
||||
|
||||
-gboolean g_use_secure_mem = FALSE;
|
||||
+extern gboolean g_use_secure_mem;
|
||||
|
||||
# define g_sec_new(type, count) \
|
||||
((type *) g_sec_malloc ((unsigned) sizeof (type) * (count)))
|
||||
@@ -269,85 +269,6 @@
|
||||
} while(0)
|
||||
|
||||
|
||||
-gpointer
|
||||
-g_malloc(gulong size)
|
||||
-{
|
||||
- gpointer p;
|
||||
-
|
||||
- if (size == 0)
|
||||
- return NULL;
|
||||
-
|
||||
- if (g_use_secure_mem)
|
||||
- p = (gpointer) secmem_malloc(size);
|
||||
- else
|
||||
- p = (gpointer) malloc(size);
|
||||
- if (!p)
|
||||
- g_error("could not allocate %ld bytes", size);
|
||||
-
|
||||
- return p;
|
||||
-}
|
||||
-
|
||||
-gpointer
|
||||
-g_malloc0(gulong size)
|
||||
-{
|
||||
- gpointer p;
|
||||
-
|
||||
- if (size == 0)
|
||||
- return NULL;
|
||||
-
|
||||
- if (g_use_secure_mem) {
|
||||
- p = (gpointer) secmem_malloc(size);
|
||||
- if (p)
|
||||
- memset(p, 0, size);
|
||||
- } else
|
||||
- p = (gpointer) calloc(size, 1);
|
||||
- if (!p)
|
||||
- g_error("could not allocate %ld bytes", size);
|
||||
-
|
||||
- return p;
|
||||
-}
|
||||
-
|
||||
-gpointer
|
||||
-g_realloc(gpointer mem, gulong size)
|
||||
-{
|
||||
- gpointer p;
|
||||
-
|
||||
- if (size == 0) {
|
||||
- g_free(mem);
|
||||
-
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
- if (!mem) {
|
||||
- if (g_use_secure_mem)
|
||||
- p = (gpointer) secmem_malloc(size);
|
||||
- else
|
||||
- p = (gpointer) malloc(size);
|
||||
- } else {
|
||||
- if (g_use_secure_mem) {
|
||||
- g_assert(m_is_secure(mem));
|
||||
- p = (gpointer) secmem_realloc(mem, size);
|
||||
- } else
|
||||
- p = (gpointer) realloc(mem, size);
|
||||
- }
|
||||
-
|
||||
- if (!p)
|
||||
- g_error("could not reallocate %lu bytes", (gulong) size);
|
||||
-
|
||||
- return p;
|
||||
-}
|
||||
-
|
||||
-void
|
||||
-g_free(gpointer mem)
|
||||
-{
|
||||
- if (mem) {
|
||||
- if (m_is_secure(mem))
|
||||
- secmem_free(mem);
|
||||
- else
|
||||
- free(mem);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
GType
|
||||
gtk_secure_entry_get_type(void)
|
||||
{
|
||||
--- gtk+-2/pinentry-gtk-2.c.orig 2007-11-19 16:44:07.000000000 +0500
|
||||
+++ gtk+-2/pinentry-gtk-2.c 2008-04-26 22:52:13.000000000 +0600
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "gtksecentry.h"
|
||||
#include "pinentry.h"
|
||||
+#include "memory.h"
|
||||
|
||||
#ifdef FALLBACK_CURSES
|
||||
#include "pinentry-curses.h"
|
||||
@@ -469,12 +470,36 @@
|
||||
|
||||
pinentry_cmd_handler_t pinentry_cmd_handler = gtk_cmd_handler;
|
||||
|
||||
+gboolean g_use_secure_mem = FALSE;
|
||||
+
|
||||
+static gpointer
|
||||
+_malloc(gsize size) {
|
||||
+ return g_use_secure_mem ? secmem_malloc(size) : malloc(size);
|
||||
+}
|
||||
+
|
||||
+static gpointer
|
||||
+_realloc(gpointer p, gsize size) {
|
||||
+ return m_is_secure(p) ? secmem_realloc(p, size) : realloc(p, size);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+_free(gpointer p) {
|
||||
+ m_is_secure(p) ? secmem_free(p) : free(p);
|
||||
+}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
pinentry_init (PGMNAME);
|
||||
-
|
||||
+
|
||||
+ GMemVTable mem_vtable = {
|
||||
+ _malloc,
|
||||
+ _realloc,
|
||||
+ _free
|
||||
+ };
|
||||
+
|
||||
+ g_mem_set_vtable (&mem_vtable);
|
||||
+
|
||||
#ifdef FALLBACK_CURSES
|
||||
if (pinentry_have_display (argc, argv))
|
||||
gtk_init (&argc, &argv);
|
11
security/pinentry/files/patch-qt4__Makefile.in
Normal file
11
security/pinentry/files/patch-qt4__Makefile.in
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- ./qt4/Makefile.in.orig 2009-06-19 04:57:52.000000000 +0400
|
||||
+++ ./qt4/Makefile.in 2009-06-23 23:09:45.000000000 +0400
|
||||
@@ -84,7 +84,7 @@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
+ $(AM_CXXFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
-o $@
|
|
@ -1,5 +1,6 @@
|
|||
%%WITH_CURSES%%bin/pinentry-curses
|
||||
bin/pinentry
|
||||
%%WITH_NCURSES%%bin/pinentry-curses
|
||||
%%WITH_GTK%%bin/pinentry-gtk
|
||||
%%WITH_GTK2%%bin/pinentry-gtk-2
|
||||
%%WITH_QT%%bin/pinentry-qt
|
||||
bin/pinentry
|
||||
%%WITH_QT3%%bin/pinentry-qt
|
||||
%%WITH_QT4%%bin/pinentry-qt4
|
||||
|
|
Loading…
Add table
Reference in a new issue