From 821d3efa604b2363f402e4959cdd79bb34f8b2b5 Mon Sep 17 00:00:00 2001 From: dsainty Date: Wed, 11 Aug 2010 12:21:56 +0000 Subject: Correct minor build problems under Ubuntu 10.04. --- databases/palm-db-tools/distinfo | 8 +++-- databases/palm-db-tools/patches/patch-ac | 14 ++++----- databases/palm-db-tools/patches/patch-ae | 17 +++++++++-- databases/palm-db-tools/patches/patch-af | 51 ++++++++++++++++++++++++++++++++ databases/palm-db-tools/patches/patch-ag | 15 ++++++++++ 5 files changed, 92 insertions(+), 13 deletions(-) create mode 100644 databases/palm-db-tools/patches/patch-af create mode 100644 databases/palm-db-tools/patches/patch-ag (limited to 'databases') diff --git a/databases/palm-db-tools/distinfo b/databases/palm-db-tools/distinfo index adc8cdf7be4..b2acdb3c6a5 100644 --- a/databases/palm-db-tools/distinfo +++ b/databases/palm-db-tools/distinfo @@ -1,10 +1,12 @@ -$NetBSD: distinfo,v 1.2 2007/10/21 03:53:45 dsainty Exp $ +$NetBSD: distinfo,v 1.3 2010/08/11 12:21:56 dsainty Exp $ SHA1 (palm-db-tools-0_3_6.tar.gz) = b8ef6ed7059f5f71571622af6ece86b61cfacee6 RMD160 (palm-db-tools-0_3_6.tar.gz) = 26a5ce1ab9d558a4b42f3278be809b31eefb19b4 Size (palm-db-tools-0_3_6.tar.gz) = 201644 bytes SHA1 (patch-aa) = 63810ff29c59b3abb48f43b55ca92968711ec943 SHA1 (patch-ab) = cc36b595666e8843728485a804f74322adb38b07 -SHA1 (patch-ac) = 27389d2f7dff02407d60a9f3a1a8d34b188df797 +SHA1 (patch-ac) = 15e13a574ccd5c800eac4216baac38692ee16ed7 SHA1 (patch-ad) = 0c8d624367a135fb5b0cf7ab5514f52f8cf3ac16 -SHA1 (patch-ae) = 17a8f9b67cbc89177b05ac1ee63c77c22fa6704f +SHA1 (patch-ae) = cf899b708386c7404bd6181aff97e5eaa2e573a2 +SHA1 (patch-af) = d44e4198c50153b141e233b0e002ead0ae3c5b3f +SHA1 (patch-ag) = d5478dbc12cf1da3eb0ca3c2d4e9d8dff09b8034 diff --git a/databases/palm-db-tools/patches/patch-ac b/databases/palm-db-tools/patches/patch-ac index 5571300df90..a2547942f7f 100644 --- a/databases/palm-db-tools/patches/patch-ac +++ b/databases/palm-db-tools/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.2 2007/10/21 03:53:45 dsainty Exp $ +$NetBSD: patch-ac,v 1.3 2010/08/11 12:21:56 dsainty Exp $ Defining _XOPEN_SOURCE breaks the build under NetBSD. @@ -8,14 +8,14 @@ As with DATE fields, if a TIME field is unset (hour value 24+), output an empty string. --- libsupport/csvfile.cpp.orig 2003-06-20 11:37:47.000000000 +1200 -+++ libsupport/csvfile.cpp 2007-02-19 21:19:46.000000000 +1300 -@@ -1,5 +1,3 @@ ++++ libsupport/csvfile.cpp 2010-08-09 22:30:58.306485980 +1200 +@@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE -- ++#include + #include #include - #include -@@ -299,6 +297,7 @@ +@@ -299,6 +299,7 @@ break; case PalmLib::FlatFile::Field::FLOAT: @@ -23,7 +23,7 @@ empty string. fldstr << field.v_float; break; -@@ -329,7 +328,7 @@ +@@ -329,7 +330,7 @@ break; case PalmLib::FlatFile::Field::TIME: diff --git a/databases/palm-db-tools/patches/patch-ae b/databases/palm-db-tools/patches/patch-ae index 64bf8768166..c918da44b40 100644 --- a/databases/palm-db-tools/patches/patch-ae +++ b/databases/palm-db-tools/patches/patch-ae @@ -1,10 +1,21 @@ -$NetBSD: patch-ae,v 1.1 2007/10/21 03:53:45 dsainty Exp $ +$NetBSD: patch-ae,v 1.2 2010/08/11 12:21:56 dsainty Exp $ + +Don't unnecessarily remove const, which complicates casting. Correctly terminate default string values on NUL. --- libflatfile/DB.cpp.orig 2003-06-20 11:37:46.000000000 +1200 -+++ libflatfile/DB.cpp 2007-10-12 17:57:05.000000000 +1300 -@@ -275,7 +276,8 @@ ++++ libflatfile/DB.cpp 2010-08-08 23:26:16.387306351 +1200 +@@ -221,7 +221,7 @@ + throw PalmLib::error("list view is corrupt"); + + // Determine the length of the name string. +- pi_char_t* null_ptr = reinterpret_cast ++ const pi_char_t* null_ptr = reinterpret_cast + (memchr(chunk.data() + 4, 0, 32)); + if (null_ptr) + lv.name = std::string((char *) (chunk.data() + 4), +@@ -275,7 +275,8 @@ switch (type) { case PalmLib::FlatFile::Field::STRING: diff --git a/databases/palm-db-tools/patches/patch-af b/databases/palm-db-tools/patches/patch-af new file mode 100644 index 00000000000..e6a4fc3e58a --- /dev/null +++ b/databases/palm-db-tools/patches/patch-af @@ -0,0 +1,51 @@ +$NetBSD: patch-af,v 1.1 2010/08/11 12:21:56 dsainty Exp $ + +Don't unnecessarily remove const, which complicates casting. + +--- libflatfile/JFile3.cpp.orig 2010-08-08 23:28:31.059277789 +1200 ++++ libflatfile/JFile3.cpp 2010-08-08 23:30:12.583338045 +1200 +@@ -454,7 +454,7 @@ + void PalmLib::FlatFile::JFile3::JFileAppInfoType::unpack(const PalmLib::Block& block) + { + unsigned i; +- pi_char_t* null_ptr; ++ const pi_char_t* null_ptr; + + // Ensure that we have enough space to extract information from. + if (block.size() < ( (20 * (20+1)) + 20*2 + 2 + 2 + 20*2 + 2 +@@ -467,7 +467,7 @@ + // Extract the field names. + for (i = 0; i < 20; ++i) { + /* Find the trailing null byte and extract the string. */ +- null_ptr = reinterpret_cast (memchr(p, 0, 21)); ++ null_ptr = reinterpret_cast (memchr(p, 0, 21)); + if (null_ptr) + fieldNames[i] = std::string((char *) p, null_ptr - p); + else +@@ -518,7 +518,7 @@ + p += sizeof(pi_uint16_t); + + // Extract the string used last by Find. +- null_ptr = reinterpret_cast (memchr(p, 0, 16)); ++ null_ptr = reinterpret_cast (memchr(p, 0, 16)); + if (null_ptr) + findString = std::string((char *) p, null_ptr - p); + else +@@ -526,7 +526,7 @@ + p += 16; + + // Extract the string used last by Filter. +- null_ptr = reinterpret_cast (memchr(p, 0, 16)); ++ null_ptr = reinterpret_cast (memchr(p, 0, 16)); + if (null_ptr) + filterString = std::string((char *) p, null_ptr - p); + else +@@ -542,7 +542,7 @@ + p += sizeof(pi_uint16_t); + + // Extract the password (if any). +- null_ptr = reinterpret_cast (memchr(p, 0, 12)); ++ null_ptr = reinterpret_cast (memchr(p, 0, 12)); + if (null_ptr) + password = std::string((char *) p, null_ptr - p); + else diff --git a/databases/palm-db-tools/patches/patch-ag b/databases/palm-db-tools/patches/patch-ag new file mode 100644 index 00000000000..d6e7dea93c6 --- /dev/null +++ b/databases/palm-db-tools/patches/patch-ag @@ -0,0 +1,15 @@ +$NetBSD: patch-ag,v 1.1 2010/08/11 12:21:56 dsainty Exp $ + +Don't unnecessarily remove const, which complicates casting. + +--- libflatfile/MobileDB.cpp.orig 2010-08-08 23:23:04.940277744 +1200 ++++ libflatfile/MobileDB.cpp 2010-08-08 23:24:13.267340616 +1200 +@@ -221,7 +221,7 @@ + if (field + 1 > fields.size()) fields.resize(field + 1); + + // Now search for the end of the current field. +- pi_char_t* q = reinterpret_cast ++ const pi_char_t* q = reinterpret_cast + (memchr(p, 0, rec.end() - p)); + if (!q) + throw PalmLib::error("field terminiator is missing"); -- cgit v1.2.3