Doug Barton wrote:

> On Mon, 3 Sep 2007, Roman Bogorodskiy wrote:
> 
>>  Doug Barton wrote:
>> 
>>> I don't think this is a good idea for a few reasons. First off, the gnupg
>>> port already has a pkg-message that is pretty clear about the fact that 
>>> you
>>> need to pick a pinentry dialog.
>> 
>> To be honest, I don't think that reporting about dependencies via
>> pkg-message is a sane way of doing things.
> 
> Reasonable minds can differ on that topic. :)
> 
>> Our ports system is mature enough to handle dependencies on its own, 
>> without requiring users to install dependencies by hand.
> 
> While in general I agree, in this case, given that the "right" choice isn't 
> obvious I think it's reasonable. However ...
> 
>>> I sort of think that this might be reasonable if the pinentry port grew
>>> OPTIONS, which I would even be willing to work on if lofi thought it was 
>>> a
>>> good idea. But I don't think the overhead of drawing all of the dialogs 
>>> in
>>> is worth it, and I don't see an easy way of guessing which one the user
>>> would want by default.
>> 
>> OPTIONS would be reasonable in this case. We can enable ncurses backend
>> by default and user will be able to configure the port to make it use
>> other backends he/she wants.
> 
> That is basically what I had in mind. I'd like to hear from lofi, but my 
> offer to help with that is still good.
> 
>>> Can this change be backed out till there has been a little discussion?
>> 
>> Backed out.
> 
> I appreciate the prompt response, as do our users (one of whom was already 
> bitten by this).

Attached a proof-of-concept patch with OPTIONS support for pinentry.
However, portlint seems to complain about using USE_QT_VER after
including pre.mk, though I'm not quite sure it's really not allowed.

Slave ports could also be adjusted/removed.

Roman Bogorodskiy
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/security/pinentry/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- Makefile    19 May 2007 20:22:48 -0000      1.37
+++ Makefile    4 Sep 2007 05:13:15 -0000
@@ -25,13 +25,19 @@
 WANT_GNOME=    yes
 GNU_CONFIGURE= yes
 USE_GMAKE=     yes
-INSTALLS_SHLIB=        yes
+USE_LDCONFIG=  yes
 INFO=          pinentry
 
 CONFIGURE_ARGS+=--with-libiconv-prefix=${LOCALBASE}
 
-.if defined(PINENTRY_QT) || defined(PINENTRY_GTK) || defined(PINENTRY_GTK2) || 
defined(PINENTRY_CURSES)
-.if defined(PINENTRY_QT)
+OPTIONS=       QT "Enable QT GUI" off \
+               GTK "Enable gtk1 GUI" off \
+               GTK2 "Enable gtk2 GUI" off \
+               CURSES "Enable ncurser GUI" on
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_QT)
 USE_QT_VER=    3
 PLIST_SUB+=    WITH_QT=""
 
@@ -44,7 +50,7 @@
 PLIST_SUB+=    WITH_QT="@comment "
 .endif
 
-.if defined(PINENTRY_GTK)
+.if defined(WITH_GTK)
 USE_GNOME+=    gtk12
 PLIST_SUB+=    WITH_GTK=""
 CONFIGURE_ENV+=        CFLAGS=-I${LOCALBASE}/include
@@ -53,7 +59,7 @@
 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
@@ -62,20 +68,12 @@
 PLIST_SUB+=    WITH_GTK2="@comment "
 .endif
 
-.if defined(PINENTRY_CURSES)
+.if defined(WITH_CURSES)
 PLIST_SUB+=    WITH_CURSES=""
 CONFIGURE_ENV+=        CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
 .else
 CONFIGURE_ARGS+=--disable-pinentry-curses
 PLIST_SUB+=    WITH_CURSES="@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=""
-.endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Attachment: pgpc4nCkjiM9U.pgp
Description: PGP signature

Reply via email to