dwb: unbreak build
This commit is contained in:
parent
61a3777669
commit
1a93ca8766
2 changed files with 47 additions and 3 deletions
srcpkgs/dwb
43
srcpkgs/dwb/patches/dwb-isnan.patch
Normal file
43
srcpkgs/dwb/patches/dwb-isnan.patch
Normal file
|
@ -0,0 +1,43 @@
|
|||
diff --git src/scripts.c src/scripts.c
|
||||
index 16784fc..71efc50 100644
|
||||
--- src/scripts.c
|
||||
+++ src/scripts.c
|
||||
@@ -3231,16 +3231,17 @@ sutil_checksum(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, s
|
||||
if (original == NULL)
|
||||
return NIL;
|
||||
|
||||
+ double dtype;
|
||||
GChecksumType type = G_CHECKSUM_SHA256;
|
||||
if (argc > 1)
|
||||
{
|
||||
- type = JSValueToNumber(ctx, argv[1], exc);
|
||||
- if (isnan(type))
|
||||
+ dtype = JSValueToNumber(ctx, argv[1], exc);
|
||||
+ if (isnan(dtype))
|
||||
{
|
||||
ret = NIL;
|
||||
goto error_out;
|
||||
}
|
||||
- type = MIN(MAX(type, G_CHECKSUM_MD5), G_CHECKSUM_SHA256);
|
||||
+ type = MIN(MAX((GChecksumType)dtype, G_CHECKSUM_MD5), G_CHECKSUM_SHA256);
|
||||
}
|
||||
checksum = g_compute_checksum_for_data(type, original, -1);
|
||||
|
||||
@@ -6247,11 +6248,14 @@ gobject_unblock_signal(JSContextRef ctx, JSObjectRef function, JSObjectRef this,
|
||||
static JSValueRef
|
||||
gobject_disconnect(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef* exc)
|
||||
{
|
||||
- int id;
|
||||
- if (argc > 0 && JSValueIsNumber(ctx, argv[0]) && !isnan(id = JSValueToNumber(ctx, argv[0], exc)))
|
||||
+ if (argc == 0) {
|
||||
+ return JSValueMakeBoolean(ctx, false);
|
||||
+ }
|
||||
+ double id = JSValueToNumber(ctx, argv[0], exc);
|
||||
+ if (!isnan(id))
|
||||
{
|
||||
GObject *o = JSObjectGetPrivate(this);
|
||||
- if (o != NULL && g_signal_handler_is_connected(o, id))
|
||||
+ if (o != NULL && g_signal_handler_is_connected(o, (int)id))
|
||||
{
|
||||
sigdata_remove(id, o);
|
||||
g_signal_handler_disconnect(o, id);
|
|
@ -1,16 +1,17 @@
|
|||
# Template file for 'dwb'
|
||||
pkgname=dwb
|
||||
version=2014.03.07
|
||||
revision=2
|
||||
revision=3
|
||||
build_style=gnu-makefile
|
||||
hostmakedepends="pkg-config m4"
|
||||
makedepends="gnutls-devel libsoup-devel webkitgtk-devel json-c-devel"
|
||||
short_desc="lightweight web browser based on webkit and gtk"
|
||||
short_desc="Lightweight web browser based on WebKit and GTK+"
|
||||
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
||||
license="GPL-3"
|
||||
homepage="http://portix.bitbucket.org/dwb/"
|
||||
distfiles="https://bitbucket.org/portix/dwb/downloads/dwb-$version.tar.gz"
|
||||
distfiles="https://bitbucket.org/portix/dwb/downloads/dwb-${version}.tar.gz"
|
||||
checksum=bfbe3e366b27c969876f9ee7954f138b1d49a270aa84a14ce43e01591ab69b62
|
||||
CFLAGS="-D_DEFAULT_SOURCE"
|
||||
|
||||
do_build() {
|
||||
sed -i '/^CFLAGS += -Werror=/d' config.mk
|
||||
|
|
Loading…
Reference in a new issue