mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-lang/ats2: new package; add 0.4.2
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
1
dev-lang/ats2/Manifest
Normal file
1
dev-lang/ats2/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST ATS2-Postiats-gmp-0.4.2.tgz 4532277 BLAKE2B 3263ab8790c737a2a4f30d2acb770e4f5d3bbedd40136bbf07283541f5b6678aaba7031cf4a2e77552755e5510fcc65446dfc3499645f5c7f4c4e5bc52e8942d SHA512 cfc3f15b1365badcdce535afc7e71ffe25471f2661bdc47294b77c917049566eee4eeb8ec373f4121ad474b8528263d7b3ff8627c1f5b7f3ea7475cb95ca7597
|
||||
94
dev-lang/ats2/ats2-0.4.2.ebuild
Normal file
94
dev-lang/ats2/ats2-0.4.2.ebuild
Normal file
@@ -0,0 +1,94 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit elisp-common toolchain-funcs
|
||||
|
||||
DESCRIPTION="Functional programming language with dependent types"
|
||||
HOMEPAGE="https://www.cs.bu.edu/~hwxi/atslangweb/
|
||||
https://sourceforge.net/projects/ats2-lang/"
|
||||
SRC_URI="http://downloads.sourceforge.net/sourceforge/ats2-lang/ATS2-Postiats-gmp-${PV}.tgz"
|
||||
S="${WORKDIR}/ATS2-Postiats-gmp-${PV}"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="emacs"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/gmp:=
|
||||
emacs? ( >=app-editors/emacs-25.3:* )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i Makefile \
|
||||
-e "/^CFLAGS/s|=| = ${CFLAGS}|" \
|
||||
-e "/^LDFLAGS/s|=| = ${LDFLAGS}|" \
|
||||
-e "/^MAKE/s|=make| ?= \$(MAKE)|g" \
|
||||
-e "/^MAKEJ4/s|-j4||" \
|
||||
|| die
|
||||
|
||||
sed -i ccomp/atslib/Makefile \
|
||||
-i src/CBOOT/Makefile \
|
||||
-i utils/atscc/Makefile_build \
|
||||
-i utils/myatscc/Makefile_build \
|
||||
-e "s|ld |$(tc-getLD) |g" \
|
||||
-e "s|-O2|${CFLAGS} ${LDFLAGS}|g" \
|
||||
|| die
|
||||
|
||||
sed -i ccomp/atslib/Makefile \
|
||||
-i src/Makefile \
|
||||
-e "s|ar -r|$(tc-getAR) ${ARFLAGS} -r|g" \
|
||||
|| die
|
||||
|
||||
rm utils/emacs/flycheck-ats2.el || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 CC="$(tc-getCC)" GCC="$(tc-getCC)" CCOMP="$(tc-getCC)" all
|
||||
|
||||
if use emacs ; then
|
||||
cd utils/emacs || die
|
||||
|
||||
elisp-compile ./*.el
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
if use emacs ; then
|
||||
cd utils/emacs || die
|
||||
|
||||
elisp-install "${PN}" ./*.el{,c}
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||||
fi
|
||||
|
||||
local ats2_dir="/usr/lib/${PN}-postiats-${PV}"
|
||||
local contrib_dir="${ats2_dir}/contrib"
|
||||
|
||||
# Randomly generated.
|
||||
local libatslib="${ED}${ats2_dir}/ccomp/atslib/lib/libatslib.a"
|
||||
if [[ -f "${libatslib}" ]] ; then
|
||||
rm "${libatslib}" || die
|
||||
fi
|
||||
|
||||
# Broken symlinks.
|
||||
rm "${ED}${contrib_dir}"/*/*/SATS/DOCUGEN/Makefile.gen || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
4
dev-lang/ats2/files/50ats2-gentoo.el
Normal file
4
dev-lang/ats2/files/50ats2-gentoo.el
Normal file
@@ -0,0 +1,4 @@
|
||||
(add-to-list 'load-path "@SITELISP@")
|
||||
(autoload 'ats-mode "@SITELISP@/ats2-mode.el"
|
||||
"Major mode to edit ATS2 source code." t)
|
||||
(add-to-list 'auto-mode-alist '("\\.\\(s\\|d\\|h\\)ats\\'" . ats-mode))
|
||||
22
dev-lang/ats2/metadata.xml
Normal file
22
dev-lang/ats2/metadata.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>xgqt@gentoo.org</email>
|
||||
<name>Maciej Barć</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
ATS is a statically typed programming language that unifies implementation
|
||||
with formal specification. It is equipped with a highly expressive type
|
||||
system rooted in the framework Applied Type System, which gives the
|
||||
language its name. In particular, both dependent types and linear types are
|
||||
available in ATS. ATS2 extends ATS with an advanced template system,
|
||||
allowing functional programming to be employed in a setting where only bare
|
||||
minimal run-time support is available. In addition, the template system
|
||||
makes ATS2 highly suitable for supporting numerical computation.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">ats2-lang</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user