[arch-commits] Commit in dwb/trunk (PKGBUILD dwb.install isnan.patch)

Christian Hesse eworm at archlinux.org
Thu Apr 28 10:40:09 UTC 2016


    Date: Thursday, April 28, 2016 @ 12:40:08
  Author: eworm
Revision: 172401

upgpkg: dwb 2014.03.07-4

* Hooks! (Update install file...)
* Fix compilation with recent glibc (define _DEFAULT_SOURCE)
* Fix usage of isnan()

Added:
  dwb/trunk/isnan.patch
Modified:
  dwb/trunk/PKGBUILD
  dwb/trunk/dwb.install

-------------+
 PKGBUILD    |   15 ++++++++++-----
 dwb.install |   12 ++----------
 isnan.patch |   43 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 15 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-04-28 09:25:44 UTC (rev 172400)
+++ PKGBUILD	2016-04-28 10:40:08 UTC (rev 172401)
@@ -4,8 +4,8 @@
 
 pkgname=dwb
 pkgver=2014.03.07
-pkgrel=3
-pkgdesc="A webkit web browser with vi-like keyboard shortcuts, stable snapshot" 
+pkgrel=4
+pkgdesc="A webkit web browser with vi-like keyboard shortcuts, stable snapshot"
 url="http://portix.bitbucket.org/dwb/"
 arch=('i686' 'x86_64')
 install=dwb.install
@@ -14,14 +14,19 @@
 makedepends=('json-c')
 source=(https://bitbucket.org/portix/"${pkgname}"/downloads/"${pkgname}"-"${pkgver}".tar.gz
         0001-Set-G_APPLICATION_HANDLES_COMMANDLINE-for-glib2-2.40.patch
+        isnan.patch
         Werror.patch)
 sha1sums=('006e9df0c52219b9f022c1b4a3aa0518ff96295d'
           'd026b4caf83920b1319591d1f1487fc9f49035df'
+          '557b50d0e8ecee1315371b5629d30959fcdf1919'
           'd5a66e8a16c25053a0693c0a3107aa1244ce3d88')
 
 prepare(){
-    patch -Np1 -d $srcdir/$pkgname-$pkgver -i $srcdir/0001-Set-G_APPLICATION_HANDLES_COMMANDLINE-for-glib2-2.40.patch
-    patch -Np1 -d $srcdir/$pkgname-$pkgver -i $srcdir/Werror.patch
+    patch -Np1 -d "$srcdir"/"$pkgname"-"$pkgver" -i "$srcdir"/0001-Set-G_APPLICATION_HANDLES_COMMANDLINE-for-glib2-2.40.patch
+    patch -Np1 -d "$srcdir"/"$pkgname"-"$pkgver" -i "$srcdir"/isnan.patch
+    patch -Np1 -d "$srcdir"/"$pkgname"-"$pkgver" -i "$srcdir"/Werror.patch
+
+    sed -i 's|_BSD_SOURCE|_DEFAULT_SOURCE|' "$srcdir"/"$pkgname"-"$pkgver"/{config.mk,dwbem/dwbem.c,exar/exar.c}
 }
 
 build() {
@@ -31,5 +36,5 @@
 package() {
   cd "${srcdir}"/"${pkgname}"-"${pkgver}"
   export BASHCOMPLETION=/usr/share/bash-completion/completions
-  make DESTDIR=${pkgdir} install
+  make DESTDIR="${pkgdir}" install
 }

Modified: dwb.install
===================================================================
--- dwb.install	2016-04-28 09:25:44 UTC (rev 172400)
+++ dwb.install	2016-04-28 10:40:08 UTC (rev 172401)
@@ -1,13 +1,5 @@
-post_install(){
-    update-desktop-database -q
-    echo "==> If you are using extensions you should update the extensions with" 
+post_upgrade(){
+    echo "==> If you are using extensions you should update the extensions with"
     echo "==> dwbem -u or dwbem -Nu"
 }
 
-post_upgrade(){
-    post_install
-}
-
-post_remove(){
-    post_install
-}

Added: isnan.patch
===================================================================
--- isnan.patch	                        (rev 0)
+++ isnan.patch	2016-04-28 10:40:08 UTC (rev 172401)
@@ -0,0 +1,43 @@
+diff --git a/src/scripts.c b/src/scripts.c
+index 16784fc..71efc50 100644
+--- a/src/scripts.c
++++ b/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);



More information about the arch-commits mailing list