summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2009-01-17 11:49:25 +0000
committerAlin Năstac <mrness@gentoo.org>2009-01-17 11:49:25 +0000
commitf4035ec75c3c06fb91bc47741dfac0c26835b108 (patch)
tree80b924dbbabded31bcc8600a4d99b08286c7593f /app-mobilephone/gammu
parentfix ChangeLog header (diff)
downloadgentoo-2-f4035ec75c3c06fb91bc47741dfac0c26835b108.tar.gz
gentoo-2-f4035ec75c3c06fb91bc47741dfac0c26835b108.tar.bz2
gentoo-2-f4035ec75c3c06fb91bc47741dfac0c26835b108.zip
Version bump (#254391).
(Portage version: 2.1.4.5)
Diffstat (limited to 'app-mobilephone/gammu')
-rw-r--r--app-mobilephone/gammu/ChangeLog11
-rw-r--r--app-mobilephone/gammu/files/gammu-1.22.1-debug-test.patch121
-rw-r--r--app-mobilephone/gammu/gammu-1.17.0.ebuild55
-rw-r--r--app-mobilephone/gammu/gammu-1.22.1.ebuild (renamed from app-mobilephone/gammu/gammu-1.18.0.ebuild)28
4 files changed, 150 insertions, 65 deletions
diff --git a/app-mobilephone/gammu/ChangeLog b/app-mobilephone/gammu/ChangeLog
index d5068aa1a7a0..72235ad19ccc 100644
--- a/app-mobilephone/gammu/ChangeLog
+++ b/app-mobilephone/gammu/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-mobilephone/gammu
-# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/gammu/ChangeLog,v 1.59 2008/11/08 13:16:28 nixnut Exp $
+# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/gammu/ChangeLog,v 1.60 2009/01/17 11:49:24 mrness Exp $
+
+*gammu-1.22.1 (17 Jan 2009)
+
+ 17 Jan 2009; Alin Năstac <mrness@gentoo.org>
+ +files/gammu-1.22.1-debug-test.patch, -gammu-1.17.0.ebuild,
+ -gammu-1.18.0.ebuild, +gammu-1.22.1.ebuild:
+ Version bump (#254391).
08 Nov 2008; nixnut <nixnut@gentoo.org> gammu-1.20.0-r1.ebuild:
Stable on ppc wrt bug 231597
diff --git a/app-mobilephone/gammu/files/gammu-1.22.1-debug-test.patch b/app-mobilephone/gammu/files/gammu-1.22.1-debug-test.patch
new file mode 100644
index 000000000000..850823721f33
--- /dev/null
+++ b/app-mobilephone/gammu/files/gammu-1.22.1-debug-test.patch
@@ -0,0 +1,121 @@
+diff -Nru gammu-1.22.1.orig/tests/debug.c gammu-1.22.1/tests/debug.c
+--- gammu-1.22.1.orig/tests/debug.c 2008-11-13 08:50:32.000000000 +0000
++++ gammu-1.22.1/tests/debug.c 2009-01-17 11:43:26.000000000 +0000
+@@ -1,17 +1,24 @@
+ #include <gammu.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+-#include <assert.h>
+
+ GSM_StateMachine *s;
+
+ #ifdef WIN32
+ # define NUL "NUL"
++char debug_filename[] = ".\\gammu-debug-test.log";
+ #else
+ # define NUL "/dev/null"
++char debug_filename[] = "./gammu-debug-test.log";
+ #endif
+
+-char debug_filename[] = "gammu-debug-test-XXXXXX";
++#define assert(val) \
++{ \
++ if (!(val)) {\
++ fprintf(stderr, "Test \"%s\" failed!\n", ""#val); \
++ exit(2); \
++ } \
++}
+
+ NORETURN void fail(int errcode)
+ {
+@@ -57,9 +64,6 @@
+ int main(int argc UNUSED, char **argv UNUSED)
+ {
+ FILE *debug_file;
+-#ifndef WIN32
+- int debug_fd;
+-#endif
+ GSM_Debug_Info *di_sm, *di_global;
+
+ /* Allocates state machine */
+@@ -69,16 +73,6 @@
+ fail(1);
+ }
+
+-#ifndef WIN32
+- /* Create file for logs */
+- debug_fd = mkstemp(debug_filename);
+- if (debug_fd == -1) {
+- printf("Could not create temporary file!\n");
+- fail(2);
+- }
+- close(debug_fd);
+-#endif
+-
+ /* Get debug handles */
+ di_sm = GSM_GetDebug(s);
+ di_global = GSM_GetGlobalDebug();
+@@ -95,6 +89,7 @@
+ * Test 2 - global /dev/null, local tempfile, do not use global
+ */
+ debug_file = fopen(debug_filename, "w+");
++ assert(debug_file != NULL);
+ assert(GSM_SetDebugGlobal(false, di_sm) == true);
+ assert(GSM_SetDebugFile(NUL, di_global) == ERR_NONE);
+ assert(GSM_SetDebugFileDescriptor(debug_file, true, di_sm) == ERR_NONE);
+@@ -107,6 +102,7 @@
+ * Test 3 - global /dev/null, local tempfile, use global
+ */
+ debug_file = fopen(debug_filename, "w+");
++ assert(debug_file != NULL);
+ assert(GSM_SetDebugGlobal(true, di_sm) == true);
+ assert(GSM_SetDebugFile(NUL, di_global) == ERR_NONE);
+ assert(GSM_SetDebugFileDescriptor(debug_file, true, di_sm) == ERR_NONE);
+@@ -119,6 +115,7 @@
+ * Test 4 - global tempfile, local /dev/null, use global
+ */
+ debug_file = fopen(debug_filename, "w+");
++ assert(debug_file != NULL);
+ assert(GSM_SetDebugGlobal(true, di_sm) == true);
+ assert(GSM_SetDebugFile(NUL, di_sm) == ERR_NONE);
+ assert(GSM_SetDebugFileDescriptor(debug_file, true, di_global) == ERR_NONE);
+@@ -131,6 +128,7 @@
+ * Test 5 - global tempfile, local /dev/null, do not use global
+ */
+ debug_file = fopen(debug_filename, "w+");
++ assert(debug_file != NULL);
+ assert(GSM_SetDebugGlobal(false, di_sm) == true);
+ assert(GSM_SetDebugFile(NUL, di_sm) == ERR_NONE);
+ assert(GSM_SetDebugFileDescriptor(debug_file, true, di_global) == ERR_NONE);
+@@ -142,6 +140,7 @@
+ * Test 6 - global /dev/null, local tempfile, do not use global
+ */
+ debug_file = fopen(debug_filename, "w+");
++ assert(debug_file != NULL);
+ assert(GSM_SetDebugGlobal(true, di_sm) == true);
+ assert(GSM_SetDebugFile(NUL, di_global) == ERR_NONE);
+ assert(GSM_SetDebugFileDescriptor(debug_file, true, di_sm) == ERR_NONE);
+@@ -155,6 +154,7 @@
+ * Test 7 - global /dev/null, local tempfile, use global
+ */
+ debug_file = fopen(debug_filename, "w+");
++ assert(debug_file != NULL);
+ assert(GSM_SetDebugGlobal(false, di_sm) == true);
+ assert(GSM_SetDebugFile(NUL, di_global) == ERR_NONE);
+ assert(GSM_SetDebugFileDescriptor(debug_file, true, di_sm) == ERR_NONE);
+@@ -168,6 +168,7 @@
+ * Test 8 - global tempfile, local /dev/null, use global
+ */
+ debug_file = fopen(debug_filename, "w+");
++ assert(debug_file != NULL);
+ assert(GSM_SetDebugGlobal(false, di_sm) == true);
+ assert(GSM_SetDebugFile(NUL, di_sm) == ERR_NONE);
+ assert(GSM_SetDebugFileDescriptor(debug_file, true, di_global) == ERR_NONE);
+@@ -181,6 +182,7 @@
+ * Test 9 - global tempfile, local /dev/null, do not use global
+ */
+ debug_file = fopen(debug_filename, "w+");
++ assert(debug_file != NULL);
+ assert(GSM_SetDebugGlobal(true, di_sm) == true);
+ assert(GSM_SetDebugFile(NUL, di_sm) == ERR_NONE);
+ assert(GSM_SetDebugFileDescriptor(debug_file, true, di_global) == ERR_NONE);
diff --git a/app-mobilephone/gammu/gammu-1.17.0.ebuild b/app-mobilephone/gammu/gammu-1.17.0.ebuild
deleted file mode 100644
index f6c3e6d4e760..000000000000
--- a/app-mobilephone/gammu/gammu-1.17.0.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/gammu/gammu-1.17.0.ebuild,v 1.5 2008/05/21 15:51:48 dev-zero Exp $
-
-inherit cmake-utils
-
-DESCRIPTION="a fork of the gnokii project, a tool to handle your cellular phone"
-HOMEPAGE="http://www.gammu.org"
-SRC_URI="ftp://dl.cihar.com/gammu/releases/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-IUSE="debug bluetooth irda mysql postgres nls"
-
-RDEPEND="bluetooth? ( net-wireless/bluez-libs )
- mysql? ( virtual/mysql )
- postgres? ( virtual/postgresql-server )
- dev-util/dialog"
-DEPEND="${RDEPEND}
- irda? ( virtual/os-headers )
- nls? ( sys-devel/gettext )
- dev-util/cmake"
-
-# Supported languages and translated documentation
-# Be sure all languages are prefixed with a single space!
-MY_AVAILABLE_LINGUAS=" cs de es it pl ru"
-IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}"
-
-src_unpack() {
- unpack ${A}
-
- # sys-devel/gettext is needed for creating .mo files
- cd "${S}/locale"
- local lang
- for lang in ${MY_AVAILABLE_LINGUAS} ; do
- if ! use linguas_${lang} ; then
- sed -i -e "/^[[:space:]]*${lang}[[:space:]]*$/d" CMakeLists.txt
- fi
- done
-}
-
-src_compile() {
- # debug flag is used inside cmake-utils.eclass
- local mycmakeargs="$(cmake-utils_use_with bluetooth Bluez) \
- $(cmake-utils_use_with irda IrDA) \
- $(cmake-utils_use_with mysql MySQL) \
- $(cmake-utils_use_with postgres Postgres) \
- -DENABLE_SHARED=ON"
- cmake-utils_src_compile
-}
-
-src_test() {
- LD_LIBRARY_PATH="${WORKDIR}"/${PN}_build/common cmake-utils_src_test
-}
diff --git a/app-mobilephone/gammu/gammu-1.18.0.ebuild b/app-mobilephone/gammu/gammu-1.22.1.ebuild
index 490f0fc11cec..f80905fe2064 100644
--- a/app-mobilephone/gammu/gammu-1.18.0.ebuild
+++ b/app-mobilephone/gammu/gammu-1.22.1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/gammu/gammu-1.18.0.ebuild,v 1.2 2008/05/21 15:51:48 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/gammu/gammu-1.22.1.ebuild,v 1.1 2009/01/17 11:49:24 mrness Exp $
inherit cmake-utils
@@ -22,22 +22,34 @@ DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
dev-util/cmake"
+# sys-devel/gettext is needed for creating .mo files
# Supported languages and translated documentation
# Be sure all languages are prefixed with a single space!
-MY_AVAILABLE_LINGUAS=" cs de es it pl ru"
+MY_AVAILABLE_LINGUAS=" cs de es id it pl ru"
IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}"
src_unpack() {
unpack ${A}
- # sys-devel/gettext is needed for creating .mo files
- cd "${S}/locale"
- local lang
+ epatch "${FILESDIR}"/${P}-debug-test.patch
+
+ pushd "${S}"/locale || die "locale directory not found"
+ local lang support_linguas=no
for lang in ${MY_AVAILABLE_LINGUAS} ; do
- if ! use linguas_${lang} ; then
- sed -i -e "/^[[:space:]]*${lang}[[:space:]]*$/d" CMakeLists.txt
+ if use linguas_${lang} ; then
+ support_linguas=yes
+ break
fi
done
+ # install all languages when all selected LINGUAS aren't supported
+ if [ "${support_linguas}" = "yes" ]; then
+ for lang in ${MY_AVAILABLE_LINGUAS} ; do
+ if ! use linguas_${lang} ; then
+ sed -i -e "/^[[:space:]]*${lang}[[:space:]]*$/d" CMakeLists.txt
+ fi
+ done
+ fi
+ popd
}
src_compile() {