Index: head/net-p2p/mldonkey/Makefile =================================================================== --- head/net-p2p/mldonkey/Makefile (revision 504093) +++ head/net-p2p/mldonkey/Makefile (revision 504094) @@ -1,152 +1,159 @@ # Created by: Holger Lamm # $FreeBSD$ PORTNAME= mldonkey PORTVERSION= 3.1.5 PORTREVISION= 2 CATEGORIES+= net-p2p MASTER_SITES= SF -MAINTAINER?= ports@FreeBSD.org -COMMENT?= OCAML client for multiple peer-to-peer networks +EXTRA_PATCHES= ${FILESDIR}/git-30e77e2:-p1 +MAINTAINER?= danfe@FreeBSD.org +COMMENT?= Multi-protocol peer-to-peer client written in OCaml + LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/Copying.txt CONFLICTS= mldonkey{-{core,gui},}-devel-[0-9]* USES= gmake iconv pkgconfig tar:bzip2 USE_OCAML= yes USE_OCAML_CAMLP4=yes GNU_CONFIGURE= yes CONFIGURE_ARGS= ac_cv_lib_charset_locale_charset=no ALL_TARGET= opt MAKE_ENV+= OCAMLRUNPARAM="l=256M" MAKE_JOBS_UNSAFE= yes SUB_FILES= pkg-message ### ## Options activation ### OPTIONS_DEFINE= GD DOCS EXAMPLES OPTIONS_DEFAULT=CORE GD GUI OPTIONS_MULTI= CLIENT OPTIONS_MULTI_CLIENT=CORE GUI CORE_DESC= Client 'core' support .include .if ${PORT_OPTIONS:MGUI} && ${PORT_OPTIONS:MCORE} CONFLICTS+= mldonkey-core-[0.9]* CONFLICTS+= mldonkey-gui-[0.9]* PLIST_SUB+= CORE="" GUI="" GUICORE="" .else # (${PORT_OPTIONS:MGUI} && ${PORT_OPTIONS:MCORE}) . if !${PORT_OPTIONS:MGUI} PKGNAMESUFFIX= -core CONFLICTS+= mldonkey-gui-[0.9]* CONFIGURE_ARGS+=--disable-gui PLIST_SUB+= CORE="" GUI="@comment " GUICORE="@comment " . endif # !${PORT_OPTIONS:MGUI} . if !${PORT_OPTIONS:MCORE} PKGNAMESUFFIX= -gui CONFLICTS+= mldonkey-core-[0.9]* PLIST_SUB+= CORE="@comment " GUI="" GUICORE="@comment " . endif # !${PORT_OPTIONS:MCORE} .endif # ${PORT_OPTIONS:MGUI} && ${PORT_OPTIONS:MCORE} .if ${PORT_OPTIONS:MGUI} BUILD_DEPENDS+= ${LOCALBASE}/lib/ocaml/site-lib/lablgtk2/lablrsvg.cma:x11-toolkits/ocaml-lablgtk2 LIB_DEPENDS+= librsvg-2.so:graphics/librsvg2 CONFIGURE_ARGS+=--enable-gui=newgui2 # we don't need lablgtk as RUN dependency, but we need gtk+glib USE_GNOME= gtk20 .endif # ${PORT_OPTIONS:MGUI} .if ${PORT_OPTIONS:MCORE} USE_RC_SUBR= mlnet SUB_LIST+= SH=${SH:Q} . if ${PORT_OPTIONS:MGD} LIB_DEPENDS+= libgd.so:graphics/gd . else CONFIGURE_ARGS+=--disable-gd . endif .endif PORTDOCS= Authors.txt Bugs.txt ChangeLog Developers.txt \ Install.txt Todo.txt ed2k_links.txt # build additional tools ALL_TARGET+= \ mld_hash .include post-patch: @${SED} \ -e "s|%%PREFIX%%|${PREFIX}|" \ -e "s|%%SH%%|${SH}|" \ ${FILESDIR}/wrapper.sh > \ ${WRKDIR}/wrapper.sh @${REINPLACE_CMD} \ -e 's|$$OCAMLLIB/$$LABLGTK_NAME|$$OCAMLLIB/site-lib/$$LABLGTK_NAME|' \ ${WRKSRC}/config/configure @${REINPLACE_CMD} \ -e 's|+labl|+site-lib/labl|' \ ${WRKSRC}/config/Makefile.in @${REINPLACE_CMD} -E \ -e 's@(#include <)(lablgtk2/)@\1site-lib/\2@' \ ${WRKSRC}/src/gtk2/gui/x11/systraystubs.c # update server.met provider @${REINPLACE_CMD} -E \ -e 's|http://www.gruk.org/server.met.gz|http://www.jd2k.com/server.met|' \ -e 's|http://www.bluetack.co.uk/config/antip2p.txt|http://www.bluetack.co.uk/config/level1.gz|' \ ${WRKSRC}/src/daemon/common/commonOptions.ml \ ${WRKSRC}/src/networks/donkey/donkeyServers.ml + @${REINPLACE_CMD} \ + -e 's/[u(]int32/&_t/' ${WRKSRC}/src/utils/cdk/zlibstubs.c + @${REINPLACE_CMD} \ + -e 's/int64/&_t/' ${WRKSRC}/src/config/unix/os_stubs_c.c \ + ${WRKSRC}/src/utils/lib/os_stubs.h do-install: .if ${PORT_OPTIONS:MCORE} ${INSTALL_PROGRAM} ${WRKSRC}/mld_hash ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/mlnet ${STAGEDIR}${PREFIX}/bin/mlnet-real ${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${STAGEDIR}${PREFIX}/bin/mlnet .if ${PORT_OPTIONS:MEXAMPLES} @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_SCRIPT} ${FILESDIR}/kill_mldonkey ${STAGEDIR}${EXAMPLESDIR} .endif .endif .if ${PORT_OPTIONS:MGUI} ${INSTALL_PROGRAM} ${WRKSRC}/mlgui ${STAGEDIR}${PREFIX}/bin .endif .if ${PORT_OPTIONS:MGUI} && ${PORT_OPTIONS:MCORE} ${INSTALL_SCRIPT} ${WRKSRC}/distrib/mldonkey_previewer ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/mlguistarter ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/mlnet+gui ${STAGEDIR}${PREFIX}/bin .endif .if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR} .for _file in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/distrib/${_file} ${STAGEDIR}${DOCSDIR} .endfor .endif install-user: extract .if !defined(LANGUAGE) @${ECHO_MSG} "Please call as: make install-user LANGUAGE=" @${ECHO_MSG} "with one of en,de,fr,fr.noaccents,sp !" .else @${CP} ${WRKSRC}/distrib/i18n/gui_messages.ini.${LANGUAGE}\ ${HOME}/.mldonkey_gui_messages.ini .endif .include Index: head/net-p2p/mldonkey/files/git-30e77e2 =================================================================== --- head/net-p2p/mldonkey/files/git-30e77e2 (nonexistent) +++ head/net-p2p/mldonkey/files/git-30e77e2 (revision 504094) @@ -0,0 +1,95 @@ +From 30e77e2571b9b11065be16ca3b88e5f139fec9e5 Mon Sep 17 00:00:00 2001 +From: Bastien Dejean +Date: Sun, 24 Jul 2016 11:44:53 +0200 +Subject: [PATCH] Fix compilation with OCaml 4.03.0 + +--- + src/networks/donkey/donkeyGlobals.ml | 1 - + src/utils/cdk/zip.ml | 2 -- + src/utils/lib/options.ml4 | 41 +--------------------------- + 3 files changed, 1 insertion(+), 43 deletions(-) + +diff --git a/src/networks/donkey/donkeyGlobals.ml b/src/networks/donkey/donkeyGlobals.ml +index 5125d018..1228830b 100644 +--- a/src/networks/donkey/donkeyGlobals.ml ++++ b/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 --git a/src/utils/cdk/zip.ml b/src/utils/cdk/zip.ml +index 2ed4e068..32085a8c 100644 +--- a/src/utils/cdk/zip.ml ++++ b/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 --git a/src/utils/lib/options.ml4 b/src/utils/lib/options.ml4 +index a5ae1f0c..be5ea347 100644 +--- a/src/utils/lib/options.ml4 ++++ b/src/utils/lib/options.ml4 +@@ -330,45 +330,6 @@ the last defined one ("defined" in the order of the program execution). + + 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 = +- let n = ref 0 in +- for i = 0 to String.length s - 1 do +- n := +- !n + +- (match unsafe_get s i with +- '"' | '\\' -> 2 +- | '\n' | '\t' -> 1 +- | c -> if is_printable c then 1 else 4) +- done; +- if !n = String.length s then s +- else +- let s' = String.create !n in +- n := 0; +- for i = 0 to String.length s - 1 do +- begin match unsafe_get s i with +- '"' | '\\' 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)) +- end; +- incr n +- done; +- s' +- + let safe_string s = + if s = "" then "\"\"" + else +@@ -388,7 +349,7 @@ let safe_string s = + s + else raise exit_exn + with +- _ -> Printf.sprintf "\"%s\"" (escaped s) ++ _ -> Printf.sprintf "\"%s\"" (String.escaped s) + + let with_help = ref false + let save_private = ref false Property changes on: head/net-p2p/mldonkey/files/git-30e77e2 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property