summaryrefslogtreecommitdiff
path: root/libraries/barry
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2016-02-06 22:23:25 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-02-07 15:06:56 +0700
commit2de8614619fff4b70366a455899e3136f0b38bef (patch)
tree7284e851ac1d3c64757d922a8a9dad0f67e1d061 /libraries/barry
parentccea84b9da65c4289468e5d2bc6da0e2729d0cc7 (diff)
downloadslackbuilds-2de8614619fff4b70366a455899e3136f0b38bef.tar.gz
libraries/barry: Fix build on 14.2.
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'libraries/barry')
-rw-r--r--libraries/barry/README6
-rw-r--r--libraries/barry/barry.SlackBuild24
-rw-r--r--libraries/barry/c++11.patch240
-rw-r--r--libraries/barry/fix-sizeof-use.patch30
4 files changed, 280 insertions, 20 deletions
diff --git a/libraries/barry/README b/libraries/barry/README
index b9b10a51d5..03263749ba 100644
--- a/libraries/barry/README
+++ b/libraries/barry/README
@@ -3,8 +3,4 @@ comes with a command line tool for exploring the device and a GUI for making
quick backups. This project's goal is to create a fully functional syncing
mechanism on Linux.
-FYI, this slackbuild can take a variable of OPENSYNC (in addition to the
-standard ARCH, TMP, BUILD, etc.), by default compiling barry with opensync
-is disabled. passing OPENSYNC=<anything that isn't 'no'> will compile barry
-with opensync support, which will require that opensync already be installed
-(libopensync is in the SBo repository as well)
+This optionally depends on libxml++ for the ALX parser.
diff --git a/libraries/barry/barry.SlackBuild b/libraries/barry/barry.SlackBuild
index 589c174854..7948654cda 100644
--- a/libraries/barry/barry.SlackBuild
+++ b/libraries/barry/barry.SlackBuild
@@ -7,16 +7,13 @@
## http://sourceforge.net/projects/barry/
##
## Written by "Vincent Batts <vbatts@batts.mine.nu>"
-##
-## opensync consideration added thanks
-## to "Heinz Wiesinger <HMWiesinger@gmx.at>"
# Modified by Robby Workman <rworkman@slackbuilds.org>
# Modified by Mario Preksavec <mario@slackware.hr>
PRGNAM=barry
VERSION=${VERSION:-0.18.3}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -37,14 +34,6 @@ OUTPUT=${OUTPUT:-/tmp}
# BARRY_GROUP=barry ./barry.SlackBuild
BARRY_GROUP=${BARRY_GROUP:-plugdev}
-# Enable opensync-plugin?
-OPENSYNC=${OPENSYNC:-no}
-
-case "$OPENSYNC" in
- no) opensync_opt="dis" ;;
- *) opensync_opt="en" ;;
-esac
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -77,8 +66,14 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+# Debian fixes
+patch -p1 -i $CWD/fix-sizeof-use.patch
+
+# Fix C++11 compatibilty (taken from Arch)
+patch -p1 -i $CWD/c++11.patch
+
+CFLAGS="$SLKCFLAGS -std=c++11" \
+CXXFLAGS="$SLKCFLAGS -std=c++11" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -86,7 +81,6 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-static \
--enable-boost \
--enable-gui \
- --${opensync_opt}able-opensync-plugin \
--build=$ARCH-slackware-linux
make
diff --git a/libraries/barry/c++11.patch b/libraries/barry/c++11.patch
new file mode 100644
index 0000000000..89373392c6
--- /dev/null
+++ b/libraries/barry/c++11.patch
@@ -0,0 +1,240 @@
+diff -Nur original/desktop/src/xmlmap.cc modified/desktop/src/xmlmap.cc
+--- original/desktop/src/xmlmap.cc 2013-04-05 07:49:43.000000000 +0100
++++ modified/desktop/src/xmlmap.cc 2015-10-24 17:02:59.792298395 +0100
+@@ -540,14 +540,14 @@
+ np.SortBySummary();
+ cout << "\n\nCute summary:\n";
+ for_each(np.begin(), np.priority_end(),
+- bind( mem_fn(&XmlNodeMapping::DumpSummaries),
+- _1, ref(cout)));
++ std::bind( std::mem_fn(&XmlNodeMapping::DumpSummaries),
++ _1, std::ref(cout)));
+
+ np.SortByPath();
+ cout << "\n\nCute summary:\n";
+ for_each(np.begin(), np.priority_end(),
+- bind( mem_fn(&XmlNodeMapping::DumpSummaries),
+- _1, ref(cout)));
++ std::bind( std::mem_fn(&XmlNodeMapping::DumpSummaries),
++ _1, std::ref(cout)));
+ }
+ catch( Glib::ConvertError &e ) {
+ cerr << e.what() << endl;
+diff -Nur original/tools/bio.cc modified/tools/bio.cc
+--- original/tools/bio.cc 2013-04-05 07:49:43.000000000 +0100
++++ modified/tools/bio.cc 2015-10-24 16:50:04.487574052 +0100
+@@ -869,7 +869,7 @@
+ class App
+ {
+ public:
+- typedef shared_ptr<OutputBase> OutputPtr;
++ typedef std::shared_ptr<OutputBase> OutputPtr;
+ typedef vector<OutputPtr> OutputsType;
+
+ private:
+diff -Nur original/tools/btool.cc modified/tools/btool.cc
+--- original/tools/btool.cc 2013-04-05 07:49:43.000000000 +0100
++++ modified/tools/btool.cc 2015-10-24 16:50:04.487574052 +0100
+@@ -284,7 +284,7 @@
+ }
+ };
+
+-shared_ptr<Parser> GetParser(const string &name,
++std::shared_ptr<Parser> GetParser(const string &name,
+ const string &filename,
+ bool null_parser,
+ bool immediate_display,
+@@ -296,139 +296,139 @@
+
+ if( null_parser ) {
+ // use null parser
+- return shared_ptr<Parser>( new Barry::HexDumpParser(cout) );
++ return std::shared_ptr<Parser>( new Barry::HexDumpParser(cout) );
+ }
+ else if( bbackup_mode ) {
+ #ifdef __BARRY_BACKUP_MODE__
+ // Only one backup file per run
+- static shared_ptr<Parser> backup;
++ static std::shared_ptr<Parser> backup;
+ if( !backup.get() ) {
+ backup.reset( new Backup(filename) );
+ }
+ return backup;
+ #else
+- return shared_ptr<Parser>( new Barry::HexDumpParser(cout) );
++ return std::shared_ptr<Parser>( new Barry::HexDumpParser(cout) );
+ #endif
+ }
+ // check for recognized database names
+ else if( name == Contact::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<Contact, Store<Contact> > (
+ new Store<Contact>(filename, false, dnow, vmode)));
+ }
+ else if( name == Message::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<Message, Store<Message> > (
+ new Store<Message>(filename, false, dnow, vmode)));
+ }
+ else if( name == Calendar::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<Calendar, Store<Calendar> > (
+ new Store<Calendar>(filename, false, dnow, vmode)));
+ }
+ else if( name == CalendarAll::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<CalendarAll, Store<CalendarAll> > (
+ new Store<CalendarAll>(filename, false, dnow, vmode)));
+ }
+ else if( name == CallLog::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<CallLog, Store<CallLog> > (
+ new Store<CallLog>(filename, false, dnow, vmode)));
+ }
+ else if( name == Bookmark::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<Bookmark, Store<Bookmark> > (
+ new Store<Bookmark>(filename, false, dnow, vmode)));
+ }
+ else if( name == ServiceBook::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<ServiceBook, Store<ServiceBook> > (
+ new Store<ServiceBook>(filename, false, dnow, vmode)));
+ }
+
+ else if( name == Memo::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<Memo, Store<Memo> > (
+ new Store<Memo>(filename, false, dnow, vmode)));
+ }
+ else if( name == Task::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<Task, Store<Task> > (
+ new Store<Task>(filename, false, dnow, vmode)));
+ }
+ else if( name == PINMessage::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<PINMessage, Store<PINMessage> > (
+ new Store<PINMessage>(filename, false, dnow, vmode)));
+ }
+ else if( name == SavedMessage::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<SavedMessage, Store<SavedMessage> > (
+ new Store<SavedMessage>(filename, false, dnow, vmode)));
+ }
+ else if( name == Sms::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<Sms, Store<Sms> > (
+ new Store<Sms>(filename, false, dnow, vmode)));
+ }
+ else if( name == Folder::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<Folder, Store<Folder> > (
+ new Store<Folder>(filename, false, dnow, vmode)));
+ }
+ else if( name == TimeZone::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<TimeZone, Store<TimeZone> > (
+ new Store<TimeZone>(filename, false, dnow, vmode)));
+ }
+ else if( name == HandheldAgent::GetDBName() ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<HandheldAgent, Store<HandheldAgent> > (
+ new Store<HandheldAgent>(filename, false, dnow, vmode)));
+ }
+ else {
+ // unknown database, use null parser
+- return shared_ptr<Parser>( new Barry::HexDumpParser(cout) );
++ return std::shared_ptr<Parser>( new Barry::HexDumpParser(cout) );
+ }
+ }
+
+-shared_ptr<Builder> GetBuilder(const string &name, const string &filename)
++std::shared_ptr<Builder> GetBuilder(const string &name, const string &filename)
+ {
+ // check for recognized database names
+ if( name == Contact::GetDBName() ) {
+- return shared_ptr<Builder>(
++ return std::shared_ptr<Builder>(
+ new RecordBuilder<Contact, Store<Contact> > (
+ new Store<Contact>(filename, true, true, false)));
+ }
+ else if( name == Calendar::GetDBName() ) {
+- return shared_ptr<Builder>(
++ return std::shared_ptr<Builder>(
+ new RecordBuilder<Calendar, Store<Calendar> > (
+ new Store<Calendar>(filename, true, true, false)));
+ }
+ else if( name == CalendarAll::GetDBName() ) {
+- return shared_ptr<Builder>(
++ return std::shared_ptr<Builder>(
+ new RecordBuilder<CalendarAll, Store<CalendarAll> > (
+ new Store<CalendarAll>(filename, true, true, false)));
+ }
+ else if( name == Memo::GetDBName() ) {
+- return shared_ptr<Builder>(
++ return std::shared_ptr<Builder>(
+ new RecordBuilder<Memo, Store<Memo> > (
+ new Store<Memo>(filename, true, true, false)));
+ }
+ else if( name == Task::GetDBName() ) {
+- return shared_ptr<Builder>(
++ return std::shared_ptr<Builder>(
+ new RecordBuilder<Task, Store<Task> > (
+ new Store<Task>(filename, true, true, false)));
+ }
+ /*
+ else if( name == "Messages" ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<Message, Store<Message> > (
+ new Store<Message>(filename, true, true, false)));
+ }
+ else if( name == "Service Book" ) {
+- return shared_ptr<Parser>(
++ return std::shared_ptr<Parser>(
+ new RecordParser<ServiceBook, Store<ServiceBook> > (
+ new Store<ServiceBook>(filename, true, true, false)));
+ }
+@@ -942,7 +942,7 @@
+ }
+
+ unsigned int id = desktop.GetDBID(dbNames[0]);
+- shared_ptr<Parser> parse = GetParser(dbNames[0],filename,
++ std::shared_ptr<Parser> parse = GetParser(dbNames[0],filename,
+ null_parser, true, vformat_mode, bbackup_mode);
+
+ for( unsigned int i = 0; i < stCommands.size(); i++ ) {
+@@ -968,7 +968,7 @@
+ vector<string>::iterator b = dbNames.begin();
+
+ for( ; b != dbNames.end(); b++ ) {
+- shared_ptr<Parser> parse = GetParser(*b,
++ std::shared_ptr<Parser> parse = GetParser(*b,
+ filename, null_parser, !sort_records,
+ vformat_mode, bbackup_mode);
+ unsigned int id = desktop.GetDBID(*b);
+@@ -1000,7 +1000,7 @@
+ vector<string>::iterator b = saveDbNames.begin();
+
+ for( ; b != saveDbNames.end(); b++ ) {
+- shared_ptr<Builder> build = GetBuilder(*b,
++ std::shared_ptr<Builder> build = GetBuilder(*b,
+ filename);
+ unsigned int id = desktop.GetDBID(*b);
+ desktop.SaveDatabase(id, *build);
diff --git a/libraries/barry/fix-sizeof-use.patch b/libraries/barry/fix-sizeof-use.patch
new file mode 100644
index 0000000000..a3d516e3a3
--- /dev/null
+++ b/libraries/barry/fix-sizeof-use.patch
@@ -0,0 +1,30 @@
+Description: Fix sizeof(pointer) to be sizeof(buffer_pointed_to)
+Author: Olly Betts <olly@survex.com>
+Forwarded: no
+Last-Update: 2014-08-14
+
+--- a/src/vformat.c
++++ b/src/vformat.c
+@@ -1881,11 +1881,11 @@
+
+ //static unsigned char _evc_base64_rank[256];
+
+-static void base64_init(char *rank)
++static void base64_init(char *rank, size_t len)
+ {
+ int i;
+
+- memset(rank, 0xff, sizeof(rank));
++ memset(rank, 0xff, len);
+ for (i=0;i<64;i++) {
+ rank[(unsigned int)base64_alphabet[i]] = i;
+ }
+@@ -2011,7 +2011,7 @@
+ static size_t base64_decode_step(const unsigned char *in, size_t len, unsigned char *out, int *state, unsigned int *save)
+ {
+ unsigned char base64_rank[256];
+- base64_init((char*)base64_rank);
++ base64_init((char*)base64_rank, sizeof(base64_rank));
+
+ register const unsigned char *inptr;
+ register unsigned char *outptr;