diff options
Diffstat (limited to 'dev-libs/Ice')
-rw-r--r-- | dev-libs/Ice/Ice-3.5.1.ebuild | 284 | ||||
-rw-r--r-- | dev-libs/Ice/Ice-3.6.3-r1.ebuild | 349 | ||||
-rw-r--r-- | dev-libs/Ice/Ice-3.6.3.ebuild | 348 | ||||
-rw-r--r-- | dev-libs/Ice/Manifest | 13 | ||||
-rw-r--r-- | dev-libs/Ice/files/Ice-3.6.3-csharp.patch | 50 | ||||
-rw-r--r-- | dev-libs/Ice/files/Ice-3.6.3-libressl.patch | 164 | ||||
-rw-r--r-- | dev-libs/Ice/files/Ice-3.6.3-no-arch-opts.patch | 50 | ||||
-rw-r--r-- | dev-libs/Ice/metadata.xml | 17 |
8 files changed, 1275 insertions, 0 deletions
diff --git a/dev-libs/Ice/Ice-3.5.1.ebuild b/dev-libs/Ice/Ice-3.5.1.ebuild new file mode 100644 index 000000000000..a3ebdc00bc33 --- /dev/null +++ b/dev-libs/Ice/Ice-3.5.1.ebuild @@ -0,0 +1,284 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 pypy ) +RUBY_OPTIONAL="yes" +USE_RUBY="ruby19" + +inherit toolchain-funcs versionator python-r1 mono-env ruby-ng db-use + +DESCRIPTION="ICE middleware C++ library and generator tools" +HOMEPAGE="https://zeroc.com/products/ice" +SRC_URI="http://www.zeroc.com/download/Ice/$(get_version_component_range 1-2)/${P}.tar.gz + doc? ( http://www.zeroc.com/download/Ice/$(get_version_component_range 1-2)/${P}.pdf )" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~ia64 x86 ~x86-linux ~x64-macos" +IUSE="doc examples +ncurses mono python ruby test debug" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +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] + sys-libs/db:5.1[cxx] + sys-libs/db:4.8[cxx] + ) + ~dev-cpp/libmcpp-2.7.2 + python? ( ${PYTHON_DEPS} ) + ruby? ( $(ruby_implementation_depend ruby19) ) + mono? ( dev-lang/mono ) + !dev-python/IcePy + !dev-ruby/IceRuby" +DEPEND="${RDEPEND} + ncurses? ( sys-libs/ncurses sys-libs/readline ) + test? ( ${PYTHON_DEPS} )" + +# Maintainer notes: +# - yes, we have to do the trickery with the move for the python functions +# since the build and test frameworks deduce various settings from the path +# and they can't be tricked by a symlink. And we also need +# SUPPORT_PYTHON_ABIS=1 otherwise we can't get pyc/pyo anymore the sane way. +# TODO: php bindings +# TODO: java bindings + +#overwrite ruby-ng.eclass default +S="${WORKDIR}/${P}" + +pkg_setup() { + # prevent ruby-ng.eclass from messing with src_unpack + :; +} + +src_unpack() { + # prevent ruby-ng.eclass from messing with src_unpack + default +} + +src_prepare() { + sed -i \ + -e 's|\(install_docdir[[:space:]]*\):=|\1?=|' \ + -e 's|\(install_configdir[[:space:]]*\):=|\1?=|' \ + cpp/config/Make.rules || die "sed failed" + + sed -i \ + -e 's|\(install_pythondir[[:space:]]*\):=|\1?=|' \ + -e 's|\(install_rubydir[[:space:]]*\):=|\1?=|' \ + -e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \ + {py,rb}/config/Make.rules || die "sed failed" + + sed -i \ + -e 's|-O2 ||g' \ + -e 's|-Werror ||g' \ + cpp/config/Make.rules.Linux || die "sed failed" + + sed -i \ + -e 's|install-common||' \ + -e 's|demo||' \ + {cpp,cs,php,py,rb}/Makefile || die "sed failed" + + sed -i \ + -e 's|-f -root|-f -gacdir $(GAC_DIR) -root|' \ + cs/config/Make.rules.cs || die "sed failed" + + # skip mono tests, bug #498484 + sed -i \ + -e 's|^\(SUBDIRS.*\)test|\1|' \ + cs/Makefile || die "sed failed" + + if ! use test ; then + sed -i \ + -e 's|^\(SUBDIRS.*\)test|\1|' \ + {cpp,php,py,rb}/Makefile || die "sed failed" + fi +} + +suitable_db_version() { + local tested_slots="5.3 5.1 4.8" + 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}\" + install_configdir=\"${ED}/usr/share/Ice-${PV}/config\" + install_mandir=\"${ED}/usr/share/man\" + embedded_runpath_prefix=\"${EPREFIX}/usr\" + LP64=yes" + + 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="$(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:${BERKDB_VERSION})|" \ + cpp/config/Make.rules{,.Linux} py/config/Make.rules || die "sed failed" + + if use python ; then + S=${S}/py python_copy_sources + + # make a place for the symlink + rm -r py/python || die + fi + + if use ruby ; then + SITERUBY="$(ruby19 -r rbconfig -e 'print Config::CONFIG["sitedir"]')" + MAKE_RULES_RB="install_rubydir=\"${ED}/${SITERUBY}\" + install_libdir=\"${ED}/${SITERUBY}\"" + + # make it use ruby19 only + sed -i \ + -e 's|RUBY = ruby|\019|' \ + rb/config/Make.rules || die "sed failed" + fi + + MAKE_RULES_CS="GACINSTALL=yes GAC_ROOT=\"${ED}/usr/$(get_libdir)\" GAC_DIR=${EPREFIX}/usr/$(get_libdir)" + + use test && python_export_best +} + +src_compile() { + # Do not remove this export or build will break! + tc-export CXX + + emake -C cpp ${MAKE_RULES} || die "emake failed" + + if use doc ; then + emake -C cpp/doc || die "building docs failed" + fi + + if use python ; then + building() { + emake -C "${BUILD_DIR}" ${MAKE_RULES} || die "emake py-${EPYTHON} failed" + } + BUILD_DIR=py python_foreach_impl building + fi + + if use ruby ; then + emake -C rb ${MAKE_RULES} ${MAKE_RULES_RB} || die "emake rb failed" + fi + + if use mono ; then + emake -C cs ${MAKE_RULES} ${MAKE_RULES_CS} || die "emake cs failed" + fi +} + +src_install() { + dodoc CHANGES README + + insinto /usr/share/${P} + doins -r slice + + emake -C cpp ${MAKE_RULES} install || die "emake install failed" + + docinto cpp + dodoc CHANGES README + + if use examples ; then + insinto /usr/share/doc/${PF}/examples-cpp + doins cpp/config/*.cfg + doins -r cpp/demo/* + fi + + if use doc ; then + dohtml -r cpp/doc/reference/* + dodoc "${DISTDIR}/${P}.pdf" + fi + + if use python ; then + installation() { + mkdir -p "${D}/$(python_get_sitedir)" || die + + emake -C "${BUILD_DIR}" ${MAKE_RULES} \ + install_pythondir="\"${D}/$(python_get_sitedir)\"" \ + install_libdir="\"${D}/$(python_get_sitedir)\"" \ + install || die "emake py-${EPYTHON} install failed" + } + BUILD_DIR=py python_foreach_impl installation + + docinto py + dodoc py/CHANGES py/README + + if use examples ; then + insinto /usr/share/doc/${PF}/examples-py + doins -r py/demo/* + fi + fi + + if use ruby ; then + dodir "${SITERUBY}" + emake -C rb ${MAKE_RULES} ${MAKE_RULES_RB} install || die "emake rb install failed" + + docinto rb + dodoc rb/CHANGES rb/README + + if use examples ; then + insinto /usr/share/doc/${PF}/examples-rb + doins -r rb/demo/* + fi + fi + + if use mono ; then + emake -C cs ${MAKE_RULES} ${MAKE_RULES_CS} install || die "emake cs install failed" + + # TODO: anyone has an idea what those are for? + rm "${ED}"/usr/bin/*.xml + + docinto cs + dodoc cs/CHANGES cs/README + + if use examples ; then + insinto /usr/share/doc/${PF}/examples-cs + doins -r cs/demo/* + fi + fi +} + +run_tests() { + # Run tests through the script interface since Python test runner + # fails to exit with non-zero code for some reason. + + pushd "${1}" >/dev/null || die + ./allTests.py --script | sh + ret=${?} + popd >/dev/null || die + + return ${ret} +} + +src_test() { + run_tests cpp || die "emake cpp test failed" + + if use python ; then + testing() { + # tests require that the directory is named 'py' + ln -f -s ../"${BUILD_DIR}"/python py/python || die + run_tests py || die "emake py-${EPYTHON} test failed" + } + BUILD_DIR=py python_foreach_impl testing + fi + + if use ruby ; then + run_tests rb || die "emake rb test failed" + fi + + if use mono ; then + # skip mono tests, bug #498484 + ewarn "Tests for C# are currently disabled." +# run_tests cs || die "emake cs test failed" + fi +} diff --git a/dev-libs/Ice/Ice-3.6.3-r1.ebuild b/dev-libs/Ice/Ice-3.6.3-r1.ebuild new file mode 100644 index 000000000000..0b7d354a2ef9 --- /dev/null +++ b/dev-libs/Ice/Ice-3.6.3-r1.ebuild @@ -0,0 +1,349 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy ) + +RUBY_OPTIONAL="yes" +USE_RUBY="ruby22" + +PHP_EXT_NAME="IcePHP" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" + +PHP_EXT_OPTIONAL_USE=php + +USE_PHP="php7-0" + +# This variable does not belong to any eclass. It is solely used in this ebuild +# db:6.2 breaks the build process +BERKDB_SLOTS=( 6.1 5.3 5.1 4.8 ) + +inherit db-use eutils mono-env php-ext-source-r2 python-r1 ruby-ng toolchain-funcs versionator + +DESCRIPTION="ICE middleware C++ library and generator tools" +HOMEPAGE="https://zeroc.com/products/ice" +SRC_URI="https://github.com/zeroc-ice/ice/archive/v${PV}.tar.gz -> ${P}.tar.gz + doc? ( http://download.zeroc.com/Ice/$(get_version_component_range 1-2)/${P}.pdf )" +LICENSE="GPL-2" +SLOT="0/36" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="doc examples libressl +ncurses mono php python ruby test debug" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=">=dev-libs/expat-2.0.1 + >=app-arch/bzip2-1.0.5 + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + || ( + $(for slot in ${BERKDB_SLOTS[@]} ; do printf '%s\n' "sys-libs/db:${slot}[cxx]" ; done) + ) + dev-cpp/libmcpp + python? ( ${PYTHON_DEPS} ) + ruby? ( $(ruby_implementation_depend ruby22) ) + mono? ( dev-lang/mono ) + php? ( dev-lang/php:7.0 ) + !dev-python/IcePy + !dev-ruby/IceRuby" +DEPEND="${RDEPEND} + ncurses? ( sys-libs/ncurses:0= sys-libs/readline:0= ) + test? ( + ${PYTHON_DEPS} + dev-python/passlib[${PYTHON_USEDEP}] + )" + +# Maintainer notes: +# TODO: java bindings, multiple ruby versions (supports 2.{1,2,3}) + +S="${WORKDIR}/${P/I/i}" +PHP_EXT_S="${S}/php" + +PATCHES=( + "${FILESDIR}/${P}-no-arch-opts.patch" + "${FILESDIR}/${P}-csharp.patch" + "${FILESDIR}/${P}-libressl.patch" +) + +pkg_setup() { + # prevent ruby-ng.eclass from messing with pkg_setup + return +} + +src_unpack() { + # prevent ruby-ng.eclass from messing with src_unpack + default +} + +src_prepare() { + epatch -p1 "${PATCHES[@]}" + + sed -i \ + -e 's|\(install_configdir[[:space:]]*\):=|\1?=|' \ + -e 's|-L\$\(libdir\)||' \ + cpp/config/Make.rules || die "sed failed" + + sed -i \ + -e 's|\(install_phpdir[[:space:]]*\):=|\1?=|' \ + -e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \ + php/config/Make.rules.php || die "sed failed" + + sed -i \ + -e 's|\(install_pythondir[[:space:]]*\)=|\1?=|' \ + -e 's|\(install_rubydir[[:space:]]*\)=|\1?=|' \ + -e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \ + {python,ruby}/config/Make.rules || die "sed failed" + + sed -i \ + -e 's|-O2 ||g' \ + -e 's|-Werror ||g' \ + cpp/config/Make.rules.Linux || die "sed failed" + + sed -i \ + -e 's|install-common||' \ + {cpp,csharp,php,python,ruby}/Makefile || die "sed failed" + + 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 '/SUBDIRS/s|\ test||' \ + csharp/Makefile || die "sed failed" + + # IceUtil/stacktrace fails with USE=debug + # skip udp test due to multicast + # skip IceSSL tests due to requirement of internet connection + # IceStorm/stress fails without USE=debug + sed -i \ + -e 's|allTests.py|allTests.py --rfilter=IceUtil\/stacktrace --rfilter=udp --rfilter=IceSSL --rfilter=IceStorm\/stress|' \ + cpp/Makefile || die "sed failed" + + # 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 "sed failed" +} + +src_configure() { + suitable_db_version() { + local ver + for ver in "${BERKDB_SLOTS[@]}"; do + if [[ -n $(db_findver sys-libs/db:${ver}) ]]; then + echo "${ver}" + return 0 + fi + done + die "No suitable BerkDB versions found, aborting" + } + + MAKE_RULES=( + "prefix=\"${ED%/}/usr\"" + "install_docdir=\"${ED%/}/usr/share/doc/${PF}\"" + "install_configdir=\"${ED%/}/usr/share/${P}/config\"" + "install_mandir=\"${ED%/}/usr/share/man\"" + "embedded_runpath_prefix=\"${EPREFIX}/usr\"" + "LP64=yes" + "new_dtags=yes" + "NOTEST=$(usex !test)" + "USE_READLINE=$(usex ncurses)" + "OPTIMIZE=$(usex !debug)" + ) + + local BERKDB_VERSION="$(suitable_db_version)" + 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:${BERKDB_VERSION})|" \ + cpp/config/Make.rules{,.Linux} python/config/Make.rules || die "sed failed" + + if use python; then + local S="${S}/python" + python_copy_sources + fi + + if use ruby; then + SITERUBY="$(ruby22 -r rbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')" + MAKE_RULES_RUBY=( + "install_rubydir=\"${ED%/}/${SITERUBY}\"" + "install_libdir=\"${ED%/}/${SITERUBY}\"" + ) + + # make it use ruby22 only + sed -i \ + -e 's|RUBY = ruby|\022|' \ + ruby/config/Make.rules || die "sed failed" + sed -i \ + -e 's|env ruby|\022|' \ + ruby/config/s2rb.rb || die "sed failed" + sed -i \ + -e 's|env ruby|\022|' \ + ruby/scripts/slice2rb || die "sed failed" + sed -i \ + -e 's|output.write("ruby|\022|' \ + scripts/TestUtil.py || die "sed failed" + fi + + MAKE_RULES_MONO=( + "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_MONO+=("MCS=mcs") + fi + + use test && python_setup +} + +src_compile() { + # Do not remove this export or build will break! + tc-export CXX + + emake -C cpp "${MAKE_RULES[@]}" + + if use php; then + local i + for i in $(php_get_slots); do + mkdir -p "${WORKDIR}/${i}" || die + cp -r "${PHP_EXT_S}" "${WORKDIR}/${i}/" || die "Failed to copy source ${PHP_EXT_S} to PHP target directory" + + pushd "${WORKDIR}/${i}" >/dev/null || die + ln -s "${S}/cpp" || die + ln -s "${S}/config" || die + ln -s "${S}/slice" || die + ln -s "${S}/Makefile" || die + + emake -C php "${MAKE_RULES[@]}" USE_NAMESPACES=yes "PHP_CONFIG=\"${EPREFIX}/usr/$(get_libdir)/${i}/bin/php-config\"" + popd >/dev/null || die + done + fi + + if use python; then + building() { + emake -C "${BUILD_DIR}" "${MAKE_RULES[@]}" PYTHON="${EPYTHON}" + } + local S="${S}/python" + python_foreach_impl building + fi + + if use ruby; then + emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" + fi + + if use mono; then + emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}" + fi +} + +src_test() { + local -x LD_LIBRARY_PATH="${S}/cpp/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake -C cpp "${MAKE_RULES[@]}" test + + # php tests require the extension loaded and are therefore skipped + + if use python; then + testing() { + 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 + emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" test + fi + + if use mono; then + # skip mono tests, bug #498484 + ewarn "Tests for C# are currently disabled." + #emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}" test + fi +} + +src_install() { + local DOCS=( CHANGELOG*.md README.md ) + use doc && DOCS+=( "${DISTDIR}/${P}.pdf" ) + einstalldocs + + insinto /usr/share/${P} + doins -r slice + + emake -C cpp "${MAKE_RULES[@]}" install + + if use examples; then + docinto examples-cpp + dodoc cpp/config/*.cfg + docompress -x /usr/share/doc/${PF}/examples-cpp + fi + + if use php; then + insinto "/usr/share/php/${PN}" + + local i + while IFS="" read -d $'\0' -r i; do + doins "${i}" + done < <(find "${S}/php/lib/" -name '*.php' -print0) + + pushd "${ED%/}/usr/share/${P}/slice" >/dev/null || die + + local -x LD_LIBRARY_PATH="${ED%/}/usr/$(get_libdir):${LD_LIBRARY_PATH}" + for i in *; do + mkdir -p "${ED%/}/usr/share/php/${i}" || die + "${ED%/}"/usr/bin/slice2php \ + -I"${ED%/}/usr/share/${P}/slice/" --all \ + --output-dir "${ED%/}/usr/share/php/${i}" \ + --ice "${ED%/}/usr/share/${P}/slice/${i}"/* + done + + for i in $(php_get_slots); do + php_init_slot_env "${i}" + insinto "${EXT_DIR}" + newins "php/lib/${PHP_EXT_NAME}.so" "${PHP_EXT_NAME}.so" + done + php-ext-source-r2_createinifiles + + popd >/dev/null || die + fi + + if use python; then + installation() { + mkdir -p "${D%/}/$(python_get_sitedir)" || die + + emake -C "${BUILD_DIR}" \ + "${MAKE_RULES[@]}" \ + install_pythondir="\"${D%/}/$(python_get_sitedir)\"" \ + install_libdir="\"${D%/}/$(python_get_sitedir)\"" \ + install + } + local S="${S}/python" + python_foreach_impl installation + fi + + if use ruby; then + dodir "${SITERUBY}" + emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" install + fi + + if use mono; then + emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}" install + fi +} diff --git a/dev-libs/Ice/Ice-3.6.3.ebuild b/dev-libs/Ice/Ice-3.6.3.ebuild new file mode 100644 index 000000000000..33bd9a462f93 --- /dev/null +++ b/dev-libs/Ice/Ice-3.6.3.ebuild @@ -0,0 +1,348 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy ) + +RUBY_OPTIONAL="yes" +USE_RUBY="ruby22" + +PHP_EXT_NAME="IcePHP" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" + +PHP_EXT_OPTIONAL_USE=php + +USE_PHP="php7-0" + +# This variable does not belong to any eclass. It is solely used in this ebuild +# db:6.2 breaks the build process +BERKDB_SLOTS=( 6.1 5.3 5.1 4.8 ) + +inherit db-use eutils mono-env php-ext-source-r2 python-r1 ruby-ng toolchain-funcs versionator + +DESCRIPTION="ICE middleware C++ library and generator tools" +HOMEPAGE="https://zeroc.com/products/ice" +SRC_URI="https://github.com/zeroc-ice/ice/archive/v${PV}.tar.gz -> ${P}.tar.gz + doc? ( http://download.zeroc.com/Ice/$(get_version_component_range 1-2)/${P}.pdf )" +LICENSE="GPL-2" +SLOT="0/36" +KEYWORDS="amd64 x86" +IUSE="doc examples libressl +ncurses mono php python ruby test debug" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=">=dev-libs/expat-2.0.1 + >=app-arch/bzip2-1.0.5 + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + || ( + $(for slot in ${BERKDB_SLOTS[@]} ; do printf '%s\n' "sys-libs/db:${slot}[cxx]" ; done) + ) + dev-cpp/libmcpp + python? ( ${PYTHON_DEPS} ) + ruby? ( $(ruby_implementation_depend ruby22) ) + mono? ( dev-lang/mono ) + php? ( dev-lang/php:7.0 ) + !dev-python/IcePy + !dev-ruby/IceRuby" +DEPEND="${RDEPEND} + ncurses? ( sys-libs/ncurses:0= sys-libs/readline:0= ) + test? ( + ${PYTHON_DEPS} + dev-python/passlib[${PYTHON_USEDEP}] + )" + +# Maintainer notes: +# TODO: java bindings, multiple ruby versions (supports 2.{1,2,3}) + +S="${WORKDIR}/${P/I/i}" +PHP_EXT_S="${S}/php" + +PATCHES=( + "${FILESDIR}/${P}-no-arch-opts.patch" + "${FILESDIR}/${P}-csharp.patch" +) + +pkg_setup() { + # prevent ruby-ng.eclass from messing with pkg_setup + return +} + +src_unpack() { + # prevent ruby-ng.eclass from messing with src_unpack + default +} + +src_prepare() { + epatch -p1 "${PATCHES[@]}" + + sed -i \ + -e 's|\(install_configdir[[:space:]]*\):=|\1?=|' \ + -e 's|-L\$\(libdir\)||' \ + cpp/config/Make.rules || die "sed failed" + + sed -i \ + -e 's|\(install_phpdir[[:space:]]*\):=|\1?=|' \ + -e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \ + php/config/Make.rules.php || die "sed failed" + + sed -i \ + -e 's|\(install_pythondir[[:space:]]*\)=|\1?=|' \ + -e 's|\(install_rubydir[[:space:]]*\)=|\1?=|' \ + -e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \ + {python,ruby}/config/Make.rules || die "sed failed" + + sed -i \ + -e 's|-O2 ||g' \ + -e 's|-Werror ||g' \ + cpp/config/Make.rules.Linux || die "sed failed" + + sed -i \ + -e 's|install-common||' \ + {cpp,csharp,php,python,ruby}/Makefile || die "sed failed" + + 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 '/SUBDIRS/s|\ test||' \ + csharp/Makefile || die "sed failed" + + # IceUtil/stacktrace fails with USE=debug + # skip udp test due to multicast + # skip IceSSL tests due to requirement of internet connection + # IceStorm/stress fails without USE=debug + sed -i \ + -e 's|allTests.py|allTests.py --rfilter=IceUtil\/stacktrace --rfilter=udp --rfilter=IceSSL --rfilter=IceStorm\/stress|' \ + cpp/Makefile || die "sed failed" + + # 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 "sed failed" +} + +src_configure() { + suitable_db_version() { + local ver + for ver in "${BERKDB_SLOTS[@]}"; do + if [[ -n $(db_findver sys-libs/db:${ver}) ]]; then + echo "${ver}" + return 0 + fi + done + die "No suitable BerkDB versions found, aborting" + } + + MAKE_RULES=( + "prefix=\"${ED%/}/usr\"" + "install_docdir=\"${ED%/}/usr/share/doc/${PF}\"" + "install_configdir=\"${ED%/}/usr/share/${P}/config\"" + "install_mandir=\"${ED%/}/usr/share/man\"" + "embedded_runpath_prefix=\"${EPREFIX}/usr\"" + "LP64=yes" + "new_dtags=yes" + "NOTEST=$(usex !test)" + "USE_READLINE=$(usex ncurses)" + "OPTIMIZE=$(usex !debug)" + ) + + local BERKDB_VERSION="$(suitable_db_version)" + 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:${BERKDB_VERSION})|" \ + cpp/config/Make.rules{,.Linux} python/config/Make.rules || die "sed failed" + + if use python; then + local S="${S}/python" + python_copy_sources + fi + + if use ruby; then + SITERUBY="$(ruby22 -r rbconfig -e 'print RbConfig::CONFIG[\"sitelibdir\"]')" + MAKE_RULES_RUBY=( + "install_rubydir=\"${ED%/}/${SITERUBY}\"" + "install_libdir=\"${ED%/}/${SITERUBY}\"" + ) + + # make it use ruby22 only + sed -i \ + -e 's|RUBY = ruby|\022|' \ + ruby/config/Make.rules || die "sed failed" + sed -i \ + -e 's|env ruby|\022|' \ + ruby/config/s2rb.rb || die "sed failed" + sed -i \ + -e 's|env ruby|\022|' \ + ruby/scripts/slice2rb || die "sed failed" + sed -i \ + -e 's|output.write("ruby|\022|' \ + scripts/TestUtil.py || die "sed failed" + fi + + MAKE_RULES_MONO=( + "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_MONO+=("MCS=mcs") + fi + + use test && python_setup +} + +src_compile() { + # Do not remove this export or build will break! + tc-export CXX + + emake -C cpp "${MAKE_RULES[@]}" + + if use php; then + local i + for i in $(php_get_slots); do + mkdir -p "${WORKDIR}/${i}" || die + cp -r "${PHP_EXT_S}" "${WORKDIR}/${i}/" || die "Failed to copy source ${PHP_EXT_S} to PHP target directory" + + pushd "${WORKDIR}/${i}" >/dev/null || die + ln -s "${S}/cpp" || die + ln -s "${S}/config" || die + ln -s "${S}/slice" || die + ln -s "${S}/Makefile" || die + + emake -C php "${MAKE_RULES[@]}" USE_NAMESPACES=yes "PHP_CONFIG=\"${EPREFIX}/usr/$(get_libdir)/${i}/bin/php-config\"" + popd >/dev/null || die + done + fi + + if use python; then + building() { + emake -C "${BUILD_DIR}" "${MAKE_RULES[@]}" PYTHON="${EPYTHON}" + } + local S="${S}/python" + python_foreach_impl building + fi + + if use ruby; then + emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" + fi + + if use mono; then + emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}" + fi +} + +src_test() { + local -x LD_LIBRARY_PATH="${S}/cpp/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + emake -C cpp "${MAKE_RULES[@]}" test + + # php tests require the extension loaded and are therefore skipped + + if use python; then + testing() { + 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 + emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" test + fi + + if use mono; then + # skip mono tests, bug #498484 + ewarn "Tests for C# are currently disabled." + #emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}" test + fi +} + +src_install() { + local DOCS=( CHANGELOG*.md README.md ) + use doc && DOCS+=( "${DISTDIR}/${P}.pdf" ) + einstalldocs + + insinto /usr/share/${P} + doins -r slice + + emake -C cpp "${MAKE_RULES[@]}" install + + if use examples; then + docinto examples-cpp + dodoc cpp/config/*.cfg + docompress -x /usr/share/doc/${PF}/examples-cpp + fi + + if use php; then + insinto "/usr/share/php/${PN}" + + local i + while IFS="" read -d $'\0' -r i; do + doins "${i}" + done < <(find "${S}/php/lib/" -name '*.php' -print0) + + pushd "${ED%/}/usr/share/${P}/slice" >/dev/null || die + + local -x LD_LIBRARY_PATH="${ED%/}/usr/$(get_libdir):${LD_LIBRARY_PATH}" + for i in *; do + mkdir -p "${ED%/}/usr/share/php/${i}" || die + "${ED%/}"/usr/bin/slice2php \ + -I"${ED%/}/usr/share/${P}/slice/" --all \ + --output-dir "${ED%/}/usr/share/php/${i}" \ + --ice "${ED%/}/usr/share/${P}/slice/${i}"/* + done + + for i in $(php_get_slots); do + php_init_slot_env "${i}" + insinto "${EXT_DIR}" + newins "php/lib/${PHP_EXT_NAME}.so" "${PHP_EXT_NAME}.so" + done + php-ext-source-r2_createinifiles + + popd >/dev/null || die + fi + + if use python; then + installation() { + mkdir -p "${D%/}/$(python_get_sitedir)" || die + + emake -C "${BUILD_DIR}" \ + "${MAKE_RULES[@]}" \ + install_pythondir="\"${D%/}/$(python_get_sitedir)\"" \ + install_libdir="\"${D%/}/$(python_get_sitedir)\"" \ + install + } + local S="${S}/python" + python_foreach_impl installation + fi + + if use ruby; then + dodir "${SITERUBY}" + emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" install + fi + + if use mono; then + emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}" install + fi +} diff --git a/dev-libs/Ice/Manifest b/dev-libs/Ice/Manifest new file mode 100644 index 000000000000..5addea70f865 --- /dev/null +++ b/dev-libs/Ice/Manifest @@ -0,0 +1,13 @@ +AUX Ice-3.6.3-csharp.patch 1573 SHA256 2cc8947dbe76a8e89216a82a8a305123120c5115cf7ddff3325c69d0bce4fc8a SHA512 62741327524cea96652179811c0591ed7e75b75a27623cb24fe2e55c47150692d862aa78039ed82a081236273163015d4b7e56817ac13ccd63ca1042e641704f WHIRLPOOL 0f15fe33b78f8f61a156eb197dab3c4cf812bcec4f68ba3bce54ba8a4ecc20617450bccf86bdaa34a9ea7186c15620face1bbd866790f7764c377769c9dc30da +AUX Ice-3.6.3-libressl.patch 6461 SHA256 39137ccea35a8b8d72d5d38bdf1503df4e1bfaa9dff2a0e66f8c644af3c9e278 SHA512 386ed4d666ea76a16255e7e5023be9880ac1f5e26ffec3d19560484eb6ace158f134c1d425586c1f654d7dc58732c17ed4b190eaf26f4aba0cd4bc319abe50cb WHIRLPOOL e41498ead25b41975172745b84a9be18f2fd0f8cca9d9d904f0dec1aea158e595719380f6b2957b01fe04f5521f8cb88a0b1075fc8a985536777053608dd75f0 +AUX Ice-3.6.3-no-arch-opts.patch 1462 SHA256 e84911ad11b435e559f0e3cd5d294fce1543c0237943641923d1c1303c796953 SHA512 236abce89a7bcf64d6a12db5a82d62db1effa2b5a105ae7c83910f02ca1ccd610193097a2c959d2a487f0d641af70ba8013bcfe570e2af40976d9a1017272e6e WHIRLPOOL 76899080b3965d01ff0c063ca72f17a609d34a7b60e750049932dcbad6b19a15e48d538b6b0ef1ac8a17bb387646f48f9cd0d1f7e8f40462b94681640a3a91d2 +DIST Ice-3.5.1.pdf 8279548 SHA256 236f509a3868301ebe688f50417f30155ffa1d330a6c7ab3ef926d40ab145150 SHA512 6fe78ed629de330c56cf260a0a78d650ad9e1507d737a8e58c616f1c61897487dae2f9fb942f1e878706dbc645cb9c672377eeef905f8764b57dd7e6f8d1c7f2 WHIRLPOOL 9fc90d131b028b74f3393df88adb8719a1fef0f829a6226e833c95bcf3bc6b53394a11e3722f0fad2a5597b2468498728310a6e974e1dcb1138fea0ab5b68b28 +DIST Ice-3.5.1.tar.gz 4799296 SHA256 989e51194c6adadbd156da3288e37bad847b93b3b876502e83033b70493af392 SHA512 610fa317bd75e64802d1b5216db4747f86157d3246a2022397bafaefdd9b1b78d131733762003ee779065401c8a83120db65cf9b86fbf1914266309571baf58f WHIRLPOOL 0b760edcd7e3eb1220af81a2236634b86775a18050b0645e4e662bf0fb543aa14177d83e2c8659a62bd5bf6e403384998b893e84b9d547c32bbc2064b5f7de9c +DIST Ice-3.6.3.pdf 8844957 SHA256 bf6edd649d44dcac1951d7d62b112fb535b8f29f58973cfdcd5cabf8940bb3b9 SHA512 44638a315b0da9c26519c053c48ab8ee216c43410f53844465535a972ae01031f1603769e9b3169fdf9358de67e0d0c7e238b2918b5d5b1c4cb95cb922fa922a WHIRLPOOL 65087b4c643e2c7f2cf66b3b9fb433823f75c8b5a44b838d39077f2dab85c57ff4e022931ec8ba21cbc6deda2e55257f6c0d2d0a360d50e9b1a615253ad7ed0a +DIST Ice-3.6.3.tar.gz 5512741 SHA256 82ff74e6d24d9fa396dbb4d9697dc183b17bc9c3f6f076fecdc05632be80a2dc SHA512 6e17d21f55a8504af87a64c498a0c4d2084ed96a85c7a66d00319324774f671ace6afa03108d8d4e9bedf5fcfc2f3dba247949a27deecacdd0d298bd0bfe0a45 WHIRLPOOL 4e2d50aaf62f805a0c5471ab907c7680607de5fe101c96a740a3bc1b8ddc7ea93d768ba5886b26772647eb173417195bd808399192b2d2c7d5adb40cf38fc95f +EBUILD Ice-3.5.1.ebuild 7239 SHA256 2175d704bdfb71c3d693e1ea65e415f64b85e6822daeb796ac2f617a69e96719 SHA512 342444cce29400d61b30135175887d7a381f86fc3e0e2b526d32e73dbdbf97601fbab8f8591408f5376a40ef496b55fa1c24a88a9007307efa437de052c46c83 WHIRLPOOL 5daf01f7ecdb010bf735418773300b51e4af706eeab9829b3e641e6a71dfc271b0aed85fba24579624088851835e185eee77710126ccd129f33474e0589303e0 +EBUILD Ice-3.6.3-r1.ebuild 9198 SHA256 a4a575a584ad5c7b27224e7841b7749bb09b8408350327789a503ab446dd1e00 SHA512 293ef0c35c6d3e6c0bcdac947f6b61e366d5f2676069b3f68dc98f2a1bfd320b3ddd6f94a5b6318360e4b015b08ddb2ab24643a426a1257656bad615b9d3a9fc WHIRLPOOL 3eb3e49f6907e8e2320475aa44f005e313a789947a3ba1becf7da89d032f693d8f37e68a7e39c019a86a415bdbe7210ccf593e6bbae12baa4a260d0400df3a4e +EBUILD Ice-3.6.3.ebuild 9158 SHA256 4b2023154fc2a0e60e470709203ecd2b926e6485bc6ac24efb8d4a19c45fa960 SHA512 e0ba152bd9ffa979c1a8f236539ed6238924e53571fccd7a070d13c18cdc5ca1510ba42da8c4da62ef5d8cb16e58ba66df09fe1f26eb26f03e6b951a45613329 WHIRLPOOL d0d878c85ec11ba423ae084dfcdfd4a851e82aeab736441c8fb207262820c17efccdb19b62f2ff3a6a50d4ae730e43d7977b6d631eeeebe6c47c5f54f6b233b4 +MISC ChangeLog 3590 SHA256 ea93b989972b18af685b4e30c62bb3f29c545cddc75d5a2eb3973e3588cbf89a SHA512 dece5e3c0e0ba820bd4fccde2faf73a7b9aed0833cbaecf6f97f29c8647adc300aea9f64cc291dfb9fbdc2ed8fdd8a1118150ddd2113090fe51cb9b77d05767b WHIRLPOOL 09e84a51e48ed2945dbb0947f8871efaadea4dad984e2512acd8cec8f528410435f496875d8b4463ef1efabbb973445cdf0caff2a8502e125e07e0aafc63b205 +MISC ChangeLog-2015 13110 SHA256 1a67f15d3f30782c60db459c1184bad3a49644064e3ed61dcf70adf44707b96b SHA512 24dd54484417eca4d0db815b8219f01ea1b4b25210ef054dc55b4204fbbd5a395088c291248327e84c6ba382c223bff7a53ed1261c2edfc80cf5456786024b4f WHIRLPOOL 2b4afb45135f5c8f77ded871930917e26386b6b74bea4ad5dd46752624fb30dbba50dda633b16b4ff7b0ad2dba04e64a981f797bce8a2f359406eb879476f964 +MISC metadata.xml 520 SHA256 d7a5d7e5b560e90512c312c28cc99ce7b665a9fb11490224314a9b338ac19479 SHA512 8958293c1fbc414bd911848999b0414dc64befc865b012c4c5c40350dce69f366e329c6aac793877eca8cf5e4b8bd477df3055a0ce7481d3c6d9ae1a4b76dfe5 WHIRLPOOL 5de39a18915e41e455c529bbb96e5d7bd21c487bbb6e961c42aaf61e894cc9f38f338ceec720caab61a3d4764cfa0cc551c1c832f3356aa8d87c48a12047abbf diff --git a/dev-libs/Ice/files/Ice-3.6.3-csharp.patch b/dev-libs/Ice/files/Ice-3.6.3-csharp.patch new file mode 100644 index 000000000000..e9dce1146baa --- /dev/null +++ b/dev-libs/Ice/files/Ice-3.6.3-csharp.patch @@ -0,0 +1,50 @@ +--- ice-3.6.3/csharp/src/Makefile~ 2015-06-23 17:30:20.000000000 +0200 ++++ ice-3.6.3/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.3/csharp/lib/pkgconfig/IceSSL.pc 2015-06-27 20:19:30.731894653 +0200 +@@ -0,0 +1,10 @@ ++version = 3.6.3 ++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.3/csharp/lib/pkgconfig/IceDiscovery.pc 2015-06-27 20:20:44.312515987 +0200 +@@ -0,0 +1,10 @@ ++version = 3.6.3 ++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.3/csharp/lib/pkgconfig/IceLocatorDiscovery.pc 2015-06-27 20:21:22.206185123 +0200 +@@ -0,0 +1,10 @@ ++version = 3.6.3 ++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} diff --git a/dev-libs/Ice/files/Ice-3.6.3-libressl.patch b/dev-libs/Ice/files/Ice-3.6.3-libressl.patch new file mode 100644 index 000000000000..e7d42e3f0d0c --- /dev/null +++ b/dev-libs/Ice/files/Ice-3.6.3-libressl.patch @@ -0,0 +1,164 @@ +From cbbac2c31a04e956261489ce75c962be7e2454ae Mon Sep 17 00:00:00 2001 +From: Joe George <joe@zeroc.com> +Date: Mon, 12 Dec 2016 11:51:41 -0500 +Subject: [PATCH] ICE-7445 - Add libressl build support + +--- + cpp/src/IceSSL/OpenSSLEngine.cpp | 20 ++++++++++---------- + cpp/src/IceSSL/OpenSSLTransceiverI.cpp | 6 +++--- + cpp/src/IceSSL/Util.cpp | 8 ++++---- + 3 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/cpp/src/IceSSL/OpenSSLEngine.cpp b/cpp/src/IceSSL/OpenSSLEngine.cpp +index 8c45950..7360d06 100644 +--- a/cpp/src/IceSSL/OpenSSLEngine.cpp ++++ b/cpp/src/IceSSL/OpenSSLEngine.cpp +@@ -43,7 +43,7 @@ IceUtil::Mutex* staticMutex = 0; + int instanceCount = 0; + bool initOpenSSL = false; + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + IceUtil::Mutex* locks = 0; + #endif + +@@ -59,10 +59,10 @@ class Init + ~Init() + { + // +- // OpenSSL 1.1.0 introduces a new thread API and removes ++ // OpenSSL 1.1.0 introduces a new thread API and removes + // the need to use a custom thread callback. + // +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + CRYPTO_set_locking_callback(0); + CRYPTO_set_id_callback(0); + +@@ -84,10 +84,10 @@ extern "C" + { + + // +-// OpenSSL 1.1.0 introduces a new thread API and removes ++// OpenSSL 1.1.0 introduces a new thread API and removes + // the need to use a custom thread callback. + // +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + // + // OpenSSL mutex callback. + // +@@ -158,7 +158,7 @@ IceSSL_opensslPasswordCallback(char* buf, int size, int flag, void* userData) + DH* + IceSSL_opensslDHCallback(SSL* ssl, int /*isExport*/, int keyLength) + { +-# if OPENSSL_VERSION_NUMBER >= 0x10100000L ++# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + SSL_CTX* ctx = SSL_get_SSL_CTX(ssl); + # else + SSL_CTX* ctx = ssl->ctx; +@@ -219,7 +219,7 @@ OpenSSLEngine::OpenSSLEngine(const CommunicatorPtr& communicator) : + // + // OpenSSL 1.1.0 remove the need for library initialization and cleanup. + // +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + // + // Create the mutexes and set the callbacks. + // +@@ -326,7 +326,7 @@ OpenSSLEngine::~OpenSSLEngine() + // + // OpenSSL 1.1.0 remove the need for library initialization and cleanup. + // +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + // + // Clean up OpenSSL resources. + // +@@ -399,7 +399,7 @@ OpenSSLEngine::initialize() + "IceSSL: unable to create SSL context:\n" + sslErrors()); + } + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + int securityLevel = properties->getPropertyAsIntWithDefault(propPrefix + "SecurityLevel", -1); + if(securityLevel != -1) + { +@@ -954,7 +954,7 @@ OpenSSLEngine::parseProtocols(const StringSeq& protocols) const + SSL_METHOD* + OpenSSLEngine::getMethod(int /*protocols*/) + { +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + SSL_METHOD* meth = const_cast<SSL_METHOD*>(TLS_method()); + #else + // +diff --git a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +index d66c5eb..9f07044 100644 +--- a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp ++++ b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +@@ -36,7 +36,7 @@ using namespace IceSSL; + // + // See: http://cvs.openssl.org/chngview?cn=22569 + // +-#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x100000bfL ++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x100000bfL && !defined(LIBRESSL_VERSION_NUMBER) + namespace + { + +@@ -156,13 +156,13 @@ IceSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::B + // + // See: http://cvs.openssl.org/chngview?cn=22569 + // +-#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x100000bfL ++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x100000bfL && !defined(LIBRESSL_VERSION_NUMBER) + IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(sslMutex); + #endif + + int ret = _incoming ? SSL_accept(_ssl) : SSL_connect(_ssl); + +-#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x100000bfL ++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x100000bfL && !defined(LIBRESSL_VERSION_NUMBER) + sync.release(); + #endif + if(ret <= 0) +diff --git a/cpp/src/IceSSL/Util.cpp b/cpp/src/IceSSL/Util.cpp +index a60ee4c..50c47f3 100644 +--- a/cpp/src/IceSSL/Util.cpp ++++ b/cpp/src/IceSSL/Util.cpp +@@ -110,7 +110,7 @@ namespace + { + + # ifndef OPENSSL_NO_DH +-# if OPENSSL_VERSION_NUMBER < 0x10100000L ++# if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + + // The following arrays are predefined Diffie Hellman group parameters. + // These are known strong primes, distributed with the OpenSSL library +@@ -228,7 +228,7 @@ unsigned char dh4096_g[] = { 0x02 }; + // + // With OpenSSL 1.1.0 is no longer possible to acess the DH p and g + // data members to set the DH params. We still use the same default +-// parameters but they were converted to DER format using ++// parameters but they were converted to DER format using + // i2d_DHparams and can be restored using d2i_DHparams + + unsigned char dh512[] = +@@ -338,7 +338,7 @@ unsigned char dh4096[] = + // + // Convert a predefined parameter set into a DH value. + // +-# if OPENSSL_VERSION_NUMBER >= 0x10100000L ++# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + static DH* + convertDH(const unsigned char* buf, int len) + { +@@ -428,7 +428,7 @@ IceSSL::DHParams::get(int keyLength) + // No match found. Use one of the predefined parameter sets instead. + // + IceUtil::Mutex::Lock sync(*this); +-# if OPENSSL_VERSION_NUMBER >= 0x10100000L ++# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + if(keyLength >= 4096) + { + if(!_dh4096) diff --git a/dev-libs/Ice/files/Ice-3.6.3-no-arch-opts.patch b/dev-libs/Ice/files/Ice-3.6.3-no-arch-opts.patch new file mode 100644 index 000000000000..149a31e1dd6c --- /dev/null +++ b/dev-libs/Ice/files/Ice-3.6.3-no-arch-opts.patch @@ -0,0 +1,50 @@ +--- ice-3.6.3/cpp/config/Make.rules.Linux~ 2015-06-27 16:56:56.000000000 +0200 ++++ ice-3.6.3/cpp/config/Make.rules.Linux 2015-06-27 17:23:45.810591931 +0200 +@@ -79,19 +79,6 @@ + CXXARCHFLAGS += -mtune=v8 -pipe -Wno-deprecated -DICE_USE_MUTEX_SHARED + endif + +- # +- # Only use multilib -m32/-m64 options for amd64 arch, x32 arch can also run +- # in amd64 macines but doesn't use multilib, in this case MACHINE_TYPE will +- # be x86_64 and HOST_ARCH x32. +- # +- ifeq ($(HOST_ARCH),amd64) +- ifeq ($(LP64),yes) +- CXXARCHFLAGS += -m64 +- else +- CXXARCHFLAGS += -m32 +- endif +- endif +- + CXXFLAGS += $(CXXARCHFLAGS) -fvisibility=hidden -Wall -Werror -pthread + + # If MAXWARN is set then enable extra warnings +--- ice-3.6.3/config/Make.common.rules~ 2015-06-23 17:30:20.000000000 +0200 ++++ ice-3.6.3/config/Make.common.rules 2015-06-28 01:53:57.149666595 +0200 +@@ -101,25 +101,7 @@ + ifeq ($(LP64),) + LP64 = yes + endif +- +- # +- # x86 binaries build on x86_64 machine use 32 binsuffix +- # +- ifneq ($(STATICLIBS),yes) +- ifneq ($(LP64),yes) +- binsuffix = 32 +- endif +- endif + endif +- +- # +- # x86 builds uses 32 binsuffix +- # +- ifneq ($(STATICLIBS),yes) +- ifeq ($(findstring $(MACHINE_TYPE),i386 i486 i586 i686),$(MACHINE_TYPE)) +- binsuffix = 32 +- endif +- endif + endif + + ifeq ($(CPP11),yes) diff --git a/dev-libs/Ice/metadata.xml b/dev-libs/Ice/metadata.xml new file mode 100644 index 000000000000..c4c331cd2dd6 --- /dev/null +++ b/dev-libs/Ice/metadata.xml @@ -0,0 +1,17 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>Dessa@gmake.de</email> + <name>Robert Förster</name> + </maintainer> + <maintainer type="project"> + <email>cpp@gentoo.org</email> + </maintainer> + <longdescription lang="en"> + Ice is a C++ middleware technology with bindings for other languages. + </longdescription> + <upstream> + <remote-id type="github">zeroc-ice/ice</remote-id> + </upstream> +</pkgmetadata> |