[135465] trunk/dports/mail/gnupg21
jann at macports.org
jann at macports.org
Thu Apr 23 16:41:16 PDT 2015
Revision: 135465
https://trac.macports.org/changeset/135465
Author: jann at macports.org
Date: 2015-04-23 16:41:16 -0700 (Thu, 23 Apr 2015)
Log Message:
-----------
New GPG21 version: 2.1.3
Modified Paths:
--------------
trunk/dports/mail/gnupg21/Portfile
Added Paths:
-----------
trunk/dports/mail/gnupg21/files/
trunk/dports/mail/gnupg21/files/patch-common-t-stringhelp.c.diff
Modified: trunk/dports/mail/gnupg21/Portfile
===================================================================
--- trunk/dports/mail/gnupg21/Portfile 2015-04-23 23:07:57 UTC (rev 135464)
+++ trunk/dports/mail/gnupg21/Portfile 2015-04-23 23:41:16 UTC (rev 135465)
@@ -4,7 +4,7 @@
PortSystem 1.0
name gnupg21
-version 2.1.2
+version 2.1.3
categories mail security
maintainers jann ionic openmaintainer
license GPL-3+
@@ -23,8 +23,10 @@
use_bzip2 yes
-checksums rmd160 015c1f427702310b6cc201483a5f94159d9e9981 \
- sha256 404f5a43d591dfe41f0ffb204b49a1533b67d77bc1fd68febd7e447575616792
+checksums rmd160 63619afe56d4adf8444925cca47da8c6e9b0c255 \
+ sha256 213e7fb0d74bb4e53a2d3153f309ddc077528f2cfffa2af85f2a20cc7875c8ed
+
+patchfiles patch-common-t-stringhelp.c.diff
notes "GPG 2.1 uses a new format for its key files. Therefore you cannot\
use it together with any earlier version of GPG. Neither can you easily go\
Added: trunk/dports/mail/gnupg21/files/patch-common-t-stringhelp.c.diff
===================================================================
--- trunk/dports/mail/gnupg21/files/patch-common-t-stringhelp.c.diff (rev 0)
+++ trunk/dports/mail/gnupg21/files/patch-common-t-stringhelp.c.diff 2015-04-23 23:41:16 UTC (rev 135465)
@@ -0,0 +1,115 @@
+--- common/t-stringhelp.c.orig 2015-04-24 00:25:39.000000000 +0100
++++ common/t-stringhelp.c 2015-04-24 00:30:01.000000000 +0100
+@@ -482,58 +482,60 @@
+ static void
+ test_strsplit (void)
+ {
+- int test_count = 0;
+- void test (const char *s, char delim, char replacement,
+- const char *fields_expected[])
+- {
+- char *s2;
+- int field_count;
+- char **fields;
+- int field_count_expected;
+- int i;
+-
+- /* Count the fields. */
+- for (field_count_expected = 0;
+- fields_expected[field_count_expected];
+- field_count_expected ++)
+- ;
+-
+- test_count ++;
+-
+- /* We need to copy s since strsplit modifies it in place. */
+- s2 = xstrdup (s);
+- fields = strsplit (s2, delim, replacement, &field_count);
+-
+- if (field_count != field_count_expected)
+- fail (test_count * 1000);
+-
+- for (i = 0; i < field_count_expected; i ++)
+- if (strcmp (fields_expected[i], fields[i]) != 0)
+- {
+- printf ("For field %d, expected '%s', but got '%s'\n",
+- i, fields_expected[i], fields[i]);
+- fail (test_count * 1000 + i + 1);
+- }
+-
+- xfree (s2);
+- }
+-
+- {
+- const char *expected_result[] =
+- { "a", "bc", "cde", "fghi", "jklmn", "", "foo", "", NULL };
+- test ("a:bc:cde:fghi:jklmn::foo:", ':', '\0', expected_result);
+- }
+-
+- {
+- const char *expected_result[] =
+- { "!a!bc!!def!", "a!bc!!def!", "bc!!def!", "!def!", "def!", "", NULL };
+- test (",a,bc,,def,", ',', '!', expected_result);
+- }
+-
+- {
+- const char *expected_result[] = { "", NULL };
+- test ("", ':', ',', expected_result);
+- }
++ struct {
++ const char *s;
++ char delim;
++ char replacement;
++ const char *fields_expected[10];
++ } tv[] = {
++ {
++ "a:bc:cde:fghi:jklmn::foo:", ':', '\0',
++ { "a", "bc", "cde", "fghi", "jklmn", "", "foo", "", NULL }
++ },
++ {
++ ",a,bc,,def,", ',', '!',
++ { "!a!bc!!def!", "a!bc!!def!", "bc!!def!", "!def!", "def!", "", NULL }
++ },
++ {
++ "", ':', ',',
++ { "", NULL }
++ }
++ };
++
++ int tidx;
++
++ for (tidx = 0; tidx < DIM(tv); tidx++)
++ {
++ char *s2;
++ int field_count;
++ char **fields;
++ int field_count_expected;
++ int i;
++
++ /* Count the fields. */
++ for (field_count_expected = 0;
++ tv[tidx].fields_expected[field_count_expected];
++ field_count_expected ++)
++ ;
++
++ /* We need to copy s since strsplit modifies it in place. */
++ s2 = xstrdup (tv[tidx].s);
++ fields = strsplit (s2, tv[tidx].delim, tv[tidx].replacement,
++ &field_count);
++
++ if (field_count != field_count_expected)
++ fail (tidx * 1000);
++
++ for (i = 0; i < field_count_expected; i ++)
++ if (strcmp (tv[tidx].fields_expected[i], fields[i]) != 0)
++ {
++ printf ("For field %d, expected '%s', but got '%s'\n",
++ i, tv[tidx].fields_expected[i], fields[i]);
++ fail (tidx * 1000 + i + 1);
++ }
++
++ xfree (s2);
++ }
+ }
+
+ int
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150423/47a2fc51/attachment.html>
More information about the macports-changes
mailing list