diff --git a/dev-libs/libixion/files/libixion-0.19.0-boost-m4.patch b/dev-libs/libixion/files/libixion-0.19.0-boost-m4.patch new file mode 100644 index 0000000000000..1771e40e262fd --- /dev/null +++ b/dev-libs/libixion/files/libixion-0.19.0-boost-m4.patch @@ -0,0 +1,31 @@ +Minimal diff from upstream boost.m4 (https://github.com/tsuna/boost.m4) +to make things work with >=boost-1.89.0, which made boost_system a +header-only library. + +--- a/m4/boost.m4~ ++++ b/m4/boost.m4 +@@ -1130,15 +1130,20 @@ BOOST_DEFUN([String_Algo], + ]) + + +-# BOOST_SYSTEM([PREFERRED-RT-OPT]) ++# BOOST_SYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) + # -------------------------------- + # Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the + # documentation of BOOST_FIND_LIB above. This library was introduced in Boost +-# 1.35.0. ++# 1.35.0 and is header only since 1.70. + BOOST_DEFUN([System], +-[BOOST_FIND_LIB([system], [$1], ++[ ++if test $boost_major_version -ge 170; then ++ BOOST_FIND_HEADER([boost/system/error_code.hpp]) ++else ++ BOOST_FIND_LIB([system], [$1], + [boost/system/error_code.hpp], +- [boost::system::error_code e; e.clear();]) ++ [boost::system::error_code e; e.clear();], [], [], [$2]) ++fi + ])# BOOST_SYSTEM + + diff --git a/dev-libs/libixion/files/libixion-0.20.0-boost-m4.patch b/dev-libs/libixion/files/libixion-0.20.0-boost-m4.patch new file mode 100644 index 0000000000000..31d2bdd7173ac --- /dev/null +++ b/dev-libs/libixion/files/libixion-0.20.0-boost-m4.patch @@ -0,0 +1,30 @@ +Minimal diff from upstream boost.m4 (https://github.com/tsuna/boost.m4) +to make things work with >=boost-1.89.0, which made boost_system a +header-only library. + +--- a/m4/boost.m4~ ++++ b/m4/boost.m4 +@@ -1328,15 +1328,20 @@ BOOST_DEFUN([String_Algo], + ]) + + +-# BOOST_SYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) ++ BOOST_SYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) + # -------------------------------- + # Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the + # documentation of BOOST_FIND_LIB above. This library was introduced in Boost +-# 1.35.0. ++# 1.35.0 and is header only since 1.70. + BOOST_DEFUN([System], +-[BOOST_FIND_LIB([system], [$1], ++[ ++if test $boost_major_version -ge 170; then ++ BOOST_FIND_HEADER([boost/system/error_code.hpp]) ++else ++ BOOST_FIND_LIB([system], [$1], + [boost/system/error_code.hpp], + [boost::system::error_code e; e.clear();], [], [], [$2]) ++fi + ])# BOOST_SYSTEM + + diff --git a/dev-libs/libixion/libixion-0.19.0-r2.ebuild b/dev-libs/libixion/libixion-0.19.0-r2.ebuild new file mode 100644 index 0000000000000..866737084bd7c --- /dev/null +++ b/dev-libs/libixion/libixion-0.19.0-r2.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..14} ) +inherit autotools python-single-r1 + +DESCRIPTION="General purpose formula parser & interpreter" +HOMEPAGE="https://gitlab.com/ixion/ixion" + +if [[ ${PV} == *9999* ]]; then + MDDS_SLOT="1/3.0" + EGIT_REPO_URI="https://gitlab.com/ixion/ixion.git" + inherit git-r3 +else + MDDS_SLOT="1/2.1" + SRC_URI="https://kohei.us/files/ixion/src/${P}.tar.xz" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +LICENSE="MIT" +SLOT="0/0.18" # based on SONAME of libixion.so +IUSE="debug python" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + dev-libs/boost:= + dev-util/mdds:${MDDS_SLOT} + python? ( ${PYTHON_DEPS} ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-0.19.0-gcc15-cstdint.patch # bug 937388 + "${FILESDIR}"/${PN}-0.19.0-fix-win32-ifdef.patch # bug 939807 + "${FILESDIR}"/${PN}-0.19.0-boost-m4.patch # bug 961528 +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_enable debug) + $(use_enable debug debug-utils) + $(use_enable debug log-debug) + $(use_enable python) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${D}" -name '*.la' -type f -delete || die +} diff --git a/dev-libs/libixion/libixion-0.20.0.ebuild b/dev-libs/libixion/libixion-0.20.0.ebuild index 3cec71c51dd9a..5779d9590f205 100644 --- a/dev-libs/libixion/libixion-0.20.0.ebuild +++ b/dev-libs/libixion/libixion-0.20.0.ebuild @@ -3,8 +3,8 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..13} ) -inherit libtool python-single-r1 +PYTHON_COMPAT=( python3_{11..14} ) +inherit autotools python-single-r1 DESCRIPTION="General purpose formula parser & interpreter" HOMEPAGE="https://gitlab.com/ixion/ixion" @@ -12,7 +12,7 @@ HOMEPAGE="https://gitlab.com/ixion/ixion" if [[ ${PV} == *9999* ]]; then MDDS_SLOT="1/3.0" EGIT_REPO_URI="https://gitlab.com/ixion/ixion.git" - inherit git-r3 autotools + inherit git-r3 else MDDS_SLOT="1/2.1" # Invalid as of 0.20.0, serves HTML @@ -34,17 +34,17 @@ RDEPEND=" " DEPEND="${RDEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-0.20.0-boost-m4.patch # bug 961528 +) + pkg_setup() { use python && python-single-r1_pkg_setup } src_prepare() { default - if [[ ${PV} == *9999* ]]; then - eautoreconf - else - elibtoolize - fi + eautoreconf } src_configure() { diff --git a/dev-libs/libixion/libixion-9999.ebuild b/dev-libs/libixion/libixion-9999.ebuild index 3cec71c51dd9a..0bf18a87fd5eb 100644 --- a/dev-libs/libixion/libixion-9999.ebuild +++ b/dev-libs/libixion/libixion-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_COMPAT=( python3_{11..14} ) inherit libtool python-single-r1 DESCRIPTION="General purpose formula parser & interpreter"