From e617a3844155716a2805bf472f6d74a850e676a7 Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Sun, 21 Feb 2021 11:15:13 +1100 Subject: [PATCH 1/3] New package: zeroc-mcpp-2.7.2.14 --- .../zeroc-mcpp/patches/Makefile-install.diff | 18 ++++++++++++++++ srcpkgs/zeroc-mcpp/template | 21 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 srcpkgs/zeroc-mcpp/patches/Makefile-install.diff create mode 100644 srcpkgs/zeroc-mcpp/template diff --git a/srcpkgs/zeroc-mcpp/patches/Makefile-install.diff b/srcpkgs/zeroc-mcpp/patches/Makefile-install.diff new file mode 100644 index 00000000000..0c3e248e414 --- /dev/null +++ b/srcpkgs/zeroc-mcpp/patches/Makefile-install.diff @@ -0,0 +1,18 @@ +diff --git a/Makefile b/Makefile +index bfbf543..9fa6deb 100644 +--- a/Makefile ++++ b/Makefile +@@ -55,9 +55,11 @@ $(LIBDIR)/libmcpp.a: $(OBJS) + $(AR) rcs $(LIBDIR)/libmcpp.a $(OBJS) + + install: $(LIBDIR)/libmcpp.a +- @mkdir -p $(PREFIX)/$(LIBDIR) +- cp $(LIBDIR)/libmcpp.a $(PREFIX)/$(LIBDIR) ++ install -Dm644 $(LIBDIR)/libmcpp.a $(DESTDIR)$(PREFIX)/$(LIBDIR)/libmcpp.a ++ install -Dm644 mcpp_lib.h $(DESTDIR)$(PREFIX)/include/mcpp_lib.h ++ install -m644 mcpp_out.h $(DESTDIR)$(PREFIX)/include/mcpp_out.h + ++.PHONY: clean + clean: + rm -f $(OBJS) + rm -rf $(LIBDIR) diff --git a/srcpkgs/zeroc-mcpp/template b/srcpkgs/zeroc-mcpp/template new file mode 100644 index 00000000000..497813ba0e0 --- /dev/null +++ b/srcpkgs/zeroc-mcpp/template @@ -0,0 +1,21 @@ +# Template file for 'zeroc-mcpp' +pkgname=zeroc-mcpp +version=2.7.2.14 +revision=1 +wrksrc="mcpp-${version}" +build_style=gnu-makefile +make_build_args="LIBDIR=lib" +make_install_args="LIBDIR=lib" +short_desc="Simplified fork of mcpp from ZeroC, for building ICE" +maintainer="a dinosaur " +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 +patch_args="-Np1" + +post_install() { + vlicense LICENSE +} From 653d53460f121545ebe697fa1b8691fff69c9b61 Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Sun, 21 Feb 2021 11:17:00 +1100 Subject: [PATCH 2/3] 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). --- common/shlibs | 29 +++++----- srcpkgs/Ice/patches/archs.patch | 62 -------------------- srcpkgs/Ice/patches/fix-musl.patch | 24 ++++---- srcpkgs/Ice/patches/libressl.patch | 37 ------------ srcpkgs/Ice/template | 90 ++++++++++-------------------- 5 files changed, 58 insertions(+), 184 deletions(-) delete mode 100644 srcpkgs/Ice/patches/archs.patch delete mode 100644 srcpkgs/Ice/patches/libressl.patch diff --git a/common/shlibs b/common/shlibs index ce0e74cc74e..d32c1c5bad3 100644 --- a/common/shlibs +++ b/common/shlibs @@ -961,19 +961,22 @@ libmcpp.so.0 libmcpp-2.7.2_1 libjitterentropy.so.3 jitterentropy-3.0.0_1 libkdecorations2.so.5 kdecoration-5.8.4_1 libkdecorations2private.so.7 kdecoration-5.18.0_1 -libGlacier2.so.35 libIce-3.5.0_1 -libIce.so.35 libIce-3.5.0_1 -libIceSSL.so.35 libIce-3.5.0_1 -libIceUtil.so.35 libIce-3.5.0_1 -libIceStormService.so.35 libIce-3.5.0_1 -libIceStorm.so.35 libIce-3.5.0_1 -libFreeze.so.35 libIce-3.5.0_1 -libSlice.so.35 libIce-3.5.0_1 -libIceBox.so.35 libIce-3.5.0_1 -libIceGrid.so.35 libIce-3.5.0_1 -libIcePatch2.so.35 libIce-3.5.0_1 -libIceDB.so.35 libIce-3.5.0_1 -libIceXML.so.35 libIce-3.5.0_1 +libGlacier2.so.37 libIce-3.7.5_1 +libGlacier2CryptPermissionsVerifier.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 libvdpau.so.1 libvdpau-0.4.1_1 libgsm.so.1 libgsm-1.0.13_13 libcgroup.so.1 libcgroup-0.37.1_1 diff --git a/srcpkgs/Ice/patches/archs.patch b/srcpkgs/Ice/patches/archs.patch deleted file mode 100644 index 2c1f9c5d7e7..00000000000 --- a/srcpkgs/Ice/patches/archs.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- cpp/include/IceUtil/Config.h -+++ cpp/include/IceUtil/Config.h -@@ -20,31 +20,28 @@ - # include - #endif - --#if defined(__i386) || defined(_M_IX86) || defined(__x86_64) || \ -- defined(_M_X64) || defined(_M_IA64) || defined(__alpha__) || \ -- defined(__ARMEL__) || defined(_M_ARM_FP) || \ -- defined(__MIPSEL__) || (defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN)) --# define ICE_LITTLE_ENDIAN --#elif defined(__sparc) || defined(__sparc__) || defined(__hppa) || \ -- defined(__ppc__) || defined(__powerpc) || defined(_ARCH_COM) || \ -- defined(__MIPSEB__) || (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) --# define ICE_BIG_ENDIAN --#else --# error "Unknown architecture" -+#if defined(HAVE_ENDIAN_H) -+# include -+# if __BYTE_ORDER==__LITTLE_ENDIAN -+# define ICE_LITTLE_ENDIAN -+# elif __BYTE_ORDER==__BIG_ENDIAN -+# define ICE_BIG_ENDIAN -+# else -+# error "Unknown endian type" -+# endif - #endif - - // - // 32 or 64 bit mode? - // --#if defined(__sun) && (defined(__sparcv9) || defined(__x86_64)) || \ -- defined(__linux) && defined(__x86_64) || \ -- defined(__hppa) && defined(__LP64__) || \ -- defined(_ARCH_COM) && defined(__64BIT__) || \ -- defined(__alpha__) || \ -- defined(_WIN64) --# define ICE_64 --#else --# define ICE_32 -+#if defined(HAVE_LIMITS_H) -+# include -+# include -+# if __WORDSIZE == 64 -+# define ICE_64 -+# else -+# define ICE_32 -+# endif - #endif - - // ---- cpp/src/IceUtil/Makefile -+++ cpp/src/IceUtil/Makefile -@@ -41,7 +41,7 @@ - include $(top_srcdir)/config/Make.rules - - CPPFLAGS := $(CPPFLAGS) $(ICEUTIL_FLAGS) -DICE_UTIL_API_EXPORTS -I.. --LINKWITH := $(ICEUTIL_OS_LIBS) -+LINKWITH := $(ICEUTIL_OS_LIBS) -lrt - - ifeq ($(STATICLIBS),yes) - $(libdir)/$(LIBNAME): $(OBJS) diff --git a/srcpkgs/Ice/patches/fix-musl.patch b/srcpkgs/Ice/patches/fix-musl.patch index c03824b70f5..8f2efa550ea 100644 --- a/srcpkgs/Ice/patches/fix-musl.patch +++ b/srcpkgs/Ice/patches/fix-musl.patch @@ -1,11 +1,13 @@ ---- cpp/include/IceUtil/Mutex.h.orig 2016-03-27 17:49:17.579001730 +0200 -+++ cpp/include/IceUtil/Mutex.h 2016-03-27 17:51:56.591989829 +0200 -@@ -231,7 +231,7 @@ Mutex::init(MutexProtocol - // Enable mutex error checking in debug builds - // - #ifndef NDEBUG --#if defined(__linux) && !defined(__USE_UNIX98) -+#if defined(__linux) && !defined(__USE_UNIX98) && defined(PTHREAD_MUTEX_ERRORCHECK_NP) - rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP); - #else - rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); +diff --git a/cpp/src/IceUtil/UtilException.cpp b/cpp/src/IceUtil/UtilException.cpp +index 266942bb3d..3ef50c30b0 100644 +--- a/cpp/src/IceUtil/UtilException.cpp ++++ b/cpp/src/IceUtil/UtilException.cpp +@@ -43,7 +43,7 @@ + # endif + # endif + +-# if !defined(_AIX) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) && !defined(ICE_STATIC_LIBS) ++# if !defined(_AIX) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) && !defined(ICE_STATIC_LIBS) && defined(__GLIBC__) + # include + # include + # include diff --git a/srcpkgs/Ice/patches/libressl.patch b/srcpkgs/Ice/patches/libressl.patch deleted file mode 100644 index 6b56ecc63e4..00000000000 --- a/srcpkgs/Ice/patches/libressl.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- cpp/src/Glacier2/CryptPermissionsVerifierI.cpp.orig 2014-07-15 16:06:05.470463382 +0200 -+++ cpp/src/Glacier2/CryptPermissionsVerifierI.cpp 2014-07-15 16:09:18.591065235 +0200 -@@ -8,6 +8,7 @@ - // ********************************************************************** - - #include -+#include - #include - - using namespace std; ---- cpp/src/IceGrid/RegistryI.cpp.orig 2014-07-15 16:10:22.943599009 +0200 -+++ cpp/src/IceGrid/RegistryI.cpp 2014-07-15 16:10:40.950748368 +0200 -@@ -40,6 +40,7 @@ - - #include - -+#include - #include // For crypt() passwords - - #include ---- cpp/src/IceSSL/Instance.cpp.orig 2014-07-15 15:59:44.430302828 +0200 -+++ cpp/src/IceSSL/Instance.cpp 2014-07-15 16:02:59.590921603 +0200 -@@ -274,12 +274,14 @@ IceSSL::Instance::Instance(const Communi - string entropyDaemon = properties->getProperty("IceSSL.EntropyDaemon"); - if(!entropyDaemon.empty()) - { -+#ifdef HAVE_SSL_RAND_EGD - if(RAND_egd(entropyDaemon.c_str()) <= 0) - { - PluginInitializationException ex(__FILE__, __LINE__); - ex.reason = "IceSSL: EGD failure using file " + entropyDaemon; - throw ex; - } -+#endif - } - #endif - if(!RAND_status()) diff --git a/srcpkgs/Ice/template b/srcpkgs/Ice/template index d27bb350c74..b9092cd5639 100644 --- a/srcpkgs/Ice/template +++ b/srcpkgs/Ice/template @@ -1,86 +1,54 @@ # Template file for 'Ice' pkgname=Ice -version=3.5.1 -revision=22 -build_wrksrc=cpp -makedepends="zlib-devel bzip2-devel mcpp-devel db-devel expat-devel libressl-devel" +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="Orphaned " -license="GPL-2.0-only, ICE" -homepage="http://www.zeroc.com" -distfiles="${homepage}/download/Ice/${version%.*}/${pkgname}-${version}.tar.gz" -checksum=989e51194c6adadbd156da3288e37bad847b93b3b876502e83033b70493af392 -python_version=2 #unverified +maintainer="a dinosaur " +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 and slice2freeze + # Cross build requires the host's slice2cpp hostmakedepends+=" Ice" fi do_configure() { - sed -i -e "s|^#OPTIMIZE|OPTIMIZE|" config/Make.rules - sed -i -e "s|x)/config|x)/lib/Ice/config|" config/Make.rules - sed -i '/^embedded_runpath_prefix*/d' config/Make.rules - sed -i -e 's|x)/man/man1|x)/share/man/man1|' config/Make.rules - sed -i -e "s|test demo||" Makefile + # 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 - sed -i -e 's|__GNUC__|__GLIBC__|' src/IceUtil/Exception.cpp - sed -i -e 's|PTHREAD_MUTEX_RECURSIVE_NP|PTHREAD_MUTEX_RECURSIVE|' src/IceUtil/RecMutex.cpp - sed -i -e 's|sys/poll\.h|poll.h|' src/Ice/*.h + # 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 - # Patch to find our $CXX and always use our $CXXFLAGS - sed -i config/Make.rules.Linux \ - -e "s|= g++|= ${CXX}|" \ - -e "s|ifeq (\$(CXX),g++)|ifeq (\$(CXX),${CXX})|" \ - -e "/CXXARCHFLAGS\s+=/ s| -m.*|${CXXFLAGS}|" \ - -e "s|\$(CXX) -shared|${CXX} -shared|" \ - -e "s|-rdynamic|-rdynamic -Wl,-rpath,\$(libdir) ${LDFLAGS}|" \ - -e "s|-Werror|-Wno-error|" - # Fix cross building if [ "$CROSS_BUILD" ]; then - # Use host's slice2cpp and slice2freeze - sed -i config/Make.rules \ - -e 's|$(SLICE2CPP) $(SLICE2CPPFLAGS)|LD_LIBRARY_PATH=/usr/lib /usr/bin/slice2cpp $(SLICE2CPPFLAGS)|' - find . -name Makefile -exec sed -i "{}" \ - -e 's|^\(\s\)$(SLICE2FREEZE)|\1LD_LIBRARY_PATH=/usr/lib /usr/bin/slice2freeze|' \ - -e '/SLICE2FREEZECMD\s=/ s|$(SLICE2FREEZE)|LD_LIBRARY_PATH=/usr/lib /usr/bin/slice2freeze|' \ - \; + # Use host's slice2cpp + vsed -i config/Make.project.rules \ + -e 's/$($6_path) |/|/' \ + -e 's|$(Q)$($6_path)|$(Q)/usr/bin/slice2cpp|' fi } -do_build() { - export CXXFLAGS+=" -fPIC -DPIC" - make prefix=/usr ${makejobs} -} - -do_install() { - case "$XBPS_MACHINE" in - x86_64*) - vmkdir usr/lib - ln -s lib ${DESTDIR}/usr/lib64 - ;; - esac - make prefix=${DESTDIR}/usr 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} +post_install() { vlicense ICE_LICENSE - vdoc CHANGES - vdoc RELEASE_NOTES - - # remove unused cruft - rm -f ${DESTDIR}/usr/lib/*.class } libIce_package() { short_desc+=" - runtime libraries" pkg_install() { vmove "usr/lib/*.so.*" - vmove usr/lib/Ice } } From 9b63932037aaa22405002479c449694d5afc4ee3 Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Sun, 21 Feb 2021 14:57:53 +1100 Subject: [PATCH 3/3] mumble: revbump for Ice-3.7.5 --- srcpkgs/mumble/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/mumble/template b/srcpkgs/mumble/template index d63df7bd4c1..db23e747ecf 100644 --- a/srcpkgs/mumble/template +++ b/srcpkgs/mumble/template @@ -1,7 +1,7 @@ # Template file for 'mumble' pkgname=mumble version=1.3.4 -revision=2 +revision=3 build_style=qmake configure_args="CONFIG+=bundled-celt CONFIG+=no-bundled-opus CONFIG+=no-update CONFIG+=no-bundled-speex CONFIG+=no-g15 CONFIG+=no-xevie CONFIG+=pulseaudio