[arch-commits] Commit in dbeaver/trunk (PKGBUILD dbeaver_DataTypeConverter.patch)

Fabio Castelli muflone at archlinux.org
Sat Nov 10 17:36:36 UTC 2018


    Date: Saturday, November 10, 2018 @ 17:36:35
  Author: muflone
Revision: 405692

upgpkg: dbeaver 5.2.3-1

Added:
  dbeaver/trunk/dbeaver_DataTypeConverter.patch
Modified:
  dbeaver/trunk/PKGBUILD

---------------------------------+
 PKGBUILD                        |   16 ++--
 dbeaver_DataTypeConverter.patch |  134 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 144 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-11-10 16:38:27 UTC (rev 405691)
+++ PKGBUILD	2018-11-10 17:36:35 UTC (rev 405692)
@@ -2,14 +2,14 @@
 # Contributor: Arne Hoch <arne at derhoch.de>
 
 pkgname=dbeaver
-pkgver=5.2.2
+pkgver=5.2.3
 pkgrel=1
 pkgdesc="Free universal SQL Client for developers and database administrators (community edition)"
 arch=('x86_64')
 url="http://dbeaver.jkiss.org/"
 license=("Apache")
-depends=('java-runtime<11' 'gtk2' 'gtk-update-icon-cache')
-makedepends=('maven' 'java-environment<11')
+depends=('java-runtime>=8' 'gtk2' 'gtk-update-icon-cache' 'libsecret')
+makedepends=('maven' 'java-environment>=8')
 optdepends=('dbeaver-plugin-office: export data in Microsoft Office Excel format'
             'dbeaver-plugin-svg-format: save diagrams in SVG format')
 source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/serge-rider/dbeaver/archive/${pkgver}.tar.gz"
@@ -16,12 +16,14 @@
         "${pkgname}.desktop"
         "${pkgname}.profile.gz"
         "${pkgname}.hook"
