pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/mldonkey Added patches to net/mldonkey to make it ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3852b28be128
branches:  trunk
changeset: 351127:3852b28be128
user:      jaapb <jaapb%pkgsrc.org@localhost>
date:      Mon Aug 15 15:48:19 2016 +0000

description:
Added patches to net/mldonkey to make it compile with OCaml 4.03. Most of
the patches were taken from the Gentoo ebuild at
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ddc06bf06bc144de45139545ff4eb6f660b443c
with one pkgsrc-specific addition. There were no upstream changes.

This (hopefully) fixes PR pkg/51397

diffstat:

 net/mldonkey/Makefile                                           |   4 +-
 net/mldonkey/distinfo                                           |  12 ++-
 net/mldonkey/patches/patch-config_configure.in                  |   3 +-
 net/mldonkey/patches/patch-src_config_unix_os_stubs.c.c         |  32 ++++++++
 net/mldonkey/patches/patch-src_networks_donkey_donkeyGlobals.ml |  13 +++
 net/mldonkey/patches/patch-src_utils_cdk_gdstubs.c              |  14 +++
 net/mldonkey/patches/patch-src_utils_cdk_zip.ml                 |  14 +++
 net/mldonkey/patches/patch-src_utils_cdk_zlibstubs.c            |  14 +++
 net/mldonkey/patches/patch-src_utils_lib_fst_hash.c             |  23 +++++
 net/mldonkey/patches/patch-src_utils_lib_options.ml4            |  40 ++++++++++
 net/mldonkey/patches/patch-src_utils_lib_os_stubs.h             |  16 ++++
 11 files changed, 180 insertions(+), 5 deletions(-)

diffs (244 lines):

diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/Makefile
--- a/net/mldonkey/Makefile     Mon Aug 15 12:46:51 2016 +0000
+++ b/net/mldonkey/Makefile     Mon Aug 15 15:48:19 2016 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.86 2016/08/03 10:23:16 adam Exp $
+# $NetBSD: Makefile,v 1.87 2016/08/15 15:48:19 jaapb Exp $
 
-PKGREVISION= 4
+PKGREVISION= 5
 .include "Makefile.common"
 
 RCD_SCRIPTS=           mldonkey
diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/distinfo
--- a/net/mldonkey/distinfo     Mon Aug 15 12:46:51 2016 +0000
+++ b/net/mldonkey/distinfo     Mon Aug 15 15:48:19 2016 +0000
@@ -1,9 +1,17 @@
-$NetBSD: distinfo,v 1.63 2015/11/04 00:35:12 agc Exp $
+$NetBSD: distinfo,v 1.64 2016/08/15 15:48:19 jaapb Exp $
 
 SHA1 (mldonkey-3.1.5.tar.bz2) = 7bc4f9272ecfe6403eef7062766b26bf321e3015
 RMD160 (mldonkey-3.1.5.tar.bz2) = 63a21aef47a7510b7f9867544345c8f03edc89c3
 SHA512 (mldonkey-3.1.5.tar.bz2) = 96e75acf91d7ecc41490f898e06d284da27404c7e567f173936d8113885a3b4b6bc93341358f92a30d3f699eef681d97ce56414a37bb02a535ad2da4d4ad13a3
 Size (mldonkey-3.1.5.tar.bz2) = 2847382 bytes
 SHA1 (patch-config_Makefile.in) = a575c505c1f736bc3940790b43a6cf2083f29112
-SHA1 (patch-config_configure.in) = 559caa495059573100a3182c4758a53433a53223
+SHA1 (patch-config_configure.in) = f9c3887e04a9727e13fecd47d763462a413913f3
+SHA1 (patch-src_config_unix_os_stubs.c.c) = 4cc60c1019a93212157d526e15269079c1e84e20
+SHA1 (patch-src_networks_donkey_donkeyGlobals.ml) = a9734496b883e4ced2a6a744d0b2fcf331b56ba1
+SHA1 (patch-src_utils_cdk_gdstubs.c) = 52717da3310492d3d737b5332e295573e5142f8a
+SHA1 (patch-src_utils_cdk_zip.ml) = 3a511187821445040a7d53b80fb3f9682f905463
+SHA1 (patch-src_utils_cdk_zlibstubs.c) = 14d61998e620b27afbecbe5e058c8ef466a68ecb
+SHA1 (patch-src_utils_lib_fst_hash.c) = f5b69a13d8ab7f3149e82b6f0f37425fdd62a945
+SHA1 (patch-src_utils_lib_options.ml4) = 9e47644d41606a2fb29f5e3c2609d2d36d97b745
+SHA1 (patch-src_utils_lib_os_stubs.h) = 4128c7507cff2f70708ab38684f7fd60af6f6bca
 SHA1 (patch-src_utils_net_terminal.ml) = 8745d3d6f605c9609febfea4e84c5c6619be0d14
diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/patches/patch-config_configure.in
--- a/net/mldonkey/patches/patch-config_configure.in    Mon Aug 15 12:46:51 2016 +0000
+++ b/net/mldonkey/patches/patch-config_configure.in    Mon Aug 15 15:48:19 2016 +0000
@@ -1,5 +1,6 @@
-$NetBSD: patch-config_configure.in,v 1.5 2015/09/14 06:03:58 wiz Exp $
+$NetBSD: patch-config_configure.in,v 1.6 2016/08/15 15:48:19 jaapb Exp $
 
+Correct include paths for lablgtk 2.16
 --- config/configure.in.orig   2012-08-05 15:49:02.000000000 +0000
 +++ config/configure.in
 @@ -1347,15 +1364,15 @@ if test "$GTK_CONFIG" = "no"; then
diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/patches/patch-src_config_unix_os_stubs.c.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mldonkey/patches/patch-src_config_unix_os_stubs.c.c   Mon Aug 15 15:48:19 2016 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-src_config_unix_os_stubs.c.c,v 1.1 2016/08/15 15:48:19 jaapb Exp $
+
+Compile with OCaml 4.03
+--- src/config/unix/os_stubs_c.c.orig  2010-07-16 13:56:35.000000000 +0000
++++ src/config/unix/os_stubs_c.c
+@@ -66,7 +66,7 @@ ssize_t os_read(OS_FD fd, char *buf, siz
+ 
+ void os_ftruncate(OS_FD fd, OFF_T len, /* bool */ int sparse)
+ {
+-  int64 cursize;
++  int64_t cursize;
+   if(!fd) failwith("ftruncate32: file is closed");
+   
+   cursize = os_getfdsize(fd);
+@@ -109,7 +109,7 @@ int os_getdtablesize()
+ 
+ *******************************************************************/
+ 
+-int64 os_getfdsize(OS_FD fd)
++int64_t os_getfdsize(OS_FD fd)
+ {
+   struct stat buf;
+ 
+@@ -127,7 +127,7 @@ int64 os_getfdsize(OS_FD fd)
+ 
+ *******************************************************************/
+ 
+-int64 os_getfilesize(char *path)
++int64_t os_getfilesize(char *path)
+ {
+   struct stat buf;
+ 
diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/patches/patch-src_networks_donkey_donkeyGlobals.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mldonkey/patches/patch-src_networks_donkey_donkeyGlobals.ml   Mon Aug 15 15:48:19 2016 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_networks_donkey_donkeyGlobals.ml,v 1.1 2016/08/15 15:48:19 jaapb Exp $
+
+Compile with OCaml 4.03
+--- src/networks/donkey/donkeyGlobals.ml.orig  2011-10-25 17:33:21.000000000 +0000
++++ src/networks/donkey/donkeyGlobals.ml
+@@ -781,7 +781,6 @@ let set_client_name c name md4 =
+       c.client_md4 <- md4;
+     end
+ 
+-exception ClientFound of client
+ let find_client_by_name name =
+   try
+     H.iter (fun c ->
diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/patches/patch-src_utils_cdk_gdstubs.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mldonkey/patches/patch-src_utils_cdk_gdstubs.c        Mon Aug 15 15:48:19 2016 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_utils_cdk_gdstubs.c,v 1.1 2016/08/15 15:48:19 jaapb Exp $
+
+Compile with OCaml 4.03
+--- src/utils/cdk/gdstubs.c.orig       2012-06-24 07:59:41.000000000 +0000
++++ src/utils/cdk/gdstubs.c
+@@ -489,7 +489,7 @@ int ml_image_pngversion(void)
+   CAMLlocal1 (v);
+ #ifdef HAVE_PNGVERSION
+   #include <png.h>
+-  v = copy_int32 ((int32)png_access_version_number());
++  v = copy_int32 ((int32_t)png_access_version_number());
+   CAMLreturn (v);
+ #else
+   raise_constant(*(value *)caml_named_value("gd type not supported"));
diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/patches/patch-src_utils_cdk_zip.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mldonkey/patches/patch-src_utils_cdk_zip.ml   Mon Aug 15 15:48:19 2016 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_utils_cdk_zip.ml,v 1.1 2016/08/15 15:48:19 jaapb Exp $
+
+Compile with OCaml 4.03
+--- src/utils/cdk/zip.ml.orig  2007-02-06 22:26:59.000000000 +0000
++++ src/utils/cdk/zip.ml
+@@ -72,8 +72,6 @@ type out_file =
+     mutable of_entries: entry list;
+     of_comment: string }
+ 
+-exception Error of string * string * string
+-
+ (* Return the position of the last occurrence of s1 in s2, or -1 if not
+    found. *)
+ 
diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/patches/patch-src_utils_cdk_zlibstubs.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mldonkey/patches/patch-src_utils_cdk_zlibstubs.c      Mon Aug 15 15:48:19 2016 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_utils_cdk_zlibstubs.c,v 1.1 2016/08/15 15:48:19 jaapb Exp $
+
+Compile with OCaml 4.03
+--- src/utils/cdk/zlibstubs.c.orig     2009-02-24 18:34:31.000000000 +0000
++++ src/utils/cdk/zlibstubs.c
+@@ -191,7 +191,7 @@ value camlzip_inflateEnd(value vzs)
+ 
+ value camlzip_update_crc32(value crc, value buf, value pos, value len)
+ {
+-  return copy_int32(crc32((uint32) Int32_val(crc), 
++  return copy_int32(crc32((uint32_t) Int32_val(crc), 
+                           &Byte_u(buf, Long_val(pos)),
+                           Long_val(len)));
+ }
diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/patches/patch-src_utils_lib_fst_hash.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mldonkey/patches/patch-src_utils_lib_fst_hash.c       Mon Aug 15 15:48:19 2016 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_utils_lib_fst_hash.c,v 1.1 2016/08/15 15:48:19 jaapb Exp $
+
+Compile with OCaml 4.03
+--- src/utils/lib/fst_hash.c.orig      2005-12-10 19:44:28.000000000 +0000
++++ src/utils/lib/fst_hash.c
+@@ -197,7 +197,7 @@ unsigned short fst_hash_checksum (unsign
+ /*****************************************************************************/
+ 
+ // hash file
+-int fst_hash_file (unsigned char *fth, char *file, int64 filesize)
++int fst_hash_file (unsigned char *fth, char *file, int64_t filesize)
+ {
+   FILE *fp;
+   unsigned char *buf;
+@@ -271,7 +271,7 @@ int fst_hash_file (unsigned char *fth, c
+ }
+ 
+ 
+-void fst_hash_string (unsigned char *fth, unsigned char *file, int64 filesize)
++void fst_hash_string (unsigned char *fth, unsigned char *file, int64_t filesize)
+ {
+   unsigned char * buf = file;
+   size_t len = filesize;
diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/patches/patch-src_utils_lib_options.ml4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mldonkey/patches/patch-src_utils_lib_options.ml4      Mon Aug 15 15:48:19 2016 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_utils_lib_options.ml4,v 1.1 2016/08/15 15:48:19 jaapb Exp $
+
+Compile with OCaml 4.03
+--- src/utils/lib/options.ml4.orig     2013-07-07 10:56:43.000000000 +0000
++++ src/utils/lib/options.ml4
+@@ -332,7 +332,6 @@ let exit_exn = Exit
+ 
+ 
+ let unsafe_get = String.unsafe_get
+-external is_printable : char -> bool = "caml_is_printable"
+ let unsafe_set = String.unsafe_set
+   
+ let escaped s =
+@@ -343,7 +342,7 @@ let escaped s =
+         (match unsafe_get s i with
+            '"' | '\\' -> 2
+          | '\n' | '\t' -> 1
+-         | c -> if is_printable c then 1 else 4)
++         | c -> 1)
+   done;
+   if !n = String.length s then s
+   else
+@@ -354,16 +353,7 @@ let escaped s =
+         '"' | '\\' as c -> unsafe_set s' !n '\\'; incr n; unsafe_set s' !n c
+       | '\n' | '\t' as c -> unsafe_set s' !n c
+       | c ->
+-          if is_printable c then unsafe_set s' !n c
+-          else
+-            let a = int_of_char c in
+-            unsafe_set s' !n '\\';
+-            incr n;
+-            unsafe_set s' !n (char_of_int (48 + a / 100));
+-            incr n;
+-            unsafe_set s' !n (char_of_int (48 + a / 10 mod 10));
+-            incr n;
+-            unsafe_set s' !n (char_of_int (48 + a mod 10))
++                          unsafe_set s' !n c
+       end;
+       incr n
+     done;
diff -r 48318d88e8c3 -r 3852b28be128 net/mldonkey/patches/patch-src_utils_lib_os_stubs.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mldonkey/patches/patch-src_utils_lib_os_stubs.h       Mon Aug 15 15:48:19 2016 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_utils_lib_os_stubs.h,v 1.1 2016/08/15 15:48:19 jaapb Exp $
+
+Compile with OCaml 4.03
+--- src/utils/lib/os_stubs.h.orig      2010-08-01 14:05:29.000000000 +0000
++++ src/utils/lib/os_stubs.h
+@@ -155,8 +155,8 @@ extern OFF_T os_lseek(OS_FD fd, OFF_T po
+ extern void os_ftruncate(OS_FD fd, OFF_T len, int sparse);
+ extern ssize_t os_read(OS_FD fd, char *buf, size_t len);
+ extern int os_getdtablesize();
+-extern int64 os_getfdsize(OS_FD fd);
+-extern int64 os_getfilesize(char *path);
++extern int64_t os_getfdsize(OS_FD fd);
++extern int64_t os_getfilesize(char *path);
+ extern void os_set_nonblock(OS_SOCKET fd);
+ extern void os_uname(char buf[]);
+ extern int os_os_supported();



Home | Main Index | Thread Index | Old Index