Date: Tuesday, March 11, 2014 @ 14:07:26 Author: anatolik Revision: 107033
archrelease: copy trunk to community-testing-i686, community-testing-x86_64 Added: mldonkey/repos/community-testing-i686/ mldonkey/repos/community-testing-i686/PKGBUILD (from rev 107032, mldonkey/trunk/PKGBUILD) mldonkey/repos/community-testing-i686/fix_compile_error.patch (from rev 107032, mldonkey/trunk/fix_compile_error.patch) mldonkey/repos/community-testing-i686/mldonkey.conf (from rev 107032, mldonkey/trunk/mldonkey.conf) mldonkey/repos/community-testing-i686/mldonkey.install (from rev 107032, mldonkey/trunk/mldonkey.install) mldonkey/repos/community-testing-i686/mldonkey.service (from rev 107032, mldonkey/trunk/mldonkey.service) mldonkey/repos/community-testing-i686/mldonkey.tmpfiles (from rev 107032, mldonkey/trunk/mldonkey.tmpfiles) mldonkey/repos/community-testing-x86_64/ mldonkey/repos/community-testing-x86_64/PKGBUILD (from rev 107032, mldonkey/trunk/PKGBUILD) mldonkey/repos/community-testing-x86_64/fix_compile_error.patch (from rev 107032, mldonkey/trunk/fix_compile_error.patch) mldonkey/repos/community-testing-x86_64/mldonkey.conf (from rev 107032, mldonkey/trunk/mldonkey.conf) mldonkey/repos/community-testing-x86_64/mldonkey.install (from rev 107032, mldonkey/trunk/mldonkey.install) mldonkey/repos/community-testing-x86_64/mldonkey.service (from rev 107032, mldonkey/trunk/mldonkey.service) mldonkey/repos/community-testing-x86_64/mldonkey.tmpfiles (from rev 107032, mldonkey/trunk/mldonkey.tmpfiles) --------------------------------------------------+ community-testing-i686/PKGBUILD | 53 ++++ community-testing-i686/fix_compile_error.patch | 254 +++++++++++++++++++++ community-testing-i686/mldonkey.conf | 2 community-testing-i686/mldonkey.install | 27 ++ community-testing-i686/mldonkey.service | 10 community-testing-i686/mldonkey.tmpfiles | 1 community-testing-x86_64/PKGBUILD | 53 ++++ community-testing-x86_64/fix_compile_error.patch | 254 +++++++++++++++++++++ community-testing-x86_64/mldonkey.conf | 2 community-testing-x86_64/mldonkey.install | 27 ++ community-testing-x86_64/mldonkey.service | 10 community-testing-x86_64/mldonkey.tmpfiles | 1 12 files changed, 694 insertions(+) Copied: mldonkey/repos/community-testing-i686/PKGBUILD (from rev 107032, mldonkey/trunk/PKGBUILD) =================================================================== --- community-testing-i686/PKGBUILD (rev 0) +++ community-testing-i686/PKGBUILD 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1,53 @@ +# $Id$ +# Maintainer: Anatol Pomozov <anatol.pomo...@gmail.com> + +pkgname=mldonkey +pkgver=3.1.4 +pkgrel=1 +pkgdesc='A multi-network P2P client' +arch=(i686 x86_64) +url='http://mldonkey.sourceforge.net/' +license=(GPL) +depends=(file gd) +makedepends=(lablgtk2 librsvg ocaml) +optdepends=('librsvg: GUI support' + 'gtk2: GUI support') +backup=(etc/conf.d/mldonkey) +install=mldonkey.install +source=(http://downloads.sourceforge.net/sourceforge/mldonkey/$pkgname-$pkgver.tar.bz2 + mldonkey.conf + mldonkey.service + mldonkey.tmpfiles + fix_compile_error.patch) +sha256sums=('1e454be51fec346d650a72049e4dc4471036d129a488443a67436af62ef375fe' + 'f1d9401cefd591662d49011c53fdb2788755a6f745a963e46d8037b990edeb6a' + '778cebe8edcffd63db3594054c2daa62ce571644a96ad235b8c95470b55c0415' + '45f45d2a3c064d5bbc0b6b9b70fa3497ed47cfecdd1ec52e175311f48eaa89dc' + '172d1b129a068caafcb1e48c861b4b78b129b4ba50bb5e692b61cf00dcc66215') + +prepare() { + cd mldonkey-$pkgver + + # http://mldonkey.sourceforge.net/phpBB2/viewtopic.php?p=32462#32462 + patch -p1 < "$srcdir/fix_compile_error.patch" + + rm config/configure # remove this file to force its regeneration, we've just changed ./config/configure.in +} + +build() { + cd mldonkey-$pkgver + ./configure --prefix=/usr --enable-gui=newgui2 + make +} + +package() { + cd mldonkey-$pkgver + make DESTDIR="$pkgdir" install + + install -Dm644 icons/rsvg/type_source_normal.svg "$pkgdir"/usr/share/icons/mldonkey.svg + install -Dm644 distrib/mldonkey.desktop "$pkgdir"/usr/share/applications/mldonkey.desktop + + install -Dm644 "$srcdir"/mldonkey.conf "$pkgdir"/etc/conf.d/mldonkey + install -Dm644 "$srcdir"/mldonkey.service "$pkgdir"/usr/lib/systemd/system/mldonkey.service + install -Dm644 "$srcdir"/mldonkey.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/mldonkey.conf +} Copied: mldonkey/repos/community-testing-i686/fix_compile_error.patch (from rev 107032, mldonkey/trunk/fix_compile_error.patch) =================================================================== --- community-testing-i686/fix_compile_error.patch (rev 0) +++ community-testing-i686/fix_compile_error.patch 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1,254 @@ +commit 64cf1e7eabf3087c111b54d7df490c5763d0546b +Author: ygrek <yg...@autistici.org> +Date: Tue Mar 11 16:15:09 2014 +0800 + + Revert "gettext: reduce complexity, drop unused code" + + This reverts commit 6a094b4381dacdc9043c8348002179eb87846e16. + "Unused" code is actually used in gui + + Conflicts: + src/utils/lib/gettext.ml4 + +diff --git a/src/daemon/common/commonMessages.ml b/src/daemon/common/commonMessages.ml +index ebae333..0cffed2 100644 +--- a/src/daemon/common/commonMessages.ml ++++ b/src/daemon/common/commonMessages.ml +@@ -1399,9 +1399,11 @@ let bad_login = _s "Bad login/password" + + let full_access = _s "Full access enabled" + +-let download_started n = _s (Printf.sprintf "Download of file %d started<br>" n) ++let download_started = message "download_started" ++ (T.boption (T.int T.bformat)) "Download of file %d started<br>" + +-let no_such_command s = _s (Printf.sprintf "No such command %s\n" s) ++let no_such_command = message "no_such_command" ++ (T.boption (T.string T.bformat)) "No such command %s\n" + + let bad_number_of_args cmd help = _s (Printf.sprintf "Bad number of arguments, see help for correct use:\n%s %s" cmd help) + +diff --git a/src/daemon/driver/driverCommands.ml b/src/daemon/driver/driverCommands.ml +index 6085073..c24be04 100644 +--- a/src/daemon/driver/driverCommands.ml ++++ b/src/daemon/driver/driverCommands.ml +@@ -87,7 +87,7 @@ let execute_command arg_list output cmd args = + let rec iter list = + match list with + [] -> +- Buffer.add_string buf (no_such_command cmd) ++ Gettext.buftext buf no_such_command cmd + | (command, _, arg_kind, help) :: tail -> + if command = cmd then begin + if !verbose_user_commands && not (user2_is_admin output.conn_user.ui_user) then +diff --git a/src/daemon/driver/driverControlers.ml b/src/daemon/driver/driverControlers.ml +index e07ba77..69a1751 100644 +--- a/src/daemon/driver/driverControlers.ml ++++ b/src/daemon/driver/driverControlers.ml +@@ -1296,7 +1296,7 @@ let http_handler o t r = + List.iter CommonInteractive.start_download files; + + let module M = CommonMessages in +- Buffer.add_string buf (M.download_started num) ++ Gettext.buftext buf M.download_started num + with e -> + Printf.bprintf buf "Error %s with %s<br>" + (Printexc2.to_string e) value; +diff --git a/src/utils/lib/gettext.ml4 b/src/utils/lib/gettext.ml4 +index 91a9fbb..fcfe50d 100644 +--- a/src/utils/lib/gettext.ml4 ++++ b/src/utils/lib/gettext.ml4 +@@ -29,15 +29,15 @@ let lprintf_n fmt = + lprintf2 log_prefix fmt + + type expected_types = +-| Type_int ++ Type_int + | Type_char + | Type_string +-| Type_float ++| Type_float + | Type_bool + | Type_int32 + | Type_int64 + | Type_nativeint +- ++ + let ty_arrow x y = x :: y + + (* Taken from ocaml-3.04, typing/typecore.ml *) +@@ -135,6 +135,81 @@ let type_format fmt = + bad_format i j + in + scan_format 0 ++ ++type 'a variable ++type 'a arrow ++ ++ ++let arrow_add_variable ++ (x : 'a variable) ++ (y : 'b arrow) = ++ let x = Obj.magic x in ++ let y = Obj.magic y in ++ (Obj.magic (x :: y) : ('a -> 'b) arrow) ++ ++ ++ ++open Options ++ ++let value_to_text (expected_type : 'a arrow) v = ++ let s = value_to_string v in ++ let expected_type = Obj.magic expected_type in ++ let format_type = type_format s in ++ if format_type = expected_type then ++ (Obj.magic s : ('a, unit, string) format) else ++ failwith "Bad format" ++ ++let text_to_value v = ++ let v = Obj.magic v in ++ string_to_value v ++ ++let text_option (expected_type : 'a arrow) ++ = ++ define_option_class "Text" ++ (value_to_text expected_type) ++ text_to_value ++ ++let gettext v = Printf.sprintf !!v ++ ++let buftext buf (v : ('a, Buffer.t, unit) format Options.option_record) = ++ Printf.bprintf buf !!v ++ ++module T = struct ++ let int x = arrow_add_variable (Obj.magic Type_int : int variable) x ++ let char x = arrow_add_variable (Obj.magic Type_char : char variable) x ++ let string x = arrow_add_variable (Obj.magic Type_string : string variable) x ++ let float x = arrow_add_variable (Obj.magic Type_float : float variable) x ++ let bool x = arrow_add_variable (Obj.magic Type_bool : bool variable) x ++ let int32 x = arrow_add_variable (Obj.magic Type_int32 : int32 variable) x ++ let int64 x = arrow_add_variable (Obj.magic Type_int64 : int64 variable) x ++ let nativeint x = arrow_add_variable (Obj.magic Type_nativeint : nativeint variable) x ++ let format = (Obj.magic [] : string arrow) ++ let bformat = (Obj.magic [] : unit arrow) ++ let option = text_option ++ let boption x = (Obj.magic text_option) x ++ end ++ ++ ++(********* Some tests ************) ++ ++(* ++let option_file = create_options_file "test.ini" ++ ++let nshared = define_option option_file ++ ["nshared"] "Text for Nshared option" ++ (text_option ++ (T.int (T.int32 T.format))) ++ "Shared: %d/%ld" ++ ++let _ = ++ try ++ load option_file ++ with Sys_error _ -> ++ save_with_help option_file ++ ++let _ = ++ lprint_string (Printf.sprintf !! nshared 23 (Int32.one)); ++ *) + + type 'a _string = { + name : string; +@@ -208,6 +283,14 @@ let translate modname s t = + save_strings_file := true; + !translation.(m.index) <- t + end ++(* ++ let x = ++ let y = (Obj.magic x : string) in ++ Obj.magic (register y : string message) ++ ++ let s_ x = register x ++*) ++ + + let verify index translated = + let index_type = type_format !default.(index) in +@@ -222,8 +305,8 @@ let verify index translated = + false + end + +-let ss_ : string -> string -> string _string = register +-let _ss : string _string -> string = fun m -> ++let ss_ modname (x : string) = register modname x ++let _ss m = + let index = m.index in + !requests.(index) <- !requests.(index) + 1; + let translation = !translation.(index) in +@@ -251,7 +334,8 @@ let _bb : ('a, 'b, 'c, 'd) format4 _string -> ('a, 'b, 'c, 'd) format4 = fun m - + Obj.magic s + + let _b modname x = _bb (bb_ modname x) +- ++ ++ + let save_strings () = + match !strings_file with + None -> () +diff --git a/src/utils/lib/gettext.mli b/src/utils/lib/gettext.mli +index 6ac31be..2370881 100644 +--- a/src/utils/lib/gettext.mli ++++ b/src/utils/lib/gettext.mli +@@ -17,7 +17,52 @@ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + *) + ++open Autoconf ++ ++type 'a variable ++type 'a arrow ++ ++val text_option : 'a arrow -> ++ ('a, unit, string) format Options.option_class ++ ++(* ++let nshared = ++ (arrow_variable int_variable int32_variable) ++ "Shared: %d/%ld" ++ *) ++ ++val save_strings : unit -> unit + val set_strings_file : string -> unit + + val _b : string -> ('a, 'b, 'c, 'd) format4 -> ('a, 'b, 'c, 'd) format4 + val _s : string -> string -> string ++ ++type 'a _string ++ ++val bb_ : string -> ('a, 'b, 'c) format -> ('a, 'b, 'c) format _string ++val _bb : ('a, 'b, 'c) format _string -> ('a, 'b, 'c) format ++ ++val ss_ : string -> string -> string _string ++val _ss : string _string -> string ++ ++ ++module T : ++ sig ++ val int : 'b arrow -> (int -> 'b) arrow ++ val char : 'b arrow -> (char -> 'b) arrow ++ val string : 'b arrow -> (string -> 'b) arrow ++ val float : 'b arrow -> (float -> 'b) arrow ++ val bool : 'b arrow -> (bool -> 'b) arrow ++ val int32 : 'b arrow -> (int32 -> 'b) arrow ++ val int64 : 'b arrow -> (int64 -> 'b) arrow ++ val nativeint : 'b arrow -> (nativeint -> 'b) arrow ++ val format : string arrow ++ val bformat : unit arrow ++ val option : 'a arrow -> ++ ('a, unit, string) format Options.option_class ++ val boption : 'a arrow -> ++ ('a, Buffer.t, unit) format Options.option_class ++ end ++ ++val gettext : ('a, unit, string) format Options.option_record -> 'a ++val buftext : Buffer.t -> ('a, Buffer.t, unit) format Options.option_record -> 'a Copied: mldonkey/repos/community-testing-i686/mldonkey.conf (from rev 107032, mldonkey/trunk/mldonkey.conf) =================================================================== --- community-testing-i686/mldonkey.conf (rev 0) +++ community-testing-i686/mldonkey.conf 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1,2 @@ +# Parameters to be passed to the daemon (default is empty) +PARAMS="" Copied: mldonkey/repos/community-testing-i686/mldonkey.install (from rev 107032, mldonkey/trunk/mldonkey.install) =================================================================== --- community-testing-i686/mldonkey.install (rev 0) +++ community-testing-i686/mldonkey.install 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1,27 @@ +post_install() { + if ! getent group mldonkey >/dev/null; then + groupadd --system mldonkey + fi + if ! getent passwd mldonkey >/dev/null; then + useradd --system -c 'Mldonkey daemon user' -g mldonkey -d /var/lib/mldonkey -s /bin/false mldonkey + fi + + mkdir -p /var/lib/mldonkey + chown mldonkey:mldonkey /var/lib/mldonkey + type -P update-desktop-database >/dev/null && update-desktop-database -q +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + if getent passwd mldonkey >/dev/null; then + userdel mldonkey + fi + if getent group mldonkey >/dev/null; then + groupdel mldonkey + fi + + type -P update-desktop-database >/dev/null && update-desktop-database -q +} Copied: mldonkey/repos/community-testing-i686/mldonkey.service (from rev 107032, mldonkey/trunk/mldonkey.service) =================================================================== --- community-testing-i686/mldonkey.service (rev 0) +++ community-testing-i686/mldonkey.service 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1,10 @@ +[Unit] +Description=Mldonkey - Multiple Peer-To-Peer Network Client +After=network.target + +[Service] +User=mldonkey +ExecStart=/usr/bin/mlnet -log_to_syslog true -log_file /dev/null -pid /run/mldonkey + +[Install] +WantedBy=multi-user.target Copied: mldonkey/repos/community-testing-i686/mldonkey.tmpfiles (from rev 107032, mldonkey/trunk/mldonkey.tmpfiles) =================================================================== --- community-testing-i686/mldonkey.tmpfiles (rev 0) +++ community-testing-i686/mldonkey.tmpfiles 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1 @@ +d /run/mldonkey 755 mldonkey mldonkey - Copied: mldonkey/repos/community-testing-x86_64/PKGBUILD (from rev 107032, mldonkey/trunk/PKGBUILD) =================================================================== --- community-testing-x86_64/PKGBUILD (rev 0) +++ community-testing-x86_64/PKGBUILD 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1,53 @@ +# $Id$ +# Maintainer: Anatol Pomozov <anatol.pomo...@gmail.com> + +pkgname=mldonkey +pkgver=3.1.4 +pkgrel=1 +pkgdesc='A multi-network P2P client' +arch=(i686 x86_64) +url='http://mldonkey.sourceforge.net/' +license=(GPL) +depends=(file gd) +makedepends=(lablgtk2 librsvg ocaml) +optdepends=('librsvg: GUI support' + 'gtk2: GUI support') +backup=(etc/conf.d/mldonkey) +install=mldonkey.install +source=(http://downloads.sourceforge.net/sourceforge/mldonkey/$pkgname-$pkgver.tar.bz2 + mldonkey.conf + mldonkey.service + mldonkey.tmpfiles + fix_compile_error.patch) +sha256sums=('1e454be51fec346d650a72049e4dc4471036d129a488443a67436af62ef375fe' + 'f1d9401cefd591662d49011c53fdb2788755a6f745a963e46d8037b990edeb6a' + '778cebe8edcffd63db3594054c2daa62ce571644a96ad235b8c95470b55c0415' + '45f45d2a3c064d5bbc0b6b9b70fa3497ed47cfecdd1ec52e175311f48eaa89dc' + '172d1b129a068caafcb1e48c861b4b78b129b4ba50bb5e692b61cf00dcc66215') + +prepare() { + cd mldonkey-$pkgver + + # http://mldonkey.sourceforge.net/phpBB2/viewtopic.php?p=32462#32462 + patch -p1 < "$srcdir/fix_compile_error.patch" + + rm config/configure # remove this file to force its regeneration, we've just changed ./config/configure.in +} + +build() { + cd mldonkey-$pkgver + ./configure --prefix=/usr --enable-gui=newgui2 + make +} + +package() { + cd mldonkey-$pkgver + make DESTDIR="$pkgdir" install + + install -Dm644 icons/rsvg/type_source_normal.svg "$pkgdir"/usr/share/icons/mldonkey.svg + install -Dm644 distrib/mldonkey.desktop "$pkgdir"/usr/share/applications/mldonkey.desktop + + install -Dm644 "$srcdir"/mldonkey.conf "$pkgdir"/etc/conf.d/mldonkey + install -Dm644 "$srcdir"/mldonkey.service "$pkgdir"/usr/lib/systemd/system/mldonkey.service + install -Dm644 "$srcdir"/mldonkey.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/mldonkey.conf +} Copied: mldonkey/repos/community-testing-x86_64/fix_compile_error.patch (from rev 107032, mldonkey/trunk/fix_compile_error.patch) =================================================================== --- community-testing-x86_64/fix_compile_error.patch (rev 0) +++ community-testing-x86_64/fix_compile_error.patch 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1,254 @@ +commit 64cf1e7eabf3087c111b54d7df490c5763d0546b +Author: ygrek <yg...@autistici.org> +Date: Tue Mar 11 16:15:09 2014 +0800 + + Revert "gettext: reduce complexity, drop unused code" + + This reverts commit 6a094b4381dacdc9043c8348002179eb87846e16. + "Unused" code is actually used in gui + + Conflicts: + src/utils/lib/gettext.ml4 + +diff --git a/src/daemon/common/commonMessages.ml b/src/daemon/common/commonMessages.ml +index ebae333..0cffed2 100644 +--- a/src/daemon/common/commonMessages.ml ++++ b/src/daemon/common/commonMessages.ml +@@ -1399,9 +1399,11 @@ let bad_login = _s "Bad login/password" + + let full_access = _s "Full access enabled" + +-let download_started n = _s (Printf.sprintf "Download of file %d started<br>" n) ++let download_started = message "download_started" ++ (T.boption (T.int T.bformat)) "Download of file %d started<br>" + +-let no_such_command s = _s (Printf.sprintf "No such command %s\n" s) ++let no_such_command = message "no_such_command" ++ (T.boption (T.string T.bformat)) "No such command %s\n" + + let bad_number_of_args cmd help = _s (Printf.sprintf "Bad number of arguments, see help for correct use:\n%s %s" cmd help) + +diff --git a/src/daemon/driver/driverCommands.ml b/src/daemon/driver/driverCommands.ml +index 6085073..c24be04 100644 +--- a/src/daemon/driver/driverCommands.ml ++++ b/src/daemon/driver/driverCommands.ml +@@ -87,7 +87,7 @@ let execute_command arg_list output cmd args = + let rec iter list = + match list with + [] -> +- Buffer.add_string buf (no_such_command cmd) ++ Gettext.buftext buf no_such_command cmd + | (command, _, arg_kind, help) :: tail -> + if command = cmd then begin + if !verbose_user_commands && not (user2_is_admin output.conn_user.ui_user) then +diff --git a/src/daemon/driver/driverControlers.ml b/src/daemon/driver/driverControlers.ml +index e07ba77..69a1751 100644 +--- a/src/daemon/driver/driverControlers.ml ++++ b/src/daemon/driver/driverControlers.ml +@@ -1296,7 +1296,7 @@ let http_handler o t r = + List.iter CommonInteractive.start_download files; + + let module M = CommonMessages in +- Buffer.add_string buf (M.download_started num) ++ Gettext.buftext buf M.download_started num + with e -> + Printf.bprintf buf "Error %s with %s<br>" + (Printexc2.to_string e) value; +diff --git a/src/utils/lib/gettext.ml4 b/src/utils/lib/gettext.ml4 +index 91a9fbb..fcfe50d 100644 +--- a/src/utils/lib/gettext.ml4 ++++ b/src/utils/lib/gettext.ml4 +@@ -29,15 +29,15 @@ let lprintf_n fmt = + lprintf2 log_prefix fmt + + type expected_types = +-| Type_int ++ Type_int + | Type_char + | Type_string +-| Type_float ++| Type_float + | Type_bool + | Type_int32 + | Type_int64 + | Type_nativeint +- ++ + let ty_arrow x y = x :: y + + (* Taken from ocaml-3.04, typing/typecore.ml *) +@@ -135,6 +135,81 @@ let type_format fmt = + bad_format i j + in + scan_format 0 ++ ++type 'a variable ++type 'a arrow ++ ++ ++let arrow_add_variable ++ (x : 'a variable) ++ (y : 'b arrow) = ++ let x = Obj.magic x in ++ let y = Obj.magic y in ++ (Obj.magic (x :: y) : ('a -> 'b) arrow) ++ ++ ++ ++open Options ++ ++let value_to_text (expected_type : 'a arrow) v = ++ let s = value_to_string v in ++ let expected_type = Obj.magic expected_type in ++ let format_type = type_format s in ++ if format_type = expected_type then ++ (Obj.magic s : ('a, unit, string) format) else ++ failwith "Bad format" ++ ++let text_to_value v = ++ let v = Obj.magic v in ++ string_to_value v ++ ++let text_option (expected_type : 'a arrow) ++ = ++ define_option_class "Text" ++ (value_to_text expected_type) ++ text_to_value ++ ++let gettext v = Printf.sprintf !!v ++ ++let buftext buf (v : ('a, Buffer.t, unit) format Options.option_record) = ++ Printf.bprintf buf !!v ++ ++module T = struct ++ let int x = arrow_add_variable (Obj.magic Type_int : int variable) x ++ let char x = arrow_add_variable (Obj.magic Type_char : char variable) x ++ let string x = arrow_add_variable (Obj.magic Type_string : string variable) x ++ let float x = arrow_add_variable (Obj.magic Type_float : float variable) x ++ let bool x = arrow_add_variable (Obj.magic Type_bool : bool variable) x ++ let int32 x = arrow_add_variable (Obj.magic Type_int32 : int32 variable) x ++ let int64 x = arrow_add_variable (Obj.magic Type_int64 : int64 variable) x ++ let nativeint x = arrow_add_variable (Obj.magic Type_nativeint : nativeint variable) x ++ let format = (Obj.magic [] : string arrow) ++ let bformat = (Obj.magic [] : unit arrow) ++ let option = text_option ++ let boption x = (Obj.magic text_option) x ++ end ++ ++ ++(********* Some tests ************) ++ ++(* ++let option_file = create_options_file "test.ini" ++ ++let nshared = define_option option_file ++ ["nshared"] "Text for Nshared option" ++ (text_option ++ (T.int (T.int32 T.format))) ++ "Shared: %d/%ld" ++ ++let _ = ++ try ++ load option_file ++ with Sys_error _ -> ++ save_with_help option_file ++ ++let _ = ++ lprint_string (Printf.sprintf !! nshared 23 (Int32.one)); ++ *) + + type 'a _string = { + name : string; +@@ -208,6 +283,14 @@ let translate modname s t = + save_strings_file := true; + !translation.(m.index) <- t + end ++(* ++ let x = ++ let y = (Obj.magic x : string) in ++ Obj.magic (register y : string message) ++ ++ let s_ x = register x ++*) ++ + + let verify index translated = + let index_type = type_format !default.(index) in +@@ -222,8 +305,8 @@ let verify index translated = + false + end + +-let ss_ : string -> string -> string _string = register +-let _ss : string _string -> string = fun m -> ++let ss_ modname (x : string) = register modname x ++let _ss m = + let index = m.index in + !requests.(index) <- !requests.(index) + 1; + let translation = !translation.(index) in +@@ -251,7 +334,8 @@ let _bb : ('a, 'b, 'c, 'd) format4 _string -> ('a, 'b, 'c, 'd) format4 = fun m - + Obj.magic s + + let _b modname x = _bb (bb_ modname x) +- ++ ++ + let save_strings () = + match !strings_file with + None -> () +diff --git a/src/utils/lib/gettext.mli b/src/utils/lib/gettext.mli +index 6ac31be..2370881 100644 +--- a/src/utils/lib/gettext.mli ++++ b/src/utils/lib/gettext.mli +@@ -17,7 +17,52 @@ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + *) + ++open Autoconf ++ ++type 'a variable ++type 'a arrow ++ ++val text_option : 'a arrow -> ++ ('a, unit, string) format Options.option_class ++ ++(* ++let nshared = ++ (arrow_variable int_variable int32_variable) ++ "Shared: %d/%ld" ++ *) ++ ++val save_strings : unit -> unit + val set_strings_file : string -> unit + + val _b : string -> ('a, 'b, 'c, 'd) format4 -> ('a, 'b, 'c, 'd) format4 + val _s : string -> string -> string ++ ++type 'a _string ++ ++val bb_ : string -> ('a, 'b, 'c) format -> ('a, 'b, 'c) format _string ++val _bb : ('a, 'b, 'c) format _string -> ('a, 'b, 'c) format ++ ++val ss_ : string -> string -> string _string ++val _ss : string _string -> string ++ ++ ++module T : ++ sig ++ val int : 'b arrow -> (int -> 'b) arrow ++ val char : 'b arrow -> (char -> 'b) arrow ++ val string : 'b arrow -> (string -> 'b) arrow ++ val float : 'b arrow -> (float -> 'b) arrow ++ val bool : 'b arrow -> (bool -> 'b) arrow ++ val int32 : 'b arrow -> (int32 -> 'b) arrow ++ val int64 : 'b arrow -> (int64 -> 'b) arrow ++ val nativeint : 'b arrow -> (nativeint -> 'b) arrow ++ val format : string arrow ++ val bformat : unit arrow ++ val option : 'a arrow -> ++ ('a, unit, string) format Options.option_class ++ val boption : 'a arrow -> ++ ('a, Buffer.t, unit) format Options.option_class ++ end ++ ++val gettext : ('a, unit, string) format Options.option_record -> 'a ++val buftext : Buffer.t -> ('a, Buffer.t, unit) format Options.option_record -> 'a Copied: mldonkey/repos/community-testing-x86_64/mldonkey.conf (from rev 107032, mldonkey/trunk/mldonkey.conf) =================================================================== --- community-testing-x86_64/mldonkey.conf (rev 0) +++ community-testing-x86_64/mldonkey.conf 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1,2 @@ +# Parameters to be passed to the daemon (default is empty) +PARAMS="" Copied: mldonkey/repos/community-testing-x86_64/mldonkey.install (from rev 107032, mldonkey/trunk/mldonkey.install) =================================================================== --- community-testing-x86_64/mldonkey.install (rev 0) +++ community-testing-x86_64/mldonkey.install 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1,27 @@ +post_install() { + if ! getent group mldonkey >/dev/null; then + groupadd --system mldonkey + fi + if ! getent passwd mldonkey >/dev/null; then + useradd --system -c 'Mldonkey daemon user' -g mldonkey -d /var/lib/mldonkey -s /bin/false mldonkey + fi + + mkdir -p /var/lib/mldonkey + chown mldonkey:mldonkey /var/lib/mldonkey + type -P update-desktop-database >/dev/null && update-desktop-database -q +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + if getent passwd mldonkey >/dev/null; then + userdel mldonkey + fi + if getent group mldonkey >/dev/null; then + groupdel mldonkey + fi + + type -P update-desktop-database >/dev/null && update-desktop-database -q +} Copied: mldonkey/repos/community-testing-x86_64/mldonkey.service (from rev 107032, mldonkey/trunk/mldonkey.service) =================================================================== --- community-testing-x86_64/mldonkey.service (rev 0) +++ community-testing-x86_64/mldonkey.service 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1,10 @@ +[Unit] +Description=Mldonkey - Multiple Peer-To-Peer Network Client +After=network.target + +[Service] +User=mldonkey +ExecStart=/usr/bin/mlnet -log_to_syslog true -log_file /dev/null -pid /run/mldonkey + +[Install] +WantedBy=multi-user.target Copied: mldonkey/repos/community-testing-x86_64/mldonkey.tmpfiles (from rev 107032, mldonkey/trunk/mldonkey.tmpfiles) =================================================================== --- community-testing-x86_64/mldonkey.tmpfiles (rev 0) +++ community-testing-x86_64/mldonkey.tmpfiles 2014-03-11 13:07:26 UTC (rev 107033) @@ -0,0 +1 @@ +d /run/mldonkey 755 mldonkey mldonkey -