6 changed files with 205 additions and 0 deletions
@ -0,0 +1 @@
|
||||
bc11ac297b3cb010be904c72789695543ee3fdf3d75cdc8225fd371385af4e61 libdbus-c++-0.9.0.tar.gz |
@ -0,0 +1,126 @@
|
||||
#!/bin/bash |
||||
# Build script for Slackware |
||||
# Copyright (C) 2018 Damien Goutte-Gattat |
||||
# |
||||
# Redistribution and use of this script, with or without modifications, |
||||
# is permitted provided that the following conditions are met: |
||||
# |
||||
# 1. Redistributions of this script must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR |
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||||
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, |
||||
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
||||
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
||||
# POSSIBILITY OF SUCH DAMAGE. |
||||
# |
||||
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org> |
||||
# |
||||
# Latest libdbus-c++ sourcecode is available at: |
||||
# <https://sourceforge.net/projects/dbus-cplusplus>. |
||||
|
||||
# Source package infos |
||||
NAMESRC=${NAMESRC:-libdbus-c++} |
||||
VERSION=${VERSION:-0.9.0} |
||||
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
||||
WGET=${WGET:-https://download.sourceforge.net/project/dbus-cplusplus/dbus-c++/$VERSION/$ARCHIVE} |
||||
|
||||
# Build infos |
||||
NAMEPKG=${NAMEPKG:-libdbus-c++} |
||||
BUILD=${BUILD:-1GGD} |
||||
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')} |
||||
JOBS=${JOBS:-1} |
||||
EXT=${EXT:-txz} |
||||
|
||||
# Directories |
||||
TMP=${TMP:-/tmp} |
||||
OUT=${OUT:-$TMP/build} |
||||
PKG=${PKG:-$OUT/$NAMEPKG} |
||||
CWD=$(pwd) |
||||
|
||||
set -e # Quit if a command returns non-zero |
||||
|
||||
# Sanity checks |
||||
if [ $UID -eq 0 ]; then |
||||
echo "You should NOT run this script as ROOT!" |
||||
exit 1 |
||||
fi |
||||
if [ ! -d $TMP ]; then |
||||
echo "$TMP does not exists or is not a directory!" |
||||
exit 1 |
||||
fi |
||||
|
||||
# Compilation flags |
||||
LIBDIRSUFFIX="" |
||||
case "$ARCH" in |
||||
i?86) |
||||
CPUOPT="-O2 -march=$ARCH -mtune=i686" |
||||
;; |
||||
x86_64) |
||||
CPUOPT="-O2 -fPIC" |
||||
LIBDIRSUFFIX="64" |
||||
;; |
||||
*) |
||||
CPUOPT="-O2" |
||||
;; |
||||
esac |
||||
|
||||
# Get and verify the source archive |
||||
if [ ! -r $ARCHIVE ]; then |
||||
wget -c -O $ARCHIVE.part "$WGET" |
||||
mv $ARCHIVE.part $ARCHIVE |
||||
fi |
||||
sha256sum -c $ARCHIVE.sha256 |
||||
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
||||
|
||||
# Compile |
||||
cd $TMP |
||||
echo "Building $ARCHIVE..." |
||||
tar xf $CWD/$ARCHIVE |
||||
cd $NAME |
||||
# Apply patches from the Ring project |
||||
for p in $CWD/patches/*.patch ; do |
||||
patch -p 1 < $p |
||||
done |
||||
CFLAGS=$CPUOPT \ |
||||
CXXFLAGS=$CPUOPT \ |
||||
./configure \ |
||||
--prefix=/usr \ |
||||
--libdir=/usr/lib$LIBDIRSUFFIX \ |
||||
--sysconfdir=/etc \ |
||||
--localstatedir=/var \ |
||||
--build=$ARCH-slackware-linux \ |
||||
--disable-static \ |
||||
--disable-ecore \ |
||||
--disable-examples \ |
||||
--disable-tests |
||||
make -j $JOBS |
||||
make install-strip DESTDIR=$PKG |
||||
|
||||
# Install the documentation |
||||
mkdir -p $PKG/usr/doc/$NAME |
||||
install -m 644 AUTHORS COPYING README TODO $PKG/usr/doc/$NAME |
||||
|
||||
# Copy slack-desc file |
||||
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
||||
|
||||
# Package the tree |
||||
cd $PKG |
||||
mkdir -p $OUT |
||||
PACKAGING=" |
||||
chown root:root . -R |
||||
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT |
||||
rm -rf $PKG |
||||
rm -rf $TMP/$NAME |
||||
" |
||||
if type -p fakeroot ; then |
||||
echo "$PACKAGING" | fakeroot |
||||
else |
||||
su -c "$PACKAGING" |
||||
fi |
@ -0,0 +1,12 @@
|
||||
diff --git a/include/dbus-c++/eventloop-integration.h b/include/dbus-c++/eventloop-integration.h
|
||||
index 1b0302e..3e44304 100644
|
||||
--- a/include/dbus-c++/eventloop-integration.h
|
||||
+++ b/include/dbus-c++/eventloop-integration.h
|
||||
@@ -26,6 +26,7 @@
|
||||
#define __DBUSXX_EVENTLOOP_INTEGRATION_H
|
||||
|
||||
#include <errno.h>
|
||||
+#include <unistd.h>
|
||||
#include "api.h"
|
||||
#include "dispatcher.h"
|
||||
#include "util.h"
|
@ -0,0 +1,45 @@
|
||||
--- libdbus-c++-0.9.0/include/dbus-c++/dispatcher.h.threading 2017-02-15 13:40:53.796004263 +0000
|
||||
+++ libdbus-c++-0.9.0/include/dbus-c++/dispatcher.h 2017-02-15 13:40:46.907000493 +0000
|
||||
@@ -188,6 +188,7 @@
|
||||
/* classes for multithreading support
|
||||
*/
|
||||
|
||||
+#if 0
|
||||
class DXXAPI Mutex
|
||||
{
|
||||
public:
|
||||
@@ -243,9 +244,11 @@
|
||||
typedef bool (*CondVarWaitTimeoutFn)(CondVar *cv, Mutex *mx, int timeout);
|
||||
typedef void (*CondVarWakeOneFn)(CondVar *cv);
|
||||
typedef void (*CondVarWakeAllFn)(CondVar *cv);
|
||||
+#endif
|
||||
|
||||
void DXXAPI _init_threading();
|
||||
|
||||
+#if 0
|
||||
void DXXAPI _init_threading(
|
||||
MutexNewFn, MutexFreeFn, MutexLockFn, MutexUnlockFn,
|
||||
CondVarNewFn, CondVarFreeFn, CondVarWaitFn, CondVarWaitTimeoutFn, CondVarWakeOneFn, CondVarWakeAllFn
|
||||
@@ -312,6 +315,7 @@
|
||||
cv->wake_all();
|
||||
}
|
||||
};
|
||||
+#endif
|
||||
|
||||
} /* namespace DBus */
|
||||
|
||||
--- libdbus-c++-0.9.0/src/dispatcher.cpp.threading 2017-02-15 13:48:22.627249868 +0000
|
||||
+++ libdbus-c++-0.9.0/src/dispatcher.cpp 2017-02-15 13:48:29.164253445 +0000
|
||||
@@ -253,6 +253,7 @@
|
||||
#endif//DBUS_HAS_THREADS_INIT_DEFAULT
|
||||
}
|
||||
|
||||
+#if 0
|
||||
void DBus::_init_threading(
|
||||
MutexNewFn m1,
|
||||
MutexFreeFn m2,
|
||||
@@ -318,3 +319,4 @@
|
||||
#endif//DBUS_HAS_RECURSIVE_MUTEX
|
||||
dbus_threads_init(&functions);
|
||||
}
|
||||
+#endif
|
@ -0,0 +1,9 @@
|
||||
--- libdbus-c++-0.9.0/src/pipe.cpp.writechar 2017-02-16 11:07:13.591950169 +0000
|
||||
+++ libdbus-c++-0.9.0/src/pipe.cpp 2017-02-16 11:04:17.158796092 +0000
|
||||
@@ -83,5 +83,5 @@
|
||||
void Pipe::signal()
|
||||
{
|
||||
// TODO: ignoring return of read/write generates warning; maybe relevant for eventloop work...
|
||||
- ::write(_fd_write, '\0', 1);
|
||||
+ ::write(_fd_write, "", 1);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
|-----handy-ruler-----------------------------------------------------| |
||||
libdbus-c++: libdbus-c++ (C++ interface for DBus) |
||||
libdbus-c++: |
||||
libdbus-c++: DBus-c++ attempts to provide a C++ API for D-BUS. The library has a |
||||
libdbus-c++: glib/gtk and an Ecore mainloop integration. It also offers an |
||||
libdbus-c++: optional own main loop. |
||||
libdbus-c++: |
||||
libdbus-c++: |
||||
libdbus-c++: |
||||
libdbus-c++: |
||||
libdbus-c++: |
||||
libdbus-c++: |
Loading…
Reference in new issue