Github messages for voidlinux
 help / color / mirror / Atom feed
From: ScrelliCopter <ScrelliCopter@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [RFC] mumble: build umurmur without Ice rpc support
Date: Fri, 19 Feb 2021 02:37:56 +0100	[thread overview]
Message-ID: <20210219013756.q9H6d6mv4YkLXbhqJ__nrcAGMize62MKG_KiVrW9LjQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28422@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 5002 bytes --]

New comment by ScrelliCopter on void-packages repository

https://github.com/void-linux/void-packages/pull/28422#issuecomment-781753855

Comment:
@Johnnynator 

> Did you have any more progress so far?

Hiya, sorry I got caught up with other things and left this hanging.

I'll share what I was able to get working,

First, upstream mcpp is abandonware and is missing features newer versions of Ice need to build. There are supposedly patches to the official mcpp that allow it to work but I couldn't see links to any (I'm guessing they live in distros), instead I tried packaging ZeroC's official stripped down library only version.

```
# Template file for 'zeroc-mcpp'
pkgname=zeroc-mcpp
version=2.7.2.14
revision=1
wrksrc="mcpp-${version}"
build_style=gnu-makefile
short_desc="Simplified fork of mcpp from ZeroC, for building ICE"
maintainer="a dinosaur <nick@a-dinosaur.com>"
license="BSD-2-Clause"
homepage="https://github.com/zeroc-ice/mcpp"
distfiles="https://github.com/zeroc-ice/mcpp/archive/v${version}.tar.gz"
checksum=1a426cf2d513ffd66634384d5445dcce1aac83be1789a56044013eab8ca8ffff
nostrip=yes
conflicts=mcpp-devel

post_patch() {
	vsed 's|LIBDIR = lib64|LIBDIR = lib|' -i Makefile
}

do_install() {
	vinstall mcpp_lib.h 644 usr/include
	vinstall mcpp_out.h 644 usr/include
	vinstall lib/libmcpp.a 644 usr/lib
	vlicense LICENSE
}
```

Then I was able to modify the existing Ice template for 3.7.5. All of the patches had completely bit-rotted, I salvaged one that was still relevant but the rest had to be thrown away, so musl and other archs would need to be tested. I got to the point where `./xbps-src pkg Ice` completes sucessfully but I haven't really tested and there are some issues like the main `Ice` package having an annoying infinitely recursing `/usr/lib/lib` symlink (I'm not sure if this problem is with Ice's complicated build scripts or if my clone of void-packages is cursed, cus this isn't the firs time this has happened to me). I haven't had the chance to test building Mumble with it just yet.

```
# 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=${DESTDIR}/usr OPTIMIZE=yes USR_DIR_INSTALL=yes NOTEST=yes CONFIGS=shared CONFIGS+=cpp11-shared"
make_install_args="LANGUAGES=cpp prefix=${DESTDIR}/usr"
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

if [ "$CROSS_BUILD" ]; then
	# Cross build requires the host's slice2cpp and slice2freeze
	hostmakedepends+=" Ice"
fi

do_configure() {
	# Disable building tests
	vsed 's|include \$(top_srcdir)/config/Make.tests.rules||' -i config/Make.rules

	# Simple fixes for musl libc instead of a proper patch
	vsed -e 's|sys/poll\.h|poll.h|' -i cpp/src/Ice/Network.h cpp/src/Ice/Selector.h

	# Patch to find our $CXX and always use our $CXXFLAGS
	vsed -e '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

	vsed 's|lib64|lib|' -i scripts/Util.py
}

pre_install() {
	case "$XBPS_MACHINE" in
	x86_64*)
		vmkdir usr/lib
		ln -s lib ${DESTDIR}/usr/lib64
		;;
	esac
}

post_install() {
	[ -h ${DESTDIR}/usr/lib64 ] && rm -f ${DESTDIR}/usr/lib64

	#mv ${DESTDIR}/usr/slice ${DESTDIR}/usr/share
	#rm ${DESTDIR}/usr/LICENSE ${DESTDIR}/usr/ICE_LICENSE
	#rm ${DESTDIR}/usr/CHANGES ${DESTDIR}/usr/RELEASE_NOTES
	#cd ${wrksrc}
	vlicense ICE_LICENSE
	#vdoc "CHANGELOG-*.md"

	# remove unused cruft
	#rm -f ${DESTDIR}/usr/lib/*.class
}

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"
	}
}
```

It appears the new shlibs should be:

```
libGlacier2.so.37 libIce-3.7.5_1
libIce.so.37 libIce-3.7.5_1
libIceSSL.so.37 libIce-3.7.5_1
libIceUtil.so.37 libIce-3.7.5_1
libIceStormService.so.37 libIce-3.7.5_1
libIceStorm.so.37 libIce-3.7.5_1
libFreeze.so.37 libIce-3.7.5_1
libSlice.so.37 libIce-3.7.5_1
libIceBox.so.37 libIce-3.7.5_1
libIceGrid.so.37 libIce-3.7.5_1
libIcePatch2.so.37 libIce-3.7.5_1
libIceDB.so.37 libIce-3.7.5_1
libIceXML.so.37 libIce-3.7.5_1
libIceDiscovery.so.37 libIce-3.7.5_1
libIceLocatorDiscovery.so.37 libIce-3.7.5_1
libGlacier2CryptPermissionsVerifier.so.37 libIce-3.7.5_1
```

  parent reply	other threads:[~2021-02-19  1:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 23:52 [PR PATCH] " Johnnynator
2021-02-03 12:01 ` ScrelliCopter
2021-02-17 22:39 ` Johnnynator
2021-02-19  1:37 ` ScrelliCopter [this message]
2021-02-20 21:46 ` ScrelliCopter
2021-02-22  9:22 ` [PR PATCH] [Closed]: " Johnnynator

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210219013756.q9H6d6mv4YkLXbhqJ__nrcAGMize62MKG_KiVrW9LjQ@z \
    --to=screllicopter@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).