* [gentoo-commits] repo/gentoo:master commit in: sci-libs/gdal/, profiles/base/
@ 2022-05-17 8:11 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-05-17 8:11 UTC (permalink / raw
To: gentoo-commits
commit: 0655625bf64978eb3e9f629e1ba29a49894a155e
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue May 17 08:10:18 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 17 08:11:34 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0655625b
sci-libs/gdal: work around jpeg/png bugs in 3.5.0 for now
Force on jpeg & png for now. It's not ideal but reported both upstream
and I lack the gdal internals knowledge to deduce whether the various
plugins which depend on each of them are functional (enough?) without
each of them.
They're both pretty small dependencies and hard to avoid in general,
although I accept it's an inconvenience, some of this stuff was fairly
expected & unavoidable with the big port to CMake.
Bug: https://github.com/OSGeo/gdal/issues/5741
Bug: https://github.com/OSGeo/gdal/issues/5742
Bug: https://bugs.gentoo.org/844751
Signed-off-by: Sam James <sam <AT> gentoo.org>
profiles/base/package.use.force | 6 ++++++
sci-libs/gdal/{gdal-3.5.0-r2.ebuild => gdal-3.5.0-r3.ebuild} | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/profiles/base/package.use.force b/profiles/base/package.use.force
index 79717a6a79fa..563c9578e4b8 100644
--- a/profiles/base/package.use.force
+++ b/profiles/base/package.use.force
@@ -1,6 +1,12 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# Sam James <sam@gentoo.org> (2022-05-17)
+# Force on jpeg & png for now until build system fixes are made
+# by upstream. The CMake port is new so it's fairly expected
+# to have a few bumps. bug #844751.
+>=sci-libs/gdal-3.5.0 jpeg png
+
# Esteve Varela Colominas <esteve.varela@gmail.com> (2022-02-19)
# Use the jemalloc allocator for telegram, as recommended by upstream,
# to reduce memory usage, at least on glibc.
diff --git a/sci-libs/gdal/gdal-3.5.0-r2.ebuild b/sci-libs/gdal/gdal-3.5.0-r3.ebuild
similarity index 96%
rename from sci-libs/gdal/gdal-3.5.0-r2.ebuild
rename to sci-libs/gdal/gdal-3.5.0-r3.ebuild
index 93225abeab64..42e368935481 100644
--- a/sci-libs/gdal/gdal-3.5.0-r2.ebuild
+++ b/sci-libs/gdal/gdal-3.5.0-r3.ebuild
@@ -15,7 +15,7 @@ SRC_URI+=" test? ( https://download.osgeo.org/${PN}/${PV}/${PN}autotest-${PV}.ta
LICENSE="BSD Info-ZIP MIT"
SLOT="0/31" # subslot is libgdal.so.<SONAME>
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
-IUSE="armadillo +curl cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_ssse3 doc fits geos gif gml hdf5 heif java jpeg2k lzma mysql netcdf odbc ogdi opencl oracle pdf png postgres python spatialite sqlite test webp xls zstd"
+IUSE="armadillo +curl cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_ssse3 doc fits geos gif gml hdf5 heif java jpeg jpeg2k lzma mysql netcdf odbc ogdi opencl oracle pdf png postgres python spatialite sqlite test webp xls zstd"
# Tests fail to build in 3.5.0, let's not worry too much yet given
# we're only just porting to CMake. Revisit later.
RESTRICT="!test? ( test ) test"
@@ -42,7 +42,6 @@ DEPEND="dev-libs/expat
dev-libs/libxml2:2
dev-libs/openssl:=
media-libs/tiff
- media-libs/libjpeg-turbo:=
>=sci-libs/libgeotiff-1.5.1-r1:=
>=sci-libs/proj-6.0.0:=
sys-libs/zlib[minizip(+)]
@@ -54,6 +53,7 @@ DEPEND="dev-libs/expat
gml? ( >=dev-libs/xerces-c-3.1 )
heif? ( media-libs/libheif:= )
hdf5? ( >=sci-libs/hdf5-1.6.4:=[szip] )
+ jpeg? ( media-libs/libjpeg-turbo:= )
jpeg2k? ( media-libs/openjpeg:2= )
lzma? ( || (
app-arch/xz-utils
@@ -134,7 +134,7 @@ src_configure() {
-DGDAL_USE_HDFS=OFF
-DGDAL_USE_ICONV=ON # TODO dep
-DGDAL_USE_IDB=OFF
- -DGDAL_USE_JPEG=ON
+ -DGDAL_USE_JPEG=$(usex jpeg)
# https://gdal.org/build_hints.html#jpeg12
# Independent of whether using system libjpeg
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/gdal/, profiles/base/
@ 2022-05-19 22:37 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-05-19 22:37 UTC (permalink / raw
To: gentoo-commits
commit: 65aecfb0afb71b3dbe0d671006ca87bb48de6338
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May 19 22:33:16 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 19 22:33:16 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65aecfb0
sci-libs/gdal: backport build system fixes for disabling JPEG + PNG
Closes: https://bugs.gentoo.org/844751
Signed-off-by: Sam James <sam <AT> gentoo.org>
profiles/base/package.use.force | 2 +-
sci-libs/gdal/Manifest | 1 +
sci-libs/gdal/gdal-3.5.0-r4.ebuild | 242 +++++++++++++++++++++++++++++++++++++
3 files changed, 244 insertions(+), 1 deletion(-)
diff --git a/profiles/base/package.use.force b/profiles/base/package.use.force
index 563c9578e4b8..09fd800d8f3f 100644
--- a/profiles/base/package.use.force
+++ b/profiles/base/package.use.force
@@ -5,7 +5,7 @@
# Force on jpeg & png for now until build system fixes are made
# by upstream. The CMake port is new so it's fairly expected
# to have a few bumps. bug #844751.
->=sci-libs/gdal-3.5.0 jpeg png
+=sci-libs/gdal-3.5.0-r3 jpeg png
# Esteve Varela Colominas <esteve.varela@gmail.com> (2022-02-19)
# Use the jemalloc allocator for telegram, as recommended by upstream,
diff --git a/sci-libs/gdal/Manifest b/sci-libs/gdal/Manifest
index e2720060f6c1..871bc739b3f9 100644
--- a/sci-libs/gdal/Manifest
+++ b/sci-libs/gdal/Manifest
@@ -1,5 +1,6 @@
DIST gdal-3.4.1.tar.xz 13257288 BLAKE2B 3b01e8345579c9d46fb3d4ff240f5b97cf13eb4b580ecc93044e0ca3d99e2d19fa2a2a52a2342b3158d67525a1de18a9ba77a2033ad891f73fee682b2c10cade SHA512 a66362996f255cb75116693b4ee398337ec8b9699b5cd7fed90105f72832faa20750b77ebbc3e8d59ab72a23b35c4e4e78513cc803bd93e1b7846711ccfb5bff
DIST gdal-3.4.2.tar.xz 13273280 BLAKE2B b40e2978d0841386b52de1ad08cec862c52aab8c015aecd58983bb8c5bbf8d86ca8e4ef5d2bbae39f421b3c78eecd0df1b3cd83d6bf25b1469563b4f9f37d8ca SHA512 7b7e2800b2c23ffe6b7739fbf77748e3be2db9e34b061753da5e175f6ad6ed7f9f91856d3838f071a17a6afab96c258d37a15502e254d2008310d3061031af73
DIST gdal-3.4.3.tar.xz 13275504 BLAKE2B 5b1cc2be9c2af7a326dc532d547b1e7d2f9c4af32d8f16998f09332a88a53305243313711cc24fe5d028b8edc131ebccda6daf08b5c67d9a2c55fd4e04fe9cee SHA512 2b97e44b9bd84eb43b4c4894b7b6e748522b2f5e8b6cbecc8247fe5ea862795dd44ba2b52934a83688a949805cee4eef9f1aa66360fb831fea3eae956ab0bef3
+DIST gdal-3.5.0-build-fixes-no-deps.patch.xz 5016 BLAKE2B 0d0ef0ccae73f8a903b0ccbf992fa775b394df85a89d86f86ad60187bfce6a87eb8b23a573bd65c0173c0e7cffe3df447cef0ddddfd5aebfcedfbed3e6a7716e SHA512 e32c97e3fef948f2fa9c0f4b7116ccb231554e962380d7bebb433083926fb4e1902b0a3bc243f747c81c95813651153ce2751d8c2de4e8abb096778ffe589a2e
DIST gdal-3.5.0.tar.xz 8826500 BLAKE2B 7123ff4a7270b309d458e4a7bd32241cdef53953c305c5027873424794f4ed27d2a4838f86c42f9f84b5174ff499ee5539694c41e906509d21d899ccfe38ff99 SHA512 15d9675ffe5e76fdcb431bef1dce0ed8c23695f418186f37c63f4c7274322924095662bbbc95232d5b4d700704c1c4922d52b419cef5bb67f3bb64ee59654d8b
DIST gdalautotest-3.5.0.tar 50442240 BLAKE2B 15005f16530690e584e39b036881c339f147e525e3e0dc39b57d027c493ab89027baa2ea3a0ed148c8fa3ebb7cd53cdb4cf4d53c96d068b5a89caf28165e213b SHA512 723c57425dd5f8acd61795be98b450844b5664b9940d47823829d510b8fb84d1d6db9ca880200d7732a83e7b0f1ae6e33269d8ebd91bf0e7d99e887b5f79aad0
diff --git a/sci-libs/gdal/gdal-3.5.0-r4.ebuild b/sci-libs/gdal/gdal-3.5.0-r4.ebuild
new file mode 100644
index 000000000000..b526f8c5bfe6
--- /dev/null
+++ b/sci-libs/gdal/gdal-3.5.0-r4.ebuild
@@ -0,0 +1,242 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit cmake java-pkg-opt-2 python-single-r1
+
+DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
+HOMEPAGE="https://gdal.org/"
+SRC_URI="https://download.osgeo.org/${PN}/${PV}/${P}.tar.xz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-build-fixes-no-deps.patch.xz"
+# Seems to not be compressed...
+SRC_URI+=" test? ( https://download.osgeo.org/${PN}/${PV}/${PN}autotest-${PV}.tar.gz -> ${PN}autotest-${PV}.tar )"
+
+LICENSE="BSD Info-ZIP MIT"
+SLOT="0/31" # subslot is libgdal.so.<SONAME>
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="armadillo +curl cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_ssse3 doc fits geos gif gml hdf5 heif java jpeg jpeg2k lzma mysql netcdf odbc ogdi opencl oracle pdf png postgres python spatialite sqlite test webp xls zstd"
+# Tests fail to build in 3.5.0, let's not worry too much yet given
+# we're only just porting to CMake. Revisit later.
+RESTRICT="!test? ( test ) test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+ spatialite? ( sqlite )"
+
+BDEPEND="virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ java? (
+ dev-java/ant-core
+ dev-lang/swig:0
+ >=virtual/jdk-1.8:*
+ )
+ python? (
+ dev-lang/swig:0
+ $(python_gen_cond_dep '
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ')
+ )"
+DEPEND="dev-libs/expat
+ dev-libs/json-c:=
+ dev-libs/libpcre2
+ dev-libs/libxml2:2
+ dev-libs/openssl:=
+ media-libs/tiff
+ >=sci-libs/libgeotiff-1.5.1-r1:=
+ >=sci-libs/proj-6.0.0:=
+ sys-libs/zlib[minizip(+)]
+ armadillo? ( sci-libs/armadillo:=[lapack] )
+ curl? ( net-misc/curl )
+ fits? ( sci-libs/cfitsio:= )
+ geos? ( >=sci-libs/geos-3.8.0 )
+ gif? ( media-libs/giflib:= )
+ gml? ( >=dev-libs/xerces-c-3.1 )
+ heif? ( media-libs/libheif:= )
+ hdf5? ( >=sci-libs/hdf5-1.6.4:=[szip] )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ jpeg2k? ( media-libs/openjpeg:2= )
+ lzma? ( || (
+ app-arch/xz-utils
+ app-arch/lzma
+ ) )
+ 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:= )
+ png? ( media-libs/libpng:= )
+ postgres? ( >=dev-db/postgresql-8.4:= )
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ 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="${DEPEND}
+ java? ( >=virtual/jre-1.8:* )"
+
+PATCHES=(
+ "${WORKDIR}"/${P}-build-fixes-no-deps.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ use java && java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ if use test ; then
+ mv "${WORKDIR}"/gdalautotest-${PV} "${S}"/autotest || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_IPO=OFF
+ -DGDAL_USE_EXTERNAL_LIBS=ON
+ -DGDAL_USE_INTERNAL_LIBS=OFF
+
+ # bug #844874 and bug #845150
+ -DCMAKE_INSTALL_INCLUDEDIR="include/gdal"
+
+ # Options here are generally off because of one of:
+ # - Not yet packaged dependencies
+ #
+ # - Off for autotools build and didn't want more churn by
+ # enabling during port to CMake. Feel free to request them
+ # being turned on if useful for you.
+ -DGDAL_USE_ARMADILLO=$(usex armadillo)
+ -DGDAL_USE_ARROW=OFF
+ -DGDAL_USE_BLOSC=OFF
+ -DGDAL_USE_BRUNSLI=OFF
+ -DGDAL_USE_CRNLIB=OFF
+ -DGDAL_USE_CFITSIO=$(usex fits)
+ -DGDAL_USE_CURL=$(usex curl)
+ -DGDAL_USE_CRYPTOPP=OFF
+ -DGDAL_USE_DEFLATE=OFF
+ -DGDAL_USE_ECW=OFF
+ -DGDAL_USE_EXPAT=ON
+ -DGDAL_USE_FILEGDB=OFF
+ -DGDAL_USE_FREEXL=$(usex xls)
+ -DGDAL_USE_FYBA=OFF
+ -DGDAL_USE_GEOTIFF=ON
+ -DGDAL_USE_GEOS=$(usex geos)
+ -DGDAL_USE_GIF=$(usex gif)
+ -DGDAL_USE_GTA=OFF
+ -DGDAL_USE_HEIF=$(usex heif)
+ -DGDAL_USE_HDF4=OFF
+ -DGDAL_USE_HDF5=$(usex hdf5)
+ -DGDAL_USE_HDFS=OFF
+ -DGDAL_USE_ICONV=ON # TODO dep
+ -DGDAL_USE_IDB=OFF
+ -DGDAL_USE_JPEG=$(usex jpeg)
+
+ # https://gdal.org/build_hints.html#jpeg12
+ # Independent of whether using system libjpeg
+ -DGDAL_USE_JPEG12_INTERNAL=ON
+
+ -DGDAL_USE_JSONC=ON
+ -DGDAL_USE_JXL=OFF
+ -DGDAL_USE_KDU=OFF
+ -DGDAL_USE_KEA=OFF
+ -DGDAL_USE_LERC=OFF
+ -DGDAL_USE_LIBKML=OFF
+ -DGDAL_USE_LIBLZMA=$(usex lzma)
+ -DGDAL_USE_LIBXML2=ON
+ -DGDAL_USE_LURATECH=OFF
+ -DGDAL_USE_LZ4=OFF
+ -DGDAL_USE_MONGOCXX=OFF
+ -DGDAL_USE_MRSID=OFF
+ -DGDAL_USE_MSSQL_NCLI=OFF
+ -DGDAL_USE_MSSQL_ODBC=OFF
+ -DGDAL_USE_MYSQL=$(usex mysql)
+ -DGDAL_USE_NETCDF=$(usex netcdf)
+ -DGDAL_USE_ODBC=$(usex odbc)
+ -DGDAL_USE_ODBCCPP=OFF
+ -DGDAL_USE_OGDI=$(usex ogdi)
+ -DGDAL_USE_OPENCAD=OFF
+ -DGDAL_USE_OPENCL=$(usex opencl)
+ -DGDAL_USE_OPENEXR=OFF
+ -DGDAL_USE_OPENJPEG=$(usex jpeg2k)
+ -DGDAL_USE_OPENSSL=ON
+ -DGDAL_USE_ORACLE=$(usex oracle)
+ -DGDAL_USE_PARQUET=OFF
+ -DGDAL_USE_PCRE2=ON
+ -DGDAL_USE_PDFIUM=OFF
+ -DGDAL_USE_PNG=$(usex png)
+ -DGDAL_USE_POPPLER=$(usex pdf)
+ -DGDAL_USE_POSTGRESQL=$(usex postgres)
+ -DGDAL_USE_QHULL=OFF
+ -DGDAL_USE_RASTERLITE2=OFF
+ -DGDAL_USE_RDB=OFF
+ -DGDAL_USE_SPATIALITE=$(usex spatialite)
+ -DGDAL_USE_SQLITE3=$(usex sqlite)
+ -DGDAL_USE_SFCGAL=OFF
+ -DGDAL_USE_TEIGHA=OFF
+ -DGDAL_USE_TIFF=ON
+ -DGDAL_USE_TILEDB=OFF
+ -DGDAL_USE_WEBP=$(usex webp)
+ -DGDAL_USE_XERCESC=$(usex gml)
+ -DGDAL_USE_ZLIB=ON
+ -DGDAL_USE_ZSTD=$(usex zstd)
+
+ # Bindings
+ -DBUILD_PYTHON_BINDINGS=$(usex python)
+ -DBUILD_JAVA_BINDINGS=$(usex java)
+
+ # Check work/gdal-3.5.0_build/CMakeCache.txt after configure
+ # and https://github.com/OSGeo/gdal/blob/master/cmake/helpers/CheckCompilerMachineOption.cmake#L71
+ # Commented out: not (yet?) implemented upstream.
+ # Also, arm64 stuff is a TODO upstream, but not there (yet?)
+ -Dtest_avx=$(usex cpu_flags_x86_avx)
+ -Dtest_avx2=$(usex cpu_flags_x86_avx2)
+ -Dtest_sse=$(usex cpu_flags_x86_sse)
+ -Dtest_sse2=$(usex cpu_flags_x86_sse2)
+ #-Dtest_sse3=$(usex cpu_flags_x86_sse3)
+ -Dtest_sse4.1=$(usex cpu_flags_x86_sse4_1)
+ #-Dtest_sse4.2=$(usex cpu_flags_x86_sse4_2)
+ #-Dtest_sse4a=$(usex cpu_flags_x86_sse4a)
+ -Dtest_ssse3=$(usex cpu_flags_x86_ssse3)
+ #-Dtest_fma4=$(usex cpu_flags_x86_fma4)
+ #-Dtest_xop=$(usex cpu_flags_x86_xop)
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+
+ use doc && cmake_src_compile doc
+}
+
+src_test() {
+ export GDAL_RUN_SLOW_TESTS=0
+ export GDAL_DOWNLOAD_TEST_DATA=0
+
+ # Two test suites:
+ # 1. autotests (much larger, uses pytest)
+ # 2. Small set of fuzzing tests (no download needed)
+ cmake_src_test
+}
+
+src_install() {
+ cmake_src_install
+
+ # TODO: install docs?
+}
+
+pkg_postinst() {
+ elog "Check available image and data formats after building with"
+ elog "gdalinfo and ogrinfo (using the --formats switch)."
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-19 22:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-17 8:11 [gentoo-commits] repo/gentoo:master commit in: sci-libs/gdal/, profiles/base/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2022-05-19 22:37 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox