summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2022-07-18 14:21:22 +1000
committerMark Wright <gienah@gentoo.org>2022-07-18 14:21:22 +1000
commitdb37f5e3fdac78d13dd51738a1b27ad269a41e6d (patch)
tree5932b11e186e1ff3024f2105c3d34aede5009b20 /dev-lang
parentnet-im/gajim: Version bump to 1.4.6. (diff)
downloadgentoo-db37f5e3fdac78d13dd51738a1b27ad269a41e6d.tar.gz
gentoo-db37f5e3fdac78d13dd51738a1b27ad269a41e6d.tar.bz2
gentoo-db37f5e3fdac78d13dd51738a1b27ad269a41e6d.zip
dev-lang/teyjus: Use CC,LD,AR,AS,CPP.
Use the environment variables CC, LD, AR, AS, CPP to configure the build environment. Specify the ocaml -cc option to instruct ocamlopt.opt to call the specified C compiler. Builds with gcc or clang. Remove the superflous sys-devel/binutils and sys-devel/gcc dependencies. Thanks to Agostino Sarubbo for reporting. Closes: https://bugs.gentoo.org/858572 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Mark Wright <gienah@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/teyjus/teyjus-2.1-r2.ebuild17
1 files changed, 11 insertions, 6 deletions
diff --git a/dev-lang/teyjus/teyjus-2.1-r2.ebuild b/dev-lang/teyjus/teyjus-2.1-r2.ebuild
index d19b8ef93092..b2cf755e19a0 100644
--- a/dev-lang/teyjus/teyjus-2.1-r2.ebuild
+++ b/dev-lang/teyjus/teyjus-2.1-r2.ebuild
@@ -14,9 +14,7 @@ KEYWORDS="~amd64 ~x86"
LICENSE="GPL-3"
IUSE="emacs examples"
-RDEPEND=">=sys-devel/binutils-2.17:*
- >=sys-devel/gcc-2.95.3:*
- >=dev-lang/ocaml-3.10[ocamlopt]
+RDEPEND="dev-lang/ocaml[ocamlopt]
emacs? ( >=app-editors/emacs-23.1:* )"
DEPEND="${RDEPEND}
app-text/dos2unix
@@ -34,7 +32,7 @@ PATCHES=( "${FILESDIR}/${P}-p001-Fixes-arity-for-pervasive-modulo-operation.patc
src_prepare() {
rm -rf source/front/caml \
|| die "Could not remove bundled ocaml header files"
- find . -type f -exec dos2unix {} \; \
+ find . -type f -exec dos2unix --quiet {} \; \
|| die "Could not convert files from DOS to Unix format"
mv source/front/ccode_stubs.c source/front/ccode_stubs_c.c \
|| die "Could not rename source/front/ccode_stubs.c to source/front/ccode_stubs_c.c"
@@ -51,8 +49,15 @@ src_prepare() {
do
lflags="${lflags} -cclib ${i}"
done
- sed -e "s@\(OCAMLFLAGS= -w -A\)@\1 ${cflags}${lflags}@" \
- -e "s@\(CFLAGS +=\) -g@\1 ${CFLAGS}\nLDFLAGS += ${LDFLAGS}@" \
+ local bs="LDFLAGS += ${LDFLAGS}\n"
+ bs+="CC = ${CC:-gcc}\n"
+ bs+="CPP = ${CPP:-cpp}\n"
+ bs+="LD = ${LD:-ld}\n"
+ bs+="AR(name) =\n"
+ bs+=" return(${AR:-ar} cq \$(name))\n"
+ bs+="AS = ${AS:-as}"
+ sed -e "s@\(OCAMLFLAGS= -w -A\)@\1 -cc ${CC:-gcc} ${cflags}${lflags}@" \
+ -e "s@\(CFLAGS +=\) -g@\1 ${CFLAGS}\n${bs}@" \
-i "${S}/source/OMakefile" \
|| die "Could not set flags in ${S}/source/OMakefile"
}