diff options
author | jgh <jgh@FreeBSD.org> | 2019-08-21 03:05:49 +0800 |
---|---|---|
committer | jgh <jgh@FreeBSD.org> | 2019-08-21 03:05:49 +0800 |
commit | 66ed01d81c8bd4ac90c1477ce319df6c121a5deb (patch) | |
tree | 55af9b275d917d07081d123b6566da87bfc85433 /databases | |
parent | 33b35d6e649b89124a3044aed03096ed8edc3f56 (diff) | |
download | freebsd-ports-gnome-66ed01d81c8bd4ac90c1477ce319df6c121a5deb.tar.gz freebsd-ports-gnome-66ed01d81c8bd4ac90c1477ce319df6c121a5deb.tar.zst freebsd-ports-gnome-66ed01d81c8bd4ac90c1477ce319df6c121a5deb.zip |
- shift to more applicable category
Diffstat (limited to 'databases')
-rw-r--r-- | databases/Makefile | 1 | ||||
-rw-r--r-- | databases/palm-db-tools/Makefile | 27 | ||||
-rw-r--r-- | databases/palm-db-tools/distinfo | 2 | ||||
-rw-r--r-- | databases/palm-db-tools/files/patch-field_argumentf | 104 | ||||
-rw-r--r-- | databases/palm-db-tools/files/patch-flatfile-Makefile.in | 17 | ||||
-rw-r--r-- | databases/palm-db-tools/files/patch-libflatfile-DB.cpp | 40 | ||||
-rw-r--r-- | databases/palm-db-tools/files/patch-libflatfile-Database.cpp | 11 | ||||
-rw-r--r-- | databases/palm-db-tools/files/patch-libflatfile_JFile3.cpp | 47 | ||||
-rw-r--r-- | databases/palm-db-tools/files/patch-libflatfile_MobileDB.cpp | 11 | ||||
-rw-r--r-- | databases/palm-db-tools/files/patch-libpalm-Block.h | 11 | ||||
-rw-r--r-- | databases/palm-db-tools/files/patch-libpalm-File.cpp | 11 | ||||
-rw-r--r-- | databases/palm-db-tools/files/patch-libpalm-File.h | 10 | ||||
-rw-r--r-- | databases/palm-db-tools/pkg-descr | 5 |
13 files changed, 297 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile index fecc89493b2e..12fffc32f25d 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -522,6 +522,7 @@ SUBDIR += p5-Xapian SUBDIR += p5-mysql-genocide SUBDIR += p5-tokyotyrant + SUBDIR += palm-db-tools SUBDIR += pear-DB SUBDIR += pear-DBA SUBDIR += pear-DBA_Relational diff --git a/databases/palm-db-tools/Makefile b/databases/palm-db-tools/Makefile new file mode 100644 index 000000000000..47d15428b0a8 --- /dev/null +++ b/databases/palm-db-tools/Makefile @@ -0,0 +1,27 @@ +# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= palm-db-tools +DISTVERSION= 0_3_6 +PORTREVISION= 1 +CATEGORIES= databases +MASTER_SITES= SF + +MAINTAINER= ports@FreeBSD.org +COMMENT= Utilities for the PalmOS flat-file database programs + +WRKSRC= ${WRKDIR}/${PORTNAME} +GNU_CONFIGURE= yes +USES= gmake +USE_LDCONFIG= yes + +PLIST_FILES= lib/libpdbtools.so \ + bin/csv2pdb \ + bin/pdb2csv + +post-patch: + @${REINPLACE_CMD} -e "s|-Wno-deprecated|& -fPIC -DPIC|" \ + ${WRKSRC}/libflatfile/Makefile.in ${WRKSRC}/libpalm/Makefile.in \ + ${WRKSRC}/libsupport/Makefile.in ${WRKSRC}/flatfile/Makefile.in + +.include <bsd.port.mk> diff --git a/databases/palm-db-tools/distinfo b/databases/palm-db-tools/distinfo new file mode 100644 index 000000000000..10b6ed828a94 --- /dev/null +++ b/databases/palm-db-tools/distinfo @@ -0,0 +1,2 @@ +SHA256 (palm-db-tools-0_3_6.tar.gz) = 8a9860873fc16901df1b2793c28f070eeaee1a14d8593f86478828f1ad01cdd2 +SIZE (palm-db-tools-0_3_6.tar.gz) = 201644 diff --git a/databases/palm-db-tools/files/patch-field_argumentf b/databases/palm-db-tools/files/patch-field_argumentf new file mode 100644 index 000000000000..1fbb2628f161 --- /dev/null +++ b/databases/palm-db-tools/files/patch-field_argumentf @@ -0,0 +1,104 @@ +This patch removes a long-unused function because a bug in it triggers +an error in the modern compiler (clang-3.8). Instead of fixing the function, +we just remove it. + + -mi + +--- libflatfile/Database.h 2003-06-19 19:37:46.000000000 -0400 ++++ libflatfile/Database.h 2016-02-18 22:35:32.329328000 -0500 +@@ -112,12 +112,4 @@ + virtual FType field(int i) const; + +- /** +- * write the format of the field's argument in format, +- * and return a strings' vector with name of each argument part. +- * the format use the same display as used by printf +- */ +- virtual std::vector<std::string> field_argumentf(int i, std::string& format) +- { format = std::string(""); return std::vector<std::string>(0, std::string(""));} +- + /** + * Add a field to the flat-file database. An exception +--- libflatfile/DB.h 2003-06-19 19:37:46.000000000 -0400 ++++ libflatfile/DB.h 2016-02-18 22:35:10.046799000 -0500 +@@ -72,11 +72,4 @@ + + /** +- * write the format of the field's argument in format, +- * and return a strings' vector with name of each argument part. +- * the format use the same display as used by printf +- */ +- virtual std::vector<std::string> field_argumentf(int i, std::string& format); +- +- /** + * Return the maximum number of views supported by this + * type of flat-file database. +--- libflatfile/DB.cpp 2003-06-19 19:37:46.000000000 -0400 ++++ libflatfile/DB.cpp 2016-02-18 22:35:55.362853000 -0500 +@@ -1291,66 +1293,4 @@ + } + +-std::vector<std::string> +-PalmLib::FlatFile::DB::field_argumentf(int i, std::string& format) +-{ +- std::vector<std::string> vtitles(0, std::string("")); +- int j; +- +- switch (field_type(i)) { +- case PalmLib::FlatFile::Field::STRING: +- format = std::string("%s"); +- vtitles.push_back(std::string("default value")); +- break; +- case PalmLib::FlatFile::Field::INTEGER: +- format = std::string("%ld/%d"); +- vtitles.push_back(std::string("default value")); +- vtitles.push_back(std::string("increment")); +- break; +- case PalmLib::FlatFile::Field::FLOAT: +- format = std::string("%f"); +- vtitles.push_back(std::string("default value")); +- break; +- case PalmLib::FlatFile::Field::DATE: +- format = std::string("%d/%d/%d"); +- vtitles.push_back(std::string("Year (or now)")); +- vtitles.push_back(std::string("Month")); +- vtitles.push_back(std::string("Day in the month")); +- break; +- case PalmLib::FlatFile::Field::TIME: +- format = std::string("%d/%d"); +- vtitles.push_back(std::string("Hour (or now)")); +- vtitles.push_back(std::string("Minute")); +- break; +- case PalmLib::FlatFile::Field::LIST: +- format = std::string(""); +- for (j = 0; j < 31; i++) { +- format += std::string("%s/"); +- std::ostringstream title; +- title << "item " << j; +- vtitles.push_back(title.str()); +- } +- format += std::string("%s"); +- vtitles.push_back(std::string("item 32")); +- break; +- case PalmLib::FlatFile::Field::LINK: +- format = std::string("%s/%d"); +- vtitles.push_back(std::string("database")); +- vtitles.push_back(std::string("field number")); +- break; +- case PalmLib::FlatFile::Field::LINKED: +- format = std::string("%d/%d"); +- vtitles.push_back(std::string("link field number")); +- vtitles.push_back(std::string("field number")); +- break; +- case PalmLib::FlatFile::Field::CALCULATED: +- case PalmLib::FlatFile::Field::BOOLEAN: +- case PalmLib::FlatFile::Field::NOTE: +- default: +- format = std::string(""); +- break; +- } +- return vtitles; +-} +- + unsigned PalmLib::FlatFile::DB::getMaxNumOfListViews() const + { diff --git a/databases/palm-db-tools/files/patch-flatfile-Makefile.in b/databases/palm-db-tools/files/patch-flatfile-Makefile.in new file mode 100644 index 000000000000..46e8d92ff958 --- /dev/null +++ b/databases/palm-db-tools/files/patch-flatfile-Makefile.in @@ -0,0 +1,17 @@ +--- flatfile/Makefile.in.orig 2014-06-10 10:35:56.370537068 +0800 ++++ flatfile/Makefile.in 2014-06-10 10:36:30.106537760 +0800 +@@ -95,10 +95,10 @@ distrib: $(ALL) + strip $(ALL) + + install: all +- $(INSTALL) -d $(bindir) +- $(INSTALL) -d $(libdir) +- $(INSTALL) -s $(TARGETS) $(libdir) +- $(INSTALL) -s $(PROGRAMS:%=%$(EXEEXT)) $(bindir) ++ $(INSTALL) -d $(DESTDIR)$(bindir) ++ $(INSTALL) -d $(DESTDIR)$(libdir) ++ $(INSTALL) -s $(TARGETS) $(DESTDIR)$(libdir) ++ $(INSTALL) -s $(PROGRAMS:%=%$(EXEEXT)) $(DESTDIR)$(bindir) + + .SUFFIXES: + .SUFFIXES: .c .cpp .lo .o .obj diff --git a/databases/palm-db-tools/files/patch-libflatfile-DB.cpp b/databases/palm-db-tools/files/patch-libflatfile-DB.cpp new file mode 100644 index 000000000000..57f6be92f2c9 --- /dev/null +++ b/databases/palm-db-tools/files/patch-libflatfile-DB.cpp @@ -0,0 +1,40 @@ +--- libflatfile/DB.cpp.orig Thu Jun 19 16:37:46 2003 ++++ libflatfile/DB.cpp +@@ -221,7 +221,7 @@ void PalmLib::FlatFile::DB::extract_list + throw PalmLib::error("list view is corrupt"); + + // Determine the length of the name string. +- pi_char_t* null_ptr = reinterpret_cast<pi_char_t*> ++ const pi_char_t* null_ptr = reinterpret_cast<const pi_char_t*> + (memchr(chunk.data() + 4, 0, 32)); + if (null_ptr) + lv.name = std::string((char *) (chunk.data() + 4), +@@ -511,7 +511,8 @@ + f.type = PalmLib::FlatFile::Field::LIST; + if (!field(j).argument().empty()) { + std::string data = field(j).argument(); +- unsigned int k, pos = 0; ++ unsigned int k; ++ size_t pos = 0; + pi_uint16_t itemID = *ptrs[j]; // TR: a list value is stored on 1 byte + + for (k = 0; k < itemID; k++) { +@@ -716,7 +717,8 @@ + case PalmLib::FlatFile::Field::LIST: + if (!field(i).argument().empty()) { + std::string data = field(i).argument(); +- unsigned int pos = 0, next, j = 0; ++ size_t pos = 0, next; ++ unsigned int j = 0; + pi_int16_t itemID = -1; + + while ( (next = data.find(charSeperator, pos)) != std::string::npos) { +@@ -920,7 +922,7 @@ + if (!field(i).argument().empty()) { + std::string data = field(i).argument(); + std::vector<std::string> items; +- unsigned int pos = 0, next; ++ size_t pos = 0, next; + std::vector<std::string>::iterator iter; + size = 2 + 2 * sizeof(pi_uint16_t); + while ( (next = data.find(charSeperator, pos)) != std::string::npos) { diff --git a/databases/palm-db-tools/files/patch-libflatfile-Database.cpp b/databases/palm-db-tools/files/patch-libflatfile-Database.cpp new file mode 100644 index 000000000000..5c28dbe529b6 --- /dev/null +++ b/databases/palm-db-tools/files/patch-libflatfile-Database.cpp @@ -0,0 +1,11 @@ +--- libflatfile/Database.cpp.orig 2012-11-30 14:43:18.000000000 +0100 ++++ libflatfile/Database.cpp 2012-11-30 14:48:11.000000000 +0100 +@@ -208,7 +208,7 @@ + // Ensure that the field numbers are within range. + for (PalmLib::FlatFile::ListView::const_iterator i = lv.begin(); + i != lv.end(); ++i) { +- if ((*i).field < 0 || (*i).field >= getNumOfFields()) ++ if ((*i).field >= getNumOfFields()) + return; + } + m_listviews.push_back(lv); diff --git a/databases/palm-db-tools/files/patch-libflatfile_JFile3.cpp b/databases/palm-db-tools/files/patch-libflatfile_JFile3.cpp new file mode 100644 index 000000000000..1a0cdbdcb540 --- /dev/null +++ b/databases/palm-db-tools/files/patch-libflatfile_JFile3.cpp @@ -0,0 +1,47 @@ +--- libflatfile/JFile3.cpp.orig 2003-06-19 23:37:46 UTC ++++ libflatfile/JFile3.cpp +@@ -454,7 +454,7 @@ PalmLib::FlatFile::JFile3::getOptions(vo + 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 @@ void PalmLib::FlatFile::JFile3::JFileApp + // Extract the field names. + for (i = 0; i < 20; ++i) { + /* Find the trailing null byte and extract the string. */ +- null_ptr = reinterpret_cast<pi_char_t*> (memchr(p, 0, 21)); ++ null_ptr = reinterpret_cast<const pi_char_t*> (memchr(p, 0, 21)); + if (null_ptr) + fieldNames[i] = std::string((char *) p, null_ptr - p); + else +@@ -518,7 +518,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + p += sizeof(pi_uint16_t); + + // Extract the string used last by Find. +- null_ptr = reinterpret_cast<pi_char_t*> (memchr(p, 0, 16)); ++ null_ptr = reinterpret_cast<const pi_char_t*> (memchr(p, 0, 16)); + if (null_ptr) + findString = std::string((char *) p, null_ptr - p); + else +@@ -526,7 +526,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + p += 16; + + // Extract the string used last by Filter. +- null_ptr = reinterpret_cast<pi_char_t*> (memchr(p, 0, 16)); ++ null_ptr = reinterpret_cast<const pi_char_t*> (memchr(p, 0, 16)); + if (null_ptr) + filterString = std::string((char *) p, null_ptr - p); + else +@@ -542,7 +542,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + p += sizeof(pi_uint16_t); + + // Extract the password (if any). +- null_ptr = reinterpret_cast<pi_char_t*> (memchr(p, 0, 12)); ++ null_ptr = reinterpret_cast<const pi_char_t*> (memchr(p, 0, 12)); + if (null_ptr) + password = std::string((char *) p, null_ptr - p); + else diff --git a/databases/palm-db-tools/files/patch-libflatfile_MobileDB.cpp b/databases/palm-db-tools/files/patch-libflatfile_MobileDB.cpp new file mode 100644 index 000000000000..b4341ae46323 --- /dev/null +++ b/databases/palm-db-tools/files/patch-libflatfile_MobileDB.cpp @@ -0,0 +1,11 @@ +--- libflatfile/MobileDB.cpp.orig 2003-06-19 23:37:46 UTC ++++ libflatfile/MobileDB.cpp +@@ -221,7 +221,7 @@ PalmLib::FlatFile::MobileDB::parse_recor + if (field + 1 > fields.size()) fields.resize(field + 1); + + // Now search for the end of the current field. +- pi_char_t* q = reinterpret_cast<pi_char_t*> ++ const pi_char_t* q = reinterpret_cast<const pi_char_t*> + (memchr(p, 0, rec.end() - p)); + if (!q) + throw PalmLib::error("field terminiator is missing"); diff --git a/databases/palm-db-tools/files/patch-libpalm-Block.h b/databases/palm-db-tools/files/patch-libpalm-Block.h new file mode 100644 index 000000000000..b8c80721154b --- /dev/null +++ b/databases/palm-db-tools/files/patch-libpalm-Block.h @@ -0,0 +1,11 @@ +--- libpalm/Block.h.orig Mon Dec 25 16:02:34 2006 ++++ libpalm/Block.h Mon Dec 25 16:02:56 2006 +@@ -176,7 +176,7 @@ + size_type m_size; + }; + +-}; ++} + + bool operator == (const PalmLib::Block& lhs, const PalmLib::Block& rhs); + diff --git a/databases/palm-db-tools/files/patch-libpalm-File.cpp b/databases/palm-db-tools/files/patch-libpalm-File.cpp new file mode 100644 index 000000000000..6b2f601b2a6a --- /dev/null +++ b/databases/palm-db-tools/files/patch-libpalm-File.cpp @@ -0,0 +1,11 @@ +--- libpalm/File.cpp.orig Thu Jun 19 16:37:47 2003 ++++ libpalm/File.cpp +@@ -270,7 +270,7 @@ + } + + if (m_sort_info.raw_size() > 0) { +- f.write((char *) m_sort_info.raw_size(), m_sort_info.raw_size()); ++ f.write((char *) m_sort_info.raw_data(), m_sort_info.raw_size()); + if (!f) + throw PalmLib::error("unable to write sort info block"); + } diff --git a/databases/palm-db-tools/files/patch-libpalm-File.h b/databases/palm-db-tools/files/patch-libpalm-File.h new file mode 100644 index 000000000000..16b990021c13 --- /dev/null +++ b/databases/palm-db-tools/files/patch-libpalm-File.h @@ -0,0 +1,10 @@ +--- libpalm/File.h.orig Mon Dec 25 16:02:24 2006 ++++ libpalm/File.h Mon Dec 25 16:02:30 2006 +@@ -89,6 +89,6 @@ + uid_map_t m_uid_map; + }; + +-}; ++} + + #endif diff --git a/databases/palm-db-tools/pkg-descr b/databases/palm-db-tools/pkg-descr new file mode 100644 index 000000000000..94369f946283 --- /dev/null +++ b/databases/palm-db-tools/pkg-descr @@ -0,0 +1,5 @@ +This package includes several utilities that let you convert text files in +CSV (comma-separated value) format to several flat-file database formats +used on PalmOS PDAs and back again. + +WWW: http://pilot-db.sourceforge.net/ |