From 5cfdcdc9cae89497ad8f0141e53bc934c7f5cef8 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Sat, 17 Dec 2022 18:58:59 -0800 Subject: [PATCH 1/2] dmd: update to 2.101.1. --- srcpkgs/dmd/files/musl.patch | 4 ++-- srcpkgs/dmd/template | 27 ++++++++++----------------- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/srcpkgs/dmd/files/musl.patch b/srcpkgs/dmd/files/musl.patch index bf41a3e49619..79b7bcd7e6d6 100644 --- a/srcpkgs/dmd/files/musl.patch +++ b/srcpkgs/dmd/files/musl.patch @@ -1,5 +1,5 @@ ---- dmd/src/dmd/link.d -+++ dmd/src/dmd/link.d +--- dmd/compiler/src/dmd/link.d ++++ dmd/compiler/src/dmd/link.d @@ -759,8 +759,7 @@ perror("unable to create pipe to linker"); return -1; diff --git a/srcpkgs/dmd/template b/srcpkgs/dmd/template index 0f6801ad1fef..3db2d1d67c7b 100644 --- a/srcpkgs/dmd/template +++ b/srcpkgs/dmd/template @@ -1,8 +1,7 @@ # Template file for 'dmd' pkgname=dmd -version=2.098.0 -revision=3 -reverts="2.100.0_1" +version=2.101.1 +revision=1 create_wrksrc=yes hostmakedepends="dmd2.091 which" makedepends="git" @@ -12,14 +11,12 @@ maintainer="streaks " license="BSL-1.0" homepage="http://www.digitalmars.com/d/2.0/" distfiles=" - https://github.com/dlang/dmd/archive/v${version}.tar.gz>dmd-${version}.tar.gz - https://github.com/dlang/druntime/archive/v${version}.tar.gz>druntime-${version}.tar.gz + https://github.com/dlang/dmd/archive/refs/tags/v${version}.tar.gz>dmd-${version}.tar.gz https://github.com/dlang/phobos/archive/v${version}.tar.gz>phobos-${version}.tar.gz http://downloads.dlang.org/releases/2.x/${version}/dmd.${version}.linux.tar.xz" -checksum="437e7abae7f747ce8a027e512d2f98f0c27badd623347141c3f6fb0834d85ad0 - f150400756c7940bc9d67a3ed7f89777e49b42a1ef2dff6f40727f83b3cea6f4 - f91c6c7f2d5683af2804a183c287bf6991b99c49692759d7844e1919ca59e974 - 1104e5e59fd47828b798d77a72be547bf086bba1d374a1855c6b5814c4db0145" +checksum="e369396dbbe4eec9311122fa24c975688b209a000bf2062a9f86b49ab2e4a7b0 + 8a275b3f46d921be87744ec80d3094421a979d6f607dbd43e88e251bbb3f503a + 58333e57ed3812077dc2f8cc8759998b3b59c9ea3dbe01571eab4b2944a84bfe" conf_files="/etc/dmd.conf" provides="d-compiler-${version}_${revision}" conflicts="dmd-bootstrap dmd2.081 dmd2.091" @@ -38,7 +35,6 @@ esac post_extract() { mv dmd-${version} dmd - mv druntime-${version} druntime mv phobos-${version} phobos } @@ -55,10 +51,7 @@ do_build() { make ${makejobs} -f posix.mak MODEL=${_archbits} TARGET_CPU=X86 ENABLE_RELEASE=1 PIC=1 dmd=${wrksrc}/dmd/generated/linux/release/$_archbits/dmd - make ${makejobs} -C docs - - cd ../druntime - make ${makejobs} -f posix.mak MODEL=${_archbits} DMD=$dmd ENABLE_RELEASE=1 PIC=1 + make ${makejobs} -C compiler/docs cd ../phobos make ${makejobs} -f posix.mak MODEL=${_archbits} DMD=$dmd ENABLE_RELEASE=1 PIC=1 @@ -96,15 +89,15 @@ libphobos_package() { license="BSL-1.0" conflicts="dmd-bootstrap" pkg_install() { - vinstall ${wrksrc}/druntime/generated/linux/release/$_archbits/libdruntime.a 644 usr/lib libdruntime.a + vinstall ${wrksrc}/dmd/generated/linux/release/$_archbits/libdruntime.a 644 usr/lib libdruntime.a vinstall ${wrksrc}/phobos/generated/linux/release/$_archbits/libphobos2.a 644 usr/lib libphobos2.a vmkdir usr/include/d cp -r ${wrksrc}/phobos/{*.d,etc,std} ${PKGDESTDIR}/usr/include/d vmkdir usr/include/d/druntime - cp -r ${wrksrc}/druntime/import ${PKGDESTDIR}/usr/include/d/druntime + cp -r ${wrksrc}/dmd/druntime/import ${PKGDESTDIR}/usr/include/d/druntime - vlicense ${wrksrc}/druntime/LICENSE.txt + vlicense ${wrksrc}/dmd/LICENSE.txt } } From 124e67fa4caba9d5cd9fca1ea2622244e67f571e Mon Sep 17 00:00:00 2001 From: oreo639 Date: Sat, 17 Dec 2022 18:59:53 -0800 Subject: [PATCH 2/2] ldc: update to 1.30.0. --- common/shlibs | 9 ++- ...4260a848c8ebad5582e27ac1e09627cdfb17.patch | 57 +++++++++++++++++++ srcpkgs/ldc/template | 8 +-- 3 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 srcpkgs/ldc/patches/54544260a848c8ebad5582e27ac1e09627cdfb17.patch diff --git a/common/shlibs b/common/shlibs index ba5c89ee3bad..11ef64e0cc7f 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2189,11 +2189,10 @@ libFcitx5Config.so.6 libfcitx5-5.0.5_1 libFcitx5GClient.so.2 fcitx5-gtk-5.0.4_1 libFcitx5Qt5DBusAddons.so.1 fcitx5-qt5-5.0.3_1 libFcitx5Qt5WidgetsAddons.so.2 fcitx5-qt5-5.0.3_1 -libdruntime-ldc-debug-shared.so.98 ldc-runtime-1.28.0_1 -libdruntime-ldc-shared.so.98 ldc-runtime-1.28.0_1 -libphobos2-ldc-shared.so.98 ldc-runtime-1.28.0_1 -libphobos2-ldc-debug-shared.so.98 ldc-runtime-1.28.0_1 -libldc-jit.so.99 ldc-runtime-1.29.0_1 +libdruntime-ldc-debug-shared.so.100 ldc-runtime-1.30.0_1 +libdruntime-ldc-shared.so.100 ldc-runtime-1.30.0_1 +libphobos2-ldc-shared.so.100 ldc-runtime-1.30.0_1 +libphobos2-ldc-debug-shared.so.100 ldc-runtime-1.30.0_1 libmarblewidget-qt5.so.28 marble5-17.12.2_1 libastro.so.2 marble5-17.12.2_1 libparrot.so.6.9.0 parrot-6.9.0_1 diff --git a/srcpkgs/ldc/patches/54544260a848c8ebad5582e27ac1e09627cdfb17.patch b/srcpkgs/ldc/patches/54544260a848c8ebad5582e27ac1e09627cdfb17.patch new file mode 100644 index 000000000000..79694372bfaa --- /dev/null +++ b/srcpkgs/ldc/patches/54544260a848c8ebad5582e27ac1e09627cdfb17.patch @@ -0,0 +1,57 @@ +From 54544260a848c8ebad5582e27ac1e09627cdfb17 Mon Sep 17 00:00:00 2001 +From: Razvan Nitu +Date: Wed, 24 Aug 2022 13:54:15 +0300 +Subject: [PATCH] Port the fix for issue 23157 (#14378) + +--- + druntime/src/core/sys/posix/sys/socket.d | 36 ++++++++++++++++++++++-- + 1 file changed, 33 insertions(+), 3 deletions(-) + +diff --git a/druntime/src/core/sys/posix/sys/socket.d b/druntime/src/core/sys/posix/sys/socket.d +index 3a7b753adff..fc5dc5d1684 100644 +--- a/runtime/druntime/src/core/sys/posix/sys/socket.d ++++ b/runtime/druntime/src/core/sys/posix/sys/socket.d +@@ -188,10 +188,40 @@ version (linux) + + extern (D) inout(ubyte)* CMSG_DATA( return scope inout(cmsghdr)* cmsg ) pure nothrow @nogc { return cast(ubyte*)( cmsg + 1 ); } + +- private inout(cmsghdr)* __cmsg_nxthdr(inout(msghdr)*, inout(cmsghdr)*) pure nothrow @nogc; +- extern (D) inout(cmsghdr)* CMSG_NXTHDR(inout(msghdr)* msg, inout(cmsghdr)* cmsg) pure nothrow @nogc ++ version (CRuntime_Musl) + { +- return __cmsg_nxthdr(msg, cmsg); ++ extern (D) ++ { ++ private size_t __CMSG_LEN(inout(cmsghdr)* cmsg) pure nothrow @nogc ++ { ++ return (cmsg.cmsg_len + size_t.sizeof -1) & cast(size_t)(~(size_t.sizeof - 1)); ++ } ++ ++ private inout(cmsghdr)* __CMSG_NEXT(inout(cmsghdr)* cmsg) pure nothrow @nogc ++ { ++ return cmsg + __CMSG_LEN(cmsg); ++ } ++ ++ private inout(msghdr)* __MHDR_END(inout(msghdr)* mhdr) pure nothrow @nogc ++ { ++ return cast(inout(msghdr)*)(mhdr.msg_control + mhdr.msg_controllen); ++ } ++ ++ inout(cmsghdr)* CMSG_NXTHDR(inout(msghdr)* msg, inout(cmsghdr)* cmsg) pure nothrow @nogc ++ { ++ return cmsg.cmsg_len < cmsghdr.sizeof || ++ __CMSG_LEN(cmsg) + cmsghdr.sizeof >= __MHDR_END(msg) - cast(inout(msghdr)*)(cmsg) ++ ? cast(inout(cmsghdr)*) null : cast(inout(cmsghdr)*) __CMSG_NEXT(cmsg); ++ } ++ } ++ } ++ else ++ { ++ private inout(cmsghdr)* __cmsg_nxthdr(inout(msghdr)*, inout(cmsghdr)*) pure nothrow @nogc; ++ extern (D) inout(cmsghdr)* CMSG_NXTHDR(inout(msghdr)* msg, inout(cmsghdr)* cmsg) pure nothrow @nogc ++ { ++ return __cmsg_nxthdr(msg, cmsg); ++ } + } + + extern (D) inout(cmsghdr)* CMSG_FIRSTHDR( inout(msghdr)* mhdr ) pure nothrow @nogc diff --git a/srcpkgs/ldc/template b/srcpkgs/ldc/template index fec8a9c80452..99d22682ce7a 100644 --- a/srcpkgs/ldc/template +++ b/srcpkgs/ldc/template @@ -1,14 +1,14 @@ # Template file for 'ldc' pkgname=ldc -version=1.28.0 -revision=2 -reverts="1.29.0_1" +version=1.30.0 +revision=1 build_style=cmake configure_args=" -DINCLUDE_INSTALL_DIR=/usr/include/dlang/ldc -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBASH_COMPLETION_COMPLETIONSDIR=/usr/share/bash-completion + -DCOMPILE_D_MODULES_SEPARATELY=ON -DC_SYSTEM_LIBS='unwind;m;pthread;rt;dl'" conf_files="/etc/ldc2.conf" hostmakedepends="dmd llvm12 perl pkg-config" @@ -22,7 +22,7 @@ license="BSD-3-Clause, BSL-1.0" homepage="https://wiki.dlang.org/LDC" changelog="https://raw.githubusercontent.com/ldc-developers/ldc/master/CHANGELOG.md" distfiles="https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz" -checksum=17fee8bb535bcb8cda0a45947526555c46c045f302a7349cc8711b254e54cf09 +checksum=fdbb376f08242d917922a6a22a773980217fafa310046fc5d6459490af23dacd nopie=yes nocross="dmd compilation fails on cross" # tests timeout on musl; also require unpackaged python3-lit