[dev-libs/Ice] less python hackery, switch to ruby22 in release ebuild instead, more test fixes

This commit is contained in:
Robert Förster 2016-10-13 20:35:05 +02:00
parent 8f23c0edab
commit c25e034592
2 changed files with 27 additions and 45 deletions

View File

@ -7,7 +7,7 @@ EAPI=5
PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy ) PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy )
RUBY_OPTIONAL="yes" RUBY_OPTIONAL="yes"
USE_RUBY="ruby23" USE_RUBY="ruby22"
PHP_EXT_NAME="IcePHP" PHP_EXT_NAME="IcePHP"
PHP_EXT_INI="yes" PHP_EXT_INI="yes"
@ -38,7 +38,7 @@ RDEPEND=">=dev-libs/expat-2.0.1
) )
dev-cpp/libmcpp dev-cpp/libmcpp
python? ( ${PYTHON_DEPS} ) python? ( ${PYTHON_DEPS} )
ruby? ( $(ruby_implementation_depend ruby23) ) ruby? ( $(ruby_implementation_depend ruby22) )
mono? ( dev-lang/mono ) mono? ( dev-lang/mono )
php? ( dev-lang/php:7.0 ) php? ( dev-lang/php:7.0 )
php_namespaces? ( dev-lang/php:7.0 ) php_namespaces? ( dev-lang/php:7.0 )
@ -54,7 +54,7 @@ DEPEND="${RDEPEND}
REQUIRED_USE="php_namespaces? ( php )" REQUIRED_USE="php_namespaces? ( php )"
# Maintainer notes: # Maintainer notes:
# TODO: java bindings # TODO: java bindings, multiple ruby versions (supports 2.{1,2,3})
S="${WORKDIR}/${P/I/i}" S="${WORKDIR}/${P/I/i}"
PHP_EXT_S="${S}/php" PHP_EXT_S="${S}/php"
@ -103,11 +103,12 @@ src_prepare() {
-e '/SUBDIRS/s|\ test||' \ -e '/SUBDIRS/s|\ test||' \
csharp/Makefile || die "sed failed" csharp/Makefile || die "sed failed"
# IceUtil/stacktrace fails with USE=debug
# skip udp test due to multicast # skip udp test due to multicast
# skip IceSSL tests due to requirement of internet connection # skip IceSSL tests due to requirement of internet connection
# IceUtil/stacktrace fails # IceStorm/stress fails without USE=debug
sed -i \ sed -i \
-e 's|allTests.py|allTests.py --rfilter=IceUtil\/stacktrace --rfilter=udp --rfilter=IceSSL|' \ -e 's|allTests.py|allTests.py --rfilter=udp --rfilter=IceSSL --rfilter=IceStorm\/stress|' \
cpp/Makefile || die "sed failed" cpp/Makefile || die "sed failed"
# mainly broken .ice files # mainly broken .ice files
@ -158,28 +159,25 @@ src_configure() {
if use python ; then if use python ; then
S=${S}/python python_copy_sources S=${S}/python python_copy_sources
# make a place for the build hackery
rm -r "${WORKDIR}/${P/I/i}"/python || die
fi fi
if use ruby ; then if use ruby ; then
SITERUBY="$(ruby23 -r rbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')" SITERUBY="$(ruby22 -r rbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')"
MAKE_RULES_RB="install_rubydir=\"${ED}/${SITERUBY}\" MAKE_RULES_RB="install_rubydir=\"${ED}/${SITERUBY}\"
install_libdir=\"${ED}/${SITERUBY}\"" install_libdir=\"${ED}/${SITERUBY}\""
# make it use ruby23 only # make it use ruby22 only
sed -i \ sed -i \
-e 's|RUBY = ruby|\023|' \ -e 's|RUBY = ruby|\022|' \
ruby/config/Make.rules || die "sed failed" ruby/config/Make.rules || die "sed failed"
sed -i \ sed -i \
-e 's|env ruby|\023|' \ -e 's|env ruby|\022|' \
ruby/config/s2rb.rb || die "sed failed" ruby/config/s2rb.rb || die "sed failed"
sed -i \ sed -i \
-e 's|env ruby|\023|' \ -e 's|env ruby|\022|' \
ruby/scripts/slice2rb || die "sed failed" ruby/scripts/slice2rb || die "sed failed"
sed -i \ sed -i \
-e 's|output.write("ruby|\023|' \ -e 's|output.write("ruby|\022|' \
scripts/TestUtil.py || die "sed failed" scripts/TestUtil.py || die "sed failed"
fi fi
@ -220,12 +218,9 @@ src_compile() {
if use python ; then if use python ; then
building() { building() {
# build requires that the directory is named 'python' emake -C ${BUILD_DIR} ${MAKE_RULES} PYTHON=${EPYTHON} || die "emake python-${EPYTHON} failed"
mv "${BUILD_DIR}" "${S}"/python || die
emake -C python ${MAKE_RULES} PYTHON=${EPYTHON} || die "emake python-${EPYTHON} failed"
mv "${S}"/python "${BUILD_DIR}"
} }
BUILD_DIR=python python_foreach_impl building S=${S}/python python_foreach_impl building
fi fi
if use ruby ; then if use ruby ; then
@ -245,14 +240,12 @@ src_test() {
if use python ; then if use python ; then
testing() { testing() {
mv "${BUILD_DIR}" "${S}"/python || die emake -C ${BUILD_DIR} ${MAKE_RULES} PYTHON=${EPYTHON} \
emake -C python ${MAKE_RULES} PYTHON=${EPYTHON} \
install_pythondir="\"${D}/$(python_get_sitedir)\"" \ install_pythondir="\"${D}/$(python_get_sitedir)\"" \
install_libdir="\"${D}/$(python_get_sitedir)\"" \ install_libdir="\"${D}/$(python_get_sitedir)\"" \
test || die "emake python-${EPYTHON} test failed" test || die "emake python-${EPYTHON} test failed"
mv "${S}"/python "${BUILD_DIR}"
} }
BUILD_DIR=python python_foreach_impl testing S=${S}/python python_foreach_impl testing
fi fi
if use ruby ; then if use ruby ; then
@ -306,14 +299,12 @@ src_install() {
installation() { installation() {
mkdir -p "${D}/$(python_get_sitedir)" || die mkdir -p "${D}/$(python_get_sitedir)" || die
mv "${BUILD_DIR}" "${S}"/python || die emake -C ${BUILD_DIR} ${MAKE_RULES} \
emake -C python ${MAKE_RULES} \
install_pythondir="\"${D}/$(python_get_sitedir)\"" \ install_pythondir="\"${D}/$(python_get_sitedir)\"" \
install_libdir="\"${D}/$(python_get_sitedir)\"" \ install_libdir="\"${D}/$(python_get_sitedir)\"" \
install || die "emake python-${EPYTHON} install failed" install || die "emake python-${EPYTHON} install failed"
mv "${S}"/python "${BUILD_DIR}"
} }
BUILD_DIR=python python_foreach_impl installation S=${S}/python python_foreach_impl installation
fi fi
if use ruby ; then if use ruby ; then

View File

@ -108,11 +108,12 @@ src_prepare() {
-e '/SUBDIRS/s|\ test||' \ -e '/SUBDIRS/s|\ test||' \
csharp/Makefile || die "sed failed" csharp/Makefile || die "sed failed"
# IceUtil/stacktrace fails with USE=debug
# skip udp test due to multicast # skip udp test due to multicast
# skip IceSSL tests due to requirement of internet connection # skip IceSSL tests due to requirement of internet connection
# IceUtil/stacktrace fails # IceStorm/stress fails without USE=debug
sed -i \ sed -i \
-e 's|allTests.py|allTests.py --rfilter=IceUtil\/stacktrace --rfilter=udp --rfilter=IceSSL|' \ -e 's|allTests.py|allTests.py --rfilter=udp --rfilter=IceSSL --rfilter=IceStorm\/stress|' \
cpp/Makefile || die "sed failed" cpp/Makefile || die "sed failed"
# mainly broken .ice files # mainly broken .ice files
@ -163,9 +164,6 @@ src_configure() {
if use python ; then if use python ; then
S=${S}/python python_copy_sources S=${S}/python python_copy_sources
# make a place for the build hackery
rm -r "${WORKDIR}/${PN}"/python || die
fi fi
if use ruby ; then if use ruby ; then
@ -225,12 +223,9 @@ src_compile() {
if use python ; then if use python ; then
building() { building() {
# build requires that the directory is named 'python' emake -C ${BUILD_DIR} ${MAKE_RULES} PYTHON=${EPYTHON} || die "emake python-${EPYTHON} failed"
mv "${BUILD_DIR}" "${S}"/python || die
emake -C python ${MAKE_RULES} PYTHON=${EPYTHON} || die "emake python-${EPYTHON} failed"
mv "${S}"/python "${BUILD_DIR}"
} }
BUILD_DIR=python python_foreach_impl building S=${S}/python python_foreach_impl building
fi fi
if use ruby ; then if use ruby ; then
@ -250,14 +245,12 @@ src_test() {
if use python ; then if use python ; then
testing() { testing() {
mv "${BUILD_DIR}" "${S}"/python || die emake -C ${BUILD_DIR} ${MAKE_RULES} PYTHON=${EPYTHON} \
emake -C python ${MAKE_RULES} PYTHON=${EPYTHON} \
install_pythondir="\"${D}/$(python_get_sitedir)\"" \ install_pythondir="\"${D}/$(python_get_sitedir)\"" \
install_libdir="\"${D}/$(python_get_sitedir)\"" \ install_libdir="\"${D}/$(python_get_sitedir)\"" \
test || die "emake python-${EPYTHON} test failed" test || die "emake python-${EPYTHON} test failed"
mv "${S}"/python "${BUILD_DIR}"
} }
BUILD_DIR=python python_foreach_impl testing S=${S}/python python_foreach_impl testing
fi fi
if use ruby ; then if use ruby ; then
@ -307,14 +300,12 @@ src_install() {
installation() { installation() {
mkdir -p "${D}/$(python_get_sitedir)" || die mkdir -p "${D}/$(python_get_sitedir)" || die
mv "${BUILD_DIR}" "${S}"/python || die emake -C ${BUILD_DIR} ${MAKE_RULES} \
emake -C python ${MAKE_RULES} \
install_pythondir="\"${D}/$(python_get_sitedir)\"" \ install_pythondir="\"${D}/$(python_get_sitedir)\"" \
install_libdir="\"${D}/$(python_get_sitedir)\"" \ install_libdir="\"${D}/$(python_get_sitedir)\"" \
install || die "emake python-${EPYTHON} install failed" install || die "emake python-${EPYTHON} install failed"
mv "${S}"/python "${BUILD_DIR}"
} }
BUILD_DIR=python python_foreach_impl installation S=${S}/python python_foreach_impl installation
fi fi
if use ruby ; then if use ruby ; then