Hi, Mldonkey in difficult to adapt to the new 4.08.0 release of OCaml. Its build system has the option to build against a private build of OCaml 3.12 and a copy of lablgtk. I adapted the port to use this option and therefore get rid of the dependency on a system wide OCaml installation. Tested to build and start up on amd64. Not tested on bytecode-only archs.
Is this the way to go? OK to commit?
Is this port still in use?
Christopher
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/mldonkey/Makefile,v
retrieving revision 1.30
diff -u -p -r1.30 Makefile
--- Makefile 20 May 2019 22:15:19 -0000 1.30
+++ Makefile 17 Jun 2019 19:07:35 -0000
@@ -21,13 +21,21 @@ WANTLIB += pthread rsvg-2 ${COMPILER_LIB
COMPILER = base-clang ports-gcc base-gcc
-MASTER_SITES =
https://github.com/ygrek/mldonkey/releases/download/release-${VER:S/./-/g}/
+MASTER_SITES0 =
https://github.com/ygrek/mldonkey/releases/download/release-${VER:S/./-/g}/
+MASTER_SITES1 = http://caml.inria.fr/pub/distrib/ocaml-3.12/
+MASTER_SITES2 =
http://www.math.nagoya-u.ac.jp/~garrigue/soft/olabl/dist/
+OCAML_SRC = ocaml-3.12.0.tar.gz
+LAMLGTK_SRC = lablgtk-2.14.2.tar.gz
EXTRACT_SUFX = .tar.bz2
+DISTFILES = ${DISTNAME}${EXTRACT_SUFX}:0 ${OCAML_SRC}:1 ${LAMLGTK_SRC}:2
+
CONFIGURE_STYLE = gnu
CONFIGURE_ARGS += --enable-gui=newgui2 \
- --enable-upnp-natpmp
+ --enable-upnp-natpmp \
+ --enable-force-ocaml \
+ --enable-batch
CONFIGURE_ENV += CPPFLAGS='-I${LOCALBASE}/include -I${X11BASE}/include' \
LDFLAGS='${LDFLAGS}' \
ac_cv_prog_RPMBUILD="" \
@@ -44,8 +52,8 @@ MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC}/con
WRKCONF = ${WRKSRC}/config
USE_GMAKE = Yes
-MODULES = lang/ocaml
-BUILD_DEPENDS = lang/ocaml-camlp4 x11/lablgtk2 math/ocaml-num
+#MODULES = lang/ocaml
+#BUILD_DEPENDS = lang/ocaml-camlp4 x11/lablgtk2 math/ocaml-num
LIB_DEPENDS = archivers/bzip2 \
devel/gettext,-runtime \
devel/libmagic \
@@ -53,6 +61,7 @@ LIB_DEPENDS = archivers/bzip2 \
net/miniupnp/libnatpmp \
net/miniupnp/miniupnpc>=1.9 \
x11/gnome/librsvg \
+ devel/libglade2 \
x11/gtk+2
ALL_TARGET = depend all
@@ -67,6 +76,11 @@ FAKE_FLAGS = OCAML_NATIVE=no
NO_TEST = Yes
.include <bsd.port.arch.mk>
+
+post-extract:
+ ln -s ${FULLDISTDIR}/${OCAML_SRC} ${WRKSRC}/patches
+ ln -s ${FULLDISTDIR}/${LAMLGTK_SRC} ${WRKSRC}/patches
+
pre-patch:
@cd ${WRKSRC}; perl -i -pe 's/\r$$//' `find . -type f`
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/mldonkey/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo 17 Aug 2017 10:06:12 -0000 1.6
+++ distinfo 17 Jun 2019 19:07:35 -0000
@@ -1,2 +1,6 @@
+SHA256 (lablgtk-2.14.2.tar.gz) = SYGr7avcRiMD80UQQELIivInzNUP0wqb9I/TU6sC0Lo=
SHA256 (mldonkey-3.1.6.tar.bz2) = Gza1fAWoPC42PAhb+OgGMIhMbJLs3v/BrV4cOamOBD0=
+SHA256 (ocaml-3.12.0.tar.gz) = 2WSzheEQwVF8neHGMxR21eejWFzGkra2uJc/Opvn2ks=
+SIZE (lablgtk-2.14.2.tar.gz) = 779803
SIZE (mldonkey-3.1.6.tar.bz2) = 2886916
+SIZE (ocaml-3.12.0.tar.gz) = 3271024
Index: patches/patch-config_Makefile_in
===================================================================
RCS file: /cvs/ports/net/mldonkey/patches/patch-config_Makefile_in,v
retrieving revision 1.6
diff -u -p -r1.6 patch-config_Makefile_in
--- patches/patch-config_Makefile_in 4 Mar 2019 12:51:16 -0000 1.6
+++ patches/patch-config_Makefile_in 17 Jun 2019 19:07:35 -0000
@@ -2,34 +2,6 @@ $OpenBSD: patch-config_Makefile_in,v 1.6
Index: config/Makefile.in
--- config/Makefile.in.orig
+++ config/Makefile.in
-@@ -13,6 +13,9 @@ changequote([[, ]])
-
- include config/Makefile.config
-
-+OCAMLC:=$(OCAMLC) -unsafe-string
-+OCAMLOPT:=$(OCAMLOPT) -unsafe-string
-+
- ifneq ("$(GLIBC_VERSION)" , "")
- GLIBC_VERSION_ARCH = "_glibc-"$(GLIBC_VERSION)
- endif
-@@ -93,7 +96,7 @@ SRC_FILETP=src/networks/fileTP
- SUBDIRS=$(EXTLIB) $(CDK) $(BITSTRING) $(LIB) $(RSS) $(XML) $(NET) tools \
- $(COMMON) $(DRIVER) $(MP3) src/config/$(OS_FILES)
-
--INCLUDES += $(foreach file, $(SUBDIRS), -I $(file)) -I +camlp4
-+INCLUDES += $(foreach file, $(SUBDIRS), -I $(file)) -I +camlp4 -I +num
-
- CFLAGS:=$(CFLAGS) $(CONFIG_INCLUDES) $(GTKCFLAGS) $(GD_CFLAGS)
-
-@@ -124,7 +127,7 @@ endif
-
- #######################################################################
-
--LIBS_flags += -ccopt "$(LDFLAGS) $(CPPFLAGS)" -cclib "$(LIBS)"
-+LIBS_flags += -ccopt "$(LDFLAGS) $(CPPFLAGS)" -cclib "$(LIBS)" -I +num
-
- ifeq ("$(OS_FILES2)", "mingw")
- LIBS_flags += -cclib "-lws2_32 -lgdi32 -luser32 -ladvapi32 -lwsock32
-limm32 -lshell32 -lole32 resfile.o"
@@ -633,6 +636,8 @@ uninstall::
rm -f $(BINDIR)/mlnet
rm -f $(BINDIR)/mlgui
--
http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
CB07 DA40 B0B6 571D 35E2 0DEF 87E2 92A7 13E5 DEE1
pgpQWwhm1Flfl.pgp
Description: OpenPGP digital signature
