Thursday, April 30, 2020

Re: UPDATE: eigen3 (3.3.7)

Andrea Fleckenstein <afleck@mailbox.org> writes:

> Rafael Sadowski <rafael@sizeofvoid.org> writes:
>
>> On Wed Dec 25, 2019 at 11:20:41AM +0100, Kristaps Dzonsons wrote:
>>> This updates eigen3 to the latest version. Beyond the trivial, it adds
>>> BLAS as a dep and changes the fftw dep to fftw3. It looks like eigen2
>>> support has been removed (it was deprecated in 3.2.1).
>>>
>>> Needed for alicevision (upcoming).
>>
>> Other distros do not need qt4, any idea why we need it? I would love to
>> see it gone.
>>
>
> Whats the status on this? qt4 got removed, I have the following diff
> which is just George's with a modification of $WRKDIST because it was
> unpacking to the specified directory rather than 'eigen3-${VERSION}'.
> Is there a way to deal with that?
> I also removed a patch because it seems test/runtests.sh no longer exists.

Apologies for the double post, but of course I mean *Kristaps'*
patch. Sorry for confusion.

>
> builds on amd64 -current
>
> thoughts?
>
> Cheers,
> Andrea
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/math/eigen3/Makefile,v
> retrieving revision 1.11
> diff -u -p -r1.11 Makefile
> --- Makefile 26 Jan 2020 07:30:15 -0000 1.11
> +++ Makefile 1 May 2020 00:41:39 -0000
> @@ -4,18 +4,15 @@ PKG_ARCH = *
> COMMENT = lightweight C++ template library for linear algebra
> CATEGORIES = math devel
> HOMEPAGE = http://eigen.tuxfamily.org/
> -DIST_SUBDIR = eigen
> -VERSION = 3.2.2
> -DISTNAME = ${VERSION}
> +VERSION = 3.3.7
> +DISTNAME = eigen3-${VERSION}
> PKGNAME = eigen3-${VERSION}
> -WRKDIST = ${WRKDIR}/eigen-eigen-1306d75b4a21
> -REVISION = 5
> +WRKDIST = ${WRKDIR}/eigen-${VERSION}-21ae2afd4edaa1b69782c67a54182d34efe43f9c
>
> # Mostly MPLv2, also LGPLv2.1, LGPLv2.1+ and BSDL
> PERMIT_PACKAGE = Yes
>
> -MASTER_SITES = http://bitbucket.org/eigen/eigen/get/ \
> - https://spacehopper.org/mirrors/eigen/
> +MASTER_SITES = https://gitlab.com/libeigen/eigen/-/archive/$(VERSION)/
>
> # Many dependencies are only needed for tests
> PSEUDO_FLAVORS = test
> @@ -25,9 +22,11 @@ FLAVOR ?=
> WANTLIB- =
>
> BUILD_DEPENDS = devel/sparsehash \
> + math/blas \
> math/suitesparse
>
> RUN_DEPENDS = devel/sparsehash \
> + math/blas \
> math/suitesparse
>
> MODULES = devel/cmake
> @@ -43,6 +42,7 @@ CONFIGURE_ARGS = -DCMAKE_DISABLE_FIND_PA
> -DCMAKE_DISABLE_FIND_PACKAGE_SPQR=Yes \
> -DCMAKE_DISABLE_FIND_PACKAGE_Scotch=Yes \
> -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=Yes \
> + -DBLAS_DIR="${LOCALBASE}" \
> -DEIGEN_TEST_NOQT=ON
>
> .if ${FLAVOR:Mtest}
> @@ -51,7 +51,8 @@ BUILD_DEPENDS += devel/gmp \
> devel/mpfr \
> graphics/freeglut \
> graphics/glew \
> - math/fftw
> + math/fftw3 \
> + math/fftw3,float
> CONFIGURE_ENV = CFLAGS="${CFLAGS} -ggdb"
>
> TEST_DEPENDS = shells/bash
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/math/eigen3/distinfo,v
> retrieving revision 1.2
> diff -u -p -r1.2 distinfo
> --- distinfo 4 Oct 2014 11:06:06 -0000 1.2
> +++ distinfo 1 May 2020 00:41:39 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (eigen/3.2.2.tar.gz) = MY1oxanCDsINCPGlChD7SZGiX9VHSpaedxzZ8qecnl8=
> -SIZE (eigen/3.2.2.tar.gz) = 1476300
> +SHA256 (eigen3-3.3.7.tar.gz) = XOMnTjpSWiBsJP+5BD2QBiVCKiAf9mOlK4cq1wHwUjM=
> +SIZE (eigen3-3.3.7.tar.gz) = 2135265
> Index: patches/patch-test_main_h
> ===================================================================
> RCS file: /cvs/ports/math/eigen3/patches/patch-test_main_h,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 patch-test_main_h
> --- patches/patch-test_main_h 10 Jul 2014 08:59:52 -0000 1.1.1.1
> +++ patches/patch-test_main_h 1 May 2020 00:41:39 -0000
> @@ -1,16 +1,23 @@
> $OpenBSD: patch-test_main_h,v 1.1.1.1 2014/07/10 08:59:52 zhuk Exp $
> This test fails, and we actually DO provide min() and max() correctly,
> so disable it.
> ---- test/main.h.orig Wed Oct 23 04:05:35 2013
> -+++ test/main.h Wed Oct 23 04:06:14 2013
> -@@ -24,8 +24,8 @@
> - #include <deque>
> - #include <queue>
> -
> +Index: test/main.h
> +--- test/main.h.orig
> ++++ test/main.h
> +@@ -67,11 +67,11 @@
> + // protected by parenthesis against macro expansion, the min()/max() macros
> + // are defined here and any not-parenthesized min/max call will cause a
> + // compiler error.
> -#define min(A,B) please_protect_your_min_with_parentheses
> -#define max(A,B) please_protect_your_max_with_parentheses
> +-#define isnan(X) please_protect_your_isnan_with_parentheses
> +-#define isinf(X) please_protect_your_isinf_with_parentheses
> +-#define isfinite(X) please_protect_your_isfinite_with_parentheses
> +// #define min(A,B) please_protect_your_min_with_parentheses
> +// #define max(A,B) please_protect_your_max_with_parentheses
> -
> - #define FORBIDDEN_IDENTIFIER (this_identifier_is_forbidden_to_avoid_clashes) this_identifier_is_forbidden_to_avoid_clashes
> - // B0 is defined in POSIX header termios.h
> ++// #define isnan(X) please_protect_your_isnan_with_parentheses
> ++// #define isinf(X) please_protect_your_isinf_with_parentheses
> ++// #define isfinite(X) please_protect_your_isfinite_with_parentheses
> + #ifdef M_PI
> + #undef M_PI
> +

No comments:

Post a Comment