Add fortran-int64.eclass to provide utility functions for multilib, int64, static multibuilds. The int64 USE flag is for Fortran 64 bit integer array indices.
Refactor openblas to use the fortran-int64.eclass. Move the virtuals from RDEPEND to PDEPEND to avoid circular dependencies. Specify the pkg-config module name in openblas
Refactor to lapack-reference use the fortran-int64.eclass. Add the virtual to PDEPEND. Call fortran-int64_ensure_blas to check the blas pkg-config file is available, and the blas-int64 pkg-config file if the int64 USE flag is specified. Remove the sed -e /export/s:lapack::g line for CMakeLists.txt, as I do not wish to change this line: "export(TARGETS ${ALL_TARGETS} FILE lapack-targets.cmake)".  Change the addition of the xblas library to the Requires of the pkg-config file to allow for using an int64 build of xblas, by renaming BLAS_PROFNAME to BLAS_REQUIRES then including xblas in the -DBLAS_REQUIRES in src_configure. Try to fix https://github.com/gentoo-science/sci/issues/275 and Bug 524830 - sci-libs/arpack - configure: ld: cannot find -llapack_rs6k by calculating the blas pkg-config file to add to the Requires - needs testing.
multilib int64 multibuild blas-reference
multilib int64 multibuild cblas-reference. int64 fails tests with blas-reference
multilib int64 multibuild xblas. The int64 build may not work though, not tested.
Bump the blas virtual to add int64 supplort for blas-reference.
Bump the cblas virtual to add int64 supplort for cblas-reference.
Specify the xblas library location to cmake - sci-libs/lapack-reference-9999::science  USE="int64 static-libs {test*} xblas*" ABI_X86="32 (64) (-x32)" builds and passes tests with eselect blas show = reference
Thanks to tamiko for testing and the fix to the problem: sci-libs/xblas is missing sys-devel/m4 as build time dependency (at least the configure script checks for it and barfs).
Thanks to tamiko for testing - the earlier fix for xblas, -DXBLAS_LIBRARY:FILEPATH="${ROOT}usr/$(get_libdir)/lib${xblas_libname}.so", breaks the build with USE=-xblas, so only do this when use xblas.
Thanks to kiwifb for reviewing and the fix: change ROOT to EROOT to support Gentoo prefix.
Thanks to jlec for reviewing, add missing documentation for EBASE_PROFNAME in fortran-int64.eclass.
Merge int64-eclass branch with master. lapack-reference-9999 builds and passes tests with USE=int64 xblas.
Merge pull request #277 from gentoo-science/int64-build-eclass

Int64 build eclass