]> jturnerusa.dev Git - ebuilds/commitdiff
dev-lisp/ecls: packaged a snapshot recent enough to build SBCL!
authorJohn Turner <jturner.usa+gentoo@gmail.com>
Fri, 16 Dec 2022 05:47:21 +0000 (00:47 -0500)
committerJohn Turner <jturner.usa+gentoo@gmail.com>
Fri, 16 Dec 2022 05:47:21 +0000 (00:47 -0500)
dev-lisp/ecls/Manifest [new file with mode: 0644]
dev-lisp/ecls/ecls-21.2.1_p20221211.ebuild [new file with mode: 0644]
dev-lisp/ecls/files/README.gentoo [new file with mode: 0644]
dev-lisp/ecls/files/ecls-16.1.3-build.patch [new file with mode: 0644]
dev-lisp/ecls/files/ecls-16.1.3-headers-gentoo.patch [new file with mode: 0644]
dev-lisp/ecls/files/ecls-21.2.1-donotcompressinfo.patch [new file with mode: 0644]
dev-lisp/ecls/files/ecls-21.2.1-ldflags.patch [new file with mode: 0644]
dev-lisp/ecls/metadata.xml [new file with mode: 0644]

diff --git a/dev-lisp/ecls/Manifest b/dev-lisp/ecls/Manifest
new file mode 100644 (file)
index 0000000..a24b07d
--- /dev/null
@@ -0,0 +1 @@
+DIST ecl-21.2.1_p20221211.tar.gz 8039002 BLAKE2B 3ef801b9aff621c7229d0f7902371021ff1a841bae2e69d0e51875f9b38b98e386ffaeba67aa5e952060c0ca0025863fe8f37a0b0b01a4e0dd0984c743dce74a SHA512 f9f42826754af15940bbe0c6385ee0d8c1e90ada077f20e37be098a2369113a343e527dca24be7080c0fc78272eb6c03fe70bdd61aa798a767dfe87e29db55fe
diff --git a/dev-lisp/ecls/ecls-21.2.1_p20221211.ebuild b/dev-lisp/ecls/ecls-21.2.1_p20221211.ebuild
new file mode 100644 (file)
index 0000000..b71dda9
--- /dev/null
@@ -0,0 +1,90 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit readme.gentoo-r1
+
+MY_P=ecl-${PV}
+DESCRIPTION="ECL is an embeddable Common Lisp implementation"
+HOMEPAGE="https://common-lisp.net/project/ecl/"
+COMMIT="7175e592bddf0a612c8f1e17a5a2dc7659223b60"
+SRC_URI="https://gitlab.com/embeddable-common-lisp/ecl/-/archive/${COMMIT}/ecl-${COMMIT}.tar.gz
+       -> ecl-${PV}.tar.gz"
+S="${WORKDIR}/ecl-${COMMIT}"
+
+LICENSE="BSD-2 LGPL-2.1+"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="cxx debug emacs gengc precisegc cpu_flags_x86_sse +threads +unicode X"
+# test phase only works if ecls already installed #516876
+RESTRICT="test"
+
+RDEPEND="dev-libs/gmp:0=
+               dev-libs/libffi:=
+               dev-libs/libatomic_ops
+               >=dev-libs/boehm-gc-7.1[threads?]
+               >=dev-lisp/asdf-2.33-r3:="
+DEPEND="${RDEPEND}
+               app-text/texi2html
+               emacs? ( >=app-editors/emacs-23.1:* >=app-eselect/eselect-emacs-1.12 )"
+
+DOCS=( README.md CHANGELOG )
+
+# We don't need the ldflags patch since upstream fixed the makefile
+# to respect LDFLAGS.
+PATCHES=(
+       "${FILESDIR}/${PN}-16.1.3-headers-gentoo.patch"
+       "${FILESDIR}/${PN}-16.1.3-build.patch"
+       "${FILESDIR}/${PN}-21.2.1-donotcompressinfo.patch"
+)
+
+src_prepare() {
+       default
+       cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
+}
+
+src_configure() {
+       econf \
+               --enable-gmp=system \
+               --enable-boehm=system \
+               --with-dffi \
+               --enable-libatomic=system \
+               --with-defsystem \
+               $(use_with cxx) \
+               $(use_enable gengc) \
+               $(use_enable precisegc) \
+               $(use_with debug debug-cflags) \
+               $(use_with cpu_flags_x86_sse sse) \
+               $(use_enable threads) \
+               $(use_enable unicode) \
+               $(use_with X x)
+}
+
+src_compile() {
+       if use emacs; then
+               local ETAGS=$(eselect --brief etags list | sed -ne '/emacs/{p;q}')
+               [[ -n ${ETAGS} ]] || die "No etags implementation found"
+               pushd build > /dev/null || die
+               emake ETAGS=${ETAGS} TAGS
+               popd > /dev/null || die
+       else
+               touch build/TAGS
+       fi
+
+       emake
+}
+
+src_install() {
+       default
+
+       readme.gentoo_create_doc
+       pushd build/doc > /dev/null || die
+       newman ecl.man ecl.1
+       newman ecl-config.man ecl-config.1
+       popd > /dev/null || die
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+}
diff --git a/dev-lisp/ecls/files/README.gentoo b/dev-lisp/ecls/files/README.gentoo
new file mode 100644 (file)
index 0000000..c95b6cb
--- /dev/null
@@ -0,0 +1,13 @@
+-*- outline -*-
+
+Gentoo GNU/Linux specific notes for ECL
+---------------------------------------
+
+  * The Gentoo port includes a patch to ECL's installed header file (ech.h) so
+    that TRUE and FALSE are not redefined if they're already included from
+    elsewhere. This makes it easier to use ECL with other software which defines
+    those C preprocesser symbols (eg. glib-2.0).
+
+If you encounter any problems or have suggestions, use https://bugs.gentoo.org/.
+Please don't bother the upstream authors unless you are absolutely certain it is
+not Gentoo-related.
diff --git a/dev-lisp/ecls/files/ecls-16.1.3-build.patch b/dev-lisp/ecls/files/ecls-16.1.3-build.patch
new file mode 100644 (file)
index 0000000..ff7d6cd
--- /dev/null
@@ -0,0 +1,10 @@
+diff -r -U2 ecl-16.1.3.orig/src/c/printer/write_sse.d ecl-16.1.3/src/c/printer/write_sse.d
+--- ecl-16.1.3.orig/src/c/printer/write_sse.d  2016-12-19 17:25:00.000000000 +0700
++++ ecl-16.1.3/src/c/printer/write_sse.d       2016-12-19 19:20:01.863563607 +0700
+@@ -13,4 +13,6 @@
+  */
++#include <ecl/config.h>
++
+ #ifdef ECL_SSE2
+ #include <ecl/ecl.h>
diff --git a/dev-lisp/ecls/files/ecls-16.1.3-headers-gentoo.patch b/dev-lisp/ecls/files/ecls-16.1.3-headers-gentoo.patch
new file mode 100644 (file)
index 0000000..10802aa
--- /dev/null
@@ -0,0 +1,15 @@
+diff -r -U2 ecl-16.1.3.orig/src/h/object.h ecl-16.1.3/src/h/object.h
+--- ecl-16.1.3.orig/src/h/object.h     2016-12-19 17:25:00.000000000 +0700
++++ ecl-16.1.3/src/h/object.h  2016-12-19 19:22:21.147557750 +0700
+@@ -26,6 +26,11 @@
+ */
++#ifndef TRUE
+ #define TRUE            1       /*  boolean true value  */
++#endif
++
++#ifndef FALSE
+ #define FALSE           0       /*  boolean false value  */
++#endif
+ #if !defined(__cplusplus) && !defined(bool)
diff --git a/dev-lisp/ecls/files/ecls-21.2.1-donotcompressinfo.patch b/dev-lisp/ecls/files/ecls-21.2.1-donotcompressinfo.patch
new file mode 100644 (file)
index 0000000..722e5dc
--- /dev/null
@@ -0,0 +1,35 @@
+diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
+index 5660f41..c2aadbe 100644
+--- a/src/doc/Makefile.in
++++ b/src/doc/Makefile.in
+@@ -15,7 +15,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_INFO = @INSTALL_INFO@
+ mkinstalldirs = $(top_srcdir)/bdwgc/install-sh -d
+-INFO_FILE = ecl.info.gz
++INFO_FILE = ecl.info
+ MAKEINFO = @MAKEINFO@
+ MANUAL_MAKE_TARGET = @MANUAL_MAKE_TARGET@
+ MANUAL_INSTALL_TARGET = @MANUAL_INSTALL_TARGET@
+diff --git a/src/doc/manual/Makefile b/src/doc/manual/Makefile
+index f82c287..2ff67e0 100644
+--- a/src/doc/manual/Makefile
++++ b/src/doc/manual/Makefile
+@@ -5,15 +5,14 @@ FILES= *.txi */*.txi figures/*
+ all: pdf info html
+ pdf: manual.pdf
+-info: ecl.info.gz
++info: ecl.info
+ html: html/index.html
+ manual.pdf: $(FILES)
+       texi2pdf manual.txi
+-ecl.info.gz: $(FILES)
++ecl.info: $(FILES)
+       $(MAKEINFO) --no-split manual.txi
+-      gzip < ecl.info > ecl.info.gz
+ html/index.html: $(FILES)
+       $(MAKEINFO) --html --css-include=ecl.css --split=section manual.txi
diff --git a/dev-lisp/ecls/files/ecls-21.2.1-ldflags.patch b/dev-lisp/ecls/files/ecls-21.2.1-ldflags.patch
new file mode 100644 (file)
index 0000000..5ac4cc5
--- /dev/null
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/723162
+
+--- ecl-21.2.1/src/c/Makefile.in
++++ ecl-21.2.1/src/c/Makefile.in
+@@ -104,7 +104,7 @@
+ $(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list.h
+       if test -f ../CROSS-DPP; then touch dpp; else \
+-      $(TRUE_CC) -I$(srcdir) -I@true_builddir@ -I./ $(srcdir)/dpp.c @CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@ -o $@ ; \
++      $(TRUE_CC) -I$(srcdir) -I@true_builddir@ -I./ $(srcdir)/dpp.c @CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@ @LDFLAGS@ -o $@ ; \
+       fi
+ $(OBJS): $(DPP)
diff --git a/dev-lisp/ecls/metadata.xml b/dev-lisp/ecls/metadata.xml
new file mode 100644 (file)
index 0000000..ec56a70
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="project">
+               <email>common-lisp@gentoo.org</email>
+               <name>Gentoo Common Lisp Project</name>
+       </maintainer>
+       <longdescription>
+       ECL (Embeddable Common Lisp) is an implementation of the Common Lisp language as
+       described in the X3J13 Ansi specification, featuring CLOS (Common Lisp Object
+       System), conditions, loops, etc, plus a translator to C, which can produce
+       standalone executables.
+       </longdescription>
+       <use>
+               <flag name="gengc">Use generational garbage collection (experimental)</flag>
+               <flag name="precisegc">Use type information during garbage collection (experimental)</flag>
+       </use>
+       <upstream>
+               <remote-id type="sourceforge">ecls</remote-id>
+       </upstream>
+</pkgmetadata>