On 11.04.2021 20:53, Brian Inglis wrote:
On 2021-04-11 12:01, Achim Gratz wrote:
brendan detracey via Cygwin-apps writes:
eccodes builds out of the box, more or less. However, all tests fail
because the cyg*.dll's weren't copied to ${B}/bin. (They were handled
properly when built without cygport i.e. copied from src and fortran
subdirs of the build dir.)

Hard to say without a log why that happens, but you should start with
checking whether the copy is even attempted.

DLLs should be built in $B/.../, installed in $D/bin/, and the tests have to run with $D/bin/ in their path. Not sure if this is automatic, you may have to override src_test, or patch the test setup to add that.


Brendan,
no idea why on your build the installation is under /usr/local
for me everything is in the right place.
Please verify if you have some settings interfering

Attached version that allows tests to be passed

Regards
Marco

inherit cmake
shopt -s extglob
# WARNING: source download link has to be hard-coded :(# The eccodes cmake 
default install location is usr/local
NAME="eccodes"
VERSION=2.21.0
RELEASE=1
CATEGORY="Science"
SUMMARY="ECMWF tools to decode and encode WMO GRIB and BUFR file formats, and 
decode WMO GTS file format"
DESCRIPTION="ecCodes is a package developed by ECMWF which provides an API and 
a set of tools\ for decoding and encoding messages in the following formats\:\ 
WMO FM-92 GRIB edition 1 and edition 2\ WMO FM-94 BUFR edition 3 and edition 4\ 
 WMO GTS abbreviated header (only decoding)"
HOMEPAGE="https://confluence.ecmwf.int/display/ECC/ecCodes+Home";
SRC_URI="https://confluence.ecmwf.int/download/attachments/45757960/eccodes-2.21.0-Source.tar.gz";
 
SRC_DIR="${PN}-${PV}-Source"
PKG_NAMES="eccodes libeccodes libeccodes-devel"
eccodes_CONTENTS="  usr/bin/!(cyg*dll)  usr/share"
libeccodes_CATEGORY="Libs"
libeccodes_SUMMARY="${SUMMARY} (runtime)"
libeccodes_CONTENTS="  usr/bin/cyg*dll"
libeccodes_devel_CATEGORY="Libs"
libeccodes_devel_SUMMARY="${SUMMARY} (development)"
libeccodes_devel_CONTENTS="  usr/lib/  usr/include"
RESTRICT="diff"
KEEP_LA_FILES="none"
# curl is required to download full test data set from ECMWF. Will this behave 
under CI?
BUILD_REQUIRES="curl gfortran libnetcdf-devel libopenjpeg-devel libpng-devel 
libaec-devel libgomp1"
CYGCMAKE_GENERATOR="Unix Makefiles"
CYGCMAKE_ARGS="    -DDISABLE_OS_CHECK=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo 
-DIEEE_LE=1    -DENABLE_NETCDF=ON -DENABLE_JPG_LIBOPENJPEG=ON -DENABLE_PNG=ON 
-DENABLE_AEC=ON -DENABLE_FORTRAN=ON -DENABLE_ECCODES_OMP_THREADS=ON 
-DENABLE_MEMFS=OFF -DENABLE_EXTRA_TESTS=ON"


src_test() {
        PATH=${B}/src:${PATH}
        cd ${B}
        cygmake test
}
        

Reply via email to