[dev-libs/Ice] bump to ruby 2.7; 3.7 is untested.

This commit is contained in:
Robert Förster 2020-07-17 13:51:01 +02:00
parent 83c59871c8
commit 7defcc765e
3 changed files with 78 additions and 60 deletions

View File

@ -1,12 +1,12 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8,9} )
PYTHON_COMPAT=( python3_{7..9} )
RUBY_OPTIONAL="yes"
USE_RUBY="ruby26"
USE_RUBY="ruby27"
PHP_EXT_NAME="IcePHP"
PHP_EXT_INI="yes"
@ -41,7 +41,7 @@ RDEPEND=">=dev-libs/expat-2.0.1
)
dev-cpp/libmcpp
python? ( ${PYTHON_DEPS} )
ruby? ( $(ruby_implementation_depend ruby26) )
ruby? ( $(ruby_implementation_depend ruby27) )
mono? ( dev-lang/mono )"
DEPEND="${RDEPEND}
readline? ( sys-libs/readline:0= )
@ -58,8 +58,8 @@ PHP_EXT_S="${S}/php"
PATCHES=(
"${FILESDIR}/${PN}-3.6.3-no-arch-opts.patch"
"${FILESDIR}/${PN}-3.6.5-db6.patch"
"${FILESDIR}/${PN}-3.6.5-csharp.patch"
"${FILESDIR}/${P}-db6.patch"
"${FILESDIR}/${P}-csharp.patch"
)
pkg_setup() {
@ -159,25 +159,25 @@ src_configure() {
fi
if use ruby; then
SITERUBY="$(ruby26 -r rbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')"
SITERUBYARCH="$(ruby26 -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')"
SITERUBY="$(ruby27 -r rbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')"
SITERUBYARCH="$(ruby27 -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')"
MAKE_RULES_RUBY=(
"install_rubydir=\"${ED}/${SITERUBY}\""
"install_libdir=\"${ED}/${SITERUBYARCH}\""
)
# make it use ruby26 only
# make it use ruby27 only
sed -i \
-e 's|RUBY = ruby|\026|' \
-e 's|RUBY = ruby|\027|' \
ruby/config/Make.rules || die
sed -i \
-e 's|env ruby|\026|' \
-e 's|env ruby|\027|' \
ruby/config/s2rb.rb || die
sed -i \
-e 's|env ruby|\026|' \
-e 's|env ruby|\027|' \
ruby/scripts/slice2rb || die
sed -i \
-e 's|output.write("ruby|\026|' \
-e 's|output.write("ruby|\027|' \
scripts/TestUtil.py || die
fi

View File

@ -3,10 +3,10 @@
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} )
PYTHON_COMPAT=( python3_{7..9} )
RUBY_OPTIONAL="yes"
USE_RUBY="ruby26"
USE_RUBY="ruby27"
PHP_EXT_NAME="IcePHP"
PHP_EXT_INI="yes"
@ -46,7 +46,7 @@ RDEPEND=">=dev-libs/expat-2.0.1
)
dev-cpp/libmcpp
python? ( ${PYTHON_DEPS} )
ruby? ( $(ruby_implementation_depend ruby26) )
ruby? ( $(ruby_implementation_depend ruby27) )
mono? ( dev-lang/mono )"
DEPEND="${RDEPEND}
readline? ( sys-libs/readline:0= )
@ -164,25 +164,25 @@ src_configure() {
fi
if use ruby; then
SITERUBY="$(ruby26 -r rbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')"
SITERUBYARCH="$(ruby26 -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')"
SITERUBY="$(ruby27 -r rbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')"
SITERUBYARCH="$(ruby27 -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')"
MAKE_RULES_RUBY=(
"install_rubydir=\"${ED}/${SITERUBY}\""
"install_libdir=\"${ED}/${SITERUBYARCH}\""
)
# make it use ruby26 only
# make it use ruby27 only
sed -i \
-e 's|RUBY = ruby|\026|' \
-e 's|RUBY = ruby|\027|' \
ruby/config/Make.rules || die
sed -i \
-e 's|env ruby|\026|' \
-e 's|env ruby|\027|' \
ruby/config/s2rb.rb || die
sed -i \
-e 's|env ruby|\026|' \
-e 's|env ruby|\027|' \
ruby/scripts/slice2rb || die
sed -i \
-e 's|output.write("ruby|\026|' \
-e 's|output.write("ruby|\027|' \
scripts/TestUtil.py || die
fi

View File

@ -1,9 +1,9 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} )
PYTHON_COMPAT=( python3_{7..9} )
RUBY_OPTIONAL="yes"
USE_RUBY="ruby27"
@ -29,6 +29,7 @@ SLOT="0/37"
KEYWORDS=""
# XXX: readline
IUSE="debug examples libressl php python ruby test"
RESTRICT="test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND=">=dev-libs/expat-2.0.1
@ -38,7 +39,7 @@ RDEPEND=">=dev-libs/expat-2.0.1
dev-db/lmdb
dev-cpp/libmcpp
python? ( ${PYTHON_DEPS} )
ruby? ( $(ruby_implementation_depend ruby26) )"
ruby? ( $(ruby_implementation_depend ruby27) )"
DEPEND="${RDEPEND}
test? (
${PYTHON_DEPS}
@ -48,7 +49,7 @@ DEPEND="${RDEPEND}
# Maintainer notes:
# TODO: java bindings
S="${WORKDIR}/${PN}"
#S="${WORKDIR}/${P,}"
PHP_EXT_S="${S}/php"
pkg_setup() {
@ -65,22 +66,32 @@ src_prepare() {
default
sed -i \
-e 's|-O2 ||g' \
-e 's|-L\$\(libdir\)||' \
cpp/config/Make.rules || die
sed -i \
-e 's|-Werror ||g' \
config/Make.rules.Linux || die "sed failed"
cpp/config/Make.rules.Linux || die
# IceUtil/stacktrace fails with USE=debug
# skip udp test due to multicast
# skip IceGrid/admin bug #649850
# skip IceSSL tests due to requirement of internet connection
# IceGrid/admin fails, no idea why
# sed -i \
# -e 's|allTests.py|allTests.py --rfilter=IceUtil\/stacktrace --rfilter=udp --rfilter=IceSSL --rfilter=IceGrid\/admin|' \
# cpp/Makefile || die "sed failed"
# skip IceStorm/single bug #636834
# IceUtil/stacktrace and IceStorm/stress fail with USE=debug
# Glacier2/staticFiltering requires network access
sed -i \
-e 's|allTests.py|allTests.py --rfilter=udp --rfilter=IceGrid\/admin --rfilter=IceSSL --rfilter=IceStorm\/single --rfilter=IceStorm\/stress --rfilter=IceUtil\/stacktrace --rfilter=Glacier2\/staticFiltering|' \
cpp/Makefile || die
# mainly broken .ice files
# sed -i \
# -e 's|allTests.py|allTests.py --rfilter=operations --rfilter=slicing\/objects|' \
# python/Makefile || die "sed failed"
# fails even on unicode locale
sed -i \
-e 's|allTests.py|allTests.py --rfilter=Slice\/unicodePaths|' \
ruby/Makefile || die
# fix for x86 IceBox test
sed -i \
-e 's|"32"|""|' \
scripts/TestUtil.py || die
}
src_configure() {
@ -88,13 +99,19 @@ src_configure() {
"prefix=\"${ED}/usr\""
"install_docdir=\"${ED}/usr/share/doc/${PF}\""
"install_configdir=\"${ED}/usr/share/${P}/config\""
"install_mandir=\"${ED}/usr/share/man\""
"install_mandir=\"${ED}/usr/share/man/man1\""
"embedded_runpath_prefix=\"${EPREFIX}/usr\""
"new_dtags=yes"
"OPTIMIZE=$(usex !debug)"
"V=1"
)
sed -i \
-e "s|g++|$(tc-getCXX)|" \
-e "s|\(CFLAGS[[:space:]]*=\)|\1 ${CFLAGS}|" \
-e "s|\(CXXFLAGS[[:space:]]*=\)|\1 ${CXXFLAGS}|" \
-e "s|\(LDFLAGS[[:space:]]*=\)|\1 ${LDFLAGS}|" \
cpp/config/Make.rules{,.Linux} python/config/Make.rules || die
if use python; then
local S="${S}/python"
python_copy_sources
@ -105,26 +122,31 @@ src_configure() {
SITERUBYARCH="$(ruby27 -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')"
MAKE_RULES_RUBY=(
"install_rubydir=\"${ED}/${SITERUBY}\""
"install_rubylibdir=\"${ED}/${SITERUBYARCH}\""
"install_libdir=\"${ED}/${SITERUBYARCH}\""
)
# make it use ruby27 only
sed -i \
-e 's|RUBY = ruby|\027|' \
ruby/config/Make.rules || die "sed failed"
ruby/config/Make.rules || die
sed -i \
-e 's|env ruby|\027|' \
ruby/config/s2rb.rb || die "sed failed"
ruby/config/s2rb.rb || die
sed -i \
-e 's|env ruby|\027|' \
ruby/scripts/slice2rb || die "sed failed"
ruby/scripts/slice2rb || die
sed -i \
-e 's|output.write("ruby|\027|' \
scripts/TestUtil.py || die
fi
use test && python_setup
}
src_compile() {
local -x LD_LIBRARY_PATH="${S}/cpp/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
# Do not remove this export or build will break!
tc-export CXX
emake -C cpp "${MAKE_RULES[@]}"
if use php; then
@ -157,37 +179,32 @@ src_compile() {
fi
}
run_tests() {
pushd "${1}" >/dev/null || die
./allTests.py
ret=${?}
popd >/dev/null || die
return ${ret}
}
src_test() {
local -x LD_LIBRARY_PATH="${S}/cpp/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
run_tests cpp || die "emake cpp test failed"
emake -C cpp "${MAKE_RULES[@]}" test
# php tests require the extension loaded and are therefore skipped
if use python ; then
if use python; then
testing() {
run_tests "${BUILD_DIR}" || die "emake ${BUILD_DIR} test failed"
PYTHONPATH="${BUILD_DIR}"/python emake -C "${BUILD_DIR}" \
"${MAKE_RULES[@]}" \
PYTHON="${EPYTHON}" \
install_pythondir="\"${D}/$(python_get_sitedir)\"" \
install_libdir="\"${D}/$(python_get_sitedir)\"" test
}
local S="${S}/python"
python_foreach_impl testing
fi
if use ruby ; then
run_tests ruby || die "emake ruby test failed"
if use ruby; then
emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" test
fi
}
src_install() {
export LD_LIBRARY_PATH="${S}/cpp/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
local DOCS=( CHANGELOG*.md README.md )
use doc && DOCS+=( "${DISTDIR}/${PN}-3.6.4.pdf" )
einstalldocs
insinto /usr/share/${P}
@ -237,6 +254,7 @@ src_install() {
emake -C "${BUILD_DIR}" \
"${MAKE_RULES[@]}" \
install_pythondir="\"${D}/$(python_get_sitedir)\"" \
install_libdir="\"${D}/$(python_get_sitedir)\"" \
install
python_optimize
}