gammu: Update to version 1.24.0.
authorStanislav Brabec <utx@penguin.cz>
Fri, 12 Jun 2009 14:17:42 +0000 (14:17 +0000)
committerutx@penguin.cz <utx@penguin.cz>
Fri, 12 Jun 2009 14:17:42 +0000 (14:17 +0000)
conf/checksums.ini
recipes/gammu/gammu-1.24.0/findmysql.patch [new file with mode: 0644]
recipes/gammu/gammu_1.24.0.bb [new file with mode: 0644]

index dfc83be..c72dcde 100644 (file)
@@ -7066,6 +7066,10 @@ sha256=7848b7c1992ef202d54a5602904e7d7e190bce0195af69174baa79e741d07e87
 md5=bc547e99535a5a05bb7093fa8b4f36a6
 sha256=32ff5fed107ca5eb94976bf22bc5b82ff45c72b8e62f35dc6dba75a2f11e6425
 
+[http://dl.cihar.com/gammu/releases/gammu-1.24.0.tar.bz2]
+md5=f805d6d93ca7064f6d04eb3c6b24168f
+sha256=dbbacb5685b84d3ee181f9172e2818ebbb3b59b088149ebf320ce0c73e71ba1d
+
 [ftp://ftp.gnu.org/gnu/gawk/gawk-3.1.4.tar.gz]
 md5=3c8935efb9fdc7202720894279ad04a7
 sha256=5cdfe0c0919895e2ec87773c583cc6ebf2b84cba7617d5ec6cfd0150749e190f
diff --git a/recipes/gammu/gammu-1.24.0/findmysql.patch b/recipes/gammu/gammu-1.24.0/findmysql.patch
new file mode 100644 (file)
index 0000000..b6345b1
--- /dev/null
@@ -0,0 +1,35 @@
+Index: gammu-1.24.0/cmake/FindMySQL.cmake
+===================================================================
+--- gammu-1.24.0.orig/cmake/FindMySQL.cmake    2008-11-20 15:37:28.000000000 +0000
++++ gammu-1.24.0/cmake/FindMySQL.cmake 2009-06-12 12:18:06.000000000 +0000
+@@ -30,7 +30,7 @@
+             ARGS --include
+             OUTPUT_VARIABLE MY_TMP)
+-        string(REGEX REPLACE "-I([^ ]*)( .*)?" "\\1" MY_TMP "${MY_TMP}")
++        string(REGEX REPLACE "-I([^ ]+)( .*)?" "\\1" MY_TMP "${MY_TMP}")
+         set(MYSQL_ADD_INCLUDE_DIR ${MY_TMP} CACHE FILEPATH INTERNAL)
+@@ -41,17 +41,19 @@
+         set(MYSQL_ADD_LIBRARIES "")
+-        string(REGEX MATCHALL "-l[^ ]*" MYSQL_LIB_LIST "${MY_TMP}")
++        string(REGEX MATCHALL "(^| )-l[^ ]+" MYSQL_LIB_LIST "${MY_TMP}")
+         foreach(LIB ${MYSQL_LIB_LIST})
+             string(REGEX REPLACE "[ ]*-l([^ ]*)" "\\1" LIB "${LIB}")
++            message("${LIB}")
+             list(APPEND MYSQL_ADD_LIBRARIES "${LIB}")
+         endforeach(LIB ${MYSQL_LIBS})
+         set(MYSQL_ADD_LIBRARY_PATH "")
+-        string(REGEX MATCHALL "-L[^ ]*" MYSQL_LIBDIR_LIST "${MY_TMP}")
++        string(REGEX MATCHALL "-L[^ ]+" MYSQL_LIBDIR_LIST "${MY_TMP}")
+         foreach(LIB ${MYSQL_LIBDIR_LIST})
+             string(REGEX REPLACE "[ ]*-L([^ ]*)" "\\1" LIB "${LIB}")
++            message("${LIB}")
+             list(APPEND MYSQL_ADD_LIBRARY_PATH "${LIB}")
+         endforeach(LIB ${MYSQL_LIBS})
diff --git a/recipes/gammu/gammu_1.24.0.bb b/recipes/gammu/gammu_1.24.0.bb
new file mode 100644 (file)
index 0000000..56a1a91
--- /dev/null
@@ -0,0 +1,42 @@
+DESCRIPTION = "GNU All Mobile Managment Utilities"
+SECTION = "console/network"
+DEPENDS = "bluez-libs cmake-native python mysql"
+RDEPENDS_python-${PN} = "python-core"
+LICENSE = "GPL"
+HOMEPAGE = "http://www.gammu.org/"
+PR = "r0"
+
+SRC_URI = "http://dl.cihar.com/gammu/releases/gammu-${PV}.tar.bz2 \
+           file://findmysql.patch;patch=1"
+
+inherit distutils-common-base cmake
+
+PYTHON_DIR = "${@python_dir(d)}"
+
+do_configure() {
+    cd ${S}
+    sed -i 's@^cmake [^$]*\$@cmake -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_TARGET} $@' configure
+    sed -i 's@\${PYTHON_SITEDIR}@${libdir}/${PYTHON_DIR}/site-packages@g' python/gammu/CMakeLists.txt
+    ./configure --prefix=${prefix} --enable-shared --enable-backup
+}
+
+do_stage() {
+    autotools_stage_all
+}
+
+# gammu has a non-standard uninstalled .pc file, which confuses pkgconfig.bbclass.
+# Replace it by custom do_stage_append():
+#do_stage_append () {
+#      install -d ${PKG_CONFIG_DIR}
+#      cat build-configure/cfg/gammu.pc > ${PKG_CONFIG_DIR}/gammu.pc
+#}
+
+PACKAGES =+ "${PN}-smsd libgammu libgsmsd python-${PN}"
+
+FILES_${PN} = "${bindir}/gammu ${bindir}/jadmaker ${sysconfdir}/bash_completion.d/gammu"
+FILES_${PN}-smsd = "${bindir}/gammu-smsd*"
+FILES_${PN}-dev += "${bindir}/gammu-config ${libdir}/*.so"
+FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/.debug ${libdir}/python*/site-packages/gammu/.debug"
+FILES_libgammu = "${libdir}/libGammu.so.*"
+FILES_libgsmsd = "${libdir}/libgsmsd.so.*"
+FILES_python-${PN} = "${libdir}/${PYTHON_DIR}/site-packages/gammu/*.??"