[dev-libs/Ice] final changes probably. also import patch from PLD Linux to fix mono compilation

This commit is contained in:
Robert Förster 2016-01-26 23:50:32 +01:00
parent 234be834f0
commit 7d4f81dd1b
2 changed files with 87 additions and 19 deletions

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
EAPI=5
PYTHON_COMPAT=( python{2_7,3_4} pypy )
@ -13,7 +13,6 @@ PHP_EXT_NAME="IcePHP"
PHP_EXT_INI="yes"
PHP_EXT_ZENDEXT="no"
PHP_EXT_S="${S}/php"
PHP_EXT_OPTIONAL_USE=php
USE_PHP="php5-6"
@ -27,7 +26,7 @@ SRC_URI="https://github.com/zeroc-ice/ice/archive/v${PV}.tar.gz -> ${P}.tar.gz
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ia64 ~x86 ~x86-linux ~x64-macos"
IUSE="doc examples +ncurses mono php python ruby test debug"
IUSE="doc examples +ncurses mono php php_namespaces python ruby test debug"
RDEPEND=">=dev-libs/expat-2.0.1
>=app-arch/bzip2-1.0.5
@ -37,7 +36,8 @@ RDEPEND=">=dev-libs/expat-2.0.1
python? ( ${PYTHON_DEPS} )
ruby? ( $(ruby_implementation_depend ruby22) )
mono? ( dev-lang/mono )
php? ( dev-lang/php:5.6 )
php? ( >=dev-lang/php-5.3 )
php_namespaces? ( >=dev-lang/php-5.3 )
!dev-python/IcePy
!dev-ruby/IceRuby"
DEPEND="${RDEPEND}
@ -55,6 +55,7 @@ REQUIRED_USE="php_namespaces? ( php )"
#overwrite ruby-ng.eclass default
S="${WORKDIR}/${P/I/i}"
PHP_EXT_S="${S}/php"
pkg_setup() {
if use ruby && [[ $RUBY_TARGETS != *$( eselect ruby show | awk 'NR==2' | tr -d ' ' )* ]]; then
@ -70,6 +71,7 @@ src_unpack() {
}
src_prepare() {
epatch "${FILESDIR}/${P}-csharp.patch"
sed -i \
-e 's|\(install_configdir[[:space:]]*\):=|\1?=|' \
cpp/config/Make.rules || die "sed failed"
@ -79,10 +81,6 @@ src_prepare() {
-e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \
php/config/Make.rules.php || die "sed failed"
sed -i \
-e "s|php-config|$(PHPCONFIG)|" \
php/src/IcePHP/Makefile || die "sed failed"
sed -i \
-e 's|\(install_pythondir[[:space:]]*\)=|\1?=|' \
-e 's|\(install_rubydir[[:space:]]*\)=|\1?=|' \
@ -100,16 +98,18 @@ src_prepare() {
sed -i \
-e 's|-f -root|-f -gacdir $(GAC_DIR) -root|' \
-e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \
-e 's|\(install_pkgconfigdir[[:space:]]*\):=|\1?=|' \
csharp/config/Make.rules.cs || die "sed failed"
# skip mono tests, bug #498484
sed -i \
-e 's|^\(SUBDIRS.*\)test|\1|' \
-e '/SUBDIRS/s|\ test||' \
csharp/Makefile || die "sed failed"
if ! use test ; then
sed -i \
-e 's|^\(SUBDIRS.*\)test|\1|' \
-e '/SUBDIRS/s|\ test||' \
{cpp,csharp,php,python,ruby}/Makefile || die "sed failed"
fi
}
@ -126,14 +126,13 @@ 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"
local BERKDB_VERSION="5.3"
MAKE_RULES="${MAKE_RULES} DB_FLAGS=-I$(db_includedir ${BERKDB_VERSION})"
MAKE_RULES="${MAKE_RULES} DB_FLAGS=-I$(db_includedir 5.3)"
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:${BERKDB_VERSION})|" \
-e "s|\(DB_LIBS[[:space:]]*=\) \-ldb_cxx|\1 -ldb_cxx-$(db_findver sys-libs/db:5.3)|" \
cpp/config/Make.rules{,.Linux} python/config/Make.rules || die "sed failed"
if use python ; then
@ -144,7 +143,7 @@ src_configure() {
fi
if use ruby ; then
SITERUBY="$(ruby22 -r rbconfig -e 'print RbConfig::CONFIG["sitedir"]')"
SITERUBY="$(ruby22 -r rbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')"
MAKE_RULES_RB="install_rubydir=\"${ED}/${SITERUBY}\"
install_libdir=\"${ED}/${SITERUBY}\""
@ -154,7 +153,9 @@ src_configure() {
ruby/config/Make.rules || die "sed failed"
fi
MAKE_RULES_CS="GACINSTALL=yes GAC_ROOT=\"${ED}/usr/$(get_libdir)\" GAC_DIR=${EPREFIX}/usr/$(get_libdir)"
MAKE_RULES_CS="GACINSTALL=yes GAC_ROOT=\"${ED}/usr/$(get_libdir)\" GAC_DIR=${EPREFIX}/usr/$(get_libdir)
install_libdir=\"${ED}/usr/$(get_libdir)\"
install_pkgconfigdir=\"${ED}/usr/$(get_libdir)/pkgconfig\""
if has_version ">dev-lang/mono-4"; then
MAKE_RULES_CS="${MAKE_RULES_CS} MCS=mcs"
fi
@ -174,10 +175,25 @@ src_compile() {
fi
if use php; then
if use php_namespaces ; then
MAKE_RULES_PHP="${MAKE_RULES_PHP} USE_NAMESPACES=yes"
fi
emake -C php ${MAKE_RULES} ${MAKE_RULES_PHP} || die "emake php failed"
local slot
for slot in $(php_get_slots); do
mkdir -p "${WORKDIR}/${slot}"
cp -r "${PHP_EXT_S}" "${WORKDIR}/${slot}/" || die "Failed to copy source ${PHP_EXT_S} to PHP target directory"
cd "${WORKDIR}/${slot}"
sed -i \
-e "s|php-config|${EPREFIX}/usr/$(get_libdir)/${slot}/bin/php-config|" \
php/src/IcePHP/Makefile || die "sed failed"
ln -s ${S}/cpp
ln -s ${S}/config
ln -s ${S}/slice
ln -s ${S}/Makefile
if use php_namespaces ; then
MAKE_RULES_PHP="${MAKE_RULES_PHP} USE_NAMESPACES=yes"
fi
emake -C php ${MAKE_RULES} ${MAKE_RULES_PHP} || die "emake php failed"
done
cd "${S}"
fi
if use python ; then
@ -229,6 +245,8 @@ src_install() {
newins "php/lib/${PHP_EXT_NAME}.so" "${PHP_EXT_NAME}.so" || die "Unable to install extension"
done
php-ext-source-r2_createinifiles
cd "${S}"
fi
if use python ; then

View File

@ -0,0 +1,50 @@
--- ice-3.6.1/csharp/src/Makefile~ 2015-06-23 17:30:20.000000000 +0200
+++ ice-3.6.1/csharp/src/Makefile 2015-06-27 20:07:04.217188211 +0200
@@ -11,7 +11,7 @@
include $(top_srcdir)/config/Make.rules.cs
-SUBDIRS = Ice IceStorm Glacier2 IcePatch2 IceGrid IceBox IceDiscovery IceLocatorDiscovery
+SUBDIRS = Ice IceStorm Glacier2 IcePatch2 IceGrid IceBox IceSSL IceDiscovery IceLocatorDiscovery
$(EVERYTHING)::
@for subdir in $(SUBDIRS); \
--- /dev/null 2015-06-27 16:44:15.733558105 +0200
+++ ice-3.6.1/csharp/lib/pkgconfig/IceSSL.pc 2015-06-27 20:19:30.731894653 +0200
@@ -0,0 +1,10 @@
+version = 3.6.1
+mono_root = /usr
+
+name = IceSSL
+
+Name: ${name}
+Description: IceSSL run-time support
+Version: ${version}
+Libs: -r:${mono_root}/lib/mono/${name}/${name}.dll
+Requires: Ice = ${version}
--- /dev/null 2015-06-27 16:44:15.733558105 +0200
+++ ice-3.6.1/csharp/lib/pkgconfig/IceDiscovery.pc 2015-06-27 20:20:44.312515987 +0200
@@ -0,0 +1,10 @@
+version = 3.6.1
+mono_root = /usr
+
+name = IceDiscovery
+
+Name: ${name}
+Description: IceDiscovery run-time support
+Version: ${version}
+Libs: -r:${mono_root}/lib/mono/${name}/${name}.dll
+Requires: Ice = ${version}
--- /dev/null 2015-06-27 16:44:15.733558105 +0200
+++ ice-3.6.1/csharp/lib/pkgconfig/IceLocatorDiscovery.pc 2015-06-27 20:21:22.206185123 +0200
@@ -0,0 +1,10 @@
+version = 3.6.1
+mono_root = /usr
+
+name = IceLocatorDiscovery
+
+Name: ${name}
+Description: IceLocatorDiscovery run-time support
+Version: ${version}
+Libs: -r:${mono_root}/lib/mono/${name}/${name}.dll
+Requires: Ice = ${version}