[-- Attachment #1: Type: text/plain, Size: 1330 bytes --] There is a new pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 6060 bytes --] From fe88276f81497b13a2cdb871a0f969a432787e1d Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Thu, 28 Apr 2022 15:07:33 -0700 Subject: [PATCH] New packages: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 150 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..d85895a1cabd --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,150 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only" +homepage="https://mercurylang.org/" +distfiles="http://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *i686*|*x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.stseg.decldebug,${_LLDS_GRADE}.gc.stseg.profdeep" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.gc.par,${_LLDS_GRADE}.gc.stseg.par" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +mercury-libs_package() { + license="custom:LGPL-2.0-only-linking-exception" + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir /usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/libgc*.so /usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + GRADE=$(usr/bin/canonical_grade --grade $GRADE) + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + vman usr/share/man/man1/mtags.1 + vlicense COPYING + vbin usr/bin/mcov + vbin usr/bin/mdb + vbin usr/bin/mdprof + vbin usr/bin/mercury_profile + vbin usr/bin/mprof + vbin usr/bin/mprof_merge_runs + vbin usr/bin/mtags + vbin usr/bin/mtc + vbin usr/bin/mtc_diff + vbin usr/bin/mtc_union + } +} + +do_install() { + vmkdir /usr/lib/mercury/lib + vmkdir /usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vlicense COPYING + vbin usr/bin/c2init + vbin usr/bin/canonical_grade + vbin usr/bin/mdemangle + vbin usr/bin/mercury_compile + vbin usr/bin/mercury_config + vbin usr/bin/mfiltercc + vbin usr/bin/mfilterjavac + vbin usr/bin/mgnuc + vbin usr/bin/mkinit + vbin usr/bin/ml + vbin usr/bin/mmake + vbin usr/bin/mmc + vcopy usr/lib/mercury/conf/Mercury.config /usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h /usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints /usr/lib/mercury/ints + vcopy usr/lib/mercury/inc /usr/lib/mercury/inc + vcopy usr/lib/mercury/ints /usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb /usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake /usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/libgc*.a /usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + GRADE=$(usr/bin/canonical_grade --grade $GRADE) + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir /usr/lib/mercury/lib/$GRADE + vmkdir /usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +}
[-- Attachment #1: Type: text/plain, Size: 299 bytes --] New comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#issuecomment-1113036149 Comment: Ah, I know how to fix the i686 failure, that's what happens when you try to use `asm_fast` as the base LLDS grade on a platform that doesn't support it.
[-- Attachment #1: Type: text/plain, Size: 1335 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 6085 bytes --] From e4723b7db623912496925078ebbb38b31fe1d75a Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Thu, 28 Apr 2022 15:07:33 -0700 Subject: [PATCH] New packages: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 152 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..4cfd6b06a209 --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,152 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only" +homepage="https://mercurylang.org/" +distfiles="http://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.stseg.decldebug,${_LLDS_GRADE}.gc.stseg.profdeep" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.gc.par,${_LLDS_GRADE}.gc.stseg.par" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +mercury-libs_package() { + license="custom:LGPL-2.0-only-linking-exception" + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir /usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/libgc*.so /usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + GRADE=$(usr/bin/canonical_grade --grade $GRADE) + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + vman usr/share/man/man1/mtags.1 + vlicense COPYING + vbin usr/bin/mcov + vbin usr/bin/mdb + vbin usr/bin/mdprof + vbin usr/bin/mercury_profile + vbin usr/bin/mprof + vbin usr/bin/mprof_merge_runs + vbin usr/bin/mtags + vbin usr/bin/mtc + vbin usr/bin/mtc_diff + vbin usr/bin/mtc_union + } +} + +do_install() { + vmkdir /usr/lib/mercury/lib + vmkdir /usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vlicense COPYING + vbin usr/bin/c2init + vbin usr/bin/canonical_grade + vbin usr/bin/mdemangle + vbin usr/bin/mercury_compile + vbin usr/bin/mercury_config + vbin usr/bin/mfiltercc + vbin usr/bin/mfilterjavac + vbin usr/bin/mgnuc + vbin usr/bin/mkinit + vbin usr/bin/ml + vbin usr/bin/mmake + vbin usr/bin/mmc + vcopy usr/lib/mercury/conf/Mercury.config /usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h /usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints /usr/lib/mercury/ints + vcopy usr/lib/mercury/inc /usr/lib/mercury/inc + vcopy usr/lib/mercury/ints /usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb /usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake /usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/libgc*.a /usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + GRADE=$(usr/bin/canonical_grade --grade $GRADE) + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir /usr/lib/mercury/lib/$GRADE + vmkdir /usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +}
[-- Attachment #1: Type: text/plain, Size: 267 bytes --] New review comment by wangp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r862286836 Comment: If you use `--enable-new-mercuryfile-struct` that's fine. I don't know how well it gets tested since it's not the default.
[-- Attachment #1: Type: text/plain, Size: 309 bytes --] New review comment by wangp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r862286673 Comment: I would remove `hlc.gc.ssdebug`. Consider adding `hlc.gc.prof` and `${_LLDS_GRADE}.gc.debug.stseg`. I suggest listing the grade components in canonical order.
[-- Attachment #1: Type: text/plain, Size: 352 bytes --] New review comment by wangp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r862287403 Comment: mdb is a trivial shell script. I think it should be in the main package. mtags depends on perl. It's pretty small and more useful than the other tools in this list. Consider moving it to the main package.
[-- Attachment #1: Type: text/plain, Size: 541 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r862310445 Comment: > I would remove `hlc.gc.ssdebug`. I use ssdebug fairly often, it's extremely useful for debugging issues that only happen in HLC, I would prefer to keep it. > Consider adding `hlc.gc.prof` and `${_LLDS_GRADE}.gc.debug.stseg`. Isn't decldebug a strict superset of debug? > I suggest listing the grade components in canonical order. Is there an actual documented canonical order?
[-- Attachment #1: Type: text/plain, Size: 281 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r862310518 Comment: I've been using `new-mercuryfile-struct` for about 7 years, it's been fine so far. I keep wondering why it's not the default yet.
[-- Attachment #1: Type: text/plain, Size: 547 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r862310445 Comment: > I would remove `hlc.gc.ssdebug`. I use ssdebug fairly often, it's extremely useful for debugging issues that only happen in HLC, I would prefer to keep it. > Consider adding `hlc.gc.prof` and `${_LLDS_GRADE}.gc.debug.stseg`. Isn't decldebug a strict superset of debug? > I suggest listing the grade components in canonical order. Is there an actual documented canonical order?
[-- Attachment #1: Type: text/plain, Size: 564 bytes --] New review comment by wangp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r862331264 Comment: Ok, keep ssdebug then. decldebug is a superset of debug but produces bigger code which is slower to compile. However, a quick check on a project shows that it's only about 6% slower to compile, less than I thought, and the runtime difference is pretty acceptable, too. So it should be fine to skip the .debug grade. The canonical order is implemented by the canonical_grade script and `mmc --output-grade-string`.
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 5978 bytes --] From f9fc72c000bcaab0639c481d3dbc0add13ca911a Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Thu, 28 Apr 2022 15:07:33 -0700 Subject: [PATCH] New packages: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 150 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..39c67e3aef0c --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,150 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only" +homepage="https://mercurylang.org/" +distfiles="http://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +mercury-libs_package() { + license="custom:LGPL-2.0-only-linking-exception" + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir /usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/libgc*.so /usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + vlicense COPYING + vbin usr/bin/mcov + vbin usr/bin/mdprof + vbin usr/bin/mercury_profile + vbin usr/bin/mprof + vbin usr/bin/mprof_merge_runs + vbin usr/bin/mtc + vbin usr/bin/mtc_diff + vbin usr/bin/mtc_union + } +} + +do_install() { + vmkdir /usr/lib/mercury/lib + vmkdir /usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + vlicense COPYING + vbin usr/bin/c2init + vbin usr/bin/canonical_grade + vbin usr/bin/mdb + vbin usr/bin/mdemangle + vbin usr/bin/mercury_compile + vbin usr/bin/mercury_config + vbin usr/bin/mfiltercc + vbin usr/bin/mfilterjavac + vbin usr/bin/mgnuc + vbin usr/bin/mkinit + vbin usr/bin/ml + vbin usr/bin/mmake + vbin usr/bin/mmc + vbin usr/bin/mtags + vcopy usr/lib/mercury/conf/Mercury.config /usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h /usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints /usr/lib/mercury/ints + vcopy usr/lib/mercury/inc /usr/lib/mercury/inc + vcopy usr/lib/mercury/ints /usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb /usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake /usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/libgc*.a /usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir /usr/lib/mercury/lib/$GRADE + vmkdir /usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +}
[-- Attachment #1: Type: text/plain, Size: 199 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r867677425 Comment: OK, I reordered the grades based on its output.
[-- Attachment #1: Type: text/plain, Size: 157 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r867677599 Comment: Moved
[-- Attachment #1: Type: text/plain, Size: 219 bytes --] New comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#issuecomment-1126968022 Comment: @wangp Is there anything else I need to change before this can be added?
[-- Attachment #1: Type: text/plain, Size: 232 bytes --] New comment by wangp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#issuecomment-1127111971 Comment: It looks okay to me. mtags requires perl at runtime, so you might need a dependency on perl.
[-- Attachment #1: Type: text/plain, Size: 325 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881051284 Comment: this does not affect the metadata on the subpkg, i think ([based on this](https://github.com/void-linux/void-packages/blob/master/common/environment/setup-subpkg/subpkg.sh))
[-- Attachment #1: Type: text/plain, Size: 184 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881052297 Comment: this should happen in do_install
[-- Attachment #1: Type: text/plain, Size: 221 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881052519 Comment: much of what's in here may not be needed once `make install` is moved
[-- Attachment #1: Type: text/plain, Size: 187 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881051905 Comment: should not be needed if this is GPL
[-- Attachment #1: Type: text/plain, Size: 206 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881051608 Comment: put this function between do_build and the subpackages
[-- Attachment #1: Type: text/plain, Size: 174 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881053955 Comment: and `DESTDIR=$DESTDIR`
[-- Attachment #1: Type: text/plain, Size: 795 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881085280 Comment: > this should happen in do_install Mercury's makefiles do a majority of their actual compilation in the `install` phase. The default rule builds the bootstrap compiler, and then `make install` actually builds the development files that this compiler will use. It's not ideal, but it's not going to change upstream. The `DESTDIR` variable to the makefile was added for the Debian packages to get around this, and is specifically to say what the build directory should be in this case, so that `install` targets that instead of the actual prefix we want to install to. This is why we can't do `make install` in `do_install`, unfortunately.
[-- Attachment #1: Type: text/plain, Size: 172 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881086298 Comment: I see. carry on then
[-- Attachment #1: Type: text/plain, Size: 225 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881052519 Comment: ~~much of what's in here may not be needed once `make install` is moved~~
[-- Attachment #1: Type: text/plain, Size: 405 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881086588 Comment: If this can't be set on the subpackage, should I set the entire license to be `GPL, custom:LGPL-2.0-only-linking-exception` then? For reference, the runtime libraries are LGPL with a static linking exception, and the compiler toolchain itself is GPL.
[-- Attachment #1: Type: text/plain, Size: 259 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881087700 Comment: yeah `GPL-2.0-only, custom:LGPL-2.0-only-linking-exception` and only install the custom one in the packages
[-- Attachment #1: Type: text/plain, Size: 194 bytes --] New review comment by leahneukirchen on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881830929 Comment: what's the rationale for these settings?
[-- Attachment #1: Type: text/plain, Size: 175 bytes --] New comment by leahneukirchen on void-packages repository https://github.com/void-linux/void-packages/pull/36905#issuecomment-1137475179 Comment: Also please rebase for CI.
[-- Attachment #1: Type: text/plain, Size: 153 bytes --] New review comment by paper42 on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881993655 Comment: https?
[-- Attachment #1: Type: text/plain, Size: 319 bytes --] New review comment by paper42 on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r881992797 Comment: We usually set $nocross to yes or set it to a reason why it can't be cross compiled. This sounds to me like this can't be cross compiled because it can't be cross compiled.
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 6165 bytes --] From 724b83c6905fe190113f3273ce010d5805dc80a6 Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Thu, 28 Apr 2022 15:07:33 -0700 Subject: [PATCH] New packages: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 151 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..f54b01628f23 --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,151 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only, custom:LGPL-2.0-only-linking-exception" +homepage="https://mercurylang.org/" +distfiles="https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + # The Mercury makefiles do most of the actual compilation in the 'install' + # rule. The 'DESTDIR' makefile variable is used to have the makefile + # install to the build directory instead, and then copy the files in + # do_install(). + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +do_install() { + vmkdir /usr/lib/mercury/lib + vmkdir /usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + vbin usr/bin/c2init + vbin usr/bin/canonical_grade + vbin usr/bin/mdb + vbin usr/bin/mdemangle + vbin usr/bin/mercury_compile + vbin usr/bin/mercury_config + vbin usr/bin/mfiltercc + vbin usr/bin/mfilterjavac + vbin usr/bin/mgnuc + vbin usr/bin/mkinit + vbin usr/bin/ml + vbin usr/bin/mmake + vbin usr/bin/mmc + vbin usr/bin/mtags + vcopy usr/lib/mercury/conf/Mercury.config /usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h /usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints /usr/lib/mercury/ints + vcopy usr/lib/mercury/inc /usr/lib/mercury/inc + vcopy usr/lib/mercury/ints /usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb /usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake /usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/libgc*.a /usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir /usr/lib/mercury/lib/$GRADE + vmkdir /usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +} + +mercury-libs_package() { + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir /usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/libgc*.so /usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + vbin usr/bin/mcov + vbin usr/bin/mdprof + vbin usr/bin/mercury_profile + vbin usr/bin/mprof + vbin usr/bin/mprof_merge_runs + vbin usr/bin/mtc + vbin usr/bin/mtc_diff + vbin usr/bin/mtc_union + } +}
[-- Attachment #1: Type: text/plain, Size: 156 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885110661 Comment: Done
[-- Attachment #1: Type: text/plain, Size: 255 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885110685 Comment: I left a note about why this happens, in case someone in the future sees it and wonders the same thing.
[-- Attachment #1: Type: text/plain, Size: 156 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885110747 Comment: Done
[-- Attachment #1: Type: text/plain, Size: 156 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885110787 Comment: Done
[-- Attachment #1: Type: text/plain, Size: 197 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885115616 Comment: I think these should not have a leading slash
[-- Attachment #1: Type: text/plain, Size: 381 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885121303 Comment: some of these could be condensed with loops, e.g.: ```sh for bin in c2init canonical_grade mdb mdemangle mercury_compile mercury_config mfiltercc mfilterjavac mgnuc mkinit ml mmake mmc mtags; do vbin usr/bin/$bin done ```
[-- Attachment #1: Type: text/plain, Size: 179 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885123064 Comment: same comment on using loops
[-- Attachment #1: Type: text/plain, Size: 197 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885115789 Comment: also should not have leading slashes, i think
[-- Attachment #1: Type: text/plain, Size: 173 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885121956 Comment: also no leading slash
[-- Attachment #1: Type: text/plain, Size: 289 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885122133 Comment: this should probably be `vmove`? `vcopy` means that the file will exist in both mercury and mercury-libs, which would make them conflict.
[-- Attachment #1: Type: text/plain, Size: 193 bytes --] New review comment by classabbyamp on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r885122208 Comment: same thing here (leading slash and vmove)
[-- Attachment #1: Type: text/plain, Size: 407 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r895065380 Comment: The mercury-libs version only copies shared libraries, and the mercury version only copies static libraries, so it should work properly I think? If there was a conflict, I would also see this when trying to install or remove the resulting packages, right?
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 6163 bytes --] From 9ab7f5071f52accdaa017772f56e3d2e0d93cc2d Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Sun, 3 Jul 2022 17:14:20 -0700 Subject: [PATCH] New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 151 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..f54b01628f23 --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,151 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only, custom:LGPL-2.0-only-linking-exception" +homepage="https://mercurylang.org/" +distfiles="https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + # The Mercury makefiles do most of the actual compilation in the 'install' + # rule. The 'DESTDIR' makefile variable is used to have the makefile + # install to the build directory instead, and then copy the files in + # do_install(). + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +do_install() { + vmkdir /usr/lib/mercury/lib + vmkdir /usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + vbin usr/bin/c2init + vbin usr/bin/canonical_grade + vbin usr/bin/mdb + vbin usr/bin/mdemangle + vbin usr/bin/mercury_compile + vbin usr/bin/mercury_config + vbin usr/bin/mfiltercc + vbin usr/bin/mfilterjavac + vbin usr/bin/mgnuc + vbin usr/bin/mkinit + vbin usr/bin/ml + vbin usr/bin/mmake + vbin usr/bin/mmc + vbin usr/bin/mtags + vcopy usr/lib/mercury/conf/Mercury.config /usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h /usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints /usr/lib/mercury/ints + vcopy usr/lib/mercury/inc /usr/lib/mercury/inc + vcopy usr/lib/mercury/ints /usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb /usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake /usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/libgc*.a /usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir /usr/lib/mercury/lib/$GRADE + vmkdir /usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +} + +mercury-libs_package() { + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir /usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/libgc*.so /usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir /usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + vbin usr/bin/mcov + vbin usr/bin/mdprof + vbin usr/bin/mercury_profile + vbin usr/bin/mprof + vbin usr/bin/mprof_merge_runs + vbin usr/bin/mtc + vbin usr/bin/mtc_diff + vbin usr/bin/mtc_union + } +}
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 5902 bytes --] From 05e077b7f9404c2b7cdbe2337a1c5870fa37125b Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Sun, 3 Jul 2022 17:14:20 -0700 Subject: [PATCH] New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 135 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..1534ceb03b8f --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,135 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only, custom:LGPL-2.0-only-linking-exception" +homepage="https://mercurylang.org/" +distfiles="https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + # The Mercury makefiles do most of the actual compilation in the 'install' + # rule. The 'DESTDIR' makefile variable is used to have the makefile + # install to the build directory instead, and then copy the files in + # do_install(). + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +do_install() { + vmkdir usr/lib/mercury/lib + vmkdir usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + for BIN in c2init canonical_grade mdb mdemangle mercury_compile mercury_config mfiltercc mfilterjavac mgnuc mkinit ml mmake mmc mtags ; do + vbin usr/bin/$BIN + done + vcopy usr/lib/mercury/conf/Mercury.config usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/inc usr/lib/mercury/inc + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/libgc*.a usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir usr/lib/mercury/lib/$GRADE + vmkdir usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +} + +mercury-libs_package() { + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/libgc*.so usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + for BIN in mcov mdprof mercury_profile mprof mprof_merge_runs mtc mtc_diff mtc_union ; do + vbin usr/bin/$BIN + done + } +}
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 5902 bytes --] From da570c8ec767dad60184d9ac39a3831aec37823b Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Sun, 3 Jul 2022 17:14:20 -0700 Subject: [PATCH] New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 135 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..1534ceb03b8f --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,135 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only, custom:LGPL-2.0-only-linking-exception" +homepage="https://mercurylang.org/" +distfiles="https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + # The Mercury makefiles do most of the actual compilation in the 'install' + # rule. The 'DESTDIR' makefile variable is used to have the makefile + # install to the build directory instead, and then copy the files in + # do_install(). + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +do_install() { + vmkdir usr/lib/mercury/lib + vmkdir usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + for BIN in c2init canonical_grade mdb mdemangle mercury_compile mercury_config mfiltercc mfilterjavac mgnuc mkinit ml mmake mmc mtags ; do + vbin usr/bin/$BIN + done + vcopy usr/lib/mercury/conf/Mercury.config usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/inc usr/lib/mercury/inc + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/libgc*.a usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir usr/lib/mercury/lib/$GRADE + vmkdir usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so /usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +} + +mercury-libs_package() { + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/libgc*.so usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + for BIN in mcov mdprof mercury_profile mprof mprof_merge_runs mtc mtc_diff mtc_union ; do + vbin usr/bin/$BIN + done + } +}
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 5901 bytes --] From 7d6e5b014ea4a8d11ec279f6a02e657b858d192b Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Sun, 3 Jul 2022 17:14:20 -0700 Subject: [PATCH] New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 135 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..261c0b6a4121 --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,135 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only, custom:LGPL-2.0-only-linking-exception" +homepage="https://mercurylang.org/" +distfiles="https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + # The Mercury makefiles do most of the actual compilation in the 'install' + # rule. The 'DESTDIR' makefile variable is used to have the makefile + # install to the build directory instead, and then copy the files in + # do_install(). + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +do_install() { + vmkdir usr/lib/mercury/lib + vmkdir usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + for BIN in c2init canonical_grade mdb mdemangle mercury_compile mercury_config mfiltercc mfilterjavac mgnuc mkinit ml mmake mmc mtags ; do + vbin usr/bin/$BIN + done + vcopy usr/lib/mercury/conf/Mercury.config usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/inc usr/lib/mercury/inc + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/libgc*.a usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir usr/lib/mercury/lib/$GRADE + vmkdir usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +} + +mercury-libs_package() { + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/libgc*.so usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + for BIN in mcov mdprof mercury_profile mprof mprof_merge_runs mtc mtc_diff mtc_union ; do + vbin usr/bin/$BIN + done + } +}
[-- Attachment #1: Type: text/plain, Size: 156 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r912560260 Comment: Done
[-- Attachment #1: Type: text/plain, Size: 156 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r912560265 Comment: Done
[-- Attachment #1: Type: text/plain, Size: 156 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r912560272 Comment: Done
[-- Attachment #1: Type: text/plain, Size: 244 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r912560292 Comment: Removed leading slash. Is my comment above applicable? Or should this still change to vmove?
[-- Attachment #1: Type: text/plain, Size: 157 bytes --] New review comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#discussion_r912560299 Comment: Done.
[-- Attachment #1: Type: text/plain, Size: 265 bytes --] New comment by leahneukirchen on void-packages repository https://github.com/void-linux/void-packages/pull/36905#issuecomment-1189517111 Comment: I tried to remove the noverifyrdeps, but it fails not finding `libpar_gc.so` and I can't actually see it. Any ideas?
[-- Attachment #1: Type: text/plain, Size: 665 bytes --] New comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#issuecomment-1193014761 Comment: > I tried to remove the noverifyrdeps, but it fails not finding `libpar_gc.so` and I can't actually see it. Any ideas? It should be copied by the `usr/lib/mercury/lib/libgc*.so` vcopy. I had a bunch of issues with the `verifyrdeps` and `verifydeps` for `libgc` and its derivatives, but I didn't think it was important to solve in particular because Mercury has a patched version of `libgc` which is not compatible with regular Boehm GC (also why it's installed to a "mercury" directory instead of to `/usr/lib`).
[-- Attachment #1: Type: text/plain, Size: 721 bytes --] New comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#issuecomment-1193023910 Comment: > > I tried to remove the noverifyrdeps, but it fails not finding `libpar_gc.so` and I can't actually see it. Any ideas? > > It should be copied by the `usr/lib/mercury/lib/libgc*.so` vcopy. > > I had a bunch of issues with the `verifyrdeps` and `verifydeps` for `libgc` and its derivatives, but I didn't think it was important to solve in particular because Mercury has a patched version of `libgc` which is not compatible with regular Boehm GC (also why it's installed to a "mercury" directory instead of to `/usr/lib`). Have reread this, I see the problem now :)
[-- Attachment #1: Type: text/plain, Size: 723 bytes --] New comment by AlaskanEmily on void-packages repository https://github.com/void-linux/void-packages/pull/36905#issuecomment-1193023910 Comment: > > I tried to remove the noverifyrdeps, but it fails not finding `libpar_gc.so` and I can't actually see it. Any ideas? > > It should be copied by the `usr/lib/mercury/lib/libgc*.so` vcopy. > > I had a bunch of issues with the `verifyrdeps` and `verifydeps` for `libgc` and its derivatives, but I didn't think it was important to solve in particular because Mercury has a patched version of `libgc` which is not compatible with regular Boehm GC (also why it's installed to a "mercury" directory instead of to `/usr/lib`). Having reread this, I see the problem now :)
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 5903 bytes --] From ad69cd0ccbe74295ea30c71ad89054682f4d13b2 Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Sun, 3 Jul 2022 17:14:20 -0700 Subject: [PATCH] New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 135 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..fe8960440aee --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,135 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only, custom:LGPL-2.0-only-linking-exception" +homepage="https://mercurylang.org/" +distfiles="https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + # The Mercury makefiles do most of the actual compilation in the 'install' + # rule. The 'DESTDIR' makefile variable is used to have the makefile + # install to the build directory instead, and then copy the files in + # do_install(). + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +do_install() { + vmkdir usr/lib/mercury/lib + vmkdir usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + for BIN in c2init canonical_grade mdb mdemangle mercury_compile mercury_config mfiltercc mfilterjavac mgnuc mkinit ml mmake mmc mtags ; do + vbin usr/bin/$BIN + done + vcopy usr/lib/mercury/conf/Mercury.config usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/inc usr/lib/mercury/inc + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/lib*gc*.a usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir usr/lib/mercury/lib/$GRADE + vmkdir usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +} + +mercury-libs_package() { + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/lib*gc*.so usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + for BIN in mcov mdprof mercury_profile mprof mprof_merge_runs mtc mtc_diff mtc_union ; do + vbin usr/bin/$BIN + done + } +}
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 5903 bytes --] From 31d3286076b398c89bb6435cfc14533906863458 Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Sun, 3 Jul 2022 17:14:20 -0700 Subject: [PATCH] New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 135 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..fe8960440aee --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,135 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only, custom:LGPL-2.0-only-linking-exception" +homepage="https://mercurylang.org/" +distfiles="https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + # The Mercury makefiles do most of the actual compilation in the 'install' + # rule. The 'DESTDIR' makefile variable is used to have the makefile + # install to the build directory instead, and then copy the files in + # do_install(). + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +do_install() { + vmkdir usr/lib/mercury/lib + vmkdir usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + for BIN in c2init canonical_grade mdb mdemangle mercury_compile mercury_config mfiltercc mfilterjavac mgnuc mkinit ml mmake mmc mtags ; do + vbin usr/bin/$BIN + done + vcopy usr/lib/mercury/conf/Mercury.config usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/inc usr/lib/mercury/inc + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/lib*gc*.a usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir usr/lib/mercury/lib/$GRADE + vmkdir usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +} + +mercury-libs_package() { + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/lib*gc*.so usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + for BIN in mcov mdprof mercury_profile mprof mprof_merge_runs mtc mtc_diff mtc_union ; do + vbin usr/bin/$BIN + done + } +}
[-- Attachment #1: Type: text/plain, Size: 388 bytes --] New comment by leahneukirchen on void-packages repository https://github.com/void-linux/void-packages/pull/36905#issuecomment-1199249786 Comment: Ok, let's finish this up. Remove noshlibprovides and shlib_requires from the main package, and noverifyrdeps and noshlibprovides from the subpackages. mercury will depend on mercury-libs which depends on libc so that's fine. LGTM else.
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 5903 bytes --] From ad69cd0ccbe74295ea30c71ad89054682f4d13b2 Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Sun, 3 Jul 2022 17:14:20 -0700 Subject: [PATCH] New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 135 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..fe8960440aee --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,135 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only, custom:LGPL-2.0-only-linking-exception" +homepage="https://mercurylang.org/" +distfiles="https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes +noshlibprovides=yes +shlib_requires="libc.so.6" + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + # The Mercury makefiles do most of the actual compilation in the 'install' + # rule. The 'DESTDIR' makefile variable is used to have the makefile + # install to the build directory instead, and then copy the files in + # do_install(). + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +do_install() { + vmkdir usr/lib/mercury/lib + vmkdir usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + for BIN in c2init canonical_grade mdb mdemangle mercury_compile mercury_config mfiltercc mfilterjavac mgnuc mkinit ml mmake mmc mtags ; do + vbin usr/bin/$BIN + done + vcopy usr/lib/mercury/conf/Mercury.config usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/inc usr/lib/mercury/inc + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/lib*gc*.a usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir usr/lib/mercury/lib/$GRADE + vmkdir usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +} + +mercury-libs_package() { + short_desc+=" - runtime libraries" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vmkdir usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/lib*gc*.so usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + noverifyrdeps=yes + noshlibprovides=yes + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + for BIN in mcov mdprof mercury_profile mprof mprof_merge_runs mtc mtc_diff mtc_union ; do + vbin usr/bin/$BIN + done + } +}
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 5770 bytes --] From bf1864a701a7933b7c986dfd6b909d41eb3084fa Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Sun, 3 Jul 2022 17:14:20 -0700 Subject: [PATCH] New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 129 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..4681edc6c4f2 --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,129 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only, custom:LGPL-2.0-only-linking-exception" +homepage="https://mercurylang.org/" +distfiles="https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + # The Mercury makefiles do most of the actual compilation in the 'install' + # rule. The 'DESTDIR' makefile variable is used to have the makefile + # install to the build directory instead, and then copy the files in + # do_install(). + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +do_install() { + vmkdir usr/lib/mercury/lib + vmkdir usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + for BIN in c2init canonical_grade mdb mdemangle mercury_compile mercury_config mfiltercc mfilterjavac mgnuc mkinit ml mmake mmc mtags ; do + vbin usr/bin/$BIN + done + vcopy usr/lib/mercury/conf/Mercury.config usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/inc usr/lib/mercury/inc + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/lib*gc*.a usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir usr/lib/mercury/lib/$GRADE + vmkdir usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +} + +mercury-libs_package() { + short_desc+=" - runtime libraries" + pkg_install() { + vmkdir usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/lib*gc*.so usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + for BIN in mcov mdprof mercury_profile mprof mprof_merge_runs mtc mtc_diff mtc_union ; do + vbin usr/bin/$BIN + done + } +}
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --] There is an updated pull request by AlaskanEmily against master on the void-packages repository https://github.com/AlaskanEmily/void-packages master https://github.com/void-linux/void-packages/pull/36905 New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly. A patch file from https://github.com/void-linux/void-packages/pull/36905.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-36905.patch --] [-- Type: text/x-diff, Size: 5770 bytes --] From 4abab5085a3607ca5999f7b30c45f3dfbb2caf2e Mon Sep 17 00:00:00 2001 From: AlaskanEmily <emily@alaskanemily.net> Date: Sun, 3 Jul 2022 17:14:20 -0700 Subject: [PATCH] New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 --- srcpkgs/mercury-libs | 1 + srcpkgs/mercury-tools | 1 + srcpkgs/mercury/template | 129 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 120000 srcpkgs/mercury-libs create mode 120000 srcpkgs/mercury-tools create mode 100644 srcpkgs/mercury/template diff --git a/srcpkgs/mercury-libs b/srcpkgs/mercury-libs new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-libs @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury-tools b/srcpkgs/mercury-tools new file mode 120000 index 000000000000..899d2a75a9aa --- /dev/null +++ b/srcpkgs/mercury-tools @@ -0,0 +1 @@ +mercury \ No newline at end of file diff --git a/srcpkgs/mercury/template b/srcpkgs/mercury/template new file mode 100644 index 000000000000..4681edc6c4f2 --- /dev/null +++ b/srcpkgs/mercury/template @@ -0,0 +1,129 @@ +# Template file for 'mercury' +pkgname=mercury +version=22.01 +revision=1 +wrksrc="mercury-srcdist-${version}" +hostmakedepends="flex bison gettext texinfo" +depends="mercury-libs>=${version}_${revision}" +short_desc="Logic/Functional Programming Language" +maintainer="Emily McDonough <emily@alaskanemily.net>" +license="GPL-2.0-only, custom:LGPL-2.0-only-linking-exception" +homepage="https://mercurylang.org/" +distfiles="https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.xz" +checksum=4ab0734aaa66808c91ffe7f54c7d818bdc4f0247aa255932e1e3d50610db4150 +nocross="Mercury cannot be cross-compiled to different architectures" +noverifyrdeps=yes + +# asm_fast is preferable, but does not work on all architectures. +case "$XBPS_MACHINE" in + *x86_64*|*arm*) + _LLDS_GRADE=asm_fast ;; + *i686*) + _LLDS_GRADE=reg ;; + *) + _LLDS_GRADE=none ;; +esac + +_LIBGRADES="hlc.gc,hlc.gc.ssdebug,hlc.gc.memprof,${_LLDS_GRADE}.gc,${_LLDS_GRADE}.gc.stseg,${_LLDS_GRADE}.gc.decldebug.stseg,${_LLDS_GRADE}.gc.profdeep.stseg" + +# The parallel grades have some issues on musl systems. +if [ "$XBPS_LIBC" != musl ] ; then + _LIBGRADES="${_LIBGRADES},hlc.par.gc,${_LLDS_GRADE}.par.gc.stseg" +fi + +do_configure() { + # Prefer the low-level C grade as default, unless it is none. + if [ "${_LLDS_GRADE}" != "none" ] ; then + DEFAULT_GRADES="${_LLDS_GRADE}.gc.stseg" + else + DEFAULT_GRADES=hlc.gc + fi + + ./configure --prefix=/usr/ \ + --enable-new-mercuryfile-struct \ + --enable-gc-mmap --enable-gc-munmap \ + --without-readline --with-editline \ + --enable-libgrades="${_LIBGRADES}" --with-llds-base-grade="${_LLDS_GRADE}" --with-default-grade="${DEFAULT_GRADES}" +} + +do_build() { + # The Mercury makefiles do most of the actual compilation in the 'install' + # rule. The 'DESTDIR' makefile variable is used to have the makefile + # install to the build directory instead, and then copy the files in + # do_install(). + make PARALLEL="${makejobs}" DESTDIR=$(pwd) + make PARALLEL="${makejobs}" DESTDIR=$(pwd) install +} + +do_install() { + vmkdir usr/lib/mercury/lib + vmkdir usr/lib/mercury/conf + vman usr/share/man/man1/c2init.1 + vman usr/share/man/man1/mdb.1 + vman usr/share/man/man1/mercury_config.1 + vman usr/share/man/man1/mgnuc.1 + vman usr/share/man/man1/ml.1 + vman usr/share/man/man1/mmake.1 + vman usr/share/man/man1/mmc.1 + vman usr/share/man/man1/mtags.1 + for BIN in c2init canonical_grade mdb mdemangle mercury_compile mercury_config mfiltercc mfilterjavac mgnuc mkinit ml mmake mmc mtags ; do + vbin usr/bin/$BIN + done + vcopy usr/lib/mercury/conf/Mercury.config usr/lib/mercury/conf/Mercury.config + vcopy usr/lib/mercury/conf/mercury_conf.h usr/lib/mercury/conf/mercury_conf.h + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/inc usr/lib/mercury/inc + vcopy usr/lib/mercury/ints usr/lib/mercury/ints + vcopy usr/lib/mercury/mdb usr/lib/mercury/mdb + vcopy usr/lib/mercury/mmake usr/lib/mercury/mmake + vcopy usr/lib/mercury/lib/lib*gc*.a usr/lib/mercury/lib + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Skip pregen, we don't need that after bootstrapping. + if test "$GRADE" != hlc.gc.pregen ; then + vmkdir usr/lib/mercury/lib/$GRADE + vmkdir usr/lib/mercury/modules/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/inc usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.a usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/modules/$GRADE/*.init usr/lib/mercury/modules/$GRADE + # Copy the shared libraries for profiling and debug grades. + case $GRADE in + *prof*|*debug*) + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + fi + done +} + +mercury-libs_package() { + short_desc+=" - runtime libraries" + pkg_install() { + vmkdir usr/lib/mercury/lib + vcopy usr/lib/mercury/lib/lib*gc*.so usr/lib/mercury/lib + vlicense COPYING.LIB + for GRADE in $(echo $_LIBGRADES | sed 's/,/ /g') ; do + # Ignore profiling and debug grades for the runtime libraries. + # Also skip pregen, we don't need that after bootstrapping. + case $GRADE in + *prof*|*debug*|hlc.gc.pregen) + ;; + *) + vmkdir usr/lib/mercury/lib/$GRADE + vcopy usr/lib/mercury/lib/$GRADE/lib*.so usr/lib/mercury/lib/$GRADE + ;; + esac + done + } +} + +mercury-tools_package() { + depends="mercury-libs>=${version}_${revision}" + short_desc+=" - extra tools" + pkg_install() { + vman usr/share/man/man1/mprof.1 + vman usr/share/man/man1/mprof_merge_runs.1 + for BIN in mcov mdprof mercury_profile mprof mprof_merge_runs mtc mtc_diff mtc_union ; do + vbin usr/bin/$BIN + done + } +}
[-- Attachment #1: Type: text/plain, Size: 1186 bytes --] There's a merged pull request on the void-packages repository New package: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22.01_1 https://github.com/void-linux/void-packages/pull/36905 Description: #### Testing the changes - I tested the changes in this PR: **YES** #### New package - This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES** <!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration and test at least one native build and, if supported, at least one cross build. Ignore this section if this PR is not skipping CI. --> #### Local build testing - I built this PR locally for my native architecture, (x86_64-glibc) - I built this PR locally for these architectures (if supported. mark crossbuilds): - x86_64-musl - i686-glibc I have marked the parallel toolchain options disabled for musl, as in the last those have had issues and I have not tested that configuration enough to be sure it works properly.
[-- Attachment #1: Type: text/plain, Size: 188 bytes --] New comment by leahneukirchen on void-packages repository https://github.com/void-linux/void-packages/pull/36905#issuecomment-1202607494 Comment: Thanks a lot for holding up with us. :)