maemo/alarmd: new aport (!810)
This commit is contained in:
parent
ab5eb1a395
commit
d89fd8630c
3 changed files with 119 additions and 0 deletions
27
maemo/alarmd/APKBUILD
Normal file
27
maemo/alarmd/APKBUILD
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Contributor: Bart Ribbers <bribbers@disroot.org>
|
||||
# Maintainer: Nikita Ukhrenkov <thekit@disroot.org>
|
||||
pkgname=alarmd
|
||||
pkgver=1.1.18
|
||||
pkgrel=0
|
||||
pkgdesc="An alarm framework used for handling of alarms and other timed events"
|
||||
url="https://github.com/maemo-leste/alarmd"
|
||||
arch="all !armhf !armv7"
|
||||
license="LGPL-2.1-only"
|
||||
makedepends="glib-dev dbus-glib-dev dbus-dev libdsme-dev libconic-dev
|
||||
osso-systemui-dbus-headers mce-headers statusbar-alarm-dbus-dev clockd-dev
|
||||
doxygen"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/maemo-leste/alarmd/archive/$pkgver.tar.gz
|
||||
alarmd-fix-musl.patch"
|
||||
subpackages="$pkgname-dev $pkgname-doc"
|
||||
options="!check"
|
||||
|
||||
build() {
|
||||
CFLAGS="$CFLAGS -Wno-error=array-bounds" make
|
||||
}
|
||||
|
||||
package() {
|
||||
ROOT="$pkgdir" make install
|
||||
}
|
||||
|
||||
sha512sums="e5c0e2608506811094bf8cdc267b2c72642bf3321df182fe813f3adb8e8491ebb0abc60d01265c4ae836bf22b9779ea69489b607971bf5b81fc0c5f89d873209 alarmd-1.1.18.tar.gz
|
||||
3add3f0e0c20f7a5db98c9138754378d5a52ac052b3cf176281b8b02434bee1b030f49157259c1a477daeebb5a70bfb05127c237de682ac4421d5005989c915f alarmd-fix-musl.patch"
|
||||
37
maemo/alarmd/alarmd-fix-musl.patch
Normal file
37
maemo/alarmd/alarmd-fix-musl.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
diff --git a/src/sighnd.c b/src/sighnd.c
|
||||
index 505e79a..cd66ab7 100644
|
||||
--- a/src/sighnd.c
|
||||
+++ b/src/sighnd.c
|
||||
@@ -35,6 +35,16 @@
|
||||
#include <errno.h>
|
||||
#include <glib.h>
|
||||
|
||||
+/* taken from glibc unistd.h and fixes musl */
|
||||
+#ifndef TEMP_FAILURE_RETRY
|
||||
+#define TEMP_FAILURE_RETRY(expression) \
|
||||
+ (__extension__ \
|
||||
+ ({ long int __result; \
|
||||
+ do __result = (long int) (expression); \
|
||||
+ while (__result == -1L && errno == EINTR); \
|
||||
+ __result; }))
|
||||
+#endif
|
||||
+
|
||||
/* ========================================================================= *
|
||||
* SIGNAL HANDING FUNCTIONALITY
|
||||
* ========================================================================= */
|
||||
diff --git a/src/ticker.c b/src/ticker.c
|
||||
index 7ff6ca9..2f97f47 100644
|
||||
--- a/src/ticker.c
|
||||
+++ b/src/ticker.c
|
||||
@@ -662,10 +662,7 @@ time_t ticker_get_monotonic(void)
|
||||
|
||||
static inline int is_leap_year(int y)
|
||||
{
|
||||
- // use macro from time.h
|
||||
- return __isleap(y);
|
||||
-
|
||||
- //return (y % 4 == 0) && ((y % 100 != 0) || (y % 400 == 0));
|
||||
+ return (y % 4 == 0) && ((y % 100 != 0) || (y % 400 == 0));
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- *
|
||||
55
maemo/alarmd/build-fix.patch
Normal file
55
maemo/alarmd/build-fix.patch
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index cd34a82..8071bff 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3,4 +3,27 @@ AM_INIT_AUTOMAKE(ke-recv-extra, 0.2)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_PROG_CC
|
||||
|
||||
+PKG_CHECK_MODULES(OSSO, libosso)
|
||||
+AC_SUBST(OSSO_CFLAGS)
|
||||
+AC_SUBST(OSSO_LIBS)
|
||||
+
|
||||
+PKG_CHECK_MODULES(GLIB, glib-2.0)
|
||||
+AC_SUBST(GLIB_CFLAGS)
|
||||
+AC_SUBST(GLIB_LIBS)
|
||||
+
|
||||
+PKG_CHECK_MODULES(GCONF, gconf-2.0)
|
||||
+AC_SUBST(GCONF_FLAGS)
|
||||
+AC_SUBST(GCONF_LIBS)
|
||||
+
|
||||
+PKG_CHECK_MODULES(DBUS, dbus-1)
|
||||
+AC_SUBST(DBUS_CFLAGS)
|
||||
+AC_SUBST(DBUS_LIBS)
|
||||
+
|
||||
+PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1)
|
||||
+AC_SUBST(DBUS_GLIB_CFLAGS)
|
||||
+AC_SUBST(DBUS_GLIB_LIBS)
|
||||
+
|
||||
+LOCALEDIR=`pkg-config --variable=localedir osso-af-settings`
|
||||
+AC_SUBST(LOCALEDIR)
|
||||
+
|
||||
AC_OUTPUT([Makefile src/Makefile])
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 8e4dee8..7a7e23b 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -1,15 +1,9 @@
|
||||
sbin_PROGRAMS = hulda
|
||||
|
||||
-INCLUDES = \
|
||||
- `pkg-config --cflags libosso` \
|
||||
- `pkg-config --cflags glib-2.0` \
|
||||
- `pkg-config --cflags gconf-2.0` \
|
||||
- `pkg-config --cflags dbus-1` \
|
||||
- `pkg-config --cflags dbus-glib-1` \
|
||||
- -DLOCALEDIR=\"`pkg-config --variable=localedir osso-af-settings`\"
|
||||
+INCLUDES = -DLOCALEDIR=\"$(LOCALEDIR)\"
|
||||
|
||||
-hulda_LDFLAGS = \
|
||||
- `pkg-config --libs gconf-2.0 dbus-glib-1`
|
||||
+hulda_CFLAGS= $(GLIB_CFLAGS) $(GCONF_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_CFLAGS) $(OSSO_CFLAGS)
|
||||
+hulda_LDADD = $(GLIB_LIBS) $(GCONF_LIBS) $(DBUS_GLIB_LIBS) $(DBUS_LIBS) $(OSSO_LIBS)
|
||||
|
||||
hulda_SOURCES = \
|
||||
hulda.h \
|
||||
Loading…
Add table
Add a link
Reference in a new issue