o Take over maintainership

o Update to 2.8.1 from port net-p2p/mldonkey-devel

Approved by:	benlutz@datacomm.ch (previous maintainer)
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2006-09-28 23:11:52 +00:00
parent 87f7903742
commit 5d9964b12f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=174069
11 changed files with 221 additions and 703 deletions

View file

@ -6,32 +6,48 @@
#
PORTNAME= mldonkey
PORTVERSION= 2.5.30.17
PORTREVISION= 2
PORTVERSION= 2.8.1
CATEGORIES+= net-p2p
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} \
${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER?= benlutz@datacomm.ch
MAINTAINER?= lioux@FreeBSD.org
COMMENT?= A OCAML client for multiple peer-to-peer networks
BUILD_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml
CONFLICTS= mldonkey-devel-[0-9]*
NO_LATEST_LINK= yes
CONFLICTS= mldonkey-[0-9]*
USE_BZIP2= yes
USE_AUTOTOOLS= autoconf:259:env
USE_OPENSSL= yes
USE_ICONV= yes
USE_RC_SUBR= mlnet
USE_AUTOTOOLS= autoconf:259:env
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-pthread --enable-ocamlver=3
USE_GMAKE= yes
ALL_TARGET= depend opt
ALL_TARGET= opt
.if !defined(WITHOUT_CORE)
USE_RC_SUBR= yes
CONFIGURE_ARGS+=\
--enable-ocamlver=3 \
--with-libiconv-prefix=${LOCALBASE}
CONFIGURE_ENV+= \
NEWCXX="${CXX}" \
CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"
###
## Library dependency handling
###
.if !exists(/usr/lib/libbz2.so)
LIB_DEPENDS+= bz2:${PORTSDIR}/archivers/bzip2
.endif
###
## Options activation
###
.if defined(WITHOUT_GUI)
.if defined(WITHOUT_CORE)
IGNORE= cannot install: you defined both WITHOUT_GUI and WITHOUT_CORE. I think I'll do nothing
@ -39,69 +55,123 @@ IGNORE= cannot install: you defined both WITHOUT_GUI and WITHOUT_CORE. I think I
# have no 'without-' flag
CONFIGURE_ARGS+=--disable-gui
PLIST_SUB+= CORE="" GUI="@comment " GUICORE="@comment "
CONFLICTS+= mldonkey-core-devel-[0.9]* mldonkey-core-stable-[0.9]* \
mldonkey-[0-9]*
PKGNAMESUFFIX= -core
CONFLICTS+= mldonkey-core-[0.9]* mldonkey-core-stable-[0.9]* \
mldonkey-devel-[0-9]*
PKGNAMESUFFIX= -core-devel
.else
PLIST_SUB+= GUI=""
CONFLICTS+= mldonkey-gui-devel-[0.9]*
CONFLICTS+= mldonkey-gui-[0.9]*
.if !defined(WITHOUT_CORE)
CONFLICTS+= mldonkey-[0-9]*
CONFLICTS+= mldonkey-devel-[0-9]*
.endif
BUILD_DEPENDS+= lablgtk:${PORTSDIR}/x11-toolkits/ocaml-lablgtk \
${LOCALBASE}/lib/ocaml/jabbr.cma:${PORTSDIR}/net-im/ocaml-jabbr
BUILD_DEPENDS+= ${LOCALBASE}/lib/ocaml/lablgtk2/lablrsvg.cma:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
LIB_DEPENDS+= rsvg-2.2:${PORTSDIR}/graphics/librsvg2
CONFIGURE_ARGS+=--enable-gui=newgui2
# we don't need lablgtk as RUN dependency, but we need gtk+glib
USE_GNOME= gtk12
USE_GNOME= gtk20
MAKE_ENV+= OCAMLRUNPARAM="l=256M"
.if defined(WITHOUT_CORE)
PKGNAMESUFFIX= -gui
PKGNAMESUFFIX= -gui-devel
PLIST_SUB+= CORE="@comment " GUICORE="@comment "
.else
PLIST_SUB+= CORE="" GUICORE=""
.endif
.endif
.if defined(WITHOUT_GD)
CONFIGURE_ARGS+=--disable-gd
.elif !defined(WITHOUT_CORE)
LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
.endif
DOCFILES= Authors.txt Bugs.txt ChangeLog Developers.txt FAQ.html \
Install.txt Readme.txt Todo.txt ed2k_links.txt
PORTDOCS= ${DOCFILES}
PKGMESSAGE= ${WRKDIR}/pkg-message
# build additional tools
ALL_TARGET+= \
mld_hash
.include <bsd.port.pre.mk>
# Fix build on 4.x
.if ${OSVERSION} < 500000
USE_GCC= 3.4
.endif
# FreeBSD has reentrant dns code
.if ( ((${OSVERSION} >= 504102) && (${OSVERSION} < 600000)) || (${OSVERSION} >= 600029) )
PTHREAD_CFLAGS+= -D_REENTRANT
.endif
### Development version
## Thus, we will use non standard threading library
## We will switch from libpthread to libthr which should produce
## better results in some scenarios. You can read more at pthread(3)
.if defined(WITH_THR_THREAD_MODEL)
PTHREAD_CFLAGS= -D_THREAD_SAFE
PTHREAD_LIBS= -lthr
.endif
pre-everything::
.if !defined(WITHOUT_GUI) && !defined(WITHOUT_CORE)
@${ECHO_MSG} "You can disable the GUI by defining WITHOUT_GUI."
@${ECHO_MSG} "You can disable the CORE by defining WITHOUT_CORE."
@${ECHO_MSG}
.endif
.ifndef(WITH_THR_THREAD_MODEL)
@${ECHO_MSG} "Define WITH_THR_THREAD_MODEL to switch from"
@${ECHO_MSG} "pthread to thr threading model which could produce better"
@${ECHO_MSG} "results in some scenarios. Use at your discretion."
.endif
post-patch:
@${SED} -e "s|%%PREFIX%%|${PREFIX}|" ${FILESDIR}/wrapper.sh > \
${WRKDIR}/wrapper.sh
@${REINPLACE_CMD} -E \
-e 's|%%AUTOCONF%%|${AUTOCONF}|' \
${BUILD_WRKSRC}/config/Makefile.in
# update server.met provider
.for file in \
src/daemon/common/commonOptions.ml \
src/networks/donkey/donkeyServers.ml
@${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}/${file}
.endfor
pre-configure:
@cd ${WRKSRC}/config && ${AUTOCONF}
post-patch:
.ifndef(WITHOUT_CORE)
@${SED} -e "s|%%PREFIX%%|${PREFIX}|g ; s|%%RC_SUBR%%|${RC_SUBR}|g ; s|%%LOCALBASE%%|${LOCALBASE}|g" ${FILESDIR}/mlnet.sh > \
${WRKDIR}/mlnet.sh
@${SED} -e "s|%%PREFIX%%|${PREFIX}|" ${FILESDIR}/wrapper.sh > \
${WRKDIR}/wrapper.sh
.endif
${REINPLACE_CMD} -E \
-e 's|%%AUTOCONF%%|${AUTOCONF}|' \
${BUILD_WRKSRC}/config/Makefile.in
post-configure:
@${REINPLACE_CMD} -E \
-e 's|^(PTHREAD_CFLAGS[^=]*=).*$$|\1${PTHREAD_CFLAGS}|' \
-e 's|^(PTHREAD_LIBS[^=]*=).*$$|\1${PTHREAD_LIBS}|' \
${BUILD_WRKSRC}/config/Makefile.config
post-build:
pre-install:
.if exists(${.CURDIR}/pkg-message)
@${SED} -e 's,%%DOCSDIR%%,${DOCSDIR},' \
< ${.CURDIR}/pkg-message > ${PKGMESSAGE}
.elif exists(${MASTERDIR}/pkg-message)
@${SED} -e 's,%%DOCSDIR%%,${DOCSDIR},' \
< ${MASTERDIR}/pkg-message > ${PKGMESSAGE}
.endif
do-install:
.ifndef(WITHOUT_CORE)
@${INSTALL_PROGRAM} ${WRKSRC}/mld_hash ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/mlnet ${PREFIX}/bin/mlnet-real
@${INSTALL_SCRIPT} ${FILESDIR}/kill_mldonkey ${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/mlnet
@${INSTALL_SCRIPT} ${WRKDIR}/mlnet.sh ${PREFIX}/etc/rc.d
@${MKDIR} ${EXAMPLESDIR}
@${INSTALL_SCRIPT} ${FILESDIR}/kill_mldonkey ${EXAMPLESDIR}
.endif
.ifndef(WITHOUT_GUI)
@${INSTALL_PROGRAM} ${WRKSRC}/mlchat ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/mlgui ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/mlim ${PREFIX}/bin
.endif
.ifndef(WITHOUT_CORE && WITHOUT_GUI)
@${INSTALL_SCRIPT} ${WRKSRC}/distrib/mldonkey_previewer ${PREFIX}/bin
@ -110,8 +180,8 @@ do-install:
.endif
.ifndef(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for file in ${DOCFILES}
@${INSTALL_DATA} ${WRKSRC}/distrib/${file} ${DOCSDIR}
.for _file in ${DOCFILES}
@${INSTALL_DATA} ${WRKSRC}/distrib/${_file} ${DOCSDIR}
.endfor
.endif

View file

@ -1,3 +1,3 @@
MD5 (mldonkey-2.5.30.17.tar.bz2) = f8db2c502c7ed4f660af124a431af020
SHA256 (mldonkey-2.5.30.17.tar.bz2) = 697d3dae81fb190a87c024b38526334b9cbd7ed45f54f59ca940b5f94784433f
SIZE (mldonkey-2.5.30.17.tar.bz2) = 2654409
MD5 (mldonkey-2.8.1.tar.bz2) = 10452ad305f105d0d0761977f825694d
SHA256 (mldonkey-2.8.1.tar.bz2) = 6ac802a918bb71c47e06193936b07d4ea161dc68d35853793986d0b6b51fa3c4
SIZE (mldonkey-2.8.1.tar.bz2) = 2642676

View file

@ -0,0 +1,69 @@
#!/bin/sh
#
# $FreeBSD$
#
# Under a BSDL license. Copyright 2005. Mario S F Ferreira <lioux@FreeBSD.org>
# PROVIDE: mlnet
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable mlnet:
#
#mlnet_enable="YES"
#mlnet_user=""
#mlnet_flags=""
#mlnet_logfile=""
#
. %%RC_SUBR%%
name="mlnet"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/${name}"
procname="%%PREFIX%%/bin/${name}-real"
load_rc_config "${name}"
: ${mlnet_enable="NO"}
: ${mlnet_user="$(whoami)"}
: ${mlnet_flags=""}
: ${mlnet_logfile=""}
pidfile="$(eval echo ~${mlnet_user}/.mldonkey/$(basename ${procname}).pid)"
required_dirs="$(eval echo ~${mlnet_user})"
mlnet_check_vars()
{
if [ "x${mlnet_user}" = "xroot" ]; then
warn "You have to set mlnet_user to a non-root user for security reasons"
return 1
fi
return 0
}
start_precmd="mlnet_check_vars"
start_cmd="start_cmd"
start_cmd()
{
if [ -n "${mlnet_logfile}" ]; then
mlnet_logcommand="-log_file ${mlnet_logfile}"
fi
if [ "x${mlnet_user}" = "x$(whoami)" ]; then
eval "${command} \
${mlnet_logcommand} \
${mlnet_flags} \
>/dev/null &"
else
su -l ${mlnet_user} -c "${command} \
${mlnet_logcommand} \
${mlnet_flags} \
>/dev/null &"
fi
}
stop_precmd="mlnet_check_vars"
run_rc_command "$1"

View file

@ -1,60 +0,0 @@
#!/bin/sh
# $FreeBSD$
# PROVIDE: mlnet
# REQUIRE: LOGIN
# KEYWORD: shutdown
mlnet_enable=${mlnet_enable:-"NO"}
mlnet_http_port=${mlnet_http_port:-"4080"}
mlnet_logfile=${mlnet_logfile:-"/var/log/mlnet"}
. %%RC_SUBR%%
name=mlnet
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/${name}"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
mlnet_conf="%%PREFIX%%/etc/mlnet.conf"
required_files="${mlnet_conf}"
mlnet_user=${mlnet_user:-"mlnet"}
if [ -r ${mlnet_conf} ] ; then
. ${mlnet_conf}
fi
mlnet_url="http://"
if [ -n "${mlnet_http_user}" -a -n "${mlnet_http_password}" ] ; then
mlnet_url="${mlnet_url}${mlnet_http_user}:${mlnet_http_password}@"
fi
mlnet_url="${mlnet_url}localhost:${mlnet_http_port}"
mlnet_start() {
if checkyesno mlnet_enable ; then
echo -n " mlnet"
su ${mlnet_user} -c "${command} \
${mlnet_flags} \
-http_port ${mlnet_http_port}" \
>>${mlnet_logfile} 2>&1 &
fi
}
mlnet_stop() {
if checkyesno mlnet_enable ; then
echo -n " mlnet"
%%LOCALBASE%%/bin/wget --spider -q \
"${mlnet_url}/submit?q=close_fds" \
>>${mlnet_logfile} 2>&1
%%LOCALBASE%%/bin/wget --spider -q \
"${mlnet_url}/submit?q=save" \
>>${mlnet_logfile} 2>&1
%%LOCALBASE%%/bin/wget --spider -q \
"${mlnet_url}/submit?q=kill" \
>>${mlnet_logfile} 2>&1
fi
}
load_rc_config ${name}
run_rc_command "$1"

View file

@ -1,49 +1,11 @@
--- config/Makefile.in.orig Sat Jun 25 01:49:14 2005
+++ config/Makefile.in Thu Apr 20 01:23:52 2006
@@ -19,7 +19,7 @@
##################################################################
-DEVFLAGS= -warn-error Am
+DEVFLAGS=
# -dtypes
NO_LIBS_byte=
@@ -144,6 +144,11 @@
CDK_SRCS += $(CDK)/zlib.ml $(CDK)/zlibstubs.c
endif
+ifneq ("$(OPENSSLBASE)", "/usr")
+ LIBS_flags += -ccopt -I$(OPENSSLINC) -cclib -L$(OPENSSLLIB)
+endif
+LIBS_flags += -cclib -lcrypto
+
ifeq ("$(GD)", "yes")
LIBS_flags += -cclib -lgd -cclib -lfreetype -cclib -lm
LIBS_flags += -ccopt -W -ccopt -Wall -ccopt -Wno-unused
@@ -219,8 +224,7 @@
$(LIB)/misc.ml $(LIB)/unix32.ml $(LIB)/md4.ml \
$(LIB)/avifile.ml $(LIB)/http_lexer.mll $(LIB)/url.ml \
$(LIB)/date.ml $(LIB)/fst_hash.c \
- $(LIB)/md4_comp.c $(LIB)/md4_c.c \
- $(LIB)/gettext.ml4 $(LIB)/md5_c.c $(LIB)/$(SHA1_VERSION)_c.c \
+ $(LIB)/md4_c.c $(LIB)/gettext.ml4 \
$(LIB)/tiger.c \
$(LIB)/stubs_c.c $(LIB)/queues.ml \
$(LIB)/charsetstubs.c $(LIB)/charset.ml
@@ -291,7 +295,7 @@
--- config/Makefile.in.orig Tue Apr 26 22:48:10 2005
+++ config/Makefile.in Tue Apr 26 22:48:41 2005
@@ -285,7 +285,7 @@
all: Makefile config/Makefile.config $(TARGET_TYPE)
config/configure: config/configure.in
- cd config; autoconf
+ cd config; %%AUTOCONF%%
ifeq ("$(CONFIGURE_RUN)" , "yes")
ifeq ("$(MYCONFIG_ARGS_DEFINED)" , "yes")
@@ -2059,5 +2063,4 @@
src/utils/lib/sha1new_c.o: src/utils/lib/sha1new_c.h \
src/utils/lib/sha1_c.h src/utils/lib/os_stubs.h
-src/daemon/common/commonHasher_c.o: src/utils/lib/sha1_c.h
-src/utils/lib/stubs_c.o: src/utils/lib/sha1_c.h
+src/daemon/common/commonHasher_c.o:

View file

@ -1,17 +0,0 @@
--- src/utils/lib/fst_hash.c.orig Mon Nov 1 12:23:02 2004
+++ src/utils/lib/fst_hash.c Thu Apr 20 02:45:46 2006
@@ -179,6 +179,7 @@
#include "caml/mlvalues.h"
+#define uint16 unsigned short int
/* returns checksum of fzhash */
uint16 fst_hash_checksum (unsigned char *hash)
@@ -337,4 +338,4 @@
value fst_hash_checksum_ml(value digest)
{
return Val_int(fst_hash_checksum(String_val(digest)));
-}
\ No newline at end of file
+}

View file

@ -1,154 +0,0 @@
--- src/utils/lib/stubs_c.c.orig Tue Sep 6 22:03:39 2005
+++ src/utils/lib/stubs_c.c Tue Sep 6 22:11:04 2005
@@ -515,11 +515,11 @@
nread = os_read (fd, hash_buffer, max_nread); \
\
if(nread < 0) { \
- unix_error(errno, "md4_safe_fd: Read", Nothing); \
+ unix_error(errno, "HASH_NAME##un_safe_fd: Read", Nothing); \
} \
\
if(nread == 0){ \
- HASH_FINISH (&context, digest); \
+ HASH_FINISH (digest, &context); \
\
return Val_unit; \
} \
@@ -527,7 +527,7 @@
HASH_APPEND (&context, hash_buffer, nread); \
len -= nread; \
} \
- HASH_FINISH (&context, digest); \
+ HASH_FINISH (digest, &context); \
\
return Val_unit; \
} \
@@ -541,7 +541,7 @@
\
HASH_INIT (&context); \
HASH_APPEND (&context, string, len); \
- HASH_FINISH (&context, digest); \
+ HASH_FINISH (digest, &context); \
\
return Val_unit; \
} \
@@ -561,7 +561,7 @@
HASH_INIT (&context); \
while ((len = fread (hash_buffer, 1, HASH_BUFFER_LEN, file)) >0) \
HASH_APPEND (&context, hash_buffer, len); \
- HASH_FINISH (&context, digest); \
+ HASH_FINISH (digest, &context); \
\
fclose (file); \
} \
@@ -569,13 +569,13 @@
} \
-#include "md4.h"
-#include "md5.h"
-#include "sha1_c.h"
+#include <openssl/md4.h>
+#include <openssl/md5.h>
+#include <openssl/sha.h>
-ML_HASH(sha1,SHA1_CTX,sha1_begin,sha1_hash, sha1_end)
-ML_HASH(md5,md5_state_t,md5_init,md5_append,md5_finish)
-ML_HASH(md4,MD4_CTX,MD4Init,MD4Update,md4_finish)
+ML_HASH(sha1,SHA_CTX,SHA1_Init,SHA1_Update, SHA1_Final)
+ML_HASH(md5, MD5_CTX, MD5_Init, MD5_Update, MD5_Final)
+ML_HASH(md4, MD4_CTX, MD4_Init, MD4_Update, MD4_Final)
/*******************************************************************
--- src/daemon/common/commonHasher_c.c.orig Tue Sep 6 22:14:27 2005
+++ src/daemon/common/commonHasher_c.c Tue Sep 6 22:19:35 2005
@@ -37,9 +37,9 @@
#define JOB_HANDLER 5
#define JOB_ERROR 6
-#include "../../utils/lib/md4.h"
-#include "../../utils/lib/md5.h"
-#include "../../utils/lib/sha1_c.h"
+#include <openssl/md4.h>
+#include <openssl/md5.h>
+#include <openssl/sha.h>
#include "../../utils/lib/tiger.h"
@@ -68,7 +68,7 @@
unix_error(errno, "HASH_NAME##unsafe64_fd_direct: Read", Nothing); \
} \
if(nread == 0){ \
- HASH_FINISH (&context, digest); \
+ HASH_FINISH (digest, &context); \
\
return; \
} \
@@ -76,12 +76,12 @@
HASH_APPEND (&context, local_hash_buffer, nread); \
len -= nread; \
} \
- HASH_FINISH (&context, digest); \
+ HASH_FINISH (digest, &context); \
}
-COMPLETE_HASH(sha1,SHA1_CTX,sha1_begin,sha1_hash, sha1_end)
-COMPLETE_HASH(md5,md5_state_t,md5_init,md5_append,md5_finish)
-COMPLETE_HASH(md4,MD4_CTX,MD4Init,MD4Update,md4_finish)
+COMPLETE_HASH(sha1,SHA_CTX,SHA1_Init,SHA1_Update, SHA1_Final)
+COMPLETE_HASH(md5, MD5_CTX, MD5_Init, MD5_Update, MD5_Final)
+COMPLETE_HASH(md4, MD4_CTX, MD4_Init, MD4_Update, MD4_Final)
static void tiger_tree_fd(OS_FD fd, long len, off_t pos,
int block_size, char *digest)
@@ -160,7 +160,7 @@
\
if(nread == 0){ \
unsigned char *digest = String_val(Field(job_v, JOB_RESULT)); \
- HASH_FINISH (&context, digest); \
+ HASH_FINISH (digest, &context); \
job_finished = 1; \
timer = 10; \
return Val_true; \
@@ -173,7 +173,7 @@
\
if(job_len <= 0){ \
unsigned char *digest = String_val(Field(job_v, JOB_RESULT)); \
- HASH_FINISH (&context, digest); \
+ HASH_FINISH (digest, &context); \
job_finished = 1; \
timer = 10; \
return Val_true; \
--- src/networks/fasttrack/fst_crypt.c.orig Tue Sep 6 22:23:50 2005
+++ src/networks/fasttrack/fst_crypt.c Tue Sep 6 22:26:34 2005
@@ -15,7 +15,8 @@
* General Public License for more details.
*/
-#include "../../utils/lib/md5.h"
+#include <string.h>
+#include <openssl/md5.h>
#include "fst_crypt.h"
/*****************************************************************************/
@@ -106,14 +106,14 @@
if (enc_type & 0x08)
{
- MD5Context ctx;
- unsigned char md5[MD5_HASH_LEN];
+ MD5_CTX ctx;
+ unsigned char md5[MD5_DIGEST_LENGTH];
FST_HEAVY_DBG ("init_cipher: enc_type & 0x08");
- MD5Init (&ctx);
- MD5Update (&ctx, cipher->pad, sizeof(cipher->pad));
- MD5Final (md5, &ctx);
+ MD5_Init (&ctx);
+ MD5_Update (&ctx, cipher->pad, sizeof(cipher->pad));
+ MD5_Final (md5, &ctx);
/* correct md5 byte order on big-endian since it's converted to (unsigned int*) below */
reverse_bytes ( (unsigned int*)&md5, 4);

View file

@ -1,374 +0,0 @@
--- tools/zoggy/pa_zog.ml.orig Wed Aug 4 20:39:32 2004
+++ tools/zoggy/pa_zog.ml Thu Apr 20 02:41:38 2006
@@ -49,7 +49,7 @@
let parse_string loc =
function
"false" ->
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -57,7 +57,7 @@
in
<:expr< False >>
| "true" ->
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -108,7 +108,7 @@
parse_prop_value p
with
Not_found ->
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -242,7 +242,7 @@
(_, n, _, _) -> n
let ast_of_creation_options_code loc ele f =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -286,7 +286,7 @@
match prop.prop_kind with
Expand | Fill | Padding ->
if must_gen prop then
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -306,7 +306,7 @@
No_pack -> f
| Insert_page ->
let g =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst parent.name_loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd parent.name_loc }
@@ -315,7 +315,7 @@
<:expr< $lid:parent.name$ >>
in
let loc1 = loc in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -332,7 +332,7 @@
>>
| _ ->
let g =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst parent.name_loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd parent.name_loc }
@@ -341,7 +341,7 @@
<:expr< $lid:parent.name$ >>
in
let loc1 = loc in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -358,7 +358,7 @@
| Insert_page | No_pack -> f
with
Failure s ->
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -375,7 +375,7 @@
| Insert_page ->
let g =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst parent.name_loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd parent.name_loc }
@@ -384,7 +384,7 @@
<:expr< $lid:parent.name$>>
in
let n =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst ele.name_loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd ele.name_loc }
@@ -393,7 +393,7 @@
<:expr< $lid:ele.name$ >>
in
let loc1 = loc in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -412,7 +412,7 @@
| _ ->
let g =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst parent.name_loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd parent.name_loc }
@@ -421,7 +421,7 @@
<:expr< $lid:parent.name$ >>
in
let loc1 = loc in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -438,7 +438,7 @@
| Insert_page | No_pack -> g
in
let n =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst ele.name_loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd ele.name_loc }
@@ -449,7 +449,7 @@
<:class_expr< let _ = $r$ $n$ # coerce in $ce$ >>
with
Failure s ->
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -485,7 +485,7 @@
remove_blanks (Zog_types.get_prop_value ele.props Accel_modifier)
with
"" ->
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -499,7 +499,7 @@
remove_blanks (Zog_types.get_prop_value ele.props Accel_flags)
with
"" ->
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -509,7 +509,7 @@
| s -> parse_string loc s
in
let loc1 = loc in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -529,7 +529,7 @@
List.fold_right (ast_of_post_menu_item_creation_code loc accel_name)
ele.children ce
in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -553,7 +553,7 @@
match win with
None -> ce
| Some w ->
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -564,7 +564,7 @@
>>
)
in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -597,7 +597,7 @@
let f =
match ele.classe, previous_opt with
Radio_menu_item, Some e when e.classe = Radio_menu_item ->
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -620,7 +620,7 @@
(* BEGIN CDK *)
gen_anonynous_name ele;
if ele.name = "_" then
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -630,14 +630,14 @@
else
(* END CDK *)
let n =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst ele.name_loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd ele.name_loc }
)
in <:patt< $lid:ele.name$ >>
in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -649,7 +649,7 @@
let cil =
if ele.classe = Menubar then
let accel_name = accel_group_name ele in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -662,7 +662,7 @@
gen_anonynous_name ele;
let cil = if ele.name.[0] <> '_' then
let n =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst ele.name_loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd ele.name_loc }
@@ -670,7 +670,7 @@
in
<:expr< $lid:ele.name$ >>
in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -685,7 +685,7 @@
let cil =
if ele.classe = Menubar then
let accel_name = accel_group_name ele in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -697,7 +697,7 @@
(* BEGIN CDK *)
gen_anonynous_name ele;
let n =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst ele.name_loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd ele.name_loc }
@@ -706,7 +706,7 @@
<:expr< $lid:ele.name$ >>
in
let cil = if ele.name.[0] <> '_' then
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -730,14 +730,14 @@
Window -> cil
| _ ->
let n =
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst e.name_loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd e.name_loc }
)
in <:expr< $lid:e.name$ >>
in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -746,7 +746,7 @@
let ci = <:class_str_item< method coerce = $n$ # coerce >> in
cil @ [ci]
in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -765,7 +765,7 @@
in
ast_of_ele_creations ?win: win_opt loc None None ele ce
in
- let loc =
+ let _loc =
(
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } ,
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc }
@@ -798,9 +798,9 @@
try
let entity = {en_name = name; en_params = pl; en_ele = w} in
(
- let loc = ((fst loc).Lexing.pos_cnum, (snd loc).Lexing.pos_cnum) in
+ let loc = ((fst _loc).Lexing.pos_cnum, (snd _loc).Lexing.pos_cnum) in
ast_of_entity loc entity
- ), loc
+ ), _loc
with Field_error m ->
field_error m;
exit 1
@@ -824,7 +824,7 @@
prop_value_loc = ((fst vloc).Lexing.pos_cnum, (snd vloc).Lexing.pos_cnum)})
proplist
in
- let nloc = ((fst loc).Lexing.pos_cnum, (snd loc).Lexing.pos_cnum) in
+ let nloc = ((fst _loc).Lexing.pos_cnum, (snd _loc).Lexing.pos_cnum) in
{ name = name; name_loc = nloc;
classe = Zog_misc.class_of_class_name tag;
props = proplist;
@@ -833,16 +833,16 @@
} ] ]
;
tag_end:
- [ [ "</"; tag = LIDENT; ">" -> tag, loc ] ]
+ [ [ "</"; tag = LIDENT; ">" -> tag, _loc ] ]
;
property:
[ [ x = LIDENT; "="; (v, vloc) = string -> x, v, vloc ] ]
;
string:
- [ [ v = STRING -> v, loc ] ]
+ [ [ v = STRING -> v, _loc ] ]
;
ident:
- [ [ v = LIDENT -> v, loc ] ]
+ [ [ v = LIDENT -> v, _loc ] ]
;
END