-        "dbeaver.install")
-sha256sums=('c02bbd56a222b243fa5fde3a7f003c8a8b4fa13f632c49c5c799a8d93cd5b7e5'
+        "${pkgname}.install"
+        "${pkgname}_DataTypeConverter.patch")
+sha256sums=('d2e9725bd8b251082fec751f79c15d741300a949db1e95c7b7700fda755c0532'
             '8d6311e85b33b65b9109fe54cc2bb811639bfd31af94be403d5112e09fafd40c'
             '1863e74bdcf22b7328e6e8487cbebff7d5360e34bde85c1dd226b168b4737034'
             'b035ea82c5c349cf992a411f208d8c874c2844d2f8490e4ad21cafb5be3fbfba'
-            'f8d65dd933049b587a5815ea75a30ef944300b812df383ca1c2dcd68280bc7ab')
+            'f8d65dd933049b587a5815ea75a30ef944300b812df383ca1c2dcd68280bc7ab'
+            'f3eec152f885dfb85b3e09d263f5099c6946a1bc625bb91db4a885132e032712')
 install="${pkgname}.install"
 
 prepare() {
@@ -29,6 +31,8 @@
   gzip --decompress --keep --stdout "${pkgname}.profile.gz" | 
     sed "s/DBEAVER_VERSION/${pkgver}/g" |
     gzip -9 > "${pkgname}.profile-${pkgver}.gz"
+  # Install patches
+  patch -p0 -i "${pkgname}_DataTypeConverter.patch"
 }
 
 build() {

Added: dbeaver_DataTypeConverter.patch
===================================================================
--- dbeaver_DataTypeConverter.patch	                        (rev 0)
+++ dbeaver_DataTypeConverter.patch	2018-11-10 17:36:35 UTC (rev 405692)
@@ -0,0 +1,134 @@
+diff -Naur dbeaver-5.2.3.orig/plugins/org.jkiss.dbeaver.ext.import_config/src/org/jkiss/dbeaver/ext/import_config/wizards/navicat/DatatypeConverter.java dbeaver-5.2.3/plugins/org.jkiss.dbeaver.ext.import_config/src/org/jkiss/dbeaver/ext/import_config/wizards/navicat/DatatypeConverter.java
+--- dbeaver-5.2.3.orig/plugins/org.jkiss.dbeaver.ext.import_config/src/org/jkiss/dbeaver/ext/import_config/wizards/navicat/DatatypeConverter.java	1970-01-01 01:00:00.000000000 +0100
++++ dbeaver-5.2.3/plugins/org.jkiss.dbeaver.ext.import_config/src/org/jkiss/dbeaver/ext/import_config/wizards/navicat/DatatypeConverter.java	2018-11-10 18:27:06.771062501 +0100
+@@ -0,0 +1,119 @@
++/*
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
++ *
++ * Copyright (c) 2007-2017 Oracle and/or its affiliates. All rights reserved.
++ *
++ * The contents of this file are subject to the terms of either the GNU
++ * General Public License Version 2 only ("GPL") or the Common Development
++ * and Distribution License("CDDL") (collectively, the "License").  You
++ * may not use this file except in compliance with the License.  You can
++ * obtain a copy of the License at
++ * https://oss.oracle.com/licenses/CDDL+GPL-1.1
++ * or LICENSE.txt.  See the License for the specific
++ * language governing permissions and limitations under the License.
++ *
++ * When distributing the software, include this License Header Notice in each
++ * file and include the License file at LICENSE.txt.
++ *
++ * GPL Classpath Exception:
++ * Oracle designates this particular file as subject to the "Classpath"
++ * exception as provided by Oracle in the GPL Version 2 section of the License
++ * file that accompanied this code.
++ *
++ * Modifications:
++ * If applicable, add the following below the License Header, with the fields
++ * enclosed by brackets [] replaced by your own identifying information:
++ * "Portions Copyright [year] [name of copyright owner]"
++ *
++ * Contributor(s):
++ * If you wish your version of this file to be governed by only the CDDL or
++ * only the GPL Version 2, indicate your decision by adding "[Contributor]
++ * elects to include this software in this distribution under the [CDDL or GPL
++ * Version 2] license."  If you don't indicate a single choice of license, a
++ * recipient has the option to distribute your version of this file under
++ * either the CDDL, the GPL Version 2 or to extend the choice of license to
++ * its licensees as provided above.  However, if you add GPL Version 2 code
++ * and therefore, elected the GPL Version 2 license, then the option applies
++ * only if the new code is made subject to such option by the copyright
++ * holder.
++ */
++
++package org.jkiss.dbeaver.ext.import_config.wizards.navicat;
++
++/**
++ * Some methods copied from JAXB DatatypeConverterImpl
++ */
++public class DatatypeConverter {
++
++    private static final byte[] decodeMap = initDecodeMap();
++    private static final byte PADDING = 127;
++
++    private static byte[] initDecodeMap() {
++        byte[] map = new byte[128];
++        int i;
++        for (i = 0; i < 128; i++) {
++            map[i] = -1;
++        }
++
++        for (i = 'A'; i <= 'Z'; i++) {
++            map[i] = (byte) (i - 'A');
++        }
++        for (i = 'a'; i <= 'z'; i++) {
++            map[i] = (byte) (i - 'a' + 26);
++        }
++        for (i = '0'; i <= '9'; i++) {
++            map[i] = (byte) (i - '0' + 52);
++        }
++        map['+'] = 62;
++        map['/'] = 63;
++        map['='] = PADDING;
++
++        return map;
++    }
++
++    public static byte[] parseHexBinary(String s) {
++        final int len = s.length();
++
++        // "111" is not a valid hex encoding.
++        if (len % 2 != 0) {
++            throw new IllegalArgumentException("hexBinary needs to be even-length: " + s);
++        }
++
++        byte[] out = new byte[len / 2];
++
++        for (int i = 0; i < len; i += 2) {
++            int h = hexToBin(s.charAt(i));
++            int l = hexToBin(s.charAt(i + 1));
++            if (h == -1 || l == -1) {
++                throw new IllegalArgumentException("contains illegal character for hexBinary: " + s);
++            }
++
++            out[i / 2] = (byte) (h * 16 + l);
++        }
++
++        return out;
++    }
++
++    private static int hexToBin(char ch) {
++        if ('0' <= ch && ch <= '9') {
++            return ch - '0';
++        }
++        if ('A' <= ch && ch <= 'F') {
++            return ch - 'A' + 10;
++        }
++        if ('a' <= ch && ch <= 'f') {
++            return ch - 'a' + 10;
++        }
++        return -1;
++    }
++    private static final char[] hexCode = "0123456789ABCDEF".toCharArray();
++
++    public static String printHexBinary(byte[] data) {
++        StringBuilder r = new StringBuilder(data.length * 2);
++        for (byte b : data) {
++            r.append(hexCode[(b >> 4) & 0xF]);
++            r.append(hexCode[(b & 0xF)]);
++        }
++        return r.toString();
++    }
++}
+diff -Naur dbeaver-5.2.3.orig/plugins/org.jkiss.dbeaver.ext.import_config/src/org/jkiss/dbeaver/ext/import_config/wizards/navicat/NavicatEncrypt.java dbeaver-5.2.3/plugins/org.jkiss.dbeaver.ext.import_config/src/org/jkiss/dbeaver/ext/import_config/wizards/navicat/NavicatEncrypt.java
+--- dbeaver-5.2.3.orig/plugins/org.jkiss.dbeaver.ext.import_config/src/org/jkiss/dbeaver/ext/import_config/wizards/navicat/NavicatEncrypt.java	2018-10-21 20:04:06.000000000 +0200
++++ dbeaver-5.2.3/plugins/org.jkiss.dbeaver.ext.import_config/src/org/jkiss/dbeaver/ext/import_config/wizards/navicat/NavicatEncrypt.java	2018-11-10 18:10:06.649829232 +0100
+@@ -14,7 +14,6 @@
+ import java.security.MessageDigest;
+ import java.util.Arrays;
+ import javax.crypto.spec.SecretKeySpec;
+-import javax.xml.bind.DatatypeConverter;
+ 
+ public class NavicatEncrypt {
+     private static final String NAVICAT_CODE = "3DC5CA39";



More information about the arch-commits mailing list