summaryrefslogtreecommitdiff
path: root/dev-lang/ats2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-20 03:52:46 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-20 03:52:46 +0100
commit9346d46d1a9e0399ca3a4d3eb40689d0daa58ebc (patch)
tree39d9d519350a5b2361fb1597751a1c82fc047b89 /dev-lang/ats2
parent67efaff61522aeb024152ab6cddf7c40ffacb530 (diff)
gentoo auto-resync : 20:10:2023 - 03:52:46
Diffstat (limited to 'dev-lang/ats2')
-rw-r--r--dev-lang/ats2/Manifest4
-rw-r--r--dev-lang/ats2/ats2-0.4.2.ebuild94
-rw-r--r--dev-lang/ats2/files/50ats2-gentoo.el4
-rw-r--r--dev-lang/ats2/metadata.xml22
4 files changed, 124 insertions, 0 deletions
diff --git a/dev-lang/ats2/Manifest b/dev-lang/ats2/Manifest
new file mode 100644
index 000000000000..60a902c4fe02
--- /dev/null
+++ b/dev-lang/ats2/Manifest
@@ -0,0 +1,4 @@
+AUX 50ats2-gentoo.el 200 BLAKE2B 4e07607ab27c87422e5f770746b3d077ca8c2564cb8a3a3bd79411c900dd41a2c1d79df1200b1fad19e8356fc22fb2250ea3f2aac95fa3e5ef9e696b397b59d7 SHA512 06c7550aca601a813dda7f3cc29642479cae27e4f605edd19bb3c41b5f76afdb84723bc81754d067eadd5e6074699969557459bfaf4200d3ecff8dc1867e4635
+DIST ATS2-Postiats-gmp-0.4.2.tgz 4532277 BLAKE2B 3263ab8790c737a2a4f30d2acb770e4f5d3bbedd40136bbf07283541f5b6678aaba7031cf4a2e77552755e5510fcc65446dfc3499645f5c7f4c4e5bc52e8942d SHA512 cfc3f15b1365badcdce535afc7e71ffe25471f2661bdc47294b77c917049566eee4eeb8ec373f4121ad474b8528263d7b3ff8627c1f5b7f3ea7475cb95ca7597
+EBUILD ats2-0.4.2.ebuild 1985 BLAKE2B f2aac7797075569c6dd1e2abaa603de96dcb554e071d63f3930312ff99b653f5edd8c77b3188e81228100bddaf71cde22a29f99996be44beabc61a140cd73db3 SHA512 7b838c2ff4bd88e12b7961fefd0169b0e94bdfe50f33da61a6632bd4823547ab072488151566f6c5061af6d11c4d676b9b57ad3a3d4f32db74ebab7e858fb758
+MISC metadata.xml 980 BLAKE2B ba3d935ee5cd32484046247817252585e5f1e8fc4fa502c7689ef90437674a02ca32506c59fadf6489ea43fb8ed769fece9554f7ab32b3e2774e382e66ae5cfc SHA512 86d721588d9c4f1e352c9b4cde43df44db269fb5189ed951244e57f7fe0c86fbc561ede3b5d09ab4b4a50b5fd036eac813e7619e462b2a9d382ec49176229380
diff --git a/dev-lang/ats2/ats2-0.4.2.ebuild b/dev-lang/ats2/ats2-0.4.2.ebuild
new file mode 100644
index 000000000000..e4f7eae958af
--- /dev/null
+++ b/dev-lang/ats2/ats2-0.4.2.ebuild
@@ -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
+}
diff --git a/dev-lang/ats2/files/50ats2-gentoo.el b/dev-lang/ats2/files/50ats2-gentoo.el
new file mode 100644
index 000000000000..2171d0efefa7
--- /dev/null
+++ b/dev-lang/ats2/files/50ats2-gentoo.el
@@ -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))
diff --git a/dev-lang/ats2/metadata.xml b/dev-lang/ats2/metadata.xml
new file mode 100644
index 000000000000..4410a5199d1c
--- /dev/null
+++ b/dev-lang/ats2/metadata.xml
@@ -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>