View file

@ -0,0 +1,23 @@
--- src/utils/lib/stubs_c.c.orig Wed Jan 4 12:23:37 2006
+++ src/utils/lib/stubs_c.c Mon Jan 16 14:14:38 2006
@@ -28,6 +28,11 @@
#include <inttypes.h>
#endif
+/* For proper FreeBSD version identification */
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
+
#define lseek XXXXXXXXX
#define read XXXXXXXXX
#define ftruncate XXXXXXXXX
@@ -683,7 +688,7 @@
#define NETDB_BUFFER_SIZE 10000
-#ifdef _WIN32
+#if defined(_WIN32) || ( defined(__FreeBSD_version) && ( ((__FreeBSD_version >= 504102) && (__FreeBSD_version < 600000)) || (__FreeBSD_version >= 600029) ) )
#define GETHOSTBYADDR_IS_REENTRANT 1
#define GETHOSTBYNAME_IS_REENTRANT 1
#endif

View file

@ -1,17 +1,17 @@
mldonkey is a OCAML/GTK client for a number of
MLDonkey is an OCAML/GTK client for a number of
peer-to-peer networks.
It is separated into a core with telnet and web interfaces, and
a GTK GUI.
It is separated into a core with telnet and web
interfaces, and a GTK GUI.
The following protocols are supported:
- eDonkey (http://www.edonkey2000.com/)
- Overnet (http://www.overnet.com/)
- Bittorrent (http://bitconjurer.org/BitTorrent/)
- Gnutella (http://www.gnutella.org/)
- Gnutella2 (http://www.shareaza.com/)
- Soulseek (http://www.slsk.org/)
- Direct-Connect (http://www.neo-modus.com/)
- Opennap (http://opennap.sourceforge.net/)
- eDonkey (http://www.edonkey2000.com/)
- Overnet (http://www.overnet.com/)
- Bittorrent (http://www.bittorrent.com/)
- Gnutella (http://www.gnutella.org/)
- Gnutella2 (http://www.shareaza.com/)
- Fasttrack (http://en.wikipedia.org/wiki/Fasttrack)
- FileTP [http/ftp/ssh] (http://mldonkey.sourceforge.net/FileTP)
- Kademlia (http://en.wikipedia.org/wiki/Kad_Network)
WWW: http://www.nongnu.org/mldonkey/
WWW: http://mldonkey.sourceforge.net/

View file

@ -1,10 +1,9 @@
%%CORE%%bin/kill_mldonkey
%%CORE%%bin/mld_hash
%%CORE%%bin/mlnet
%%CORE%%bin/mlnet-real
%%CORE%%etc/rc.d/mlnet.sh
%%CORE%%%%EXAMPLESDIR%%/kill_mldonkey
%%GUICORE%%bin/mlguistarter
%%GUICORE%%bin/mldonkey_previewer
%%GUICORE%%bin/mlnet+gui
%%GUI%%bin/mlchat
%%GUI%%bin/mlgui
%%GUI%%bin/mlim
%%CORE%%@dirrm %%EXAMPLESDIR%%