void-packages/srcpkgs/Ice/template
a dinosaur 25bc7512a1 Ice: update to 3.7.5
Continuation of my work at #28422

Upstream mcpp is abandonware and is missing features newer versions of Ice
need to build. There are supposedly patches applicable to the official mcpp
that allows it to work but I couldn't see links to any (I'm guessing they live
in distros). Instead I tried packaging ZeroC's officially maintained stripped
down library only version (see previous commit e617a384).

Tests have been disabled because they take a disgustingly long time to build
and have to be hand blacklisted to the ones that don't fail on each platform.
I tested this package by building and running Murmur from the `mumble` package.

Almost all of the patches had completely bit-rotted, I salvaged a few that was
still relevant but the rest had to be thrown away. I made the changes
necessary to cross-compile to aarch64-musl but the result untested as I don't
have any exotic systems to test with (`mumble` was built for aarch64-musl
as well).
2021-02-22 10:21:46 +01:00

62 lines
1.7 KiB
Bash

# Template file for 'Ice'
pkgname=Ice
version=3.7.5
revision=1
wrksrc="ice-${version}"
build_style=gnu-makefile
make_build_args="LANGUAGES=cpp prefix=/usr OPTIMIZE=yes
USR_DIR_INSTALL=yes CONFIGS=shared CONFIGS+=cpp11-shared"
make_install_args="LANGUAGES=cpp prefix=/usr lib-suffix="
makedepends="zlib-devel bzip2-devel zeroc-mcpp db-devel expat-devel
libressl-devel lmdb-devel editline-devel"
short_desc="Internet Communications Engine (Ice)"
maintainer="a dinosaur <nick@a-dinosaur.com>"
license="GPL-2.0-only, custom:ICE"
homepage="https://www.zeroc.com"
distfiles="https://github.com/zeroc-ice/ice/archive/v${version}.tar.gz"
checksum=36bf45591a95e6ee7216153d45d8eca05ff00c1da35608f0c400e6ddc8049da9
patch_args="-Np1"
if [ "$CROSS_BUILD" ]; then
# Cross build requires the host's slice2cpp
hostmakedepends+=" Ice"
fi
do_configure() {
# Disable building tests
vsed 's|include \$(top_srcdir)/config/Make.tests.rules||' -i config/Make.rules
# Disable errors on warnings
vsed 's|-Werror|-Wno-error|' -i config/Make.rules.Linux
# Patch to fix finding editline
vsed 's|-ledit|-leditline|' -i config/Make.rules.Linux
vsed 's|editline/readline.h|editline.h|' -i cpp/src/IceStorm/Parser.cpp cpp/src/IceGrid/Parser.cpp
if [ "$CROSS_BUILD" ]; then
# Use host's slice2cpp
vsed -i config/Make.project.rules \
-e 's/$($6_path) |/|/' \
-e 's|$(Q)$($6_path)|$(Q)/usr/bin/slice2cpp|'
fi
}
post_install() {
vlicense ICE_LICENSE
}
libIce_package() {
short_desc+=" - runtime libraries"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
Ice-devel_package() {
depends="libIce>=${version}_${revision} Ice>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
}
}