Diff libsc-2.3.6 with a libsc-2.8.5-r3

/usr/portage/sci-libs/libsc/libsc-2.8.5-r3.ebuild 2023-10-09 14:52:35.084368491 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
LUA_COMPAT=( lua5-{1..3} )
7

  
8
inherit autotools lua-single toolchain-funcs
6
inherit cmake toolchain-funcs
9 7

  
10 8
DESCRIPTION="Support for parallel scientific applications"
11 9
HOMEPAGE="http://www.p4est.org/"
......
21 19

  
22 20
LICENSE="LGPL-2.1+"
23 21
SLOT="0"
24
IUSE="debug examples mpi openmp romio threads"
25
REQUIRED_USE="
26
	${LUA_REQUIRED_USE}
27
	romio? ( mpi )"
22
IUSE="debug examples mpi openmp threads"
28 23

  
29 24
RDEPEND="
30
	${LUA_DEPS}
31 25
	sys-apps/util-linux
26
	sys-libs/zlib-ng
32 27
	virtual/blas
33 28
	virtual/lapack
34
	mpi? ( virtual/mpi[romio?] )"
29
	mpi? ( virtual/mpi[romio] )"
35 30
DEPEND="${RDEPEND}"
36 31
BDEPEND="virtual/pkgconfig"
37 32

  
38 33
PATCHES=(
39
	"${FILESDIR}"/${PN}-2.3-autoconf_lua_version.patch
40
	"${FILESDIR}"/${PN}-2.3.6-override_soname.patch
34
	"${FILESDIR}"/${P}-set_version.patch
35
	"${FILESDIR}"/${P}-fix_build_system.patch
36
	"${FILESDIR}"/${P}-do_not_compile_zlib-ng.patch
37
	"${FILESDIR}"/${P}-use_zlib-ng_symbols.patch
38
	"${FILESDIR}"/${P}-fix_cmake_path.patch
41 39
)
42 40

  
43 41
pkg_pretend() {
......
46 44

  
47 45
pkg_setup() {
48 46
	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
49
	lua-single_pkg_setup
50
}
51

  
52
src_prepare() {
53
	default
54

  
55
	sed -i -e "s/@LUA_IMPL@/${ELUA}/" "${S}"/src/sc_lua.h || die
56

  
57
	# Inject a version number into the build system
58
	echo "${PV}" > "${S}"/.tarball-version || die
59
	eautoreconf
60 47
}
61 48

  
62 49
src_configure() {
63
	local myeconfargs=(
64
		--disable-static
65
		$(use_enable debug)
66
		$(use_enable mpi)
67
		$(use_enable openmp openmp)
68
		$(use_enable romio mpiio)
69
		$(use_enable threads pthread)
70
		--with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
71
		--with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
50
	# avoid using debug codepaths that are manually enabled with the
51
	# RelWithDebInfo build type
52
	local CMAKE_BUILD_TYPE="Release"
53

  
54
	local mycmakeargs=(
55
		-Dmpi="$(usex mpi)"
56
		-Dopenmp="$(usex openmp)"
57
		-Dlibrary_reldir="$(get_libdir)"
72 58
	)
73
	econf LUA_IMPL="${ELUA}" "${myeconfargs[@]}"
59

  
60
	cmake_src_configure
74 61
}
75 62

  
76 63
src_install() {
77
	default
64
	cmake_src_install
78 65

  
79
	if use examples; then
80
		docinto examples
81
		dodoc -r example/*
82
		docompress -x /usr/share/doc/${PF}/examples
83
	else
84
		# Remove compiled example binaries in case of -examples:
85
		rm -r "${ED}"/usr/bin || die "rm failed"
86
	fi
87

  
88
	# Remove ac files, bug #619806
89
	rm -r "${ED}"/usr/share/aclocal || die "rm failed"
90

  
91
	# Fix wrong installation paths:
92
	dodir /usr/share/libsc
93
	mv "${ED}"/etc/* "${ED}"/usr/share/libsc || die "mv failed"
94
	rmdir "${ED}"/etc/ || die "rmdir failed"
95
	mv "${ED}"/usr/share/ini/* "${ED}"/usr/share/libsc || die "mv failed"
96
	rmdir "${ED}"/usr/share/ini || die "rmdir failed"
66
	rm -r "${ED}"/usr/include/getopt.h \
67
		"${ED}"/usr/include/getopt_int.h \
68
		"${ED}"/usr/include/sc_builtin || die "rm failed"
97 69

  
98
	# no static archives
99
	find "${ED}" -name '*.la' -delete || die
70
	mv "${ED}"/usr/share/docs/SC/* "${ED}"/usr/share/doc/${PF}/ || die "mv failed"
71
	rm -r "${ED}"/usr/share/docs || die "rm failed"
100 72
}
Thank you!