diff options
author | Max Brazhnikov <makc@FreeBSD.org> | 2009-06-24 08:25:55 +0000 |
---|---|---|
committer | Max Brazhnikov <makc@FreeBSD.org> | 2009-06-24 08:25:55 +0000 |
commit | ac1b0c5c742a0255e3f1fdb368e6e188e264000c (patch) | |
tree | 776aa0afd82012d9db8dcbda92d152f03638213b | |
parent | 46c33b2f1191086a09a28577442845c5da059546 (diff) | |
download | ports-ac1b0c5c742a0255e3f1fdb368e6e188e264000c.tar.gz ports-ac1b0c5c742a0255e3f1fdb368e6e188e264000c.zip |
Notes
-rw-r--r-- | security/pinentry-curses/Makefile | 5 | ||||
-rw-r--r-- | security/pinentry-gtk/Makefile | 5 | ||||
-rw-r--r-- | security/pinentry-gtk2/Makefile | 5 | ||||
-rw-r--r-- | security/pinentry-qt/Makefile | 7 | ||||
-rw-r--r-- | security/pinentry-qt4/Makefile | 19 | ||||
-rw-r--r-- | security/pinentry/Makefile | 70 | ||||
-rw-r--r-- | security/pinentry/distinfo | 6 | ||||
-rw-r--r-- | security/pinentry/files/patch-gtk2-gmem | 145 | ||||
-rw-r--r-- | security/pinentry/files/patch-qt4__Makefile.in | 11 | ||||
-rw-r--r-- | security/pinentry/pkg-plist | 7 |
10 files changed, 88 insertions, 192 deletions
diff --git a/security/pinentry-curses/Makefile b/security/pinentry-curses/Makefile index d6d7819c71b4..4cac9dfe93a6 100644 --- a/security/pinentry-curses/Makefile +++ b/security/pinentry-curses/Makefile @@ -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 diff --git a/security/pinentry-gtk/Makefile b/security/pinentry-gtk/Makefile index 9e7c74d80321..d61db2fc5ba5 100644 --- a/security/pinentry-gtk/Makefile +++ b/security/pinentry-gtk/Makefile @@ -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 diff --git a/security/pinentry-gtk2/Makefile b/security/pinentry-gtk2/Makefile index e7614fd8ccb4..0f8d108af408 100644 --- a/security/pinentry-gtk2/Makefile +++ b/security/pinentry-gtk2/Makefile @@ -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 diff --git a/security/pinentry-qt/Makefile b/security/pinentry-qt/Makefile index 907eeedc93e0..ca0ebc3f0e40 100644 --- a/security/pinentry-qt/Makefile +++ b/security/pinentry-qt/Makefile @@ -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 diff --git a/security/pinentry-qt4/Makefile b/security/pinentry-qt4/Makefile new file mode 100644 index 000000000000..feab34dff12a --- /dev/null +++ b/security/pinentry-qt4/Makefile @@ -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" diff --git a/security/pinentry/Makefile b/security/pinentry/Makefile index fda3a107b62a..48bd29c00f26 100644 --- a/security/pinentry/Makefile +++ b/security/pinentry/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="" +.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 +PKGNAMESUFFIX= ${PINENTRY_SLAVE} +.endif -pre-configure: - @${REINPLACE_CMD} -e "s@-lpthread@${PTHREAD_LIBS}@g" \ - ${WRKSRC}/acinclude.m4 ${WRKSRC}/configure +.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_QT="@comment " +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(PINENTRY_GTK) +.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> diff --git a/security/pinentry/distinfo b/security/pinentry/distinfo index ebb700e2080b..b7e07f9f6f94 100644 --- a/security/pinentry/distinfo +++ b/security/pinentry/distinfo @@ -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 diff --git a/security/pinentry/files/patch-gtk2-gmem b/security/pinentry/files/patch-gtk2-gmem deleted file mode 100644 index fb640e6ad836..000000000000 --- a/security/pinentry/files/patch-gtk2-gmem +++ /dev/null @@ -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); diff --git a/security/pinentry/files/patch-qt4__Makefile.in b/security/pinentry/files/patch-qt4__Makefile.in new file mode 100644 index 000000000000..c0cc1873e079 --- /dev/null +++ b/security/pinentry/files/patch-qt4__Makefile.in @@ -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 $@ diff --git a/security/pinentry/pkg-plist b/security/pinentry/pkg-plist index 6ebc83fedc0f..4b29a33c5d49 100644 --- a/security/pinentry/pkg-plist +++ b/security/pinentry/pkg-plist @@ -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 |