Skip to content

Commit

Permalink
app-mobilephone/gammu: bump to 1.42.0
Browse files Browse the repository at this point in the history
- bump version
- fix cmake warning
- fix gammu-detect

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Victor Kustov <[email protected]>
Closes: gentoo#25423
Signed-off-by: Joonas Niilola <[email protected]>
  • Loading branch information
ktrace authored and juippis committed May 18, 2022
1 parent c1b307d commit 49ef6c9
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-mobilephone/gammu/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST gammu-1.41.0.tar.bz2 2167233 BLAKE2B 4b0bf77246cc6a07a52457cff2bae44e63ebfe2715cb0c0b7d89c3d6352bb2df4cd5e7fd9b62d316e316fb1e73108fe561e030b7444eccd601cd0d2541b9f0e9 SHA512 f2c2534d3827216bf015607431938e0cf2524d5f2c670a5f76bb5ab7928962d22de981bbbf2dfa7af833c7903b60a775242048210bac6c35b1a9ee7668db4543
DIST gammu-1.42.0.tar.bz2 2193946 BLAKE2B 074f870624efbd28aaf9ecb445063ff7ec070cd1498c00a2e93a8842ed2afd5a0bc6475d950885eec883bed158528dda0588809c2d55ef78c83f0eed3e1b4aff SHA512 f440df357578ce7f5ddd17f2f0f6405b4dacbca3e5da65a469f3f1e92c71bf899a7ef0977438c803ed9b1d7d15324d4a43bd9d97d986119a522243e2e6304971
12 changes: 12 additions & 0 deletions app-mobilephone/gammu/files/gammu-1.42.0-CMP0110-policy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
index 6cffb02..f7993cf 100644
--- a/CMakeLists.txt.orig
+++ b/CMakeLists.txt
@@ -13,6 +13,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# Silent some warnings from CMake 2.6
cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0009 NEW)
+cmake_policy(SET CMP0110 NEW)

option (COVERAGE "Add flags for Coverage analysis" OFF)

22 changes: 22 additions & 0 deletions app-mobilephone/gammu/files/gammu-1.42.0-gammu-detect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/gammu-detect/udev.c.orig b/gammu-detect/udev.c
index 4d25949..e0cd383 100644
--- a/gammu-detect/udev.c.orig
+++ b/gammu-detect/udev.c
@@ -189,12 +189,12 @@ void udev_detect(void)
client = g_udev_client_new(subsys);

list = g_udev_client_query_by_subsystem(client, subsys[0]);
- for (iter = list; iter; iter = g_list_next(iter)) {
- dump_device_and_parent(G_UDEV_DEVICE(iter->data), 0);
- if (device_is_valid(G_UDEV_DEVICE(iter->data))) {
- device_dump_config(G_UDEV_DEVICE(iter->data));
+ for (iter = g_list_first(list); iter; iter = g_list_next(iter)) {
+ dump_device_and_parent(iter->data, 0);
+ if (device_is_valid(iter->data)) {
+ device_dump_config(iter->data);
}
- g_object_unref(G_UDEV_DEVICE(iter->data));
+ g_object_unref(iter->data);
}
}

66 changes: 66 additions & 0 deletions app-mobilephone/gammu/gammu-1.42.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="A tool to handle your cellular phone"
HOMEPAGE="https://wammu.eu/gammu/"
SRC_URI="https://dl.cihar.com/${PN}/releases/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="bluetooth curl dbi debug irda mysql nls odbc postgres usb"

COMMON_DEPEND="
dev-libs/glib:2=
dev-libs/libgudev:=
virtual/libiconv
bluetooth? ( net-wireless/bluez:= )
curl? ( net-misc/curl:= )
dbi? ( >=dev-db/libdbi-0.8.3:= )
mysql? ( dev-db/mysql-connector-c:= )
nls? ( sys-devel/gettext )
odbc? ( dev-db/unixODBC )
postgres? ( dev-db/postgresql:= )
usb? ( virtual/libusb:1= )
"
DEPEND="
${COMMON_DEPEND}
irda? ( virtual/os-headers )
"
RDEPEND="
${COMMON_DEPEND}
dev-util/dialog
"
PATCHES=( "${FILESDIR}/${P}-CMP0110-policy.patch"
"${FILESDIR}/${P}-gammu-detect.patch" )

src_configure() {
local mycmakeargs=(
-DWITH_BLUETOOTH=$(usex bluetooth)
-DWITH_CURL=$(usex curl)
-DWITH_Gettext=$(usex nls)
-DWITH_Iconv=$(usex nls)
-DWITH_IRDA=$(usex irda)
-DWITH_LibDBI=$(usex dbi)
-DWITH_MySQL=$(usex mysql)
-DWITH_ODBC=$(usex odbc)
-DWITH_Postgres=$(usex postgres)
-DWITH_USB=$(usex usb)
-DINSTALL_DOC_DIR="share/doc/${PF}"
)
cmake_src_configure
}

src_test() {
addwrite "/var/lock/LCK..bar"
LD_LIBRARY_PATH="${BUILD_DIR}/libgammu" cmake_src_test -j1
}

src_install() {
cmake_src_install
docompress -x /usr/share/doc/${PF}/examples/
}

0 comments on commit 49ef6c9

Please sign in to comment.