Permalink
Browse files

app-pda/barry: Created ebuild for git master

  • Loading branch information...
1 parent fe17ba9 commit aec580af16c9ea9b3cdbe30ab9c6d8b78d6c1600 @bruceg committed Jan 4, 2012
View
@@ -0,0 +1,4 @@
+AUX 10-blackberry.rules 1983 RMD160 bea10908beef0558402b8a8888ebc0ea4e561562 SHA1 c94747478a616c67cd115662c7a5bb4ad6220611 SHA256 26d15257fc5f48089a1b8559e7ac93101bdbc4434e409214c67dda130f05159a
+AUX blacklist-berry_charge.conf 65 RMD160 5fbc61819a71cb266a93053c99d32ea2424c5683 SHA1 5320c555ecd5b844bb4db5a238538abc472b2516 SHA256 26003dcfdf7da0a677cbc72e01615fc694ccd2e884269da9a22d722f7549386e
+AUX libopensync-0.39.patch 3992 RMD160 87f2451f82e5904b0986ff078c6da8bec766686f SHA1 b56465ca53db962ff0460c54ec69bc9842cf5b10 SHA256 f42187227d93cacfed0740e73b87bcc3d9db6e0e39b32c845741159cfe92cdb8
+EBUILD barry-9999.ebuild 2666 RMD160 21e9d67cab2fca4fe7599ecdd941b06264bc9c9a SHA1 db001c602f85288c5f3d86b8578193674b655d36 SHA256 b195f6095f0a76d8b4d848fa9e74b15a22d887afe0b503990e10b2c181cd7357
@@ -0,0 +1,110 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-pda/barry/barry-0.17.1.ebuild,v 1.1 2011/04/13 07:10:36 dirtyepic Exp $
+
+EAPI="4"
+
+inherit autotools-utils bash-completion eutils git-2
+
+DESCRIPTION="Sync, backup, program management, and charging for BlackBerry devices"
+HOMEPAGE="http://www.netdirect.ca/software/packages/barry/"
+EGIT_REPO_URI="git://repo.or.cz/barry.git"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="boost doc gui opensync nls static-libs"
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-libs/libusb:0
+ dev-libs/openssl
+ sys-libs/zlib
+ >=dev-cpp/libxmlpp-2.6
+ >=dev-libs/libtar-1.2.11-r2
+ boost? ( >=dev-libs/boost-1.33 )
+ gui? ( dev-cpp/glibmm:2
+ dev-cpp/gtkmm:2.4
+ dev-cpp/libglademm:2.4 )
+ opensync? ( >=app-pda/libopensync-0.30 )"
+
+DEPEND="${RDEPEND}
+ >=dev-util/pkgconfig-0.9.0
+ doc? ( >=app-doc/doxygen-1.5.6 )
+ nls? ( >=sys-devel/gettext-0.17 )"
+
+DOCS=(AUTHORS DEPUTY ChangeLog NEWS README TODO)
+
+src_configure() {
+ epatch ${FILESDIR}/libopensync-0.39.patch
+ ./buildgen.sh
+ myeconfargs=(
+ $(use_enable boost)
+ $(use_enable gui)
+ $(use_enable nls)
+ $(use_enable opensync opensync-plugin-4x)
+ --disable-rpath
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ if use doc ; then
+ cd "${S}"
+ doxygen || die
+ fi
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ # docs
+ rm -rf "${S}"/doc/www/*.php
+ rm -rf "${S}"/doc/www/*.sh
+ find "${S}"/doc/www/doxygen/html -name "*.map" -size 0 -exec rm -f {} +
+
+ if use doc; then
+ dohtml "${S}"/doc/www/doxygen/html/*
+ fi
+
+ rm -rf "${S}"/doc/www
+ dodoc -r "${S}"/doc/*
+
+ # udev rules
+ insinto /lib/udev/rules.d
+ doins "${S}"/udev/10-blackberry.rules
+# doins "${S}"/udev/69-blackberry.rules
+ sed -i -e 's:plugdev:usb:g' "${S}"/udev/99-blackberry-perms.rules || die
+ doins "${S}"/udev/99-blackberry-perms.rules
+
+ # blacklist for BERRY_CHARGE kernel module
+ insinto /etc/modprobe.d
+ doins "${S}"/modprobe/blacklist-berry_charge.conf
+
+ # pppd options files
+ docinto "${DOCDIR}"/ppp/
+ dodoc "${S}"/ppp/*
+
+ BASHCOMPFILES="${S}/bash/btool ${S}/bash/bjavaloader"
+ dobashcompletion
+
+ if use gui; then
+ domenu "${S}"/menu/barrybackup.desktop || die
+ doicon "${S}"/logo/barry_logo_icon.png || die
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ elog "Barry requires you to be a member of the \"usb\" group."
+ einfo
+ bash-completion_pkg_postinst
+ ewarn
+ ewarn "Barry and the in-kernel module 'BERRY_CHARGE' are incompatible."
+ ewarn
+ ewarn "Kernel-based USB suspending can discharge your blackberry."
+ ewarn "Use at least kernel 2.6.22 and/or disable CONFIG_USB_SUSPEND."
+ ewarn
+}
@@ -0,0 +1,51 @@
+#
+# Blackberry devices
+#
+# Note: the following rules may appear wasteful, in that bcharge is run
+# twice: once for changing the mode, and once again after the
+# device resets itself to enter this mode. This is required
+# in order to support older kernels (approx. 2.6.20 to 2.6.22) with
+# CONFIG_USB_SUSPEND enabled. The second time bcharge is run
+# is when the -p argument comes into play, adjusting the device's
+# autosuspend settings.
+#
+# Note: SUBSYSTEM=="usb_device" is not reliably available on all kernels
+# and all versions of udev, so instead we use the very first
+# kernel message of: SUBSYSTEM=="usb", ENV{DEVTYPE}="usb_device"
+# (See the output of 'udevadm monitor --kernel')
+# Since the device is likely not created at this point, we
+# can't set permissions... so permissions are handled in the
+# generic 99-blackberry-perms.rules file.
+#
+
+#
+# Older devices that only use 0x0001 (no USB Mass Storage)
+#
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
+ ATTR{idVendor}=="0fca", ATTR{idProduct}=="0001", \
+ RUN="/usr/sbin/bcharge -p %p"
+
+#
+# Newer devices with USB Mass Storage:
+# 0x8007 usually get transformed into 0x8004
+# 0x8004 sometimes get transformed into 0x0004
+# 0x0006 usually get transformed into 0x0004
+#
+
+# 0x0006 turns into 0x0004, so no need to fiddle with autosuspend here
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
+ ATTR{idVendor}=="0fca", ATTR{idProduct}=="0006", \
+ RUN="/usr/sbin/bcharge"
+
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
+ ATTR{idVendor}=="0fca", ATTR{idProduct}=="8007", \
+ RUN="/usr/sbin/bcharge -p %p"
+
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
+ ATTR{idVendor}=="0fca", ATTR{idProduct}=="8004", \
+ RUN="/usr/sbin/bcharge -p %p"
+
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
+ ATTR{idVendor}=="0fca", ATTR{idProduct}=="0004", \
+ RUN="/usr/sbin/bcharge -p %p"
+
@@ -0,0 +1,3 @@
+# conflicts with Barry's bcharge utility
+blacklist berry_charge
+
@@ -0,0 +1,83 @@
+diff --git a/desktop/configure.ac b/desktop/configure.ac
+index c761374..91d0f8d 100644
+--- a/desktop/configure.ac
++++ b/desktop/configure.ac
+@@ -110,7 +110,7 @@ PKG_CHECK_MODULES([BARRY], [libbarry-0 libbarrysync-0])
+ PKG_CHECK_MODULES([GLIB2], [glib-2.0])
+ PKG_CHECK_MODULES([LIBXMLPP], [libxml++-2.6])
+ PKG_CHECK_MODULES([OPENSYNC22], [opensync-1.0], [], [OS22NOTFOUND=yes])
+-PKG_CHECK_MODULES([OPENSYNC40], [libopensync1], [], [OS40NOTFOUND=yes])
++PKG_CHECK_MODULES([OPENSYNC40], [libopensync], [], [OS40NOTFOUND=yes])
+
+ if test "$OS22NOTFOUND" = "yes" -a "$OS40NOTFOUND" = "yes" ; then
+ AC_MSG_ERROR(dnl
+diff --git a/desktop/src/os40.cc b/desktop/src/os40.cc
+index 64d2040..5b5c89c 100644
+--- a/desktop/src/os40.cc
++++ b/desktop/src/os40.cc
+@@ -40,13 +40,13 @@
+ #include <glib.h>
+
+ // use relative paths to backtrack enough to specify only 0.4x includes
+-#include <../libopensync1/opensync/opensync.h>
+-#include <../libopensync1/opensync/opensync-group.h>
+-#include <../libopensync1/opensync/opensync-format.h>
+-#include <../libopensync1/opensync/opensync-plugin.h>
+-#include <../libopensync1/opensync/opensync-engine.h>
+-#include <../libopensync1/opensync/opensync-data.h>
+-#include <../libopensync1/opensync/opensync-capabilities.h>
++#include <../libopensync/opensync/opensync.h>
++#include <../libopensync/opensync/opensync-group.h>
++#include <../libopensync/opensync/opensync-format.h>
++#include <../libopensync/opensync/opensync-plugin.h>
++#include <../libopensync/opensync/opensync-engine.h>
++#include <../libopensync/opensync/opensync-data.h>
++#include <../libopensync/opensync/opensync-capabilities.h>
+
+ using namespace std;
+ using namespace Barry;
+diff --git a/opensync-plugin-0.4x/configure.ac b/opensync-plugin-0.4x/configure.ac
+index 15416a9..c7146dd 100644
+--- a/opensync-plugin-0.4x/configure.ac
++++ b/opensync-plugin-0.4x/configure.ac
+@@ -27,7 +27,7 @@ AM_CONDITIONAL([WITH_GCCVISIBILITY], [test "$HAVE_C_GCCVISIBILITY" = "1" -a "$HA
+ AC_LANG([C++])
+
+ PKG_CHECK_MODULES([GLIB2], [glib-2.0])
+-PKG_CHECK_MODULES([OPENSYNC4X], [libopensync1])
++PKG_CHECK_MODULES([OPENSYNC4X], [libopensync])
+ PKG_CHECK_MODULES([BARRY], [libbarry-0])
+ PKG_CHECK_MODULES([BARRYSYNC], [libbarrysync-0])
+
+@@ -36,10 +36,10 @@ PKG_CHECK_MODULES([BARRYSYNC], [libbarrysync-0])
+ AC_SUBST(TREE_BUILD_CXXFLAGS)
+ AC_SUBST(TREE_BUILD_LDFLAGS)
+
+-OPENSYNC_CONFIGDIR=$(pkg-config --variable=configdir libopensync1)
+-OPENSYNC_PLUGINDIR=$(pkg-config --variable=plugindir libopensync1)
+-OPENSYNC_FORMATSDIR=$(pkg-config --variable=formatsdir libopensync1)
+-OPENSYNC_HEADERDIR=$(pkg-config --variable=headerdir libopensync1)
++OPENSYNC_CONFIGDIR=$(pkg-config --variable=configdir libopensync)
++OPENSYNC_PLUGINDIR=$(pkg-config --variable=plugindir libopensync)
++OPENSYNC_FORMATSDIR=$(pkg-config --variable=formatsdir libopensync)
++OPENSYNC_HEADERDIR=$(pkg-config --variable=headerdir libopensync)
+
+ AC_SUBST(OPENSYNC_CONFIGDIR) ## This is the place where you can install the default configuration files of your plugin
+ AC_SUBST(OPENSYNC_PLUGINDIR) ## This is the dir where you plugin will be installed
+diff --git a/opensync-plugin-0.4x/src/barry_sync.cc b/opensync-plugin-0.4x/src/barry_sync.cc
+index 9bb2b93..67393c5 100644
+--- a/opensync-plugin-0.4x/src/barry_sync.cc
++++ b/opensync-plugin-0.4x/src/barry_sync.cc
+@@ -1108,9 +1108,9 @@ osync_bool get_sync_info(OSyncPluginEnv *env, OSyncError **error)
+ osync_plugin_set_description(plugin, "Plugin to synchronize note, task, calendar and contact entries on USB Blackberry handhelds");
+
+ // Set the callback functions
+- osync_plugin_set_initialize_func(plugin, initialize);
+- osync_plugin_set_finalize_func(plugin, finalize);
+- osync_plugin_set_discover_func(plugin, discover);
++ osync_plugin_set_initialize(plugin, initialize);
++ osync_plugin_set_finalize(plugin, finalize);
++ osync_plugin_set_discover(plugin, discover);
+ osync_plugin_set_start_type(plugin, OSYNC_START_TYPE_PROCESS);
+
+ if( !osync_plugin_env_register_plugin(env, plugin, error) ) {

0 comments on commit aec580a

Please sign in to comment.