mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-lang/mercury-extras: drop 20.06, 20.06.1, 22.01
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
This commit is contained in:
committed by
Miroslav Šulc
parent
d62360d749
commit
163b45aca4
@@ -1,8 +1,2 @@
|
||||
DIST mercury-extras-20.06-gentoo-patchset-0.tar.gz 1093 BLAKE2B cd0087a7a878c303a610e0007b352deec2e54b8223af1fbdcdd5e1fec0a7d6b4533895ba4ec01d4f90734349535a4c16c69f4ec60495f5a7888f99e4580e3ce3 SHA512 abd74dee931a01085a75f45d2793109737662345bdc68f4cf25dd874b59726da6a5ec8acd84cc8f0957052eeb9e5a9e3502090a0688fbea817d05c6948728ecb
|
||||
DIST mercury-extras-20.06.1-gentoo-patchset-0.tar.gz 617 BLAKE2B e16a3887bd0927911e2062befa38119d0347e01eae08d21dcf185942648ce52a94890c26059d39b096f69d19227c2ed22e2d3ded0cc762ebfd1bcb702810f5ea SHA512 1274c08c7c02f6f5fa5183f42e958a8e469df38d8e693722134a24aa846d4f3a74dafa0dd4f9d11fbca58497ff6d714aa7456dc2fd516d8961bc1ba43f3b3b8c
|
||||
DIST mercury-extras-22.01-gentoo-patchset-0.tar.gz 436 BLAKE2B 2c1ff61b87e04777f3d3b66e7a6ae1c8e82e7caec413e2ed51eeb785b5dd8bc1773aa065219ccc58833b1c2aae3d481f531b94a48c215ce7eea2e0762948f946 SHA512 eac4615c951665150c6e6d2cc317d68be8e510aa9be663cadfe04b55d30fe8a0d17fae93a19d1e54556179618262ea4fdb6381e05aca278c4c516bc1f52656bd
|
||||
DIST mercury-extras-22.01.1-gentoo-patchset-1.tar.gz 824 BLAKE2B 677ab82f668f2e35cccf6eff0fc453fb5483941b5315891b1b02a2afb3216b59c86aa3712cdbc7382aa604ce7d1ac7cd8e32bb25c7643b8a3786bae09e987dbb SHA512 bb6ca63a9d4ceb71f7e2c07540301ca319a0163414b5d005251de4b8d4948fcd551b892e1520be0e95c845c31fd6953f2293f5fe52990af680b5bf9117a22e69
|
||||
DIST mercury-srcdist-20.06.1.tar.gz 47796261 BLAKE2B f282c6edb78e9090eb451585c65c9214927b94eaa5fcdf6f674aef6beb62eb65179f998bcc2e56c3c93b73dd1dc94973084eb8363bc05e334384096c9520d478 SHA512 94e901e5d3db39e3342bf2d6a2a74556a7b18b295c7e02669b487a81d41c72e572046ce1133d670ca6c1b8e246dd277439087efe8fb99b979a73555a101aa9a8
|
||||
DIST mercury-srcdist-20.06.tar.gz 47768559 BLAKE2B f242aa2ef7da53aa2dfa054e4fee8646434d276f0748b014e33ea52d22f2a8a37e6fecaa20617f4943c4c1e7d8c179ed0603a344fde2dd58da98b2bacadf1a71 SHA512 b76bd22d8eb16242c68b614ff122ed7ee7535efef6c0ceb8cc798fee4c550bc41b6faff2135cea43b24c652b654bb35ae049656585d8e7bf3a1122d07cb1ecf4
|
||||
DIST mercury-srcdist-22.01.1.tar.gz 48956249 BLAKE2B 0f5a7662327f27c27a4d9e421f71afa58920f6232093452781124817ce5c34d1953a80a08b75e95101a7e2e88159b7d4ead08d25c67a99abcb908a9582af2bab SHA512 5fa49640307233ea0f641488e5ea526385e52833007a31469e083711b63925ca7568d7ad6e09301ddf7816384a080546bc4cf46b1422f974e008917d1aa4f37a
|
||||
DIST mercury-srcdist-22.01.tar.gz 48960609 BLAKE2B 4ac45251bc098c1465f4bc418501db152bfcf36a2e04bb9153a44c44ff2dff300545103c29551818e773728c5a61947c019997fcc2cb64900e538d5ef64c1b39 SHA512 35b3b1e9fd85062edea5263b304bfc965382d04353e5548d59211519ee222bb6a8e8c95cb03faa089062e39c90b2d1c4af7ca0d9eabbf3bb44872d461e10ff2d
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit multilib toolchain-funcs vcs-clean
|
||||
|
||||
PATCHSET_VER="0"
|
||||
MY_P=mercury-srcdist-${PV}
|
||||
|
||||
DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
|
||||
HOMEPAGE="https://www.mercurylang.org/index.html"
|
||||
SRC_URI="https://dl.mercurylang.org/release/${MY_P}.tar.gz
|
||||
https://dev.gentoo.org/~keri/distfiles/mercury-extras/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="cairo examples glut gmp iodbc ncurses odbc opengl ssl tk tommath X xml"
|
||||
REQUIRED_USE="?? ( odbc iodbc )"
|
||||
|
||||
RDEPEND="
|
||||
~dev-lang/mercury-${PV}
|
||||
cairo? ( >=x11-libs/cairo-1.10.0 )
|
||||
gmp? ( dev-libs/gmp:0 )
|
||||
glut? ( media-libs/freeglut )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
tommath? ( dev-libs/libtommath )
|
||||
ncurses? ( sys-libs/ncurses:= )
|
||||
opengl? (
|
||||
virtual/opengl
|
||||
virtual/glu
|
||||
)
|
||||
tk? (
|
||||
dev-lang/tcl:0
|
||||
dev-lang/tk:0
|
||||
)
|
||||
X? ( x11-libs/libX11 )"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
S="${WORKDIR}"/${MY_P}/extras
|
||||
|
||||
mercury_pkgs() {
|
||||
echo "
|
||||
align_right/align_right:bin:
|
||||
base64/mercury_base64:lib:
|
||||
cgi/mercury_www:lib:
|
||||
complex_numbers/complex_numbers:lib:
|
||||
$(use ncurses && echo \
|
||||
curs/curs:lib:ncurses,panel curses/mcurses:lib:ncurses)
|
||||
dynamic_linking/dl:lib:
|
||||
error/error:bin:
|
||||
fixed/fixed:lib:
|
||||
$(use gmp && echo gmp_int/gmp_int:lib:)
|
||||
$(use tommath && echo mp_int/mp_int:lib:libtommath)
|
||||
$(use X && echo graphics/easyx/easyx:lib:x11)
|
||||
$(use cairo && echo graphics/mercury_cairo/mercury_cairo:lib:cairo)
|
||||
$(use glut && echo graphics/mercury_glut/mercury_glut:lib:freeglut)
|
||||
$(use opengl && echo graphics/mercury_opengl/mercury_opengl:lib:gl,glu)
|
||||
$(use tk && echo graphics/mercury_tcltk/mercury_tcltk:lib:tk)
|
||||
lex/lex:lib:
|
||||
lex/regex:lib:
|
||||
moose/moose:bin:
|
||||
net/net:lib:
|
||||
net/echo:bin:
|
||||
$(use ssl && echo mopenssl/mopenssl:lib:openssl)
|
||||
$(use odbc && echo odbc/odbc:lib:odbc)
|
||||
$(use iodbc && echo odbc/odbc:lib:libiodbc)
|
||||
posix/posix:lib:
|
||||
$(has_version dev-lang/mercury[trail] && echo \
|
||||
references/global:lib:)
|
||||
show_ops/show_ops:bin:
|
||||
solver_types/library/any:lib:
|
||||
$(use xml && echo xml/xml:lib:)"
|
||||
}
|
||||
|
||||
mercury_pkg_setup() {
|
||||
mercury_pkg=${1%%:*}
|
||||
mercury_pkg_dir=${mercury_pkg%/*}
|
||||
mercury_pkg_name=${mercury_pkg##*/}
|
||||
|
||||
mercury_pkg_atts=${1#*:}
|
||||
mercury_pkg_type=${mercury_pkg_atts%%:*}
|
||||
mercury_pkg_deps=${mercury_pkg_atts#*:}
|
||||
|
||||
cd "${S}"/${mercury_pkg_dir} || die
|
||||
|
||||
echo ">> Preparing Mercury package: ${mercury_pkg}"
|
||||
|
||||
echo "MCFLAGS += --libgrades-exclude java" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
echo "MCFLAGS += --libgrades-exclude erlang" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
echo "MCFLAGS += --libgrades-exclude csharp" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
|
||||
if test -n "$mercury_pkg_deps"; then
|
||||
echo "EXTRA_CFLAGS += $($(tc-getPKG_CONFIG) --cflags ${mercury_pkg_deps/,/ })" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
echo "EXTRA_LDFLAGS += $($(tc-getPKG_CONFIG) --libs ${mercury_pkg_deps/,/ })" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
fi
|
||||
|
||||
if test ${mercury_pkg_name} = dl; then
|
||||
echo "EXTRA_LDFLAGS += -ldl" >> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = gmp_int; then
|
||||
echo "EXTRA_LDFLAGS += -lgmp" >> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = mercury_tcltk; then
|
||||
echo "EXTRA_CFLAGS += -DUSE_INTERP_RESULT" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = odbc && use odbc; then
|
||||
echo "EXTRA_CFLAGS += -DMODBC_UNIX -DMODBC_MYSQL" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = odbc && use iodbc; then
|
||||
echo "EXTRA_CFLAGS += -DMODBC_IODBC -DMODBC_MYSQL" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
fi
|
||||
}
|
||||
|
||||
mercury_pkg_compile() {
|
||||
mercury_pkg=${1%%:*}
|
||||
mercury_pkg_dir=${mercury_pkg%/*}
|
||||
mercury_pkg_name=${mercury_pkg##*/}
|
||||
|
||||
mercury_pkg_atts=${1#*:}
|
||||
mercury_pkg_type=${mercury_pkg_atts%:*}
|
||||
|
||||
cd "${S}"/${mercury_pkg_dir} || die
|
||||
|
||||
echo ">> Compiling Mercury package: ${mercury_pkg}"
|
||||
|
||||
if test "${mercury_pkg_type}" = "bin"; then
|
||||
mercury_mmc_target=${mercury_pkg_name}
|
||||
else
|
||||
mercury_mmc_target=lib${mercury_pkg_name}
|
||||
fi
|
||||
|
||||
mmc -f *.m || die "mmc -f .m failed"
|
||||
|
||||
mmc \
|
||||
--make \
|
||||
--verbose-commands \
|
||||
--no-strip \
|
||||
--cflags "${CFLAGS}" \
|
||||
--ld-flags "${LDFLAGS}" \
|
||||
--ld-libflags "${LDFLAGS}" \
|
||||
${mercury_mmc_target} || die "mmc ${mercury_mmc_target} failed"
|
||||
}
|
||||
|
||||
mercury_pkg_install() {
|
||||
mercury_pkg=${1%%:*}
|
||||
mercury_pkg_dir=${mercury_pkg%/*}
|
||||
mercury_pkg_name=${mercury_pkg##*/}
|
||||
|
||||
mercury_pkg_atts=${1#*:}
|
||||
mercury_pkg_type=${mercury_pkg_atts%:*}
|
||||
|
||||
cd "${S}"/${mercury_pkg_dir} || die
|
||||
|
||||
echo ">> Installing Mercury package: ${mercury_pkg}"
|
||||
|
||||
if test "${mercury_pkg_type}" = "bin"; then
|
||||
into /usr/$(get_libdir)/mercury/extras
|
||||
dobin ${mercury_pkg_name}
|
||||
else
|
||||
mmc \
|
||||
--make \
|
||||
--verbose-commands \
|
||||
--no-strip \
|
||||
--cflags "${CFLAGS}" \
|
||||
--ld-flags "${LDFLAGS}" \
|
||||
--ld-libflags "${LDFLAGS}" \
|
||||
--install-prefix "${D}/usr/$(get_libdir)/mercury/extras" \
|
||||
lib${mercury_pkg_name}.install || die "mmc lib${mercury_pkg_name}.install failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cd "${WORKDIR}"/${MY_P}
|
||||
if [[ -d "${WORKDIR}"/${PV} ]] ; then
|
||||
eapply "${WORKDIR}"/${PV}
|
||||
fi
|
||||
eapply_user
|
||||
|
||||
cd "${S}"
|
||||
for mercury_pkg in $(mercury_pkgs); do
|
||||
mercury_pkg_setup ${mercury_pkg}
|
||||
done
|
||||
|
||||
cp "${S}"/net/*.m "${S}"/mopenssl/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
for mercury_pkg in $(mercury_pkgs); do
|
||||
mercury_pkg_compile ${mercury_pkg}
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for mercury_pkg in $(mercury_pkgs); do
|
||||
mercury_pkg_install ${mercury_pkg}
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
dodoc README
|
||||
|
||||
if use examples; then
|
||||
docinto samples/cgi
|
||||
dodoc cgi/form_test.m
|
||||
|
||||
docinto samples/complex_numbers
|
||||
dodoc complex_numbers/samples/*.m
|
||||
|
||||
if use ncurses; then
|
||||
docinto samples/curs
|
||||
dodoc curs/samples/*.m
|
||||
|
||||
docinto samples/curses
|
||||
dodoc curses/sample/*.m
|
||||
fi
|
||||
|
||||
docinto samples/dynamic_linking
|
||||
dodoc dynamic_linking/{hello,dl_test}.m
|
||||
|
||||
docinto samples/gator
|
||||
dodoc -r gator/*
|
||||
|
||||
if use gmp; then
|
||||
docinto samples/gmp_int
|
||||
dodoc gmp_int/gmp_int_test.m
|
||||
fi
|
||||
|
||||
if use tommath; then
|
||||
docinto samples/mp_int
|
||||
dodoc mp_int/mp_int_test.m
|
||||
fi
|
||||
|
||||
if use X; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/easyx/samples/*.m
|
||||
fi
|
||||
|
||||
if use glut && use opengl; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/samples/gears/*.m
|
||||
dodoc graphics/samples/maze/*.m
|
||||
fi
|
||||
|
||||
if use tk; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/samples/calc/*.m
|
||||
fi
|
||||
|
||||
if use opengl && use tk; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/samples/pent/*.m
|
||||
fi
|
||||
|
||||
docinto samples/lex
|
||||
dodoc lex/samples/*.m
|
||||
|
||||
docinto samples/log4m
|
||||
dodoc log4m/*.m
|
||||
|
||||
docinto samples/monte
|
||||
dodoc monte/*.m
|
||||
|
||||
docinto samples/moose
|
||||
dodoc moose/samples/*
|
||||
|
||||
docinto samples/net
|
||||
dodoc net/test_lookups.m
|
||||
|
||||
if use odbc || use iodbc; then
|
||||
docinto samples/odbc
|
||||
dodoc odbc/odbc_test.m
|
||||
fi
|
||||
|
||||
docinto samples/posix
|
||||
dodoc posix/samples/*.m
|
||||
|
||||
docinto samples/random
|
||||
dodoc random/*.m
|
||||
|
||||
if has_version dev-lang/mercury[trail]; then
|
||||
docinto samples/references
|
||||
dodoc references/samples/*.m
|
||||
|
||||
docinto samples/trail
|
||||
dodoc trail/*.m
|
||||
fi
|
||||
|
||||
if use xml; then
|
||||
docinto samples/xml
|
||||
dodoc xml/tryit.m
|
||||
dodoc xml/samples/*
|
||||
dodoc xml_stylesheets/*.xsl
|
||||
fi
|
||||
|
||||
ecvs_clean
|
||||
fi
|
||||
}
|
||||
@@ -1,307 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit multilib toolchain-funcs vcs-clean
|
||||
|
||||
PATCHSET_VER="0"
|
||||
MY_P=mercury-srcdist-${PV}
|
||||
|
||||
DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
|
||||
HOMEPAGE="https://www.mercurylang.org/index.html"
|
||||
SRC_URI="https://dl.mercurylang.org/release/${MY_P}.tar.gz
|
||||
https://dev.gentoo.org/~keri/distfiles/mercury-extras/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
IUSE="cairo examples glut gmp iodbc ncurses odbc opengl ssl tk tommath X xml"
|
||||
REQUIRED_USE="?? ( odbc iodbc )"
|
||||
|
||||
RDEPEND="
|
||||
~dev-lang/mercury-${PV}
|
||||
cairo? ( >=x11-libs/cairo-1.10.0 )
|
||||
gmp? ( dev-libs/gmp:0 )
|
||||
glut? ( media-libs/freeglut )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
tommath? ( dev-libs/libtommath )
|
||||
ncurses? ( sys-libs/ncurses:= )
|
||||
opengl? (
|
||||
virtual/opengl
|
||||
virtual/glu
|
||||
)
|
||||
tk? (
|
||||
dev-lang/tcl:0
|
||||
dev-lang/tk:0
|
||||
)
|
||||
X? ( x11-libs/libX11 )"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
S="${WORKDIR}"/${MY_P}/extras
|
||||
|
||||
mercury_pkgs() {
|
||||
echo "
|
||||
align_right/align_right:bin:
|
||||
base64/mercury_base64:lib:
|
||||
cgi/mercury_www:lib:
|
||||
complex_numbers/complex_numbers:lib:
|
||||
$(use ncurses && echo \
|
||||
curs/curs:lib:ncurses,panel curses/mcurses:lib:ncurses)
|
||||
dynamic_linking/dl:lib:
|
||||
error/error:bin:
|
||||
fixed/fixed:lib:
|
||||
$(use gmp && echo gmp_int/gmp_int:lib:)
|
||||
$(use tommath && echo mp_int/mp_int:lib:libtommath)
|
||||
$(use X && echo graphics/easyx/easyx:lib:x11)
|
||||
$(use cairo && echo graphics/mercury_cairo/mercury_cairo:lib:cairo)
|
||||
$(use glut && echo graphics/mercury_glut/mercury_glut:lib:freeglut)
|
||||
$(use opengl && echo graphics/mercury_opengl/mercury_opengl:lib:gl,glu)
|
||||
$(use tk && echo graphics/mercury_tcltk/mercury_tcltk:lib:tk)
|
||||
lex/lex:lib:
|
||||
lex/regex:lib:
|
||||
moose/moose:bin:
|
||||
net/net:lib:
|
||||
net/echo:bin:
|
||||
$(use ssl && echo mopenssl/mopenssl:lib:openssl)
|
||||
$(use odbc && echo odbc/odbc:lib:odbc)
|
||||
$(use iodbc && echo odbc/odbc:lib:libiodbc)
|
||||
posix/posix:lib:
|
||||
$(has_version dev-lang/mercury[trail] && echo \
|
||||
references/global:lib:)
|
||||
show_ops/show_ops:bin:
|
||||
solver_types/library/any:lib:
|
||||
$(use xml && echo xml/xml:lib:)"
|
||||
}
|
||||
|
||||
mercury_pkg_setup() {
|
||||
mercury_pkg=${1%%:*}
|
||||
mercury_pkg_dir=${mercury_pkg%/*}
|
||||
mercury_pkg_name=${mercury_pkg##*/}
|
||||
|
||||
mercury_pkg_atts=${1#*:}
|
||||
mercury_pkg_type=${mercury_pkg_atts%%:*}
|
||||
mercury_pkg_deps=${mercury_pkg_atts#*:}
|
||||
|
||||
cd "${S}"/${mercury_pkg_dir} || die
|
||||
|
||||
echo ">> Preparing Mercury package: ${mercury_pkg}"
|
||||
|
||||
echo "MCFLAGS += --libgrades-exclude java" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
echo "MCFLAGS += --libgrades-exclude erlang" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
echo "MCFLAGS += --libgrades-exclude csharp" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
|
||||
if test -n "$mercury_pkg_deps"; then
|
||||
echo "EXTRA_CFLAGS += $($(tc-getPKG_CONFIG) --cflags ${mercury_pkg_deps/,/ })" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
echo "EXTRA_LDFLAGS += $($(tc-getPKG_CONFIG) --libs ${mercury_pkg_deps/,/ })" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
fi
|
||||
|
||||
if test ${mercury_pkg_name} = dl; then
|
||||
echo "EXTRA_LDFLAGS += -ldl" >> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = gmp_int; then
|
||||
echo "EXTRA_LDFLAGS += -lgmp" >> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = mercury_tcltk; then
|
||||
echo "EXTRA_CFLAGS += -DUSE_INTERP_RESULT" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = odbc && use odbc; then
|
||||
echo "EXTRA_CFLAGS += -DMODBC_UNIX -DMODBC_MYSQL" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = odbc && use iodbc; then
|
||||
echo "EXTRA_CFLAGS += -DMODBC_IODBC -DMODBC_MYSQL" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
fi
|
||||
}
|
||||
|
||||
mercury_pkg_compile() {
|
||||
mercury_pkg=${1%%:*}
|
||||
mercury_pkg_dir=${mercury_pkg%/*}
|
||||
mercury_pkg_name=${mercury_pkg##*/}
|
||||
|
||||
mercury_pkg_atts=${1#*:}
|
||||
mercury_pkg_type=${mercury_pkg_atts%:*}
|
||||
|
||||
cd "${S}"/${mercury_pkg_dir} || die
|
||||
|
||||
echo ">> Compiling Mercury package: ${mercury_pkg}"
|
||||
|
||||
if test "${mercury_pkg_type}" = "bin"; then
|
||||
mercury_mmc_target=${mercury_pkg_name}
|
||||
else
|
||||
mercury_mmc_target=lib${mercury_pkg_name}
|
||||
fi
|
||||
|
||||
mmc -f *.m || die "mmc -f .m failed"
|
||||
|
||||
mmc \
|
||||
--make \
|
||||
--verbose-commands \
|
||||
--no-strip \
|
||||
--cflags "${CFLAGS}" \
|
||||
--ld-flags "${LDFLAGS}" \
|
||||
--ld-libflags "${LDFLAGS}" \
|
||||
${mercury_mmc_target} || die "mmc ${mercury_mmc_target} failed"
|
||||
}
|
||||
|
||||
mercury_pkg_install() {
|
||||
mercury_pkg=${1%%:*}
|
||||
mercury_pkg_dir=${mercury_pkg%/*}
|
||||
mercury_pkg_name=${mercury_pkg##*/}
|
||||
|
||||
mercury_pkg_atts=${1#*:}
|
||||
mercury_pkg_type=${mercury_pkg_atts%:*}
|
||||
|
||||
cd "${S}"/${mercury_pkg_dir} || die
|
||||
|
||||
echo ">> Installing Mercury package: ${mercury_pkg}"
|
||||
|
||||
if test "${mercury_pkg_type}" = "bin"; then
|
||||
into /usr/$(get_libdir)/mercury/extras
|
||||
dobin ${mercury_pkg_name}
|
||||
else
|
||||
mmc \
|
||||
--make \
|
||||
--verbose-commands \
|
||||
--no-strip \
|
||||
--cflags "${CFLAGS}" \
|
||||
--ld-flags "${LDFLAGS}" \
|
||||
--ld-libflags "${LDFLAGS}" \
|
||||
--install-prefix "${D}/usr/$(get_libdir)/mercury/extras" \
|
||||
lib${mercury_pkg_name}.install || die "mmc lib${mercury_pkg_name}.install failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cd "${WORKDIR}"/${MY_P}
|
||||
if [[ -d "${WORKDIR}"/${PV} ]] ; then
|
||||
eapply "${WORKDIR}"/${PV}
|
||||
fi
|
||||
eapply_user
|
||||
|
||||
cd "${S}"
|
||||
for mercury_pkg in $(mercury_pkgs); do
|
||||
mercury_pkg_setup ${mercury_pkg}
|
||||
done
|
||||
|
||||
cp "${S}"/net/*.m "${S}"/mopenssl/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
for mercury_pkg in $(mercury_pkgs); do
|
||||
mercury_pkg_compile ${mercury_pkg}
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for mercury_pkg in $(mercury_pkgs); do
|
||||
mercury_pkg_install ${mercury_pkg}
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
dodoc README
|
||||
|
||||
if use examples; then
|
||||
docinto samples/cgi
|
||||
dodoc cgi/form_test.m
|
||||
|
||||
docinto samples/complex_numbers
|
||||
dodoc complex_numbers/samples/*.m
|
||||
|
||||
if use ncurses; then
|
||||
docinto samples/curs
|
||||
dodoc curs/samples/*.m
|
||||
|
||||
docinto samples/curses
|
||||
dodoc curses/sample/*.m
|
||||
fi
|
||||
|
||||
docinto samples/dynamic_linking
|
||||
dodoc dynamic_linking/{hello,dl_test}.m
|
||||
|
||||
docinto samples/gator
|
||||
dodoc -r gator/*
|
||||
|
||||
if use gmp; then
|
||||
docinto samples/gmp_int
|
||||
dodoc gmp_int/gmp_int_test.m
|
||||
fi
|
||||
|
||||
if use tommath; then
|
||||
docinto samples/mp_int
|
||||
dodoc mp_int/mp_int_test.m
|
||||
fi
|
||||
|
||||
if use X; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/easyx/samples/*.m
|
||||
fi
|
||||
|
||||
if use glut && use opengl; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/samples/gears/*.m
|
||||
dodoc graphics/samples/maze/*.m
|
||||
fi
|
||||
|
||||
if use tk; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/samples/calc/*.m
|
||||
fi
|
||||
|
||||
if use opengl && use tk; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/samples/pent/*.m
|
||||
fi
|
||||
|
||||
docinto samples/lex
|
||||
dodoc lex/samples/*.m
|
||||
|
||||
docinto samples/log4m
|
||||
dodoc log4m/*.m
|
||||
|
||||
docinto samples/monte
|
||||
dodoc monte/*.m
|
||||
|
||||
docinto samples/moose
|
||||
dodoc moose/samples/*
|
||||
|
||||
docinto samples/net
|
||||
dodoc net/test_lookups.m
|
||||
|
||||
if use odbc || use iodbc; then
|
||||
docinto samples/odbc
|
||||
dodoc odbc/odbc_test.m
|
||||
fi
|
||||
|
||||
docinto samples/posix
|
||||
dodoc posix/samples/*.m
|
||||
|
||||
docinto samples/random
|
||||
dodoc random/*.m
|
||||
|
||||
if has_version dev-lang/mercury[trail]; then
|
||||
docinto samples/references
|
||||
dodoc references/samples/*.m
|
||||
|
||||
docinto samples/trail
|
||||
dodoc trail/*.m
|
||||
fi
|
||||
|
||||
if use xml; then
|
||||
docinto samples/xml
|
||||
dodoc xml/tryit.m
|
||||
dodoc xml/samples/*
|
||||
dodoc xml_stylesheets/*.xsl
|
||||
fi
|
||||
|
||||
ecvs_clean
|
||||
fi
|
||||
}
|
||||
@@ -1,298 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit multilib vcs-clean
|
||||
|
||||
PATCHSET_VER="0"
|
||||
MY_P=mercury-srcdist-${PV}
|
||||
|
||||
DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
|
||||
HOMEPAGE="https://www.mercurylang.org/index.html"
|
||||
SRC_URI="https://dl.mercurylang.org/release/${MY_P}.tar.gz
|
||||
https://dev.gentoo.org/~keri/distfiles/mercury-extras/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="cairo examples glut gmp iodbc ncurses odbc opengl ssl tk tommath X xml"
|
||||
REQUIRED_USE="?? ( odbc iodbc )"
|
||||
|
||||
RDEPEND="
|
||||
~dev-lang/mercury-${PV}
|
||||
cairo? ( >=x11-libs/cairo-1.10.0 )
|
||||
gmp? ( dev-libs/gmp:0 )
|
||||
glut? ( media-libs/freeglut )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
tommath? ( dev-libs/libtommath )
|
||||
ncurses? ( sys-libs/ncurses:= )
|
||||
opengl? (
|
||||
virtual/opengl
|
||||
virtual/glu
|
||||
)
|
||||
tk? (
|
||||
dev-lang/tcl:0
|
||||
dev-lang/tk:0
|
||||
)
|
||||
X? ( x11-libs/libX11 )"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}"/${MY_P}/extras
|
||||
|
||||
mercury_pkgs() {
|
||||
echo "
|
||||
align_right/align_right:bin:
|
||||
base64/mercury_base64:lib:
|
||||
cgi/mercury_www:lib:
|
||||
complex_numbers/complex_numbers:lib:
|
||||
$(use ncurses && echo \
|
||||
curs/curs:lib:ncurses,panel curses/mcurses:lib:ncurses)
|
||||
dynamic_linking/dl:lib:
|
||||
error/error:bin:
|
||||
fixed/fixed:lib:
|
||||
$(use gmp && echo gmp_int/gmp_int:lib:)
|
||||
$(use tommath && echo mp_int/mp_int:lib:libtommath)
|
||||
$(use X && echo graphics/easyx/easyx:lib:x11)
|
||||
$(use cairo && echo graphics/mercury_cairo/mercury_cairo:lib:cairo)
|
||||
$(use glut && echo graphics/mercury_glut/mercury_glut:lib:freeglut)
|
||||
$(use opengl && echo graphics/mercury_opengl/mercury_opengl:lib:gl,glu)
|
||||
$(use tk && echo graphics/mercury_tcltk/mercury_tcltk:lib:tk)
|
||||
lex/lex:lib:
|
||||
lex/regex:lib:
|
||||
moose/moose:bin:
|
||||
net/net:lib:
|
||||
net/echo:bin:
|
||||
$(use ssl && echo mopenssl/mopenssl:lib:openssl)
|
||||
$(use odbc && echo odbc/odbc:lib:odbc)
|
||||
$(use iodbc && echo odbc/odbc:lib:libiodbc)
|
||||
posix/posix:lib:
|
||||
$(has_version dev-lang/mercury[trail] && echo \
|
||||
references/global:lib:)
|
||||
show_ops/show_ops:bin:
|
||||
solver_types/library/any:lib:
|
||||
$(use xml && echo xml/xml:lib:)"
|
||||
}
|
||||
|
||||
mercury_pkg_setup() {
|
||||
mercury_pkg=${1%%:*}
|
||||
mercury_pkg_dir=${mercury_pkg%/*}
|
||||
mercury_pkg_name=${mercury_pkg##*/}
|
||||
|
||||
mercury_pkg_atts=${1#*:}
|
||||
mercury_pkg_type=${mercury_pkg_atts%%:*}
|
||||
mercury_pkg_deps=${mercury_pkg_atts#*:}
|
||||
|
||||
cd "${S}"/${mercury_pkg_dir} || die
|
||||
|
||||
echo ">> Preparing Mercury package: ${mercury_pkg}"
|
||||
|
||||
echo "MCFLAGS += --libgrades-exclude java" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
echo "MCFLAGS += --libgrades-exclude csharp" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
|
||||
if test -n "$mercury_pkg_deps"; then
|
||||
echo "EXTRA_CFLAGS += $(pkg-config --cflags ${mercury_pkg_deps/,/ })" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
echo "EXTRA_LDFLAGS += $(pkg-config --libs ${mercury_pkg_deps/,/ })" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
fi
|
||||
|
||||
if test ${mercury_pkg_name} = dl; then
|
||||
echo "EXTRA_LDFLAGS += -ldl" >> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = gmp_int; then
|
||||
echo "EXTRA_LDFLAGS += -lgmp" >> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = mercury_tcltk; then
|
||||
echo "EXTRA_CFLAGS += -DUSE_INTERP_RESULT" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = odbc && use odbc; then
|
||||
echo "EXTRA_CFLAGS += -DMODBC_UNIX -DMODBC_MYSQL" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
elif test ${mercury_pkg_name} = odbc && use iodbc; then
|
||||
echo "EXTRA_CFLAGS += -DMODBC_IODBC -DMODBC_MYSQL" \
|
||||
>> "${S}"/${mercury_pkg_dir}/Mercury.options
|
||||
fi
|
||||
}
|
||||
|
||||
mercury_pkg_compile() {
|
||||
mercury_pkg=${1%%:*}
|
||||
mercury_pkg_dir=${mercury_pkg%/*}
|
||||
mercury_pkg_name=${mercury_pkg##*/}
|
||||
|
||||
mercury_pkg_atts=${1#*:}
|
||||
mercury_pkg_type=${mercury_pkg_atts%:*}
|
||||
|
||||
cd "${S}"/${mercury_pkg_dir} || die
|
||||
|
||||
echo ">> Compiling Mercury package: ${mercury_pkg}"
|
||||
|
||||
if test "${mercury_pkg_type}" = "bin"; then
|
||||
mercury_mmc_target=${mercury_pkg_name}
|
||||
else
|
||||
mercury_mmc_target=lib${mercury_pkg_name}
|
||||
fi
|
||||
|
||||
mmc -f *.m || die "mmc -f .m failed"
|
||||
|
||||
mmc \
|
||||
--make \
|
||||
--verbose-commands \
|
||||
--no-strip \
|
||||
--cflags "${CFLAGS}" \
|
||||
--ld-flags "${LDFLAGS}" \
|
||||
--ld-libflags "${LDFLAGS}" \
|
||||
${mercury_mmc_target} || die "mmc ${mercury_mmc_target} failed"
|
||||
}
|
||||
|
||||
mercury_pkg_install() {
|
||||
mercury_pkg=${1%%:*}
|
||||
mercury_pkg_dir=${mercury_pkg%/*}
|
||||
mercury_pkg_name=${mercury_pkg##*/}
|
||||
|
||||
mercury_pkg_atts=${1#*:}
|
||||
mercury_pkg_type=${mercury_pkg_atts%:*}
|
||||
|
||||
cd "${S}"/${mercury_pkg_dir} || die
|
||||
|
||||
echo ">> Installing Mercury package: ${mercury_pkg}"
|
||||
|
||||
if test "${mercury_pkg_type}" = "bin"; then
|
||||
into /usr/$(get_libdir)/mercury/extras
|
||||
dobin ${mercury_pkg_name}
|
||||
else
|
||||
mmc \
|
||||
--make \
|
||||
--verbose-commands \
|
||||
--no-strip \
|
||||
--cflags "${CFLAGS}" \
|
||||
--ld-flags "${LDFLAGS}" \
|
||||
--ld-libflags "${LDFLAGS}" \
|
||||
--install-prefix "${D}/usr/$(get_libdir)/mercury/extras" \
|
||||
lib${mercury_pkg_name}.install || die "mmc lib${mercury_pkg_name}.install failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cd "${WORKDIR}"/${MY_P}
|
||||
if [[ -d "${WORKDIR}"/${PV} ]] ; then
|
||||
eapply "${WORKDIR}"/${PV}
|
||||
fi
|
||||
eapply_user
|
||||
|
||||
cd "${S}"
|
||||
for mercury_pkg in $(mercury_pkgs); do
|
||||
mercury_pkg_setup ${mercury_pkg}
|
||||
done
|
||||
|
||||
cp "${S}"/net/*.m "${S}"/mopenssl/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
for mercury_pkg in $(mercury_pkgs); do
|
||||
mercury_pkg_compile ${mercury_pkg}
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for mercury_pkg in $(mercury_pkgs); do
|
||||
mercury_pkg_install ${mercury_pkg}
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
dodoc README.md
|
||||
|
||||
if use examples; then
|
||||
docinto samples/cgi
|
||||
dodoc cgi/form_test.m
|
||||
|
||||
docinto samples/complex_numbers
|
||||
dodoc complex_numbers/samples/*.m
|
||||
|
||||
if use ncurses; then
|
||||
docinto samples/curs
|
||||
dodoc curs/samples/*.m
|
||||
|
||||
docinto samples/curses
|
||||
dodoc curses/sample/*.m
|
||||
fi
|
||||
|
||||
docinto samples/dynamic_linking
|
||||
dodoc dynamic_linking/{hello,dl_test}.m
|
||||
|
||||
docinto samples/gator
|
||||
dodoc -r gator/*
|
||||
|
||||
if use gmp; then
|
||||
docinto samples/gmp_int
|
||||
dodoc gmp_int/gmp_int_test.m
|
||||
fi
|
||||
|
||||
if use tommath; then
|
||||
docinto samples/mp_int
|
||||
dodoc mp_int/mp_int_test.m
|
||||
fi
|
||||
|
||||
if use X; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/easyx/samples/*.m
|
||||
fi
|
||||
|
||||
if use glut && use opengl; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/samples/gears/*.m
|
||||
dodoc graphics/samples/maze/*.m
|
||||
fi
|
||||
|
||||
if use tk; then
|
||||
docinto samples/graphics
|
||||
dodoc graphics/samples/calc/*.m
|
||||
fi
|
||||
|
||||
docinto samples/lex
|
||||
dodoc lex/samples/*.m
|
||||
|
||||
docinto samples/log4m
|
||||
dodoc log4m/*.m
|
||||
|
||||
docinto samples/monte
|
||||
dodoc monte/*.m
|
||||
|
||||
docinto samples/moose
|
||||
dodoc moose/samples/*
|
||||
|
||||
docinto samples/net
|
||||
dodoc net/test_lookups.m
|
||||
|
||||
if use odbc || use iodbc; then
|
||||
docinto samples/odbc
|
||||
dodoc odbc/odbc_test.m
|
||||
fi
|
||||
|
||||
docinto samples/posix
|
||||
dodoc posix/samples/*.m
|
||||
|
||||
docinto samples/random
|
||||
dodoc random/*.m
|
||||
|
||||
if has_version dev-lang/mercury[trail]; then
|
||||
docinto samples/references
|
||||
dodoc references/samples/*.m
|
||||
|
||||
docinto samples/trail
|
||||
dodoc trail/*.m
|
||||
fi
|
||||
|
||||
if use xml; then
|
||||
docinto samples/xml
|
||||
dodoc xml/tryit.m
|
||||
dodoc xml/samples/*
|
||||
dodoc xml_stylesheets/*.xsl
|
||||
fi
|
||||
|
||||
ecvs_clean
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user