diff options
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/Manifest.gz | bin | 41496 -> 41488 bytes | |||
-rw-r--r-- | sci-libs/blas-reference/Manifest | 4 | ||||
-rw-r--r-- | sci-libs/blas-reference/blas-reference-20151113-r1.ebuild | 1 | ||||
-rw-r--r-- | sci-libs/blas-reference/blas-reference-20161223.ebuild | 1 | ||||
-rw-r--r-- | sci-libs/cblas-reference/Manifest | 4 | ||||
-rw-r--r-- | sci-libs/cblas-reference/cblas-reference-20151113-r2.ebuild | 3 | ||||
-rw-r--r-- | sci-libs/cblas-reference/cblas-reference-20161223.ebuild | 3 | ||||
-rw-r--r-- | sci-libs/gdal/Manifest | 6 | ||||
-rw-r--r-- | sci-libs/gdal/gdal-2.3.0-r1.ebuild | 4 | ||||
-rw-r--r-- | sci-libs/gdal/gdal-2.3.1.ebuild | 316 | ||||
-rw-r--r-- | sci-libs/gdal/metadata.xml | 1 | ||||
-rw-r--r-- | sci-libs/tensorflow/Manifest | 3 | ||||
-rw-r--r-- | sci-libs/tensorflow/tensorflow-1.10.0.ebuild | 427 |
13 files changed, 763 insertions, 10 deletions
diff --git a/sci-libs/Manifest.gz b/sci-libs/Manifest.gz Binary files differindex d53b8e6eaf8e..5f8e3de50845 100644 --- a/sci-libs/Manifest.gz +++ b/sci-libs/Manifest.gz diff --git a/sci-libs/blas-reference/Manifest b/sci-libs/blas-reference/Manifest index bf18b786f1cd..7e15ad08e8c6 100644 --- a/sci-libs/blas-reference/Manifest +++ b/sci-libs/blas-reference/Manifest @@ -8,6 +8,6 @@ DIST lapack-3.6.0.tgz 6792324 BLAKE2B 438f3376b63b38ef0fe70f6becac847816f3a11c01 DIST lapack-3.7.0.tgz 7359812 BLAKE2B 20aa42e22d8c920d1360afe41ceec7b36f6cd5fbe43ca9d7848ef7cc45a64a0314cb1321941c1a7c03654f41e28ec805445882ded0ca0ea07674e70b66cba6b5 SHA512 e4f4c7d0ba8a096eeb813160c6dbcdd535647df6b2ad5beac9181908158956b31d1a9554ec9b9836fd44fe7404c1f377b297cbb20d744f20d70e357fd246c91b DIST lapack-lite-3.1.1.tgz 5332509 BLAKE2B 5a8ea98e9956f2bc1fc8dbb1ede18178d43d1f418e324f2798daf2197a2f7f7a1841ea0a0d68f1affa3c9c0a37b024f82222bd2fd6072ca827c70c9c441191c7 SHA512 492b932ef313339ce6b4e63ac8f778489e6870b0eb85f7b086f3c844e75f98e7f85382c7556dfa368ab8320b6f02d1df8ccfcb40b5c0b7c2d74518b7c309e75c EBUILD blas-reference-20070226-r4.ebuild 1960 BLAKE2B 31a8ba7cc32d6db15b70e66dcb1e1ac753c622848d9fb532623a1a8e3e03fb84114ff1f5dcb28d6eec0c3cb9152f7eafdd1b209b39eafc309cc042b198df867e SHA512 00fa4c79ec1e3607f58a91ce9fea701a681e1a35258f59e437ea46daa7e72348eb7a3e84a49b9810a26f3b70eef4098f391e714fce1514ad5ed696ac709ce2ca -EBUILD blas-reference-20151113-r1.ebuild 2434 BLAKE2B e50bb59e974d893fa0c4a8d8440a3afe4c9e946c5565fe9456d25c9161b0d391ef2daea0f38fc5f40bcb8a3c2d0d45f3b233a415fc81da1e9240bae694d33881 SHA512 df2992f47c432b0ea9e1d0268d52989293506f8f852e978b87a5c57c6edcef390f96a37191228c297df28e4aff5fde4ddc53425fd88c5fb9340400961ef9f4ba -EBUILD blas-reference-20161223.ebuild 2670 BLAKE2B 585ba9712215422301179cf187f54443c45f228409f97cbb791217e3b7a5bca4b0efdde3882f136489457d1bd9805460894d32ec396a269ec11236d4fe7d14fa SHA512 85d6150b70019ffa992f95bc6d3e775e2c00b27edf3068566355a2ab1f2d9e41706d91088741b4e16b257c8a92dc6c15a785f7cbfc774850841d06ce837e30a5 +EBUILD blas-reference-20151113-r1.ebuild 2465 BLAKE2B 814bb3dd1750a8b24d89be02a6cc503064760b6d6b2b51c6a0781c3f74951aa3284caab9ed6c00f9a1959624c43d2dcd26625952208176be08fe98f75c514c95 SHA512 3ba5dc44282a82e42a5d337fa9cbde9f5a1c098ba2ec4179748f55dce9c0ad152f45bf20617af975e7bea0cd5c5d6a47f25b0a50fe239f2aa4642eb514b06821 +EBUILD blas-reference-20161223.ebuild 2701 BLAKE2B 0cf4f7b7a45f2ba3090f507091df05f0617370961e95bdd6e6d8c0957aa7a2d2f682631b147774e1d69f6e1587e417f387a171c7faf6608106f27356f2dfa7f8 SHA512 4bb9b8ec30db542d6fed0389de07fb4cdf3c0b79bfc79331fff501fa4d340d23ce1889b472c60b73743918c0da2e3c28f1aa23b879b6eb6fb5b37eba15ff01c9 MISC metadata.xml 801 BLAKE2B 68ea5978073c01c861253ffd064179a25dc63771c9cabc0b3de200e5333c93a5d55caf8cde1234b643007b690b2a96fa207314117f790b367bd089c997722676 SHA512 78ca8d7459ba5bc81f5f821d9020023d01610d1fd55157bf566890a5c80ff8f83ca1139304319ee41b04f04b559c9e377037c04a1fbdd8dfde3e62f7ca6ff9fe diff --git a/sci-libs/blas-reference/blas-reference-20151113-r1.ebuild b/sci-libs/blas-reference/blas-reference-20151113-r1.ebuild index 4b9722513640..13f1edb36df5 100644 --- a/sci-libs/blas-reference/blas-reference-20151113-r1.ebuild +++ b/sci-libs/blas-reference/blas-reference-20151113-r1.ebuild @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=6 +CMAKE_MAKEFILE_GENERATOR=emake inherit eutils fortran-2 cmake-utils multilib flag-o-matic toolchain-funcs diff --git a/sci-libs/blas-reference/blas-reference-20161223.ebuild b/sci-libs/blas-reference/blas-reference-20161223.ebuild index f9afcc3aec12..5ceb038e7702 100644 --- a/sci-libs/blas-reference/blas-reference-20161223.ebuild +++ b/sci-libs/blas-reference/blas-reference-20161223.ebuild @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=6 +CMAKE_MAKEFILE_GENERATOR=emake inherit eutils fortran-2 cmake-utils multilib flag-o-matic toolchain-funcs diff --git a/sci-libs/cblas-reference/Manifest b/sci-libs/cblas-reference/Manifest index d1883bd8a3c6..9967f4937d09 100644 --- a/sci-libs/cblas-reference/Manifest +++ b/sci-libs/cblas-reference/Manifest @@ -7,6 +7,6 @@ DIST cblas.tgz 197694 BLAKE2B a9a6feff0198cc62b2a9fd75740e9cebbecd36adff7a1fb3ea DIST lapack-3.6.0.tgz 6792324 BLAKE2B 438f3376b63b38ef0fe70f6becac847816f3a11c01f5ab237dc0d941792ceb54dbd2f8dc22d56286f5dab3499289ed94e67521ea951a98973c9640abc294ad6c SHA512 bc50441d415ef8896dd7626d77c6104184b996e758704366288089f03d4c99d068e33153b0d13305310886017e5d2e716130f812a95cfcad36ef37fe20417ab8 DIST lapack-3.7.0.tgz 7359812 BLAKE2B 20aa42e22d8c920d1360afe41ceec7b36f6cd5fbe43ca9d7848ef7cc45a64a0314cb1321941c1a7c03654f41e28ec805445882ded0ca0ea07674e70b66cba6b5 SHA512 e4f4c7d0ba8a096eeb813160c6dbcdd535647df6b2ad5beac9181908158956b31d1a9554ec9b9836fd44fe7404c1f377b297cbb20d744f20d70e357fd246c91b EBUILD cblas-reference-20030223-r6.ebuild 1864 BLAKE2B 7d772393f7721a8a53d25fdf9de938273a35d38b204893f4d04173ee129c9adc2bcfccba117dcd961c97e5dfcac2bf2cc2858fb8b9eec5a10801ae25dadafec5 SHA512 bdcf2929e1965d470956a7a7ac63f06ed3e231b30f962db37e5208f03504ddf69e103c4aa014cd7dff0dd45801c0ee9f1c3a1c0491c275002220ce8031ca7e8b -EBUILD cblas-reference-20151113-r2.ebuild 2625 BLAKE2B f4c4af515cfa0167b44740aaf3fb1b131005972f1949ad19bfae9aede6dd6091b2afaf203594a0ac8e7b60385b4b5a70eab6ad6b71e4b54c48c026be72912f5d SHA512 42d7ead9609f038f774b42b3e6f93d31939d13780d8cad052e2e57c06386ce7f1fec7caa8694714f7fee8122e38298e85436a72fc902e2e5738e0783636a37cc -EBUILD cblas-reference-20161223.ebuild 2632 BLAKE2B 4f9d119116e9a8129c86d01b9ee6579735e710c200604cc6ac7cc66a49ee702f3207c1a81ab0261143d6be7a4ca79c40bcfc3fc39912e6fdb26822102f129ee6 SHA512 6663e47a9c48b6e67fe3fa32ff0de51ee1265daa7da189f9017a622817b4eade9b9174e852af5d17018b7846e18d5d5a56dad8212ea38ef31076843d31f3a50d +EBUILD cblas-reference-20151113-r2.ebuild 2656 BLAKE2B c1291e6fe03a538cb02ad556067c20be70f917586a7a2b481d5ec345fd2cb74850a2e11c2c2aa9a4e4bf7c45325f920f7ae679d3397874e6f24aaec725cb2be3 SHA512 e606382c6114cf3d72dee8b8aea12335fae062efe667d677100165fb561e60941c7425bc29bd2a71d317d3704c76ea019e82b372f10f5c333cde1bf9b69118a9 +EBUILD cblas-reference-20161223.ebuild 2663 BLAKE2B b44157a5861535fd0239a88d2651ec983502fc7edde0a2c0ffde3c82ade1112d60eedaa360e49907206eda00af758956815b88fb8dc0b971116eff16326cf782 SHA512 1449bafa47c0613964586f2d0652742346371a7f3a12eecf83cfeea7b94db85c7bfbd05fa34110ad19cc7a04b1532cea7e220a458e4933238a804c1ede15d9e0 MISC metadata.xml 836 BLAKE2B b355702b31b2de0e8c98cbd84338da58a19821c32b2e9cc039e0ea2f6a416be88ba4b4480b1f769c1311b1902092b8cfbe218ad67d48863932961a99b1ef15d2 SHA512 5e3394b15042b221806f47a96bc5b1bb09a004f9dc30639595c6a3264c7c92af3fec769b87a1702eba2f8a7c06580e7c62cbe22577ce93e35886c9db1aa309b3 diff --git a/sci-libs/cblas-reference/cblas-reference-20151113-r2.ebuild b/sci-libs/cblas-reference/cblas-reference-20151113-r2.ebuild index 90ce15319a0e..1fb8df2d9def 100644 --- a/sci-libs/cblas-reference/cblas-reference-20151113-r2.ebuild +++ b/sci-libs/cblas-reference/cblas-reference-20151113-r2.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 +CMAKE_MAKEFILE_GENERATOR=emake inherit eutils fortran-2 cmake-utils multilib flag-o-matic toolchain-funcs diff --git a/sci-libs/cblas-reference/cblas-reference-20161223.ebuild b/sci-libs/cblas-reference/cblas-reference-20161223.ebuild index 8ad5308167eb..817aaa188ef1 100644 --- a/sci-libs/cblas-reference/cblas-reference-20161223.ebuild +++ b/sci-libs/cblas-reference/cblas-reference-20161223.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 +CMAKE_MAKEFILE_GENERATOR=emake inherit eutils fortran-2 cmake-utils multilib flag-o-matic toolchain-funcs diff --git a/sci-libs/gdal/Manifest b/sci-libs/gdal/Manifest index 863740d7aeb6..8c5930d89a11 100644 --- a/sci-libs/gdal/Manifest +++ b/sci-libs/gdal/Manifest @@ -5,7 +5,9 @@ AUX gdal-2.2.3-soname.patch 2062 BLAKE2B 159b3d8eec126a141ff21c908d45193411bdbcc AUX gdal-2.3.0-curl.patch 471 BLAKE2B 551c9fba5cd49afef45ae271f20b8440214b06f569893cf8dfba73bd5682a9494e8ff1d3c81c1784019e49149d56aa4a4f4ced77db2d1a29f12eaec3f4fbce72 SHA512 a23a7df486ed2fe0c000a87405ad56ed48107a957ce29bd6692df26ef93e493b2221b856720721cafeba9646c4c959e154549c87e1012a8a65389343d267dbe6 DIST gdal-2.2.3.tar.gz 13754766 BLAKE2B d9482e7ee40bb5558fbbb43b750dfb95344abe45142c19e1f767535d3fc127fa9d6ed4496d730a25cb4132980efbffb4685e8663798fa05515b8548edb689e42 SHA512 841e5ba3c1a442b678dcaabac719ea7707b817f3dc717a34430dc7ba1f2c27fa88e27b7a8645075fae6e16373b36e6c50f674bdd6b70d10059e6bc4be7a72046 DIST gdal-2.3.0.tar.gz 14423820 BLAKE2B 6c67c66b2f68699249ccd4df2cb1e3b7042e94003b730e64bd8b8eec726a32da9485cab29552bd34c23831686ec3e879edd1848a2339c8289580ce282a287992 SHA512 b37e433be0b7a587ea9f9e5e720295e4cd1406f6c8ca770f5fedcd7fdc797e01e576eb887034b38f93f04a4e76c0ce84792bc7d91a49fea4122231a37ace812f +DIST gdal-2.3.1.tar.gz 14450452 BLAKE2B 226ddf80ff8b9e3d420ac717b245a09fe3daa0331931f4d371b62ab9fa9bb0735ca11e1e045398de92d61b68815aa1dc3e7b6568f4853964cf42d188e46e6eb7 SHA512 0c5bb515dd2a9ad3110421b39bd680ce7e9de68e969cf35a7e63118965dbe193d25a7720a525e53af153de3e78f76ccc6983f4dcdfa6ba429d732a7a47a35d57 EBUILD gdal-2.2.3-r1.ebuild 7528 BLAKE2B db6fd16c9fa5679cfde4ef85b5ec6ecc161052dbd990da6e6eeae9934f300172bccd020e114067e90ad4ba25714741f24923379246ae29cc1ebdffe69bee0cdc SHA512 444f2a99ca963a4e1359fd888053a7cd8754534c12e4cd28bb4441aeeecc4fe869442eefbc7bcaa23347ee12cff568859f497a6411d0b0de86e3dbc2dd38f9d7 EBUILD gdal-2.2.3-r2.ebuild 7579 BLAKE2B 3b6d969b924315db0563ba43b1f5b6370f5682c019095b8febdadf8c78807a85a81dd548fafb1826d91b6eddcf694f72f1f873fbfb42ba23a4a0da084e7ad047 SHA512 11f91a0186a6a35d16725894c9f330027eae6124e3903295183f673068c75cfcf08e5c578873bff22017a14a77f67e390c08a7ab75cccc2f154883a624afca12 -EBUILD gdal-2.3.0-r1.ebuild 7924 BLAKE2B 204fea1f6842576043135fd97dbc707db014d9c6916b61863e47b1acb91e0c9b91ec846aef1ebd33b250ca789572a438b90e95d523f4e9ec35db4b83fb789c01 SHA512 12a75a36205314e53fd1c5c8af40285dbcd4d1a5d52ee383c834a7b0ffd8e7747c47e1b3f0c2f7302b961a350c60a0fa78249a61134bfb3ba59f77ac3b615971 -MISC metadata.xml 1522 BLAKE2B b67678f81739e2fb2866cc6ca49545368fce4a85b145ba3f8228b8a39ecb2d7f75b55500f13768838c9ed11a47f586ab7b05eb31e2dbf6fcd4d29c5d8896107f SHA512 091112e555a5a77c5643cbd4465046bfd9fe287e209b42f5410787a2f1a2e4d7ec640efad93c277f0f6581db2264fa104d5aba2e8cbc4126c2c14fe4d86afcee +EBUILD gdal-2.3.0-r1.ebuild 7926 BLAKE2B 6781fc33a7d287814d267d95c7b9fa5ff6eab0ad970072f79f55476481560753155121add92bbd4d8d18d7b3f8fe22ccc1fab1aa3c69907eb8993ac50970e421 SHA512 0da72b67c0ee5acb3ef0a4306877e942574873672156a61ceffeea4043170e88df46b4b675f85f0b42326b088b7a8f76dedd70699b8282a4857ff5133d9e103a +EBUILD gdal-2.3.1.ebuild 7987 BLAKE2B d550f6c8a05cefef45f62de1a11845d80ee14f257cbedb373ac317632e0abe814098c455253912f1cc111ea5eadeb50c8d83987566338941edf127c17b1e2922 SHA512 fc7344da710ca0464229ea8ef2f5192ad6bd13b7e9ca533d8369d8bd18c79241e9d40019a0b27d110e4b50189702e548423914f6390cfbe78b8ae2d39e81ae31 +MISC metadata.xml 1616 BLAKE2B 7167165623c93e069ce77ef80e68e6339fc38354c0db343564ce8ecf3566e0d61b8b5aeb4e6b69e66bf1e8932d18de54b528bf1a2148767efe3b5cf985a31748 SHA512 dca0cb7a8c94a5313aed09f8c28ae35a55de4b0ff8198469b7f9adc8220b29cbd8c3f92db121b944b03c169b302ac8aa95f4342b76510590aff63a5f122c74c1 diff --git a/sci-libs/gdal/gdal-2.3.0-r1.ebuild b/sci-libs/gdal/gdal-2.3.0-r1.ebuild index 2ddaa49d4146..436c68a468d8 100644 --- a/sci-libs/gdal/gdal-2.3.0-r1.ebuild +++ b/sci-libs/gdal/gdal-2.3.0-r1.ebuild @@ -10,8 +10,8 @@ DISTUTILS_OPTIONAL=1 inherit autotools perl-module distutils-r1 toolchain-funcs flag-o-matic java-pkg-opt-2 DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)" -HOMEPAGE="http://www.gdal.org/" -SRC_URI="http://download.osgeo.org/${PN}/${PV}/${P}.tar.gz" +HOMEPAGE="https://www.gdal.org/" +SRC_URI="https://download.osgeo.org/${PN}/${PV}/${P}.tar.gz" SLOT="0/2.3" LICENSE="BSD Info-ZIP MIT" diff --git a/sci-libs/gdal/gdal-2.3.1.ebuild b/sci-libs/gdal/gdal-2.3.1.ebuild new file mode 100644 index 000000000000..38736368a997 --- /dev/null +++ b/sci-libs/gdal/gdal-2.3.1.ebuild @@ -0,0 +1,316 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL="no" +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +DISTUTILS_OPTIONAL=1 + +inherit autotools perl-module distutils-r1 toolchain-funcs flag-o-matic java-pkg-opt-2 + +DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)" +HOMEPAGE="https://www.gdal.org/" +SRC_URI="https://download.osgeo.org/${PN}/${PV}/${P}.tar.gz" + +SLOT="0/2.3" +LICENSE="BSD Info-ZIP MIT" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="armadillo +aux_xml curl debug doc fits geos gif gml hdf5 java jpeg jpeg2k lzma mdb mysql netcdf odbc ogdi opencl oracle pdf perl png postgres python spatialite sqlite threads webp xls zstd" + +COMMON_DEPEND=" + dev-libs/expat + dev-libs/json-c:= + dev-libs/libpcre + dev-libs/libxml2:= + media-libs/tiff:0= + sci-libs/libgeotiff + sys-libs/zlib:=[minizip(+)] + armadillo? ( sci-libs/armadillo:=[lapack] ) + curl? ( net-misc/curl ) + fits? ( sci-libs/cfitsio:= ) + geos? ( >=sci-libs/geos-2.2.1 ) + gif? ( media-libs/giflib:= ) + gml? ( >=dev-libs/xerces-c-3.1 ) + hdf5? ( >=sci-libs/hdf5-1.6.4:=[szip] ) + jpeg? ( virtual/jpeg:0= ) + jpeg2k? ( media-libs/openjpeg:2= ) + lzma? ( || ( + app-arch/xz-utils + app-arch/lzma + ) ) + mdb? ( dev-java/jackcess:1 ) + mysql? ( virtual/mysql ) + netcdf? ( sci-libs/netcdf:= ) + odbc? ( dev-db/unixODBC ) + ogdi? ( sci-libs/ogdi ) + opencl? ( virtual/opencl ) + oracle? ( dev-db/oracle-instantclient:= ) + pdf? ( app-text/poppler:= ) + perl? ( dev-lang/perl:= ) + png? ( media-libs/libpng:0= ) + postgres? ( >=dev-db/postgresql-8.4:= ) + python? ( + ${PYTHON_DEPS} + dev-python/numpy[${PYTHON_USEDEP}] + ) + spatialite? ( dev-db/spatialite ) + sqlite? ( dev-db/sqlite:3 ) + webp? ( media-libs/libwebp:= ) + xls? ( dev-libs/freexl ) + zstd? ( app-arch/zstd:= )" + +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.7:* )" + +DEPEND="${COMMON_DEPEND} + doc? ( app-doc/doxygen ) + java? ( >=virtual/jdk-1.7:* ) + perl? ( dev-lang/swig:0 ) + python? ( + dev-lang/swig:0 + dev-python/setuptools[${PYTHON_USEDEP}] + )" + +REQUIRED_USE=" + mdb? ( java ) + python? ( ${PYTHON_REQUIRED_USE} ) + spatialite? ( sqlite ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2.2.3-soname.patch" + "${FILESDIR}/${PN}-2.2.3-bashcomp-path.patch" # bug 641866 + "${FILESDIR}/${PN}-2.3.0-curl.patch" # bug 659840 +) + +src_prepare() { + # fix datadir and docdir placement + sed -e "s:@datadir@:@datadir@/gdal:" \ + -e "s:@exec_prefix@/doc:@exec_prefix@/share/doc/${PF}/html:g" \ + -i "${S}"/GDALmake.opt.in || die + + # the second sed expression should fix bug 371075 + sed -e "s:setup.py install:setup.py install --root=\$(DESTDIR):" \ + -e "s:--prefix=\$(DESTDIR):--prefix=:" \ + -i "${S}"/swig/python/GNUmakefile || die + + # Fix spatialite/sqlite include issue + sed -e 's:spatialite/sqlite3.h:sqlite3.h:g' \ + -i ogr/ogrsf_frmts/sqlite/ogr_sqlite.h || die + + # Fix freexl configure check + sed -e 's:FREEXL_LIBS=missing):FREEXL_LIBS=missing,-lm):g' \ + -i configure.ac || die + + sed -e "s: /usr/: \"${EPREFIX}\"/usr/:g" \ + -i configure.ac || die + + sed -e 's:^ar:$(AR):g' \ + -i ogr/ogrsf_frmts/sdts/install-libs.sh || die + + # updated for newer swig (must specify the path to input files) + sed -e "s: gdal_array.i: ../include/gdal_array.i:" \ + -e "s:\$(DESTDIR)\$(prefix):\$(DESTDIR)\$(INST_PREFIX):g" \ + -i swig/python/GNUmakefile || die "sed python makefile failed" + sed -e "s:library_dirs = :library_dirs = /usr/$(get_libdir):g" \ + -i swig/python/setup.cfg || die "sed python setup.cfg failed" + + default + + eautoreconf +} + +src_configure() { + # bug 619148 + append-cxxflags -std=c++14 + + local myconf=( + # charls - not packaged in Gentoo ebuild repository + # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore + # bsb - legal issues + # ingres - same story as oracle oci + # jasper - disabled because unmaintained and vulnerable; openjpeg will be used as JPEG-2000 provider instead + # podofo - we use poppler instead they are exclusive for each other + # tiff is a hard dep + --includedir="${EPREFIX}/usr/include/${PN}" + --disable-pdf-plugin + --disable-static + --enable-shared + --with-expat + --with-cryptopp=no + --with-geotiff + --with-grib + --with-hide-internal-symbols + --with-libjson-c="${EPREFIX}/usr/" + --with-libtiff + --with-libtool + --with-libz="${EPREFIX}/usr/" + --with-gnm + --without-bsb + --without-charls + --without-dods-root + --without-ecw + --without-epsilon + --without-fgdb + --without-fme + --without-gta + --without-grass + --without-hdf4 + --without-idb + --without-ingres + --without-jasper + --without-jp2lura + --without-jp2mrsid + --without-kakadu + --without-kea + --without-libkml + --without-mongocxx + --without-mrsid + --without-mrsid_lidar + --without-msg + --without-mrf + --without-rasdaman + --without-rasterlite2 + --without-pcraster + --without-pdfium + --without-php + --without-podofo + --without-qhull + --without-sde + --without-sfcgal + --without-sosi + --without-teigha + --disable-lto + $(use_enable debug) + $(use_with armadillo) + $(use_with aux_xml pam) + $(use_with curl) + $(use_with fits cfitsio) + $(use_with geos) + $(use_with gif) + $(use_with gml xerces) + $(use_with hdf5) + $(use_with jpeg pcidsk) # pcidsk is internal, because there is no such library yreleased developer by gdal + $(use_with jpeg) + $(use_with jpeg2k openjpeg) + $(use_with lzma liblzma) + $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config) + $(use_with netcdf) + $(use_with oracle oci) + $(use_with odbc) + $(use_with ogdi ogdi "${EPREFIX}"/usr) + $(use_with opencl) + $(use_with pdf poppler) + $(use_with perl) + $(use_with png) + $(use_with postgres pg) + $(use_with python) + $(use_with spatialite) + $(use_with sqlite sqlite3 "${EPREFIX}"/usr) + $(use_with threads) + $(use_with webp) + $(use_with xls freexl) ) + $(use_with zstd) + + tc-export AR RANLIB + + if use java; then + myconf+=( + --with-java=$(java-config --jdk-home 2>/dev/null) + --with-jvm-lib=dlopen + $(use_with mdb) + ) + else + myconf+=( --without-java --without-mdb ) + fi + + if use sqlite; then + append-libs -lsqlite3 + fi + + # bug #632660 + if use ogdi; then + tc-export PKG_CONFIG + append-cflags $(${PKG_CONFIG} --cflags libtirpc) + append-cxxflags $(${PKG_CONFIG} --cflags libtirpc) + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" + + # mysql-config puts this in (and boy is it a PITA to get it out) + if use mysql; then + sed -e "s: -rdynamic : :" \ + -i GDALmake.opt || die "sed LIBS failed" + fi +} + +src_compile() { + if use perl; then + rm "${S}"/swig/perl/*_wrap.cpp || die + emake -C "${S}"/swig/perl generate + fi + + # gdal-config needed before generating Python bindings + default + + if use perl ; then + pushd "${S}"/swig/perl > /dev/null || die + perl-module_src_configure + perl-module_src_compile + popd > /dev/null || die + fi + + if use python; then + rm -f "${S}"/swig/python/*_wrap.cpp || die + emake -C "${S}"/swig/python generate + pushd "${S}"/swig/python > /dev/null || die + distutils-r1_src_compile + popd > /dev/null || die + fi + + use doc && emake docs +} + +src_install() { + if use perl ; then + pushd "${S}"/swig/perl > /dev/null || die + perl-module_src_install + popd > /dev/null || die + sed -e 's:BINDINGS = \(.*\) perl:BINDINGS = \1:g' \ + -i GDALmake.opt || die + fi + + use perl && perl_delete_localpod + + local DOCS=( Doxyfile HOWTO-RELEASE NEWS ) + use doc && HTML_DOCS=( html/. ) + + default + + python_install() { + distutils-r1_python_install + python_doscript scripts/*.py + } + + if use python; then + # Don't clash with gdal's docs + unset DOCS HTML_DOCS + + pushd "${S}"/swig/python > /dev/null || die + distutils-r1_src_install + popd > /dev/null || die + + newdoc swig/python/README.txt README-python.txt + + insinto /usr/share/${PN}/samples + doins -r swig/python/samples/ + fi + + doman "${S}"/man/man*/* +} + +pkg_postinst() { + elog "Check available image and data formats after building with" + elog "gdalinfo and ogrinfo (using the --formats switch)." +} diff --git a/sci-libs/gdal/metadata.xml b/sci-libs/gdal/metadata.xml index 7088f71ba0f1..14e5e92e78fe 100644 --- a/sci-libs/gdal/metadata.xml +++ b/sci-libs/gdal/metadata.xml @@ -25,5 +25,6 @@ <flag name="opencl">Enable OpenCL support</flag> <flag name="spatialite">Enable Spatial DBMS over sqlite <pkg>dev-db/spatialite</pkg></flag> <flag name="xls">Add the <pkg>dev-libs/freexl</pkg> library for xls import support</flag> + <flag name="zstd">Enable support for ZSTD compression using <pkg>app-arch/zstd</pkg></flag> </use> </pkgmetadata> diff --git a/sci-libs/tensorflow/Manifest b/sci-libs/tensorflow/Manifest index 4b3c9dfdc754..df10da13ab96 100644 --- a/sci-libs/tensorflow/Manifest +++ b/sci-libs/tensorflow/Manifest @@ -60,14 +60,17 @@ DIST snappy-1.1.7.tar.gz 1090550 BLAKE2B e389c96e093de5db92b896a7fa17a90d3ad0be0 DIST sqlite-amalgamation-3200000.zip 2069628 BLAKE2B 97b641fdd143af8bd1f4b7b733f9823196d09ac1b1c1ea5b093da12592957b66d8be2450a7edf18c54ae83a03e09564d5c7f6b0cb8dd48d4fa8b4f2b153f62a7 SHA512 659b5fe93d526d6121f1530581d3fce5af90c986decf2fab7505fea14dc1ebc9167943261a433207fd70df0019bbcb4faeb5e49e586fc9ba6300439b6e00d1e8 DIST sqlite-amalgamation-3230100.zip 2183147 BLAKE2B af25542f81ac0592d143695466de785779dc8002ebc5b6cf20cb2d56a66cf12b9d4f73392b6ac696b8107beca0e5c3a3e03efb703fa49fc380355d1e9302e78a SHA512 5784f4dea7f14d7dcf5dd07f0e111c8f0b64ff55c68b32a23fba7a36baf1f095c7a35573fc3b57b84822878218b78f9b0187c4e3f0439d4215471ee5f556eee1 DIST swig-3.0.8.tar.gz 7937213 BLAKE2B 38f17631a36f178a478bf77f1a7ea77b50b91ed95ca0363f0f75d86bf7da6d855db314c1b7e67634b0e6e1438a0d141d0241595987142154ee356d60955248bc SHA512 85605bd98bf2b56f5bfca23ae23d76d764d76a174b05836c8686825e912d6326c370e9cf2134c0bf4f425560be103b16bf9c9d075077f52e713a69082616e906 +DIST tensorflow-1.10.0.tar.gz 24490786 BLAKE2B 2ecec19b2b2ebb2e292ec07fee458017aa3fcc4c1445e6c9419ea9bd37990a58607c8f3134c785be0e3ae098c332a734fb85717b2ecd781551a0c8f20ffca8f2 SHA512 a25257ad7e561c2040ba9dda699acb24b757e6d79c60324cab20d8d8a428fef79a06a3627a95a59e2c8408a094666b9aa6d8af1c5419fa8c238e1f5e10e9ec33 DIST tensorflow-1.10.0_rc1.tar.gz 24486453 BLAKE2B 3b41653695cfa03ae5ca3a4e16d82a0f3248ce674acb76210747614e98fabb9131a298ad947185c462d2e3573dfb7d1580de934d1a0b40710bba16208df7e333 SHA512 889430262f686613f39982b9b2ed328db16b651848cbf1dd06fbf9a5ef2304ddf0b43ca21eef2bbcc86800051497f18ba166427788c74a65aac7d3c10ae60f52 DIST tensorflow-1.8.0.tar.gz 22649439 BLAKE2B 7384c2cf742fb5a8b4e266e95080ae2513c1b112ab97f74839fa8e81bd91bd24645be8afb02e4447ad5fba9f47c4d146f59aa12085937cd3a364ec34c99590f3 SHA512 7280e65d26fb3f15d95f7217ee3bc08d1424cd144cf25bf638fa114fa835b2505dfaf457c55700067d24f485b77120973d094ec568e6d1b1054857402f9c352d DIST tensorflow-1.9.0.tar.gz 23571524 BLAKE2B 2961ef5a35d3271512999478f6e260c90c48537e251b41d60ae9e033386c0dd9e1337af85c5441afca1b8cf5b3726349ba0e56cccdfa95fdf1c5e9e4d4db8af5 SHA512 eb25dafccf2ec600c4ca28612362c8317b8b9160610ca9fb60f265815651c155b19ae5be3f213a0d9e716d9e25637d6502164433955247cf6fa5d75408b7ac84 +DIST tensorflow-patches-1.10.0.tar.bz2 4032 BLAKE2B 8588deec74179d8044af631de8e651491cc713553ee15ece9dff5052bd95b10924bdbe4301453f00d0f2fccd5d595d496b48fe45b0259837653b2de9e1898ab9 SHA512 1f57995ca9b3278735636cc42c88dc45558fa6a1d656108293f8df3fd9961d75f5e979bf0a9909136134e1cdaab41a34f83e605b48b23dddf17a6b1be684117b DIST tensorflow-patches-1.10.0_rc1.tar.bz2 4032 BLAKE2B 8588deec74179d8044af631de8e651491cc713553ee15ece9dff5052bd95b10924bdbe4301453f00d0f2fccd5d595d496b48fe45b0259837653b2de9e1898ab9 SHA512 1f57995ca9b3278735636cc42c88dc45558fa6a1d656108293f8df3fd9961d75f5e979bf0a9909136134e1cdaab41a34f83e605b48b23dddf17a6b1be684117b DIST tensorflow-patches-1.9.0.tar.bz2 8588 BLAKE2B 7fbdaa680b3bc372c760861709776cf333d587398297fb596332bb7394a7747c86cdc87615ae6f74e81d4e6b39a34aa3a9b6ee7cab95237316f20a315773b12b SHA512 35d56a1e71e500f41e423a2b58d58d210737afd2d9cd955aed227036a066506be1b39e7809f71d82c80f055ed43dfe1813213975acfb8d86be38baf24510e0f3 DIST tensorflow-python-license.txt 45132 BLAKE2B 1f572a06eeb4a58a5563b87a2db381a6e9eb0195cf1d006bda0d3da158e62a1e67e889a7d3d0da83d8609c0d048887bcbbd0d7056fd8e4f56b654047f36936fa SHA512 1b8c2f9733fcf27d560879418c366b5c3e44420d42adb3b857ee741793ddc75ad18324b016909457e5311f2143593392ce4404d12962f076e62f6036afbb521e DIST termcolor-1.1.0.tar.gz 3912 BLAKE2B 8d661a708eff02894b6e390befddaef1c9d14f78f0c7d10ac332fa149f7892109f77bd279c9a488a3aa4070569c92f0ce847e3911d419ff549a10555b34534fb SHA512 4bd06bf4405a9ef6c005cd4d159ef602f7fc7fccb3e57586da1187c402f4d0b9051ef930cae423065c51ff4be8a22ceae556a61a6b3c8c519d623c066c340b53 DIST zlib-1.2.11.tar.gz 607698 BLAKE2B 6bfc4bca5dcadba8a0d4121a2b3ed0bfe440c261003521862c8e6381f1a6f0a72d3fc037351d30afd7ef321e8e8d2ec817c046ac749f2ca0c97fbdc2f7e840b7 SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae +EBUILD tensorflow-1.10.0.ebuild 13829 BLAKE2B dd99f463536047e6b5acaa9aa6341d367b91d1a864f9b641bfab2b4522e73c669bc80641ad8feb5134926ac70eb8b3dee1e8551508ba25ae0c93fe59f713aba4 SHA512 29cf0984492d506aebfcab35e6c889e497c8771a8cf5974abf2b5752b2ea4d082491149f76beb3cc66eda7dd1d173322bab478df5fffe02494eac58a6154541f EBUILD tensorflow-1.10.0_rc1.ebuild 13829 BLAKE2B dd99f463536047e6b5acaa9aa6341d367b91d1a864f9b641bfab2b4522e73c669bc80641ad8feb5134926ac70eb8b3dee1e8551508ba25ae0c93fe59f713aba4 SHA512 29cf0984492d506aebfcab35e6c889e497c8771a8cf5974abf2b5752b2ea4d082491149f76beb3cc66eda7dd1d173322bab478df5fffe02494eac58a6154541f EBUILD tensorflow-1.8.0-r1.ebuild 12704 BLAKE2B 09da9048917ec2a5919179791fe0ef6607d2453e8a0e16ea0809820629a10002fbb157b96a9aad2c4999a78a8cfe75f4d43db8d1ed428741188fa12932ed0f15 SHA512 d6ec346fa14febaefe985c428d151477243cf7f1d4f21ecc24ea19204acaf2ff28fb192879206e46bbb771bfe10958cc0c460d351c9dc9ea5798b9211a40d84e EBUILD tensorflow-1.9.0.ebuild 16027 BLAKE2B a3a46215df0dec77d15ef828fe0fc73f9b209d3c1433c7893edd594a46161a30d73b8a811bc73829b540560cfadbf6fdd92fe132c12a374cb768c62d1bcea0de SHA512 ab6bcacacc67714628f7353c22052e6a659eb3d4a1d596c1caaca52157b90f23529a1fa37c192249faaf5909e320d6c54a32a09831494bcfa28611b596894ff5 diff --git a/sci-libs/tensorflow/tensorflow-1.10.0.ebuild b/sci-libs/tensorflow/tensorflow-1.10.0.ebuild new file mode 100644 index 000000000000..cd3af7d25880 --- /dev/null +++ b/sci-libs/tensorflow/tensorflow-1.10.0.ebuild @@ -0,0 +1,427 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python2_7 python3_{5,6} ) +MY_PV=${PV/_rc/-rc} +MY_P=${PN}-${MY_PV} + +inherit check-reqs cuda distutils-r1 eapi7-ver multiprocessing toolchain-funcs + +DESCRIPTION="Computation framework using data flow graphs for scalable machine learning" +HOMEPAGE="https://www.tensorflow.org/" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="cuda jemalloc mpi +python +system-libs" +CPU_USE_FLAGS_X86="sse sse2 sse3 sse4_1 sse4_2 avx avx2 fma3 fma4" +for i in $CPU_USE_FLAGS_X86; do + IUSE+=" cpu_flags_x86_$i" +done + +# distfiles that bazel uses for the workspace, will be copied to basel-distdir +bazel_external_uris=" + http://www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz -> oourafft-20061228.tgz + https://bitbucket.org/eigen/eigen/get/fd6845384b86.tar.gz -> eigen-fd6845384b86.tar.gz + https://github.com/abseil/abseil-cpp/archive/9613678332c976568272c8f4a78631a29159271d.tar.gz -> abseil-cpp-9613678332c976568272c8f4a78631a29159271d.tar.gz + https://github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz -> bazelbuild-rules_closure-dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz + https://github.com/google/double-conversion/archive/3992066a95b823efc8ccc1baf82a1cfc73f6e9b8.zip -> double-conversion-3992066a95b823efc8ccc1baf82a1cfc73f6e9b8.zip + https://github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz -> farmhash-816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz + https://github.com/google/gemmlowp/archive/38ebac7b059e84692f53e5938f97a9943c120d98.zip -> gemmlowp-38ebac7b059e84692f53e5938f97a9943c120d98.zip + https://github.com/google/highwayhash/archive/fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz -> highwayhash-fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz + https://github.com/google/protobuf/archive/v3.6.0.tar.gz -> protobuf-3.6.0.tar.gz + jemalloc? ( https://github.com/jemalloc/jemalloc/archive/4.4.0.tar.gz -> jemalloc-4.4.0.tar.gz ) + cuda? ( + https://github.com/nvidia/nccl/archive/03d856977ecbaac87e598c0c4bafca96761b9ac7.tar.gz -> nvidia-nccl-03d856977ecbaac87e598c0c4bafca96761b9ac7.tar.gz + https://github.com/NVlabs/cub/archive/1.8.0.zip -> cub-1.8.0.zip + ) + python? ( + https://github.com/abseil/abseil-py/archive/pypi-v0.2.2.tar.gz -> abseil-py-0.2.2.tar.gz + https://github.com/googleapis/googleapis/archive/f81082ea1e2f85c43649bee26e0d9871d4b41cdb.zip -> googleapis-f81082ea1e2f85c43649bee26e0d9871d4b41cdb.zip + https://github.com/GoogleCloudPlatform/google-cloud-cpp/archive/f875700a023bdd706333cde45aee8758b272c357.tar.gz -> google-cloud-cpp-f875700a023bdd706333cde45aee8758b272c357.tar.gz + https://github.com/google/boringssl/archive/a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz -> boringssl-a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz + https://github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz -> ARM_NEON_2_x86_SSE-0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz + https://github.com/llvm-mirror/llvm/archive/bd8c8d759852871609ba2e4e79868420f751949d.tar.gz -> llvm-bd8c8d759852871609ba2e4e79868420f751949d.tar.gz + https://mirror.bazel.build/docs.python.org/2.7/_sources/license.txt -> tensorflow-python-license.txt + https://pypi.python.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz + https://pypi.python.org/packages/bc/cc/3cdb0a02e7e96f6c70bd971bc8a90b8463fda83e264fa9c5c1c98ceabd81/backports.weakref-1.0rc1.tar.gz + !system-libs? ( + https://github.com/google/flatbuffers/archive/v1.9.0.tar.gz -> flatbuffers-1.9.0.tar.gz + ) + ) + !system-libs? ( + https://github.com/google/nsync/archive/1.20.1.tar.gz -> nsync-1.20.1.tar.gz + https://github.com/grpc/grpc/archive/v1.13.0.tar.gz -> grpc-1.13.0.tar.gz + )" + +SRC_URI="https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~perfinion/patches/tensorflow-patches-${PVR}.tar.bz2 + ${bazel_external_uris}" + +RDEPEND=" + app-arch/snappy + dev-db/lmdb + dev-db/sqlite + >=dev-libs/jsoncpp-1.8.4 + dev-libs/libpcre + >=dev-libs/protobuf-3.6.0 + >=dev-libs/re2-0.2018.04.01 + media-libs/giflib + media-libs/libjpeg-turbo + media-libs/libpng:0 + net-misc/curl + sys-libs/zlib + cuda? ( + >=dev-util/nvidia-cuda-toolkit-8.0[profiler] + >=dev-libs/cudnn-6.0 + ) + jemalloc? ( >=dev-libs/jemalloc-4.4.0 ) + mpi? ( virtual/mpi ) + python? ( + ${PYTHON_DEPS} + dev-python/absl-py[${PYTHON_USEDEP}] + dev-python/astor[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + >=dev-python/protobuf-python-3.6.0[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + dev-python/termcolor[${PYTHON_USEDEP}] + virtual/python-enum34[${PYTHON_USEDEP}] + system-libs? ( + >=dev-libs/flatbuffers-1.8.0 + ) + ) + system-libs? ( + dev-libs/nsync + >=net-libs/grpc-1.13.0[${PYTHON_USEDEP}] + )" +DEPEND="${RDEPEND} + !python? ( dev-lang/python ) + app-arch/unzip + >=dev-util/bazel-0.16.0 + dev-java/java-config + dev-python/mock + dev-lang/nasm + dev-lang/swig + dev-python/cython" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +S="${WORKDIR}/${MY_P}" + +DOCS=( AUTHORS CONTRIBUTING.md ISSUE_TEMPLATE.md README.md RELEASE.md ) +CHECKREQS_MEMORY="5G" +CHECKREQS_DISK_BUILD="5G" + +bazel-get-cpu-flags() { + local i f=() + # Keep this list in sync with tensorflow/core/platform/cpu_feature_guard.cc. + for i in sse sse2 sse3 sse4_1 sse4_2 avx avx2 fma4; do + use cpu_flags_x86_${i} && f+=( -m${i/_/.} ) + done + use cpu_flags_x86_fma3 && f+=( -mfma ) + echo "${f[*]}" +} + +bazel-get-flags() { + local i fs=() + for i in ${CFLAGS} $(bazel-get-cpu-flags); do + fs+=( "--copt=${i}" "--host_copt=${i}" ) + done + for i in ${CXXFLAGS} $(bazel-get-cpu-flags); do + fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" ) + done + for i in ${CPPFLAGS}; do + fs+=( "--copt=${i}" "--host_copt=${i}" ) + fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" ) + done + for i in ${LDFLAGS}; do + fs+=( "--linkopt=${i}" "--host_linkopt=${i}" ) + done + echo "${fs[*]}" +} + +setup_bazelrc() { + if [[ -f "${T}/bazelrc" ]]; then + return + fi + + # F: fopen_wr + # P: /proc/self/setgroups + # Even with standalone enabled, the Bazel sandbox binary is run for feature test: + # https://github.com/bazelbuild/bazel/blob/7b091c1397a82258e26ab5336df6c8dae1d97384/src/main/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedSpawnRunner.java#L61 + # https://github.com/bazelbuild/bazel/blob/76555482873ffcf1d32fb40106f89231b37f850a/src/main/tools/linux-sandbox-pid1.cc#L113 + addpredict /proc + + mkdir -p "${T}/bazel-cache" || die + mkdir -p "${T}/bazel-distdir" || die + + cat > "${T}/bazelrc" <<-EOF || die + startup --batch + + # dont strip HOME, portage sets a temp per-package dir + build --action_env HOME + + # make bazel respect MAKEOPTS + build --jobs=$(makeopts_jobs) $(bazel-get-flags) + build --compilation_mode=opt --host_compilation_mode=opt + + # Use standalone strategy to deactivate the bazel sandbox, since it + # conflicts with FEATURES=sandbox. + build --spawn_strategy=standalone --genrule_strategy=standalone + test --spawn_strategy=standalone --genrule_strategy=standalone + + build --strip=never + build --verbose_failures --noshow_loading_progress + test --verbose_test_summary --verbose_failures --noshow_loading_progress + + # make bazel only fetch distfiles from the cache + fetch --repository_cache=${T}/bazel-cache/ --distdir=${T}/bazel-distdir/ + build --repository_cache=${T}/bazel-cache/ --distdir=${T}/bazel-distdir/ + EOF +} + +ebazel() { + # Use different build folders for each multibuild variant. + local base_suffix="${MULTIBUILD_VARIANT+-}${MULTIBUILD_VARIANT}" + local output_base="${WORKDIR}/bazel-base${base_suffix}" + mkdir -p "${output_base}" || die + + einfo Running: bazel --output_base="${output_base}" "$@" + bazel --output_base="${output_base}" $@ || die +} + +load_distfiles() { + # Populate the bazel distdir to fetch from since it cannot use the network + # Bazel looks in distdir but will only look for the original filename, not + # the possibly renamed one that portage downloaded. If the line has -> we + # need to rename it back, otherwise a simple copy is fine. + + local src dst uri rename + + while read uri rename dst; do + src="${uri##*/}" + [[ -z $src ]] && continue + if [[ "$rename" != "->" ]]; then + dst="${src}" + fi + + [[ ${A} =~ ${dst} ]] || continue + + if [[ "$dst" == "$src" ]]; then + einfo "Copying $dst to bazel distdir $src ..." + else + einfo "Copying $dst to bazel distdir ..." + fi + ln -s "${DISTDIR}/${dst}" "${T}/bazel-distdir/${src}" || die + done <<< "$(sed -re 's/!?[A-Za-z]+\?\s+\(\s*//g; s/\s+\)//g' <<< "${bazel_external_uris}")" +} + +pkg_setup() { + check-reqs_pkg_setup +} + +src_unpack() { + # Only unpack the main distfile + unpack "${P}.tar.gz" + unpack tensorflow-patches-${PVR}.tar.bz2 +} + +src_prepare() { + export JAVA_HOME=$(java-config --jre-home) # so keepwork works + + setup_bazelrc + load_distfiles + + eapply "${WORKDIR}"/patches/*.patch + + default + use python && python_copy_sources + + if use cuda; then + for i in /dev/nvidia*; do + addpredict $i + done + fi +} + +src_configure() { + export JAVA_HOME=$(java-config --jre-home) # so keepwork works + + do_configure() { + export BAZEL_STRIP=0 + export CC_OPT_FLAGS=" " + export TF_NEED_JEMALLOC=$(usex jemalloc 1 0) + export TF_NEED_GCP=0 + export TF_NEED_HDFS=0 + export TF_NEED_S3=0 + export TF_NEED_AWS=0 + export TF_NEED_KAFKA=0 + export TF_ENABLE_XLA=0 + export TF_NEED_GDR=0 + export TF_NEED_VERBS=0 + export TF_NEED_OPENCL_SYCL=0 + export TF_NEED_OPENCL=0 + export TF_NEED_COMPUTECPP=0 + export TF_NEED_MKL=0 + export TF_NEED_MPI=$(usex mpi 1 0) + export TF_SET_ANDROID_WORKSPACE=0 + + if use python; then + python_export PYTHON_SITEDIR + export PYTHON_BIN_PATH="${PYTHON}" + export PYTHON_LIB_PATH="${PYTHON_SITEDIR}" + else + export PYTHON_BIN_PATH="$(which python)" + export PYTHON_LIB_PATH="$(python -c 'from distutils.sysconfig import *; print(get_python_lib())')" + fi + + export TF_NEED_CUDA=$(usex cuda 1 0) + export TF_DOWNLOAD_CLANG=0 + export TF_CUDA_CLANG=0 + export TF_NEED_TENSORRT=0 + if use cuda; then + export CUDA_TOOLKIT_PATH="${EPREFIX%/}/opt/cuda" + export CUDNN_INSTALL_PATH="${EPREFIX%/}/opt/cuda" + export GCC_HOST_COMPILER_PATH="$(cuda_gccdir)/$(tc-getCC)" + export TF_NCCL_VERSION="1" + + TF_CUDA_VERSION="$(best_version dev-util/nvidia-cuda-toolkit)" + TF_CUDA_VERSION="${TF_CUDA_VERSION##*cuda-toolkit-}" + export TF_CUDA_VERSION="$(ver_cut 1-2 ${TF_CUDA_VERSION})" + einfo "Setting CUDA version: $TF_CUDA_VERSION" + + TF_CUDNN_VERSION="$(best_version dev-libs/cudnn)" + TF_CUDNN_VERSION="${TF_CUDNN_VERSION##*cudnn-}" + export TF_CUDNN_VERSION="$(ver_cut 1-2 ${TF_CUDNN_VERSION})" + einfo "Setting CUDNN version: $TF_CUDNN_VERSION" + fi + + local SYSLIBS=( + astor_archive + com_googlesource_code_re2 + curl + cython + gif_archive + jemalloc + jpeg + jsoncpp_git + lmdb + nasm + org_sqlite + pcre + png_archive + six_archive + snappy + swig + termcolor_archive + zlib_archive + ) + if use system-libs; then + SYSLIBS+=( flatbuffers grpc nsync ) + fi + + SYSLIBS="${SYSLIBS[@]}" + export TF_SYSTEM_LIBS="${SYSLIBS// /,}" + + # Only one bazelrc is read, import our one before configure sets its options + echo "import ${T}/bazelrc" >> ./.bazelrc + + # This is not autoconf + ./configure || die + } + if use python; then + python_foreach_impl run_in_build_dir do_configure + else + do_configure + fi +} + +src_compile() { + export JAVA_HOME=$(java-config --jre-home) # so keepwork works + + if use python; then + python_setup + local MULTIBUILD_VARIANT="${EPYTHON/./_}" + cd "${S}-${MULTIBUILD_VARIANT}" || die + fi + + ebazel build \ + //tensorflow:libtensorflow_framework.so \ + //tensorflow:libtensorflow.so + ebazel build //tensorflow:libtensorflow_cc.so + + do_compile() { + ebazel build //tensorflow/tools/pip_package:build_pip_package + } + use python && python_foreach_impl run_in_build_dir do_compile +} + +src_install() { + local i j + export JAVA_HOME=$(java-config --jre-home) # so keepwork works + + do_install() { + einfo "Installing ${EPYTHON} files" + local srcdir="${T}/src-${MULTIBUILD_VARIANT}" + mkdir -p "${srcdir}" || die + bazel-bin/tensorflow/tools/pip_package/build_pip_package --src "${srcdir}" || die + cd "${srcdir}" || die + esetup.py install + + # Symlink to the main .so file + python_export PYTHON_SITEDIR + rm -rf "${D}/${PYTHON_SITEDIR}/${PN}/lib${PN}_framework.so" || die + dosym "../../../lib${PN}_framework.so" "${PYTHON_SITEDIR#${EPREFIX%/}}/${PN}/lib${PN}_framework.so" || die + + python_optimize + } + + if use python; then + python_foreach_impl run_in_build_dir do_install + + rm -f "${ED}"/usr/lib/python-exec/*/tensorboard || die "failed to remove tensorboard" + + # Symlink to python-exec scripts + for i in "${ED}"/usr/lib/python-exec/*/*; do + n="${i##*/}" + [[ -e "${ED}/usr/bin/${n}" ]] || dosym ../lib/python-exec/python-exec2 "/usr/bin/$n" + done + + python_setup + local MULTIBUILD_VARIANT="${EPYTHON/./_}" + cd "${S}-${MULTIBUILD_VARIANT}" || die + fi + + einfo "Installing headers" + # Install c c++ and core header files + for i in $(find ${PN}/{c,cc,core} -name "*.h"); do + insinto /usr/include/${PN}/${i%/*} + doins ${i} + done + + einfo "Installing generated headers" + for i in $(find bazel-genfiles/${PN}/{cc,core} -name "*.h"); do + j=${i#bazel-genfiles/} + insinto /usr/include/${PN}/${j%/*} + doins ${i} + done + + einfo "Installing Eigen headers" + ebazel build //third_party/eigen3:install_eigen_headers + insinto /usr/include/${PN}/ + doins -r bazel-genfiles/third_party/eigen3/include/* + + einfo "Installing libs" + # Generate pkg-config file + ${PN}/c/generate-pc.sh --prefix="${EPREFIX}"/usr --libdir=$(get_libdir) --version=${MY_PV} || die + insinto /usr/$(get_libdir)/pkgconfig + doins ${PN}.pc + + dolib.so bazel-bin/tensorflow/lib${PN}_framework.so + dolib.so bazel-bin/tensorflow/lib${PN}.so + dolib.so bazel-bin/tensorflow/lib${PN}_cc.so + + einstalldocs +} |