Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New packages: mercury-22.01_1, mercury-libs-22.01_1, mercury-tools-22…
….01_1
- Loading branch information
1 parent
aa2c2db
commit e4723b7
Showing
3 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mercury |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mercury |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |