[csw-devel] SF.net SVN: gar:[20832] csw/mgar/pkg/mailutils/trunk

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Sun Apr 21 21:02:11 CEST 2013


Revision: 20832
          http://gar.svn.sourceforge.net/gar/?rev=20832&view=rev
Author:   chninkel
Date:     2013-04-21 19:02:10 +0000 (Sun, 21 Apr 2013)
Log Message:
-----------
mailutils/trunk: updated recipe to work and to remove openssl dependency

Modified Paths:
--------------
    csw/mgar/pkg/mailutils/trunk/Makefile
    csw/mgar/pkg/mailutils/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/mailutils/trunk/files/0001-define-asprintf-and-vasprintf.patch
    csw/mgar/pkg/mailutils/trunk/files/0002-Fix-building-with-fribidi2.noautoconf.patch
    csw/mgar/pkg/mailutils/trunk/files/0003-Add-missing-libraries.patch
    csw/mgar/pkg/mailutils/trunk/files/0004-remove-usr-local-etc-mailcap-path.patch
    csw/mgar/pkg/mailutils/trunk/files/README.CSW
    csw/mgar/pkg/mailutils/trunk/files/mailutils.rc

Modified: csw/mgar/pkg/mailutils/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mailutils/trunk/Makefile	2013-04-21 08:29:06 UTC (rev 20831)
+++ csw/mgar/pkg/mailutils/trunk/Makefile	2013-04-21 19:02:10 UTC (rev 20832)
@@ -1,30 +1,99 @@
 # $Id$
 NAME = mailutils
-VERSION = 2.2
+VERSION = 1.2
 GARTYPE = v2
 
 DESCRIPTION = A collection of mail related utilities
 define BLURB
 endef
 
-MASTER_SITES = $(GNU_MIRROR)
-DISTFILES  = $(DISTNAME).tar.xz
+MASTER_SITES = http://ftp.gnu.org/gnu/mailutils/
+DISTFILES  = $(DISTNAME).tar.bz2
 
 # File name regex to get notifications about upstream software releases
-UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
+UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.bz2
 
 VENDOR_URL = http://savannah.gnu.org/projects/mailutils/
 
-# This is needed for __FUNCTION__
-EXTRA_CPPFLAGS = -features=extensions -D__FUNCTION__=__func__
+RUNTIME_DEP_PKGS_CSWmailutils += CSWlibltdl7
+RUNTIME_DEP_PKGS_CSWmailutils += CSWlibiconv2
+RUNTIME_DEP_PKGS_CSWmailutils += CSWlibgssapi-krb5-2
+RUNTIME_DEP_PKGS_CSWmailutils += CSWlibfribidi0
+RUNTIME_DEP_PKGS_CSWmailutils += CSWlibkrb5-3
+RUNTIME_DEP_PKGS_CSWmailutils += CSWlibgnutls26
+RUNTIME_DEP_PKGS_CSWmailutils += CSWlibreadline6
+RUNTIME_DEP_PKGS_CSWmailutils += CSWlibmysqlclient18
+RUNTIME_DEP_PKGS_CSWmailutils += CSWlibintl8
 
+# We will not fix this compliance issue today
+CHECKPKG_OVERRIDES_CSWmailutils += shared-lib-pkgname-mismatch
+CHECKPKG_OVERRIDES_CSWmailutils += shared-lib-package-contains-so-symlink
+
+# emacs is an optional requirement
+CHECKPKG_OVERRIDES_CSWmailutils += missing-dependency|CSWemacs-common
+
+# Solaris doesn't have asprintf until recently so we have
+# to define it, we should rather use gnulib but this 
+# seemed complicated for a tempororary workaround
+PATCHFILES  = 0001-define-asprintf-and-vasprintf.patch
+ 
+PATCHFILES += 0002-Fix-building-with-fribidi2.noautoconf.patch
+
+# Some libraries are missing in a makefile (?!)
+PATCHFILES += 0003-Add-missing-libraries.patch
+
+PATCHFILES += 0004-remove-usr-local-etc-mailcap-path.patch
+
+DOCFILES  = ABOUT-NLS AUTHORS COPYING COPYING.LESSER ChangeLog
+DOCFILES += INSTALL NEWS README THANKS TODO
+
+MIGRATE_FILES = mailutils.rc domain
+MIGRATE_SOURCE_DIR = $(prefix)/etc/
+MIGRATE_DEST_DIR = $(sysconfdir)/
+
+
+GARCOMPILER = SUN
+
 # This is to find the gnulib generated local lib/stdint.h
 EXTRA_CPPFLAGS += -I../lib -I../../lib
 
-CONFIGURE_ARGS = $(DIRPATHS)
+# Mailutils also needs to be compiled  XPG compliant mode
+EXTRA_CPPFLAGS += -D_XPG6
+EXTRA_LDFLAGS  += -D_XPG6
 
+ifeq ($(GARCOMPILER),SUN)
+# Mailutils needs to be compiled in C99 mode
+EXTRA_CFLAGS += -xc99=all
+# This is needed for __FUNCTION__
+EXTRA_CPPFLAGS += -features=extensions -D__FUNCTION__=__func__ 
+else # GNU
+# Mailutils needs to be compiled in C99 mode
+EXTRA_CFLAGS += -std=gnu99
+endif
+
+CONFIGURE_ARGS  = $(DIRPATHS)
+CONFIGURE_ARGS += --disable-rpath
+CONFIGURE_ARGS += --enable-mh-utils
+CONFIGURE_ARGS += --with-gnutls
+CONFIGURE_ARGS += --with-gssapi
+CONFIGURE_ARGS += --with-mysql
+CONFIGURE_ARGS += --without-guile
+
 # Make sure the gnulib is built first
 BUILD_SCRIPTS  = $(WORKSRC)/lib/Makefile
 BUILD_SCRIPTS += $(WORKSRC)/Makefile
 
 include gar/category.mk
+
+pre-build:
+	cd $(WORKSRC)/include/mailutils && $(MAKE) types.h
+
+post-install:
+	ginstall -d "$(PKGROOT)$(sysconfdir)/domain"
+	for FILE in $(DOCFILES); do \
+                ginstall -D "$(WORKSRC)/$$FILE" "$(PKGROOT)$(docdir)/$(NAME)/$$FILE"; \
+        done
+	ginstall -D "$(FILEDIR)/README.CSW" "$(PKGROOT)$(docdir)/$(NAME)/README.CSW"
+	ginstall -D "$(FILEDIR)/mailutils.rc" "$(PKGROOT)$(sysconfdir)/mailutils.rc.CSW"
+	@$(MAKECOOKIE)
+

Modified: csw/mgar/pkg/mailutils/trunk/checksums
===================================================================
--- csw/mgar/pkg/mailutils/trunk/checksums	2013-04-21 08:29:06 UTC (rev 20831)
+++ csw/mgar/pkg/mailutils/trunk/checksums	2013-04-21 19:02:10 UTC (rev 20832)
@@ -1 +1 @@
-e183e91d3f2369c49360c9a07abf4c3c  mailutils-2.2.tar.xz
+0a5bf84e908f15343414c6a95118a373  mailutils-1.2.tar.bz2

Added: csw/mgar/pkg/mailutils/trunk/files/0001-define-asprintf-and-vasprintf.patch
===================================================================
--- csw/mgar/pkg/mailutils/trunk/files/0001-define-asprintf-and-vasprintf.patch	                        (rev 0)
+++ csw/mgar/pkg/mailutils/trunk/files/0001-define-asprintf-and-vasprintf.patch	2013-04-21 19:02:10 UTC (rev 20832)
@@ -0,0 +1,59 @@
+From 9f79b76a93555dda97ca5a9089fb4d23ef3bf96f Mon Sep 17 00:00:00 2001
+From: Yann Rouillard <yann at pleiades.fr.eu.org>
+Date: Sat, 20 Apr 2013 15:30:34 +0200
+Subject: [PATCH] define asprintf and vasprintf
+
+---
+ mailbox/mailer.c               |  36 +++
+ 1 files changed, 36 insertions(+)
+
+diff --git a/mailbox/mailer.c b/mailbox/mailer.c
+index cbb3938..ae10f45 100644
+--- a/mailbox/mailer.c
++++ b/mailbox/mailer.c
+@@ -51,6 +51,42 @@
+ 
+ static char *mailer_url_default;
+ 
++#if (defined (__SVR4) && defined (__sun))
++int vasprintf(char **ret, const char *format, va_list args)
++{
++        va_list copy;
++        va_copy(copy, args);
++
++        /* Make sure it is determinate, despite manuals indicating otherwise */
++        *ret = 0;
++
++        int count = vsnprintf(NULL, 0, format, args);
++        if (count >= 0) {
++                char* buffer = malloc(count + 1);
++                if (buffer != NULL) {
++                        count = vsnprintf(buffer, count + 1, format, copy);
++                        if (count < 0)
++                                free(buffer);
++                        else
++                                *ret = buffer;
++                }
++        }
++        va_end(args);  // Each va_start() or va_copy() needs a va_end()
++
++        return count;
++}
++
++int asprintf(char **strp, const char *fmt, ...)
++{
++        int size;
++        va_list args;
++        va_start(args, fmt);
++        size = vasprintf(strp, fmt, args);
++        va_end(args);
++        return size;
++}
++#endif
++
+ /* FIXME: I'd like to check that the URL is valid, but that requires that the
+    mailers already be registered! */
+ int
+-- 
+1.8.1.4
+

Added: csw/mgar/pkg/mailutils/trunk/files/0002-Fix-building-with-fribidi2.noautoconf.patch
===================================================================
--- csw/mgar/pkg/mailutils/trunk/files/0002-Fix-building-with-fribidi2.noautoconf.patch	                        (rev 0)
+++ csw/mgar/pkg/mailutils/trunk/files/0002-Fix-building-with-fribidi2.noautoconf.patch	2013-04-21 19:02:10 UTC (rev 20832)
@@ -0,0 +1,72 @@
+From 6c03bcffdf2504e7ae757128c3e2335d3fe7cd77 Mon Sep 17 00:00:00 2001
+From: Yann Rouillard <yann at pleiades.fr.eu.org>
+Date: Sat, 20 Apr 2013 19:04:04 +0200
+Subject: [PATCH] Fix building with fribidi2
+
+---
+ frm/common.c | 34 +++++++++++++----------
+ 1 files changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/frm/common.c b/frm/common.c
+index 4ec73c5..a32b10e 100644
+--- a/frm/common.c
++++ b/frm/common.c
+@@ -62,10 +62,10 @@ static char *output_charset = NULL;
+ const char *
+ get_charset ()
+ {
+-  char *tmp;
+-  
+   if (!output_charset)
+     {
++      char *tmp;
++      const char *str = NULL;
+       char locale[32];
+       
+       memset (locale, 0, sizeof (locale));
+@@ -86,16 +86,16 @@ get_charset ()
+ 	  
+ 	  lang = strtok_r (locale, "_", &sp);
+ 	  terr = strtok_r (NULL, ".", &sp);
+-	  output_charset = strtok_r (NULL, "@", &sp);
++	  str = strtok_r (NULL, "@", &sp);
+ 
+-	  if (output_charset)
+-	    output_charset = xstrdup (output_charset);
+-	  else
+-	    output_charset = mu_charset_lookup (lang, terr);
++	  if (!str)
++	    str = mu_charset_lookup (lang, terr);
+ 	}
+       
+-      if (!output_charset)
+-	output_charset = "ASCII";
++      if (!str)
++        str = "ASCII";
++
++      output_charset = xstrdup (str);
+     }
+   return output_charset;
+ }
+@@ -104,6 +104,9 @@ get_charset ()
+ /* BIDI support (will be moved to lib when it's ready) */
+ #ifdef HAVE_LIBFRIBIDI
+ 
++#   include <wchar.h>
++#   define mu_fribidi_wcwidth(c) wcwidth((wchar_t)c)
++
+ static int fb_charset_num = -1;
+ FriBidiChar *logical;
+ char *outstring;
+@@ -170,7 +184,7 @@ puts_bidi (char *string)
+ 	      if (fb_charset_num != FRIBIDI_CHARSET_CAP_RTL)
+ 		{
+ 		  while (wid > 0 && idx < len)
+-		    wid -= fribidi_wcwidth (visual[idx++]);
++		    wid -= mu_fribidi_wcwidth (visual[idx++]);
+ 		}
+ 	      else
+ 		{
+-- 
+1.8.1.4
+

Added: csw/mgar/pkg/mailutils/trunk/files/0003-Add-missing-libraries.patch
===================================================================
--- csw/mgar/pkg/mailutils/trunk/files/0003-Add-missing-libraries.patch	                        (rev 0)
+++ csw/mgar/pkg/mailutils/trunk/files/0003-Add-missing-libraries.patch	2013-04-21 19:02:10 UTC (rev 20832)
@@ -0,0 +1,28 @@
+From b2c9549631b42638687e261eefb9bc8981032016 Mon Sep 17 00:00:00 2001
+From: Yann Rouillard <yann at pleiades.fr.eu.org>
+Date: Sun, 21 Apr 2013 00:57:25 +0200
+Subject: [PATCH] Add missing libraries
+
+---
+ mail.local/Makefile.in         |   5 +
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/mail.local/Makefile.in b/mail.local/Makefile.in
+index 3e2e2d8..00a86b0 100644
+--- a/mail.local/Makefile.in
++++ b/mail.local/Makefile.in
+@@ -374,6 +374,11 @@ mail_local_LDADD = \
+  ../lib/libmuaux.la \
+  ${MU_LIB_SIEVE}\
+  ${MU_LIB_MBOX}\
++ ${MU_LIB_IMAP}\
++ ${MU_LIB_MAILDIR}\
++ ${MU_LIB_MH}\
++ ${MU_LIB_NNTP}\
++ ${MU_LIB_POP}\
+  ${MU_LIB_AUTH}\
+  @MU_AUTHLIBS@\
+  ${MU_LIB_MAILUTILS} \
+-- 
+1.8.1.4
+

Added: csw/mgar/pkg/mailutils/trunk/files/0004-remove-usr-local-etc-mailcap-path.patch
===================================================================
--- csw/mgar/pkg/mailutils/trunk/files/0004-remove-usr-local-etc-mailcap-path.patch	                        (rev 0)
+++ csw/mgar/pkg/mailutils/trunk/files/0004-remove-usr-local-etc-mailcap-path.patch	2013-04-21 19:02:10 UTC (rev 20832)
@@ -0,0 +1,24 @@
+From 8ebbeb7686c5fba4bf52441ac69a80d110d13631 Mon Sep 17 00:00:00 2001
+From: Yann Rouillard <yann at pleiades.fr.eu.org>
+Date: Sun, 21 Apr 2013 10:39:11 +0200
+Subject: [PATCH] remove /usr/local/etc/mailcap path
+
+---
+ lib/mailcap.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/lib/mailcap.c b/lib/mailcap.c
+index 5a43329..65abc13 100644
+--- a/lib/mailcap.c
++++ b/lib/mailcap.c
+@@ -36,7 +36,6 @@
+ 
+ /* Default mailcap path, the $HOME/.mailcap: entry is prepended to it */
+ #define DEFAULT_MAILCAP \
+- "/usr/local/etc/mailcap:"\
+  "/usr/etc/mailcap:"\
+  "/etc/mailcap:"\
+  "/etc/mail/mailcap:"\
+-- 
+1.8.1.4
+

Added: csw/mgar/pkg/mailutils/trunk/files/README.CSW
===================================================================
--- csw/mgar/pkg/mailutils/trunk/files/README.CSW	                        (rev 0)
+++ csw/mgar/pkg/mailutils/trunk/files/README.CSW	2013-04-21 19:02:10 UTC (rev 20832)
@@ -0,0 +1,14 @@
+Mailutils notes:
+The package is built with the default options plus the following-
+	--prefix=/opt/csw --mandir=/opt/csw/share/man --disable-nls
+	--disable-rpath --enable-mh-utils --with-included-gettext
+	--with-gnutls --with-gssapi --with-mysql
+#
+The system configuration directory is /opt/csw/etc.  A small sample
+  configuation file is provided - /opt/csw/etc/mailutils.rc.CSW.
+  Copy this file to /opt/csw/etc/mailutils.rc and make your changes.
+#
+Help text is accessed by info, select Mailutils.
+#
+The options available for the package is listed from the following command.
+/opt/csw/bin/mailutils-config --info

Added: csw/mgar/pkg/mailutils/trunk/files/mailutils.rc
===================================================================
--- csw/mgar/pkg/mailutils/trunk/files/mailutils.rc	                        (rev 0)
+++ csw/mgar/pkg/mailutils/trunk/files/mailutils.rc	2013-04-21 19:02:10 UTC (rev 20832)
@@ -0,0 +1,10 @@
+#The following configuration file specifies that all Mailutils programs
+#should use `/var/mail' as a local mailspool directory. Programs
+#performing authentication will use pam service `mailutils'. All
+#programs, except `imap4d' will issue log messages via `mail' facility,
+#`imap4d' will use facility `local1'.
+
+     :mailbox --mail-spool /var/mail
+     :auth --authentication pam --pam-service mailutils
+     :logging --log-facility mail
+     imap4d --daemon=20 --timeout=1800 --log-facility local1

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list