From 9c6b4dcbae61795501af0d73d0bb8f27aaa20881 Mon Sep 17 00:00:00 2001 From: Bernhard M. Wiedemann <bwiedemann@suse.de> Date: Sep 13 2019 14:29:36 +0000 Subject: restructure files to remain below github limit of 1000 entries --- diff --git a/gcc46_build_fix.patch b/gcc46_build_fix.patch new file mode 100644 index 0000000..508058f --- /dev/null +++ b/gcc46_build_fix.patch @@ -0,0 +1,10 @@ +--- libpalm/Block.h 2011-05-10 19:56:26.101382558 +0200 ++++ libpalm/Block.h 2011-05-10 20:01:04.927592457 +0200 +@@ -13,6 +13,7 @@ + + #include <algorithm> + #include <iterator> ++#include <cstddef> + + #include "palmtypes.h" + diff --git a/palm-db-tools-0.3.6-gcc.diff b/palm-db-tools-0.3.6-gcc.diff new file mode 100644 index 0000000..0eb306c --- /dev/null +++ b/palm-db-tools-0.3.6-gcc.diff @@ -0,0 +1,42 @@ +--- configure.in ++++ configure.in +@@ -60,7 +60,7 @@ + + if test "x$warnings" = "xyes"; then + if test "x$ac_cv_prog_gxx" = "xyes"; then +- CXXFLAGS="-ansi -pedantic $CXXFLAGS -Wall -Werror" ++ CXXFLAGS="-ansi -pedantic $CXXFLAGS -Wall" + fi + fi + +--- libpalm/Block.h ++++ libpalm/Block.h +@@ -176,7 +176,7 @@ + size_type m_size; + }; + +-}; ++} + + bool operator == (const PalmLib::Block& lhs, const PalmLib::Block& rhs); + +--- libpalm/File.h ++++ libpalm/File.h +@@ -89,6 +89,6 @@ + uid_map_t m_uid_map; + }; + +-}; ++} + + #endif +--- libsupport/csvfile.cpp ++++ libsupport/csvfile.cpp +@@ -4,6 +4,7 @@ + #include <fstream> + #include <sstream> + #include <string> ++#include <cstring> + #include <stdexcept> + #include <utility> + diff --git a/palm-db-tools-0.3.6-type-fix.diff b/palm-db-tools-0.3.6-type-fix.diff new file mode 100644 index 0000000..454781f --- /dev/null +++ b/palm-db-tools-0.3.6-type-fix.diff @@ -0,0 +1,98 @@ +--- libflatfile/DB.cpp ++++ libflatfile/DB.cpp +@@ -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<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; ++ std::string::size_type 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; ++ unsigned int j = 0; ++ std::string::size_type pos = 0, next; + 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; ++ std::string::size_type 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) { +--- libflatfile/JFile3.cpp ++++ libflatfile/JFile3.cpp +@@ -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<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 @@ + 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 @@ + 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 @@ + 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 +--- libflatfile/MobileDB.cpp ++++ libflatfile/MobileDB.cpp +@@ -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<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/palm-db-tools.changes b/palm-db-tools.changes new file mode 100644 index 0000000..bf174a8 --- /dev/null +++ b/palm-db-tools.changes @@ -0,0 +1,91 @@ +------------------------------------------------------------------- +Sat Jan 12 13:53:15 UTC 2013 - coolo@suse.com + +- remove suse_update_config + +------------------------------------------------------------------- +Sun Nov 27 06:53:22 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- +Tue May 10 18:03:15 UTC 2011 - cgiboudeaux@gmx.com + +- Add gcc46_build_fix.patch + +------------------------------------------------------------------- +Thu Jun 11 14:08:51 CEST 2009 - nadvornik@novell.com + +- fixed to compile with new gcc +- removed obsolete macro %run_ldconfig + +------------------------------------------------------------------- +Wed Oct 24 11:26:25 CEST 2007 - nadvornik@suse.cz + +- added missing includes + +------------------------------------------------------------------- +Wed Jan 25 21:39:13 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Mon Jan 23 23:44:59 CET 2006 - schwab@suse.de + +- Don't strip binaries. + +------------------------------------------------------------------- +Wed Apr 27 12:14:28 CEST 2005 - postadal@suse.cz + +- fixed for gcc 4.0 + +------------------------------------------------------------------- +Sat Jan 10 15:22:24 CET 2004 - adrian@suse.de + +- add %defattr and %run_ldconfig + +------------------------------------------------------------------- +Fri Aug 22 14:05:59 CEST 2003 - postadal@suse.cz + +- fixed data type (type-fix.diff) +- build libflatfile.a with -fPIC + +------------------------------------------------------------------- +Thu Jul 31 12:18:56 CEST 2003 - ro@suse.de + +- try to fix installation (urgs...) + +------------------------------------------------------------------- +Mon Jul 28 12:31:10 CEST 2003 - postadal@suse.cz + +- updated to version 0.3.6 +- removed obsoleted patches (c++, gcc, makefile) + +------------------------------------------------------------------- +Wed Jan 22 17:44:13 CET 2003 - postadal@suse.cz + +- updated to version 0.3.5 + * note, link, linked field Type support +- fix to compile with gcc3.2 + +------------------------------------------------------------------- +Thu Jan 31 16:59:33 CET 2002 - schwab@suse.de + +- Fix for gcc3. + +------------------------------------------------------------------- +Wed Oct 7 09:35:56 CEST 2001 - tcrhak@suse.cz + +- added -a to automake (needed by automake 1.5-4) + +------------------------------------------------------------------- +Fri Aug 10 10:23:16 CEST 2001 - adostal@suse.cz + +- update to version 0.3.2 (stable) +- add makefile patch + +------------------------------------------------------------------- +Mon Jun 4 11:41:19 CEST 2001 - pblaha@suse.cz + +- create this package version 0.3.2 + diff --git a/palm-db-tools.dif b/palm-db-tools.dif new file mode 100644 index 0000000..c167a59 --- /dev/null +++ b/palm-db-tools.dif @@ -0,0 +1,17 @@ +--- flatfile/Makefile.in ++++ flatfile/Makefile.in +@@ -95,10 +95,10 @@ + 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) $(TARGETS) $(DESTDIR)$(libdir) ++ $(INSTALL) $(PROGRAMS:%=%$(EXEEXT)) $(DESTDIR)$(bindir) + + .SUFFIXES: + .SUFFIXES: .c .cpp .lo .o .obj diff --git a/palm-db-tools.spec b/palm-db-tools.spec new file mode 100644 index 0000000..33f4381 --- /dev/null +++ b/palm-db-tools.spec @@ -0,0 +1,83 @@ +# +# spec file for package palm-db-tools +# +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: palm-db-tools +BuildRequires: gcc-c++ +BuildRequires: libtool +Version: 0.3.6 +Release: 0 +Source: %{name}-%{version}.tar.bz2 +Patch: %{name}.dif +Patch1: %{name}-%{version}-type-fix.diff +Patch2: %{name}-%{version}-gcc.diff +Patch3: gcc46_build_fix.patch +Url: http://pilot-db.sourceforge.net// +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Summary: convert text files into several PalmOS database formats +License: GPL-2.0+ +Group: Hardware/Palm + +%description +The palm-db-tools package convert text files to several flat-file +database formats. The currently supported formats are: DB +http://pilot-db.sourceforge.net/ MobileDB +http://www.mobilegeneration.com/products/mobiledb/ List +http://www.magma.ca/~roo/list/list.html JFile v3.x (v4.x will be +supported later) http://www.land-j.com/jfile.html + +%prep +%setup -n %{name} +%patch +%patch1 +%patch2 +%patch3 +#convert dos2unix file format +cat configure.in | tr -d '\015' >configure.in.new && mv -f configure.in.new configure.in + +%build +libtoolize --force +autoreconf --install --force +chmod a+x configure +CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS -Wno-deprecated -fPIC" \ +./configure --prefix=/usr \ + --exec_prefix=/usr \ + --bindir=/usr/bin \ + --sysconfdir=%{_sysconfdir} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + --libdir=/usr/%_lib +make %{?jobs:-j%jobs} + +%install +make DESTDIR=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc README NEWS ChangeLog TODO docs/manual.txt +/usr/%_lib/libpdbtools.so +/usr/bin/csv2pdb +/usr/bin/pdb2csv + +%changelog