[dev-libs/Ice] put back db 5.1 support since that is stable, no idea if 5.3 gets stable anytime soon, add libressl support, apply patch from PLD which maybe can fix bug 552702

This commit is contained in:
2016-02-12 23:54:02 +01:00
parent 11c2ac4835
commit 98a6dfa42a
3 changed files with 78 additions and 5 deletions

View File

@@ -26,12 +26,16 @@ SRC_URI="https://github.com/zeroc-ice/ice/archive/v${PV}.tar.gz -> ${P}.tar.gz
LICENSE="GPL-2"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm ~ia64 ~x86 ~x86-linux ~x64-macos"
IUSE="doc examples +ncurses mono php php_namespaces python ruby test debug"
IUSE="doc examples libressl +ncurses mono php php_namespaces python ruby test debug"
RDEPEND=">=dev-libs/expat-2.0.1
>=app-arch/bzip2-1.0.5
>=dev-libs/openssl-0.9.8o:0
sys-libs/db:5.3[cxx]
!libressl? ( >=dev-libs/openssl-0.9.8o:0 )
libressl? ( dev-libs/libressl )
|| (
sys-libs/db:5.3[cxx]
sys-libs/db:5.1[cxx]
)
dev-cpp/libmcpp
python? ( ${PYTHON_DEPS} )
ruby? ( $(ruby_implementation_depend ruby22) )
@@ -71,6 +75,8 @@ src_unpack() {
}
src_prepare() {
epatch "${FILESDIR}/${P}-libressl.patch"
epatch "${FILESDIR}/${P}-no-arch-opts.patch"
epatch "${FILESDIR}/${P}-csharp.patch"
sed -i \
-e 's|\(install_configdir[[:space:]]*\):=|\1?=|' \
@@ -114,6 +120,18 @@ src_prepare() {
fi
}
suitable_db_version() {
local tested_slots="5.3 5.1"
for ver in ${tested_slots}; do
if [[ -n $(db_findver sys-libs/db:${ver}) ]]; then
echo ${ver}
return 0
fi
done
die "No suitable BerkDB versions found, aborting"
}
src_configure() {
MAKE_RULES="prefix=\"${ED}/usr\"
install_docdir=\"${ED}/usr/share/doc/${PF}\"
@@ -126,13 +144,14 @@ src_configure() {
use ncurses && OPTIONS="${MAKE_RULES} USE_READLINE=yes" || MAKE_RULES="${MAKE_RULES} USE_READLINE=no"
use debug && OPTIONS="${MAKE_RULES} OPTIMIZE=no" || MAKE_RULES="${MAKE_RULES} OPTIMIZE=yes"
MAKE_RULES="${MAKE_RULES} DB_FLAGS=-I$(db_includedir 5.3)"
local BERKDB_VERSION="$(suitable_db_version)"
MAKE_RULES="${MAKE_RULES} DB_FLAGS=-I$(db_includedir ${BERKDB_VERSION})"
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}|" \
-e "s|\(DB_LIBS[[:space:]]*=\) \-ldb_cxx|\1 -ldb_cxx-$(db_findver sys-libs/db:5.3)|" \
-e "s|\(DB_LIBS[[:space:]]*=\) \-ldb_cxx|\1 -ldb_cxx-$(db_findver sys-libs/db:${BERKDB_VERSION})|" \
cpp/config/Make.rules{,.Linux} python/config/Make.rules || die "sed failed"
if use python ; then