Subject: Re: cone
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.org>
From: Adam Hoka <adam.hoka@gmail.com>
List: tech-pkg
Date: 11/15/2007 00:41:11
Hello!

Johnny C. Lam wrote:
> I've commited pkgsrc/mail/cone.  It compiles correctly, but currently 
> core dumps on FreeBSD 4.x on several screens for me, so use it at your 
> own risk.  I haven't had time to track down what's wrong.  If you have 
> success with running it on NetBSD, I'd like to hear about.

Nice. :)
I had some issues with openssl's c_rehash wich is not present in netbsd base because it needs perl. The configuration also cried fo perl, so I have added these:

-----8<-----

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/cone/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- Makefile	13 Nov 2007 18:02:15 -0000	1.1.1.1
+++ Makefile	14 Nov 2007 23:17:50 -0000
@@ -9,15 +9,16 @@
 HOMEPAGE=	http://www.courier-mta.org/cone/
 COMMENT=	console newsreader and emailer
 
-USE_TOOLS+=		gmake
+USE_TOOLS+=		gmake perl:build
 USE_LANGUAGES=		c c++
 GCC_REQD+=		3.0	# need Standard C++ Library
 
 .include "options.mk"
 
+BUILD_DEPENDS+=	openssl>=0.9.7:../../security/openssl
 GNU_CONFIGURE=		yes
 CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+=	--without-certdb
+CONFIGURE_ARGS+=	--with-certdb=${PREFIX}/share/cone/rootcerts
 
 EGDIR=			${PREFIX}/share/examples/cone
 INSTALL_AM_MAKEFLAGS+=	sysconfdir=${EGDIR:Q}

-----8<-----

It still won't compile because some termattr() issues at curses/cursesscreen.C which still needs resolution.

It has something to do with this:

  2003-09-21  Mr. Sam  <mrsam@courier-mta.com>

      * curses/cursesscreen.C (writeText): Use termattrs() to check if
      the terminal can underline.  If not, replace spaces with underscores.

ps.:
You could add FAM support to the package if you think its a good idea. :)

Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mail/cone/options.mk,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 options.mk
--- options.mk	13 Nov 2007 18:02:15 -0000	1.1.1.1
+++ options.mk	14 Nov 2007 23:17:50 -0000
@@ -1,5 +1,5 @@
 PKG_OPTIONS_VAR=		PKG_OPTIONS.cone
-PKG_SUPPORTED_OPTIONS=		aspell ldap
+PKG_SUPPORTED_OPTIONS=		aspell ldap fam
 PKG_SUGGESTED_OPTIONS=		aspell ldap
 
 .include "../../mk/bsd.options.mk"
@@ -20,3 +20,10 @@
 .  include "../../textproc/aspell/buildlink3.mk"
 CONFIGURE_ARGS+=	--with-spellcheck=aspell
 .endif
+
+###
+### FAM support
+###
+.if !empty(PKG_OPTIONS:Mfam)
+.  include "../../mk/fam.buildlink3.mk"
+.endif

--
Cheers
  -Adam