Diff gdal-3.6.4 with a gdal-3.7.0

/usr/portage/sci-libs/gdal/gdal-3.7.0.ebuild 2023-10-09 14:52:35.072368491 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
PYTHON_COMPAT=( python3_{9..11} )
6
PYTHON_COMPAT=( python3_{10..11} )
7 7
inherit cmake java-pkg-opt-2 python-single-r1
8 8

  
9 9
DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
......
12 12
SRC_URI+=" test? ( https://download.osgeo.org/${PN}/${PV}/${PN}autotest-${PV}.tar.gz )"
13 13

  
14 14
LICENSE="BSD Info-ZIP MIT"
15
SLOT="0/32" # subslot is libgdal.so.<SONAME>
15
SLOT="0/33" # subslot is libgdal.so.<SONAME>
16 16
KEYWORDS="amd64 ~arm arm64 ~ia64 ~ppc ppc64 ~riscv x86 ~amd64-linux ~x86-linux ~ppc-macos"
17 17
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"
18 18
RESTRICT="!test? ( test )"
......
20 20
REQUIRED_USE="
21 21
	python? ( ${PYTHON_REQUIRED_USE} )
22 22
	spatialite? ( sqlite )
23
	test? ( ${PYTHON_REQUIRED_USE} )
23 24
"
24 25

  
25
BDEPEND="virtual/pkgconfig
26
BDEPEND="
27
	virtual/pkgconfig
26 28
	doc? ( app-doc/doxygen )
27 29
	java? (
28 30
		dev-java/ant-core
29
		dev-lang/swig:0
30
		>=virtual/jdk-1.8:*
31
		dev-lang/swig
31 32
	)
32 33
	python? (
33
		dev-lang/swig:0
34
		dev-lang/swig
34 35
		$(python_gen_cond_dep '
35 36
			dev-python/setuptools[${PYTHON_USEDEP}]
36 37
		')
37
	)"
38
DEPEND="dev-libs/expat
38
	)
39
	test? (
40
		${PYTHON_DEPS}
41
		dev-cpp/gtest
42
	)
43
"
44
DEPEND="
45
	dev-libs/expat
39 46
	dev-libs/json-c:=
40 47
	dev-libs/libpcre2
41 48
	dev-libs/libxml2:2
......
52 59
	gml? ( >=dev-libs/xerces-c-3.1 )
53 60
	heif? ( media-libs/libheif:= )
54 61
	hdf5? ( >=sci-libs/hdf5-1.6.4:=[cxx,szip] )
62
	java? (
63
		>=virtual/jdk-1.8:*[-headless-awt]
64
	)
55 65
	jpeg? ( media-libs/libjpeg-turbo:= )
56 66
	jpeg2k? ( media-libs/openjpeg:2= )
57 67
	lzma? ( || (
......
77 87
	sqlite? ( dev-db/sqlite:3 )
78 88
	webp? ( media-libs/libwebp:= )
79 89
	xls? ( dev-libs/freexl )
80
	zstd? ( app-arch/zstd:= )"
81
RDEPEND="${DEPEND}
82
	java? ( >=virtual/jre-1.8:* )"
90
	zstd? ( app-arch/zstd:= )
91
"
92
RDEPEND="
93
	${DEPEND}
94
	java? ( >=virtual/jre-1.8:* )
95
"
83 96

  
84 97
QA_CONFIG_IMPL_DECL_SKIP=(
85 98
	_wstat64 # Windows LFS
......
87 100

  
88 101
PATCHES=(
89 102
	"${FILESDIR}"/${PN}-3.6.4-abseil-cpp-20230125.2-c++17.patch
103
	"${FILESDIR}"/${PN}-3.7.0-zlib-OF.patch
90 104
)
91 105

  
92 106
pkg_setup() {
93
	use python && python-single-r1_pkg_setup
107
	if use python || use test ; then
108
		python-single-r1_pkg_setup
109
	fi
110

  
94 111
	use java && java-pkg-opt-2_pkg_setup
95 112
}
96 113

  
......
107 124
		-DENABLE_IPO=OFF
108 125
		-DGDAL_USE_EXTERNAL_LIBS=ON
109 126
		-DGDAL_USE_INTERNAL_LIBS=OFF
127
		-DBUILD_TESTING=$(usex test)
110 128

  
111 129
		# bug #844874 and bug #845150
112 130
		-DCMAKE_INSTALL_INCLUDEDIR="include/gdal"
......
216 234
		#-Dtest_xop=$(usex cpu_flags_x86_xop)
217 235
	)
218 236

  
237
	if use test ; then
238
		mycmakeargs+=( -DUSE_EXTERNAL_GTEST=ON )
239
	fi
240

  
219 241
	cmake_src_configure
220 242
}
221 243

  
......
240 262
src_install() {
241 263
	cmake_src_install
242 264
	use python && python_optimize
265

  
266
	if use java; then
267
		# Move the native library into the proper place for Gentoo.  The
268
		# library in ${D} has already had its RPATH fixed, so we use it
269
		# rather than ${BUILD_DIR}/swig/java/libgdalalljni.so.
270
		java-pkg_doso "${D}/usr/share/java/libgdalalljni.so"
271
		rm "${D}/usr/share/java/libgdalalljni.so" || die
272
	fi
273

  
243 274
	# TODO: install docs?
244 275
}
245 276

  
246 277
pkg_postinst() {
247 278
	elog "Check available image and data formats after building with"
248 279
	elog "gdalinfo and ogrinfo (using the --formats switch)."
280

  
281
	if use java; then
282
		elog
283
		elog "To use the Java bindings, you need to pass the following to java:"
284
		elog "    -Djava.library.path=$(java-config -i gdal)"
285
	fi
249 286
}
Thank you!