summaryrefslogtreecommitdiff
path: root/dev-lang/helium
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-10-13 22:11:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-10-13 22:11:03 +0100
commit2929788def9a92c1eb237eed93fbdb0c02838bbf (patch)
tree166b01591366d3479084ea774c888bc84aaa8d4f /dev-lang/helium
parentab499d7cfb9ad23e83cf7a4f5052bdf1b4c42030 (diff)
Revert "gentoo resync : 13.10.2019"
This reverts commit ab499d7cfb9ad23e83cf7a4f5052bdf1b4c42030.
Diffstat (limited to 'dev-lang/helium')
-rw-r--r--dev-lang/helium/Manifest5
-rw-r--r--dev-lang/helium/files/helium-1.6-respect-cflags-ldflags-nostrip.patch59
-rw-r--r--dev-lang/helium/files/helium-wrapper-1.631
-rw-r--r--dev-lang/helium/helium-1.6.ebuild106
4 files changed, 201 insertions, 0 deletions
diff --git a/dev-lang/helium/Manifest b/dev-lang/helium/Manifest
index e9be40e3b24c..2ceec46b774c 100644
--- a/dev-lang/helium/Manifest
+++ b/dev-lang/helium/Manifest
@@ -1,4 +1,9 @@
+AUX helium-1.6-respect-cflags-ldflags-nostrip.patch 1847 BLAKE2B a2c6a0d7282bed6d48e24c852e052d29983a1f60ff63f11a9da7ea5c19cb7dde3c6ac40cc03213130ed0060f48923dc513faffabaf98c3b3f61b744d5946b5d0 SHA512 cd3f176f618cc32bb4feb1b693e9b281e388897380172c85645b478d6be79b164e57754b5c7cb58bc55b956644323900bb6bca5bfa74b28857a69f9eeeb52635
AUX helium-1.8.1-ghc-7.10.patch 2459 BLAKE2B 0719a5f5308c6eac8a86a4b8c060da15d8fed9530504597b3a1cb427f95626fc2277ac689cc0626aee4851481946827e13e8eb645ce5d09c4ab33b02dff10e06 SHA512 fd63893965fefce259d01a464e95ee081dd1d46d36a2ae2901b541e14fc5a5eca9f44fb96de58775e0ca2d4b758d40bfb4f6acc746f6a8c98e3c552c04513531
+AUX helium-wrapper-1.6 549 BLAKE2B d7a863f904114a830e27e6367ab18573e047f0681ff81ff2e7abb8592fc47868a58c5997b01795792ad6dd6b5db62eedfe2cfc393fbe4aff2556fd608deec417 SHA512 254fc560106914ca992ff6318f6a69c3a284f54791eed55ec1a332123b09a6fc840f66caf3af977fcb3a9ee0019e825819d22e26747f40a3c11eb5f8fbf382f6
+DIST helium-1.6-ghc.patch.bz2 34579 BLAKE2B a2454589721e32a45e2adca41a4ba3bd0c17ecc9f1616aa276e590e56491f9b2e5b89bf0ed33624931edf4a72f24201245cd0873c8ea2448a3996ee6d1d8fd94 SHA512 ac86750a98d3c87cb00e8777ad0e5a838df9d87ebdd8540d1c5a297a8488c810acbecf4d665ef7754da0f99729785f48fb77d24fc09f3c963fe972e06dc952c8
+DIST helium-1.6-src.tar.gz 960254 BLAKE2B db7a23b6d18f3b19c024857a043aaee31837b81bd67c3133a566a21ab8615f3bc019322f3ca08437e3acdbb092a60d41a9162ff95026052caaf2da1bd777ae47 SHA512 f102c5a4f669cb0b7fecdf3efdf9dacf0cddb97e9bf5cbdebd0801169802dbfefbe3de08d3f36c1c66a3839a3b080e241840f5135eea40860a91157815026a95
DIST helium-1.8.1.tar.gz 774509 BLAKE2B 05e28d1140cd48925a2c4d06c5c152e06879389d666d54b0c5d7592453489f8e2bbaa8e7c20dbd9d72fe57a3f9651bffa05d156a32e0208e41ef0e78599353fa SHA512 4523d7323251354ea9f4fd0f6f5a112659119bef2fc0c790bb139cdcdf25e7f740ae4c7d584d0c93aabc3baaace8be49931808c59ad9133b81a64ae115e0f9b9
+EBUILD helium-1.6.ebuild 3774 BLAKE2B 4e18cc461c6a6a626fe0e7831989a614431a1e043202bf468731265b5fd757260a7381f6a5bb1f8d884f16272dadcd42288b2208e490a0c6b70d53b243865f72 SHA512 9f2e0e63a2acdf65a710acb7cf6a1e03a25bfa09b9a730cad8c0a094fafa901dd7743dfabc1d60edce1fcc01b7a4b1b8f8e7ae8c9e78673aa697b7813c4215b4
EBUILD helium-1.8.1.ebuild 847 BLAKE2B 4ea659e1e7b35cb12c7f9d0d44ac078c153c8b512f6f5d10de3509dc4e99ac5dcf90b0477e7f1cd445b69fb091e0e7dd29b7333cf5a88bd854e6ec4ab8082641 SHA512 9e166e032150b3767cd2b481994f294eba930957eebfce80547dc32746f12cf5aaf5e0511b55c494cddcf68e32528e93eb5f3b97ccfad7e6018746a30b573e13
MISC metadata.xml 335 BLAKE2B 580c038ef02e919f05c44bd88f47536d878f86cf2e96746c03821d098e1e6e6fff1b8dbdd646026f011cc397b02f58ec3fd3e72a7e6fff6627e34c4015ef7c57 SHA512 df03893e771bad584ee6374bdef22799b039850c413fd7475224c77398f5a218097eec64908273db7326bd6312487b9cc50611e0da687b4a7b5c0070594309cc
diff --git a/dev-lang/helium/files/helium-1.6-respect-cflags-ldflags-nostrip.patch b/dev-lang/helium/files/helium-1.6-respect-cflags-ldflags-nostrip.patch
new file mode 100644
index 000000000000..6c035ad3b8fc
--- /dev/null
+++ b/dev-lang/helium/files/helium-1.6-respect-cflags-ldflags-nostrip.patch
@@ -0,0 +1,59 @@
+Original report: https://bugs.gentoo.org/attachment.cgi?id=244509
+
+The patch is not ideal as lvm/src/configure runs
+compiler tests without those flags enabled, but
+they are broken anyways.
+
+Added CFLAGS, LDFLAGS, remover STRIP call in C part of lvm.
+diff --git a/lvm/src/configure b/lvm/src/configure
+index 9aa1a1d..2789828 100755
+--- a/helium-1.6/lvm/src/configure
++++ b/helium-1.6/lvm/src/configure
+@@ -647,7 +647,7 @@ fi
+ echo "CC=$ccomp" >> makefile
+ echo "LINK=$link" >> makefile
+ echo "STRIP=$strip" >> makefile
+-echo "LINKOPTS=$cclinkopts" >> makefile
++echo "LINKOPTS=$cclinkopts \$(LDFLAGS)" >> makefile
+ echo "EXE=$exe" >> makefile
+ echo "DLL=$dll" >> makefile
+ echo "CP=cp" >> makefile
+@@ -662,7 +662,7 @@ case "$config" in
+ echo "CONFIGPATH=../config" >> makefile;;
+ esac
+
+-echo "CCOPTS=$cccompopts -I\$(CONFIGPATH)" >> makefile
++echo "CCOPTS=$cccompopts -I\$(CONFIGPATH) \$(CFLAGS)" >> makefile
+
+ rm -f tst$exe hasgot.c *.obj
+
+diff --git a/lvm/src/lib/makefile b/lvm/src/lib/makefile
+index d9a0004..78cce0f 100644
+--- a/helium-1.6/lvm/src/lib/makefile
++++ b/helium-1.6/lvm/src/lib/makefile
+@@ -55,7 +55,6 @@ OBJS = $(SRCS:.hs=.o)
+ # The main target
+ $(MAIN)$(EXE): $(OBJS)
+ $(HC) -o $@ $(HC_OPTS) $(OBJS)
+- $(STRIP) $@
+
+ common/ghc/Special.hi: common/ghc/Special.hs
+ $(HC) -c $< -cpp -fglasgow-exts $(HC_OPTS)
+diff --git a/lvm/src/runtime/makefile b/lvm/src/runtime/makefile
+index 310a7b6..bde3550 100644
+--- a/helium-1.6/lvm/src/runtime/makefile
++++ b/helium-1.6/lvm/src/runtime/makefile
+@@ -47,11 +47,10 @@ OBJS = $(SRCS:.c=.o)
+
+
+ #lvmrun$(EXE): $(OBJS)
+-# $(LINK) -o $@ $(LINKOPT) $(OBJS) -g
++# $(LINK) -o $@ $(OBJS) -g $(LINKOPT)
+
+ lvmrun$(EXE): $(OBJS)
+- $(LINK) -o $@ $(LINKOPT) $(OBJS)
+- $(STRIP) $@
++ $(LINK) -o $@ $(OBJS) $(LINKOPT)
+
+ core/evaluator.o: core/evaluator.c
+ $(CC) -o $@ -c $< $(CCOPT_FAST)
diff --git a/dev-lang/helium/files/helium-wrapper-1.6 b/dev-lang/helium/files/helium-wrapper-1.6
new file mode 100644
index 000000000000..926e18cc6171
--- /dev/null
+++ b/dev-lang/helium/files/helium-wrapper-1.6
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+BINNAME_LONG="$(basename $0)"
+BINNAME="${BINNAME_LONG%-tc}"
+
+if [ -n "${HELIUM_TEMP}" ]; then
+ TEMP="${HELIUM_TEMP}";
+else
+ TEMP="/tmp/helium-${USER}"
+ if ! [ -d "${TEMP}" ]; then
+ mkdir ${TEMP};
+ fi;
+fi
+
+# if [ "${BINNAME_LONG}" = "${BINNAME}" ]; then
+# HELIUM_LIBS="/usr/lib/helium/lib/simple";
+# else
+HELIUM_LIBS="/usr/lib/helium/lib";
+# fi
+
+if [ -z "${LVMPATH}" ]; then
+ LVMPATH=".:${HELIUM_LIBS}";
+else
+ LVMPATH="${LVMPATH}:${HELIUM_LIBS}";
+fi
+export LVMPATH
+export TEMP
+
+PROGCALL="/usr/lib/helium/bin/${BINNAME}"
+
+${PROGCALL} $*
diff --git a/dev-lang/helium/helium-1.6.ebuild b/dev-lang/helium/helium-1.6.ebuild
new file mode 100644
index 000000000000..ff730ad0010e
--- /dev/null
+++ b/dev-lang/helium/helium-1.6.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+inherit autotools eutils
+
+DESCRIPTION="Helium (for learning Haskell)"
+HOMEPAGE="https://github.com/Helium4Haskell/helium"
+SRC_URI="http://www.cs.uu.nl/helium/distr/${P}-src.tar.gz
+ mirror://gentoo/${P}-ghc.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+# compilation breaks on amd64, suspect lvm doesn't work properly
+KEYWORDS="-amd64 ~x86"
+IUSE="readline"
+
+DEPEND=">=dev-lang/ghc-6.8
+ dev-haskell/mtl
+ dev-haskell/parsec
+ readline? ( dev-haskell/readline )"
+RDEPEND="dev-libs/gmp
+ readline? ( sys-libs/readline )"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${P}-ghc.patch"
+ epatch "${FILESDIR}/helium-1.6-respect-cflags-ldflags-nostrip.patch"
+
+ # split base only
+ sed -e 's/^GHCFLAGS =.*$/& -package containers/' \
+ -i "${S}/helium/src/Makefile.in"
+
+ # file has non-ASCII syms and it's pulled to ghc for dependency generaton
+ # ghc w/UTF-8 dislikes it:
+ sed -e 's/\xCA//g' \
+ -i "${S}/helium/src/Makefile.in"
+
+ # mangle evil 'rec' to 'rec_'. It's not very accurate, but less,
+ # than manually patching ~250 occurences. (ghc-6.10+ has rec as reserved word)
+ local bad_file
+
+ for bad_file in Top/src/Top/Types/Unification.hs \
+ Top/src/Top/Types/Quantification.hs \
+ Top/src/Top/Types/Primitive.hs \
+ Top/src/Top/Solver/PartitionCombinator.hs \
+ Top/src/Top/Repair/Repair.hs \
+ Top/src/Top/Ordering/Tree.hs \
+ Top/src/Top/Implementation/TypeGraph/Standard.hs \
+ Top/src/Top/Implementation/TypeGraph/Path.hs \
+ Top/src/Top/Implementation/TypeGraph/EquivalenceGroup.hs \
+ Top/src/Top/Implementation/TypeGraph/Basics.hs \
+ Top/src/Top/Implementation/TypeGraph/ApplyHeuristics.hs \
+ lvm/src/lib/lvm/LvmRead.hs \
+ lvm/src/lib/core/CoreNoShadow.hs \
+ helium/src/utils/LoggerEnabled.hs \
+ helium/src/staticanalysis/miscellaneous/TypesToAlignedDocs.hs \
+ helium/src/staticanalysis/miscellaneous/TypeConversion.hs \
+ helium/src/staticanalysis/inferencers/TypeInferencing.hs \
+ helium/src/staticanalysis/heuristics/RepairSystem.hs \
+ helium/src/staticanalysis/heuristics/RepairHeuristics.hs \
+ helium/src/staticanalysis/heuristics/ListOfHeuristics.hs \
+ helium/src/staticanalysis/directives/TS_PatternMatching.ag
+ do
+ # take all symbols from exactly this source. This set is not universal,
+ # but it aims to catch (same) lexeme separators on the left and on the right
+ sed -e 's/\([^a-zA-Z_0-9"]\|^\)rec\([^a-zA-Z_0-9"]\|$\)/\1rec_\2/g' \
+ -i "${S}/$bad_file"
+ done
+
+ # cabal is their friend (oneOf became polymorphic and breaks the test)
+ sed -e 's/Text.ParserCombinators.Parsec/&.Pos/g' \
+ -e 's/oneOf/newPos/g' \
+ -i "${S}/helium/configure.in"
+
+ cd "${S}/helium"
+ eautoreconf
+}
+
+src_compile() {
+ # helium consists of two components that have to be set up separately,
+ # lvm and the main compiler. both build systems are slightly strange.
+ # lvm uses a completely non-standard build system:
+ # the ./configure of lvm is not the usual autotools configure
+
+ cd "${S}/lvm/src" && ./configure || die "lvm configure failed"
+ echo "STRIP=echo" >> config/makefile || die "lvm postconfigure failed"
+ myconf="$(use_enable readline) --without-strip --without-upx --without-ag"
+ cd "${S}/helium" && econf --prefix="/usr/lib" ${myconf} || die "econf failed"
+ cd "${S}/helium/src" && make depend || die "make depend failed"
+
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ cd helium/src || die "cannot cd to helium/src"
+ make install bindir="/usr/lib/helium/bin" DESTDIR="${D}" || die "make install failed"
+
+ # create wrappers
+ newbin "${FILESDIR}/helium-wrapper-${PV}" helium-wrapper
+
+ dosym /usr/bin/helium-wrapper /usr/bin/texthint
+ dosym /usr/bin/helium-wrapper /usr/bin/helium
+ dosym /usr/bin/helium-wrapper /usr/bin/lvmrun
+}