Re: sysutils/opam: use -full source tree including all dependencies.

2019-03-11 Thread Anil Madhavapeddy
And ok avsm@.

> On 11 Mar 2019, at 22:01, kwesterb...@gmail.com wrote:
> 
> This is ok krw@.
> 
>  Ken
> 
>> On Mar 11, 2019, at 5:29 PM, Christopher Zimmermann  
>> wrote:
>> 
>> On Mon, 11 Mar 2019 17:08:45 -0400
>> Kenneth R Westerback  wrote:
>> 
>>> I like this, but I am slightly confused -- did I miss the commit to
>>> switch opam to -full? I would assume we'd want to do that first, no?
>> 
>> oops, I somehow asserted this was already committed. So of course I'd
>> like to commit this first. OKs for change?
>> 
>> Christopher
>> 
>> 
>> Index: Makefile
>> ===
>> RCS file: /cvs/ports/sysutils/opam/Makefile,v
>> retrieving revision 1.10
>> diff -u -p -r1.10 Makefile
>> --- Makefile4 Mar 2019 12:51:16 -1.10
>> +++ Makefile11 Mar 2019 21:26:24 -
>> @@ -4,24 +4,12 @@ COMMENT =OCaml source-based package ma
>> 
>> CATEGORIES =sysutils devel
>> 
>> -# opam version
>> V =2.0.3
>> -# opam file format version
>> -OFFV =2.0.0
>> -MCSS =1.1+9
>> -#GH_ACCOUNT =ocaml
>> -GH_PROJECT =opam
>> -#GH_TAGNAME =${V}
>> -DISTNAME =${GH_PROJECT}-${V}
>> -
>> -DISTFILES +=opam-${V}.tar.gz:0
>> -MASTER_SITES0 =https://github.com/ocaml/opam/archive/${V}/
>> -DISTFILES +=opam-file-format-${OFFV}.tar.gz:1
>> -MASTER_SITES1 =
>> https://github.com/ocaml/opam-file-format/archive/${OFFV}/
>> -DISTFILES +=ocaml-mccs-${MCSS}.tar.gz:2
>> -MASTER_SITES2 =https://github.com/AltGr/ocaml-mccs/archive/${MCSS}/
>> -
>> +REVISION =0
>> PKGNAME =opam-${V}
>> +DISTNAME =opam-full-${V}
>> +
>> +MASTER_SITES =https://github.com/ocaml/opam/releases/download/${V}/
>> 
>> HOMEPAGE =https://opam.ocaml.org/
>> 
>> @@ -34,16 +22,7 @@ WANTLIB =${COMPILER_LIBCXX} c m
>> 
>> #MODULES =lang/ocaml
>> 
>> -BUILD_DEPENDS =lang/ocaml \
>> -devel/dune \
>> -sysutils/findlib \
>> -devel/ocaml-cppo \
>> -devel/cudf,-ocaml>=0.7 \
>> -devel/ocaml-cmdliner>=0.9.8 \
>> -devel/ocaml-dose>=5 \
>> -devel/ocaml-graph \
>> -devel/ocaml-re>=1.5.0 \
>> -net/curl # TODO: remove this dep and patch build system
>> +BUILD_DEPENDS =lang/ocaml
>> 
>> RUN_DEPENDS =archivers/unzip \
>>   archivers/bzip2 \
>> @@ -54,7 +33,11 @@ RUN_DEPENDS =archivers/unzip \
>> 
>> USE_GMAKE =Yes
>> 
>> -CONFIGURE_STYLE =gnu
>> +CONFIGURE_ENV +=CFLAGS="${CFLAGS}" \
>> +LDFLAGS="${LDFLAGS}" \
>> +CC=cc
>> +CONFIGURE_STYLE =gnu autoconf no-autoheader
>> +AUTOCONF_VERSION =2.69
>> 
>> ALL_TARGET =lib-ext all man #doc requires odoc
>> INSTALL_TARGET =install
>> @@ -62,13 +45,8 @@ TEST_TARGET =tests
>> 
>> docdir =${PREFIX}/share/doc/opam
>> 
>> -
>> -pre-patch:
>> -ln -s${FULLDISTDIR}/opam-file-format-${OFFV}.tar.gz \
>> -${WRKSRC}/src_ext/opam-file-format.tar.gz
>> -ln -s${FULLDISTDIR}/ocaml-mccs-${MCSS}.tar.gz \
>> -${WRKSRC}/src_ext/mccs.tar.gz
>> -touch
>> ${WRKSRC}/src_ext/{mccs,opam-file-format}.{download,pkgdownload}
>> +#pre-configure:
>> +#cd ${WRKSRC} && env ${CONFIGURE_ENV} ${GMAKE} compiler
>> 
>> post-install:
>>   mv${PREFIX}/doc/opam-installer \
>> Index: distinfo
>> ===
>> RCS file: /cvs/ports/sysutils/opam/distinfo,v
>> retrieving revision 1.3
>> diff -u -p -r1.3 distinfo
>> --- distinfo4 Mar 2019 12:51:16 -1.3
>> +++ distinfo11 Mar 2019 21:26:24 -
>> @@ -1,6 +1,2 @@
>> -SHA256 (ocaml-mccs-1.1+9.tar.gz) = 
>> G3rkvRs0n8JMU2k9cApg39qaO86VTZMaZ703WQwzyD0=
>> -SHA256 (opam-2.0.3.tar.gz) = zMbAl7vPMZDZGW4T1l9pwZuKHdZJ/V1wsbrhsSDuhzk=
>> -SHA256 (opam-file-format-2.0.0.tar.gz) = 
>> FSUt8u24K//CCplXyzdkV0srp0g5K7NObJHGeHIyXDI=
>> -SIZE (ocaml-mccs-1.1+9.tar.gz) = 1008737
>> -SIZE (opam-2.0.3.tar.gz) = 626720
>> -SIZE (opam-file-format-2.0.0.tar.gz) = 31419
>> +SHA256 (opam-full-2.0.3.tar.gz) = 
>> BYnaTaGEWEpURdWThQCVNlNPYLwOJ3ciRbL0nl+o8OI=
>> +SIZE (opam-full-2.0.3.tar.gz) = 7870020
>> Index: patches/patch-m4_ocaml_m4
>> ===
>> RCS file: patches/patch-m4_ocaml_m4
>> diff -N patches/patch-m4_ocaml_m4
>> --- /dev/null1 Jan 1970 00:00:00 -
>> +++ patches/patch-m4_ocaml_m411 Mar 2019 21:26:24 -
>> @@ -0,0 +1,16 @@
>> +$OpenBSD$
>> +
>> +do not detect any installed findlib library.
>> +
>> +Index: m4/ocaml.m4
>> +--- m4/ocaml.m4.orig
>>  m4/ocaml.m4
>> +@@ -209,7 +209,7 @@ AC_DEFUN([AC_CHECK_OCAML_PKG],
>> +   unset pkg
>> +   found=no
>> +   for pkg in $1 $2 ; do
>> +-if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
>> ++if false; then
>> +   AC_MSG_RESULT([found])
>> +   

Re: sysutils/opam: use -full source tree including all dependencies.

2019-03-11 Thread kwesterback
This is ok krw@.

 Ken

> On Mar 11, 2019, at 5:29 PM, Christopher Zimmermann  
> wrote:
> 
> On Mon, 11 Mar 2019 17:08:45 -0400
> Kenneth R Westerback  wrote:
> 
>> I like this, but I am slightly confused -- did I miss the commit to
>> switch opam to -full? I would assume we'd want to do that first, no?
> 
> oops, I somehow asserted this was already committed. So of course I'd
> like to commit this first. OKs for change?
> 
> Christopher
> 
> 
> Index: Makefile
> ===
> RCS file: /cvs/ports/sysutils/opam/Makefile,v
> retrieving revision 1.10
> diff -u -p -r1.10 Makefile
> --- Makefile4 Mar 2019 12:51:16 -1.10
> +++ Makefile11 Mar 2019 21:26:24 -
> @@ -4,24 +4,12 @@ COMMENT =OCaml source-based package ma
> 
> CATEGORIES =sysutils devel
> 
> -# opam version
> V =2.0.3
> -# opam file format version
> -OFFV =2.0.0
> -MCSS =1.1+9
> -#GH_ACCOUNT =ocaml
> -GH_PROJECT =opam
> -#GH_TAGNAME =${V}
> -DISTNAME =${GH_PROJECT}-${V}
> -
> -DISTFILES +=opam-${V}.tar.gz:0
> -MASTER_SITES0 =https://github.com/ocaml/opam/archive/${V}/
> -DISTFILES +=opam-file-format-${OFFV}.tar.gz:1
> -MASTER_SITES1 =
> https://github.com/ocaml/opam-file-format/archive/${OFFV}/
> -DISTFILES +=ocaml-mccs-${MCSS}.tar.gz:2
> -MASTER_SITES2 =https://github.com/AltGr/ocaml-mccs/archive/${MCSS}/
> -
> +REVISION =0
> PKGNAME =opam-${V}
> +DISTNAME =opam-full-${V}
> +
> +MASTER_SITES =https://github.com/ocaml/opam/releases/download/${V}/
> 
> HOMEPAGE =https://opam.ocaml.org/
> 
> @@ -34,16 +22,7 @@ WANTLIB =${COMPILER_LIBCXX} c m
> 
> #MODULES =lang/ocaml
> 
> -BUILD_DEPENDS =lang/ocaml \
> -devel/dune \
> -sysutils/findlib \
> -devel/ocaml-cppo \
> -devel/cudf,-ocaml>=0.7 \
> -devel/ocaml-cmdliner>=0.9.8 \
> -devel/ocaml-dose>=5 \
> -devel/ocaml-graph \
> -devel/ocaml-re>=1.5.0 \
> -net/curl # TODO: remove this dep and patch build system
> +BUILD_DEPENDS =lang/ocaml
> 
> RUN_DEPENDS =archivers/unzip \
>archivers/bzip2 \
> @@ -54,7 +33,11 @@ RUN_DEPENDS =archivers/unzip \
> 
> USE_GMAKE =Yes
> 
> -CONFIGURE_STYLE =gnu
> +CONFIGURE_ENV +=CFLAGS="${CFLAGS}" \
> +LDFLAGS="${LDFLAGS}" \
> +CC=cc
> +CONFIGURE_STYLE =gnu autoconf no-autoheader
> +AUTOCONF_VERSION =2.69
> 
> ALL_TARGET =lib-ext all man #doc requires odoc
> INSTALL_TARGET =install
> @@ -62,13 +45,8 @@ TEST_TARGET =tests
> 
> docdir =${PREFIX}/share/doc/opam
> 
> -
> -pre-patch:
> -ln -s${FULLDISTDIR}/opam-file-format-${OFFV}.tar.gz \
> -${WRKSRC}/src_ext/opam-file-format.tar.gz
> -ln -s${FULLDISTDIR}/ocaml-mccs-${MCSS}.tar.gz \
> -${WRKSRC}/src_ext/mccs.tar.gz
> -touch${WRKSRC}/src_ext/{mccs,opam-file-format}.{download,pkgdownload}
> +#pre-configure:
> +#cd ${WRKSRC} && env ${CONFIGURE_ENV} ${GMAKE} compiler
> 
> post-install:
>mv${PREFIX}/doc/opam-installer \
> Index: distinfo
> ===
> RCS file: /cvs/ports/sysutils/opam/distinfo,v
> retrieving revision 1.3
> diff -u -p -r1.3 distinfo
> --- distinfo4 Mar 2019 12:51:16 -1.3
> +++ distinfo11 Mar 2019 21:26:24 -
> @@ -1,6 +1,2 @@
> -SHA256 (ocaml-mccs-1.1+9.tar.gz) = 
> G3rkvRs0n8JMU2k9cApg39qaO86VTZMaZ703WQwzyD0=
> -SHA256 (opam-2.0.3.tar.gz) = zMbAl7vPMZDZGW4T1l9pwZuKHdZJ/V1wsbrhsSDuhzk=
> -SHA256 (opam-file-format-2.0.0.tar.gz) = 
> FSUt8u24K//CCplXyzdkV0srp0g5K7NObJHGeHIyXDI=
> -SIZE (ocaml-mccs-1.1+9.tar.gz) = 1008737
> -SIZE (opam-2.0.3.tar.gz) = 626720
> -SIZE (opam-file-format-2.0.0.tar.gz) = 31419
> +SHA256 (opam-full-2.0.3.tar.gz) = 
> BYnaTaGEWEpURdWThQCVNlNPYLwOJ3ciRbL0nl+o8OI=
> +SIZE (opam-full-2.0.3.tar.gz) = 7870020
> Index: patches/patch-m4_ocaml_m4
> ===
> RCS file: patches/patch-m4_ocaml_m4
> diff -N patches/patch-m4_ocaml_m4
> --- /dev/null1 Jan 1970 00:00:00 -
> +++ patches/patch-m4_ocaml_m411 Mar 2019 21:26:24 -
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +do not detect any installed findlib library.
> +
> +Index: m4/ocaml.m4
> +--- m4/ocaml.m4.orig
>  m4/ocaml.m4
> +@@ -209,7 +209,7 @@ AC_DEFUN([AC_CHECK_OCAML_PKG],
> +   unset pkg
> +   found=no
> +   for pkg in $1 $2 ; do
> +-if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
> ++if false; then
> +   AC_MSG_RESULT([found])
> +   AS_TR_SH([OCAML_PKG_$1])=$pkg
> +   found=yes
> Index: patches/patch-shell_bootstrap-ocaml_sh
> ===
> RCS file: patches/patch-shell_bootstrap-ocaml_sh
> 

sysutils/opam: use -full source tree including all dependencies.

2019-03-11 Thread Christopher Zimmermann
On Mon, 11 Mar 2019 17:08:45 -0400
Kenneth R Westerback  wrote:

> I like this, but I am slightly confused -- did I miss the commit to
> switch opam to -full? I would assume we'd want to do that first, no?

oops, I somehow asserted this was already committed. So of course I'd
like to commit this first. OKs for change?

Christopher


Index: Makefile
===
RCS file: /cvs/ports/sysutils/opam/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- Makefile4 Mar 2019 12:51:16 -   1.10
+++ Makefile11 Mar 2019 21:26:24 -
@@ -4,24 +4,12 @@ COMMENT = OCaml source-based package ma
 
 CATEGORIES =   sysutils devel
 
-# opam version
 V =2.0.3
-# opam file format version
-OFFV = 2.0.0
-MCSS = 1.1+9
-#GH_ACCOUNT =  ocaml
-GH_PROJECT =   opam
-#GH_TAGNAME =  ${V}
-DISTNAME = ${GH_PROJECT}-${V}
-
-DISTFILES +=   opam-${V}.tar.gz:0
-MASTER_SITES0 =https://github.com/ocaml/opam/archive/${V}/
-DISTFILES +=   opam-file-format-${OFFV}.tar.gz:1
-MASTER_SITES1 =
https://github.com/ocaml/opam-file-format/archive/${OFFV}/
-DISTFILES +=   ocaml-mccs-${MCSS}.tar.gz:2
-MASTER_SITES2 =
https://github.com/AltGr/ocaml-mccs/archive/${MCSS}/
-
+REVISION = 0
 PKGNAME =  opam-${V}
+DISTNAME = opam-full-${V}
+
+MASTER_SITES = https://github.com/ocaml/opam/releases/download/${V}/
 
 HOMEPAGE = https://opam.ocaml.org/
 
@@ -34,16 +22,7 @@ WANTLIB =${COMPILER_LIBCXX} c m
 
 #MODULES = lang/ocaml
 
-BUILD_DEPENDS =lang/ocaml \
-   devel/dune \
-   sysutils/findlib \
-   devel/ocaml-cppo \
-   devel/cudf,-ocaml>=0.7 \
-   devel/ocaml-cmdliner>=0.9.8 \
-   devel/ocaml-dose>=5 \
-   devel/ocaml-graph \
-   devel/ocaml-re>=1.5.0 \
-   net/curl # TODO: remove this dep and patch build system
+BUILD_DEPENDS =lang/ocaml
 
 RUN_DEPENDS =  archivers/unzip \
archivers/bzip2 \
@@ -54,7 +33,11 @@ RUN_DEPENDS =archivers/unzip \
 
 USE_GMAKE =Yes
 
-CONFIGURE_STYLE =  gnu
+CONFIGURE_ENV +=   CFLAGS="${CFLAGS}" \
+   LDFLAGS="${LDFLAGS}" \
+   CC=cc
+CONFIGURE_STYLE =  gnu autoconf no-autoheader
+AUTOCONF_VERSION = 2.69
 
 ALL_TARGET =   lib-ext all man #doc requires odoc
 INSTALL_TARGET =   install
@@ -62,13 +45,8 @@ TEST_TARGET =tests
 
 docdir =   ${PREFIX}/share/doc/opam
 
-
-pre-patch:
-   ln -s   ${FULLDISTDIR}/opam-file-format-${OFFV}.tar.gz \
-   ${WRKSRC}/src_ext/opam-file-format.tar.gz
-   ln -s   ${FULLDISTDIR}/ocaml-mccs-${MCSS}.tar.gz \
-   ${WRKSRC}/src_ext/mccs.tar.gz
-   touch   ${WRKSRC}/src_ext/{mccs,opam-file-format}.{download,pkgdownload}
+#pre-configure:
+#  cd ${WRKSRC} && env ${CONFIGURE_ENV} ${GMAKE} compiler
 
 post-install:
mv  ${PREFIX}/doc/opam-installer \
Index: distinfo
===
RCS file: /cvs/ports/sysutils/opam/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo4 Mar 2019 12:51:16 -   1.3
+++ distinfo11 Mar 2019 21:26:24 -
@@ -1,6 +1,2 @@
-SHA256 (ocaml-mccs-1.1+9.tar.gz) = G3rkvRs0n8JMU2k9cApg39qaO86VTZMaZ703WQwzyD0=
-SHA256 (opam-2.0.3.tar.gz) = zMbAl7vPMZDZGW4T1l9pwZuKHdZJ/V1wsbrhsSDuhzk=
-SHA256 (opam-file-format-2.0.0.tar.gz) = 
FSUt8u24K//CCplXyzdkV0srp0g5K7NObJHGeHIyXDI=
-SIZE (ocaml-mccs-1.1+9.tar.gz) = 1008737
-SIZE (opam-2.0.3.tar.gz) = 626720
-SIZE (opam-file-format-2.0.0.tar.gz) = 31419
+SHA256 (opam-full-2.0.3.tar.gz) = BYnaTaGEWEpURdWThQCVNlNPYLwOJ3ciRbL0nl+o8OI=
+SIZE (opam-full-2.0.3.tar.gz) = 7870020
Index: patches/patch-m4_ocaml_m4
===
RCS file: patches/patch-m4_ocaml_m4
diff -N patches/patch-m4_ocaml_m4
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-m4_ocaml_m4   11 Mar 2019 21:26:24 -
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+do not detect any installed findlib library.
+
+Index: m4/ocaml.m4
+--- m4/ocaml.m4.orig
 m4/ocaml.m4
+@@ -209,7 +209,7 @@ AC_DEFUN([AC_CHECK_OCAML_PKG],
+   unset pkg
+   found=no
+   for pkg in $1 $2 ; do
+-if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
++if false; then
+   AC_MSG_RESULT([found])
+   AS_TR_SH([OCAML_PKG_$1])=$pkg
+   found=yes
Index: patches/patch-shell_bootstrap-ocaml_sh
===
RCS file: patches/patch-shell_bootstrap-ocaml_sh
diff -N patches/patch-shell