diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-06-12 21:46:49 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-06-12 21:46:49 +0000 |
commit | d6163df4173cd62d463b7ffe64e3bf52e023fed0 (patch) | |
tree | 289d1840ebc97e8f51ea17a35f405a6b4066a3b3 /dev-lang/lua | |
parent | amd64 stable wrt bug #511536 (diff) | |
download | historical-d6163df4173cd62d463b7ffe64e3bf52e023fed0.tar.gz historical-d6163df4173cd62d463b7ffe64e3bf52e023fed0.tar.bz2 historical-d6163df4173cd62d463b7ffe64e3bf52e023fed0.zip |
Enable multilib support.
Package-Manager: portage-2.2.10/cvs/Linux x86_64
Manifest-Sign-Key: 0xEFB4464E!
Diffstat (limited to 'dev-lang/lua')
-rw-r--r-- | dev-lang/lua/ChangeLog | 10 | ||||
-rw-r--r-- | dev-lang/lua/Manifest | 37 | ||||
-rw-r--r-- | dev-lang/lua/lua-5.1.5-r100.ebuild | 132 | ||||
-rw-r--r-- | dev-lang/lua/lua-5.1.5-r3.ebuild | 127 | ||||
-rw-r--r-- | dev-lang/lua/lua-5.2.3-r1.ebuild | 130 |
5 files changed, 418 insertions, 18 deletions
diff --git a/dev-lang/lua/ChangeLog b/dev-lang/lua/ChangeLog index 6f8a8117d08e..9dae2de9dd2a 100644 --- a/dev-lang/lua/ChangeLog +++ b/dev-lang/lua/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-lang/lua # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.187 2014/05/29 21:58:33 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.188 2014/06/12 21:46:47 mgorny Exp $ + +*lua-5.1.5-r100 (12 Jun 2014) +*lua-5.1.5-r3 (12 Jun 2014) +*lua-5.2.3-r1 (12 Jun 2014) + + 12 Jun 2014; Michał Górny <mgorny@gentoo.org> +lua-5.1.5-r100.ebuild, + +lua-5.1.5-r3.ebuild, +lua-5.2.3-r1.ebuild: + Enable multilib support. 29 May 2014; Matti Bickel <mabi@gentoo.org> -lua-5.1.4-r4.ebuild: remove stale EAPI1 ebuild diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest index 3d635b91c91c..468bfa43a7ed 100644 --- a/dev-lang/lua/Manifest +++ b/dev-lang/lua/Manifest @@ -32,30 +32,33 @@ DIST lua-5.2.1.tar.gz 249882 SHA256 64304da87976133196f9e4c15250b70f444467b6ed80 DIST lua-5.2.3.tar.gz 251195 SHA256 13c2fb97961381f7d06d5b5cea55b743c163800896fd5c5e2356201d3619002d SHA512 264bb7c8db2f190ef0ca38584ec81999ab588f54e03119c5214c40bb8925b0eb407fac483a03e40cc8a220f6748ddff7d3a7392da3803418276b0d263b866449 WHIRLPOOL d278a1e38416bcf7f82eb3e7fd5fb423e60ccb69e9d57a937070516ff8be2d19a98bbfdaf37ec6fd6fb3ef2d625900977ca0cb47e46cb0ede5ebd5d37a9454ef EBUILD lua-5.1.4-r8.ebuild 3164 SHA256 0e408cc508160c80c10165b9d029063700a5aa21092cc0d1cc21fb126c52d840 SHA512 e29d6b1684d4acbcc6cf9a14b4958461f03d8b39ac3d462db2b9733335a8c775f3f0a25b830b6268b6f126096f6743a0676f94fcccd5e499e134a9300ec9d75c WHIRLPOOL 6b00772cbd20cdbe10c4dfcfd948626160c238b08aaef49f400d8d28b928e29f309adcb5b59b46a6cef17e465c2e9cebbfff9f3fa2d0f5960682acd7e377b912 EBUILD lua-5.1.5-r1.ebuild 3300 SHA256 74e8985ffb0de810c7725ffb33079570b67afd981e3ee246252b22ad6a80b7da SHA512 faa30dd73e4477cd8c8367854b7ded9824b3978ef38a4194d54eacfefb96f170fa703d2d933f6b787652d27663a586f87b43be2a5646d24c4010ddade419d896 WHIRLPOOL 0ee24144dc4a736bd863909ec5eb1a27ac683840484c88a0ff931ff087acd395a223bbb408b7d02bc2849e5c4cffb13bf52b67e147f4f8965b014b6bba4fc539 +EBUILD lua-5.1.5-r100.ebuild 3569 SHA256 552dc17b4aafd8b9fe8b11777f2cb01296fba9222fd259f8484e1070045d318f SHA512 2444ce3fd2baf51918eefc6f25b32d6977de7020d9f713ba4b883353ae502ccd8f270df1e3ccb5bb37d82efa528ae8a15508cc3abdf02205c789979848a797b9 WHIRLPOOL 07c92c98ee2ab19259a5c4a567dba061a47a96afb28f49b0d37edb0659b9c1b98d0541ca3e67e92f9592868442f6afa976d84acde78f69866d64aeb1a5f4e387 EBUILD lua-5.1.5-r2.ebuild 3445 SHA256 ec33b9a69ba0e08ac3b2a6b1b4aefecf1c8ef1a78b51008b73cbfcade5002b39 SHA512 876d8e0569bde3c1b6c8d361e3f27c70aeee37605ea78061420830204bcd6d6815cc3364cc442752369447fce027f06bb234ec4927104512c7fea435314740bf WHIRLPOOL b69a2affa4f6d9f153da8e67fae629928eb60d4ef1a4735fe7bb6d53c828ef8a26623978348803e03aa3ad855e9ac5a45274361ff6ed8f0dbf5a6848200a0387 +EBUILD lua-5.1.5-r3.ebuild 3423 SHA256 55c2d950708ffd3884f53989d27622e47ed47b2f0df8edb45c6a47dc8ff4d0c4 SHA512 c1735e0bddd8e96c280c3f43d613034bad2e372591b3ec44ef62ad9f83206390b0a0d64dbdec021dfe1a85c1165cef4cfd204c504a164f34daaa2234caf307a2 WHIRLPOOL 69d402c98c16db780908246cb1a1639c45d5ac3726c1198538b1c6f1c4fd7cd1f9ca3bd6e0d6703d161c0e0a810adc229828fb2457e6addca4e2e91b71cc55c3 EBUILD lua-5.1.5.ebuild 3275 SHA256 4a90f231b987225b98be3708d03e08ca75b871b3b74c90191c29d3ac95d1ce40 SHA512 4a104d75ea50a256f472fe17a5dd7e6c9c4ddec47ab685d9112900a115afe392f63b0bbe6653d04ca2972d103a66e191ea35798486de539bafdd3ef9d07ea295 WHIRLPOOL 99d5dbd6c63ffbff7cad20fa927e30f647493b6952f0852e3c0b12c02d7dbdef1b8fc95833ab584f889093f97d15ca964cca5a7b441d94e2297725bc9a74a6b5 EBUILD lua-5.2.0-r1.ebuild 3026 SHA256 09a25322e66963d135bad400ebca3863bf5ca6b10ab4b4dbee6f965593299d62 SHA512 25875efda333992ee940f749c4aa24034321267d26f328a476dd6331816a2b777789277c942bd8e4e2c98fa0756427a1d9cc78faf16f118b8868b99608f60742 WHIRLPOOL d8c8d9069b22bca5efeac6f267132c3c8a495af491fbb07549696db27fd0ee130f284a067199f786810a7a68d4d5ca1de1896ef30d48da804ac758a5d7b5d454 EBUILD lua-5.2.0.ebuild 2949 SHA256 ff6d72650e730be5a8850208762e0246293ce7f06d70f3e5b42b6c3a1bb468e5 SHA512 864fc6e2da4c649d6e80289485581e89318b750b6ed7c139b7f4b13adf471976bb92c671339ba7b0bb55232f55b1ca25622015d0efaf92bd97e65420e200169d WHIRLPOOL 10fb2a7019df3274af6a8618c1ead587993dee27785d6876b52f04481d770a722771490e29bcdd0c938c88f1c6dd4d0e31ef70c654d916d9b27818135b18f3d6 EBUILD lua-5.2.1.ebuild 3101 SHA256 1cf60be8ca113663718b8656eb9d5b6617a9a39cd9820e253a5c8d04398ae21b SHA512 4d68daa4c27688ed2ab128bd11e649a87aad690f2bac40b4a400cc0c07ceefb424ee1d60f3d7d87c42eafb5baebd0bec4e8384106c1e425850d63f13aa249086 WHIRLPOOL f722fe3fcca3785b1c4e6bc109afec3869212b9cb52a55b04c807cc0727ae1f48a536d66925cac8eb51408ab476135b72a2c1dac45d00a46865994f911568ef4 +EBUILD lua-5.2.3-r1.ebuild 3559 SHA256 99927da814690a4d1931795224c272f30f2a85d43db7b209d8281679d8a8d181 SHA512 d2c8ec4fdc85b421e2c94bc8c9bfeea6bc2329f8116465bc32e600a0ae4b2618b4a3cdda2c2b5ae3a0e8dbb5ea8473093bc4f5fe79fbf79d72090f428a112bc9 WHIRLPOOL fd4653b803e0266d71965da3cf7c184bea68c58f5f1a66d3fda2ba6ca53ff82526cf0c391718875f8a8a6a35b48f58f2f0351bb8a64dd601223cd24a67ba5435 EBUILD lua-5.2.3.ebuild 3376 SHA256 4db9fa174d155ac7caae823f4b9a4a9ca0abc060e0e1fa6f0ff3f3294ded2d57 SHA512 5d9d211c25887a94182275d910c0005b65f92ae3c94e8141b9fb50e2fb027dac6e5d45f93d3f29f595c7ac8abbdc66ecdf133ef1a5cf3bc546303915393a52ec WHIRLPOOL 99197ca0b42fe961c6f56023f78803866875c85e181b4d7f153ff1c4559bf02e824eb78c0fbec0924ae6e5d1ced554d5f9d557474c6f19ad106b41959e64e7aa -MISC ChangeLog 27921 SHA256 3b5275e17d34c0d8030467bfad25ed4006c921c849403aba4d46f60cd31e6268 SHA512 4fb5da8280fa3a21655a5d240eb0aeee10a070196bf3e9b376224fa0749945cfb949f67e736df1fccaf1ee2f18595136afcf0f6d6d29c80ad4c5c7744ede5ecf WHIRLPOOL fa29b371e266c037b9532422e0c27c8040138c832a9c3945bb7fba1a188357822fd5ded4b2fafd10068a165a02fa93d5505db979941a535a87be906970fb9fec +MISC ChangeLog 28158 SHA256 22b879fcc279df636882f88a307f6be7d99a7f62eae5e42513ea4f9c94af5b3b SHA512 be7cd5c317d7cf4d2d1fa2dda2dbdcb05e0abe2164db6014d802dc464c03c398eeb2cb787d35acf41aefe430fe00fa195471c421b2b51d391b8cb3ac3fab8f38 WHIRLPOOL 60134dbfa54b8c343d7fab769b6a99f1e820c88413e674bc3a89def5bd8a2f56046d93149aaae3998fa318efc458dfb7ec6ce8d35042bf4394276f3553578f01 MISC metadata.xml 418 SHA256 ecdbace4d7d07830cc308755b909384644dc449cf7a3f32faefeecf6d3752b55 SHA512 f545c84ef7c020511117e59ee232984409ebe2dd418c2a3e61adb8fa33649d435df86dcb70391d48ed7e2be9b04575757bf2c2e5347114f5c38a9c9335352490 WHIRLPOOL e9e84ca81f1e173e723e07bed3fc954b3d39fd288b47792c1cb61fd7e493eafe6401247a5e35ac7bc4845b21ea40d64aa1f2f643df2942491f6815a9fe7ecb2a -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.22 (GNU/Linux) +Version: GnuPG v2 -iQJ8BAEBCABmBQJTh62lXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w -ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNzE1M0M4QzQxMzM4REREMjMzQjg4NUZE -REY5NzFGMTE4RUVBNUU2AAoJEN35cfEY7qXmXUwP/0qTJn4gxsnb/ZSpgnm8WT5X -9BcSMHpm0/LwB8O4pMd8XXIJwkhIZqMtEGp7L1O+r0N36eKemNYQDG4kTXBXgO2Q -cqyoFJDx2vBsadqllKskyAxpgFNlEPXmslKVjrlhs8abKKf3XN9TszEWX9s8PtyU -jpXdpKwuz2bEvXiklY2DqaH7hj2+uP/ZYGZwwU8lcej/8Pse2Q/F83MB2PI8X/fG -HNp+FcgKKdV8VLAwVTwKRJtfg3GDRs2ZrAZbHkfYSBUIJeE54be4HWi4P22R7gOh -3PVJNvGvIb8xGY/s024HSfTUQeziwDMUJqDctRaRb2y6kE+fEKD93GN4GIzP3ilk -q2i8b3eIREL3PMqPoD7YwxHgYpbpAfUTpbe1Udf94BjxjCiEO0DLUCCrgnco8cu6 -1yPbl5j3T1s8P3hM267FTFKUaC5g9B7gedoLRlMqfZ1uefamWQPxgezjECBLfUof -tZgOn0+vyKENft5EDrCrlwuo9nvUIrHbQqy6ZAEaFbOkd/upFSRWD1QM/HZDIxnR -qaA+5uaG5xbUKxVAtptd5IUB3aKhcrV02KVo5Rcz3WGD4JNbaHNBy2Lz/fXVp6qC -cntzu0J3C2gu6ZjbS5t/elDGJk1GnidXAxdnRcpOA5dFz/koWIIO6cM0eVatwCih -UWiZsXLIsdFjcZQnhmrm -=S6Sp +iQJ8BAEBCABmBQJTmh/JXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC +MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOH4wQAKIxnOi6eXea6xmbzbJ8Dn6R +PS/AITWNNCp/vtFI2+P6FsPkx18GUmF7PO4Lk7k981prn5hr6XJDcNMKH1KXGb47 +OdEqYZ15OPPXKJB9d9VioqpDOUTKJRhoix1uk/i1S7669bvKIFd5QMGOIx6tC5bl +Y+KUfaf/Usc+6larUiuvtldhWm+RflIjzyBmrM27HTL2T76JFgw8RYjQxnP0gDz4 +PH9HzQbtlUOHcPxrVemliyBO9h5z0FgSsP/wGAwLvkmcERe52actzIoZYoQ59cSS +Z8f4+2nwaSQZcOMkrlqVSbutsxS/5byW+bB3ssM41SfgqzDhfjC1GiORyTPbzGef +PapjGUhtkv/X3yFRMN/CCO2D0SYjEXJPoc7X86cqPLwMk6+UVeh+CrVd/mNIfV1t +3p128X/z2COGED8Vy/CGy0eiW5HqpKHByWUenx1P4v1FL2qt4UrTnIPyEMJuOoBL +rdlU61A9or0xgCFVJKFBRWwmHjv1SvM4+1kcz+TgERyzHii5QW3erAF8txlLMqnw +18ZVJ/P3hppxwu7EgVRGKjdBwEujFmbYNsLE/CvflBwqIRP5+1n4b0FFM4XgUzuX +NrJhfzs5igdouJG2dWzrbJnnLqo9p8C9gHbJ1eTMCy61YUUWorgVkIu+sOvE55OP +nfrMBFCIB12F0oUcDPDU +=sc+M -----END PGP SIGNATURE----- diff --git a/dev-lang/lua/lua-5.1.5-r100.ebuild b/dev-lang/lua/lua-5.1.5-r100.ebuild new file mode 100644 index 000000000000..6e3444ecd1a9 --- /dev/null +++ b/dev-lang/lua/lua-5.1.5-r100.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.1.5-r100.ebuild,v 1.1 2014/06/12 21:46:47 mgorny Exp $ + +EAPI=5 + +inherit eutils multilib multilib-minimal portability toolchain-funcs versionator + +DESCRIPTION="A powerful light-weight programming language designed for extending applications" +HOMEPAGE="http://www.lua.org/" +SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" + +LICENSE="MIT" +SLOT="5.1" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux" +IUSE="+deprecated emacs readline static" + +RDEPEND="readline? ( sys-libs/readline[${MULTILIB_USEDEP}] ) + app-admin/eselect-lua + !dev-lang/lua:0" +DEPEND="${RDEPEND} + sys-devel/libtool" +PDEPEND="emacs? ( app-emacs/lua-mode )" + +SAN_SLOT="${SLOT//.}" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/lua${SLOT}/luaconf.h +) + +src_prepare() { + local PATCH_PV=$(get_version_component_range 1-2) + + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r2.patch + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch + + #EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch + + # correct lua versioning + sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:5:1/' src/Makefile + + sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html + + if ! use deprecated ; then + # patches from 5.1.4 still apply + epatch "${FILESDIR}"/${PN}-5.1.4-deprecated.patch + epatch "${FILESDIR}"/${PN}-5.1.4-test.patch + fi + + if ! use readline ; then + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch + fi + + # Using dynamic linked lua is not recommended for performance + # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519 + # Mainly, this is of concern if your arch is poor with GPRs, like x86 + # Note that this only affects the interpreter binary (named lua), not the lua + # compiler (built statically) nor the lua libraries (both shared and static + # are installed) + if use static ; then + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch + fi + + # custom Makefiles + multilib_copy_sources +} + +multilib_src_configure() { + # We want packages to find our things... + sed -i \ + -e 's:/usr/local:'${EPREFIX}'/usr:' \ + -e "s:\([/\"]\)\<lib\>:\1$(get_libdir):g" \ + etc/lua.pc src/luaconf.h || die +} + +multilib_src_compile() { + tc-export CC + myflags= + # what to link to liblua + liblibs="-lm" + liblibs="${liblibs} $(dlopen_lib)" + + # what to link to the executables + mylibs= + if use readline; then + mylibs="-lreadline" + fi + + cd src + emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \ + RPATH="${EPREFIX}/usr/$(get_libdir)/" \ + LUA_LIBS="${mylibs}" \ + LIB_LIBS="${liblibs}" \ + V=$(get_version_component_range 1-2) \ + gentoo_all + + mv lua_test ../test/lua.static +} + +multilib_src_install() { + emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ + V=${SLOT} gentoo_install + + insinto /usr/$(get_libdir)/pkgconfig + newins etc/lua.pc lua${SLOT}.pc +} + +multilib_src_install_all() { + dodoc HISTORY README + dohtml doc/*.html doc/*.png doc/*.css doc/*.gif + + doicon etc/lua.ico + + newman doc/lua.1 lua${SLOT}.1 + newman doc/luac.1 luac${SLOT}.1 +} + +multilib_src_test() { + local positive="bisect cf echo env factorial fib fibfor hello printf sieve + sort trace-calls trace-globals" + local negative="readonly" + local test + + cd "${BUILD_DIR}" || die + for test in ${positive}; do + test/lua.static test/${test}.lua || die "test $test failed" + done + + for test in ${negative}; do + test/lua.static test/${test}.lua && die "test $test failed" + done +} diff --git a/dev-lang/lua/lua-5.1.5-r3.ebuild b/dev-lang/lua/lua-5.1.5-r3.ebuild new file mode 100644 index 000000000000..75563e9103b4 --- /dev/null +++ b/dev-lang/lua/lua-5.1.5-r3.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.1.5-r3.ebuild,v 1.1 2014/06/12 21:46:47 mgorny Exp $ + +EAPI=5 + +inherit eutils multilib multilib-minimal portability toolchain-funcs versionator + +DESCRIPTION="A powerful light-weight programming language designed for extending applications" +HOMEPAGE="http://www.lua.org/" +SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux" +IUSE="+deprecated emacs readline static" + +RDEPEND="readline? ( sys-libs/readline[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + sys-devel/libtool" +PDEPEND="emacs? ( app-emacs/lua-mode )" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/luaconf.h +) + +src_prepare() { + local PATCH_PV=$(get_version_component_range 1-2) + + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch + + #EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch + + # correct lua versioning + sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:5:1/' src/Makefile || die + + sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die + + if ! use deprecated ; then + # patches from 5.1.4 still apply + epatch "${FILESDIR}"/${PN}-5.1.4-deprecated.patch + epatch "${FILESDIR}"/${PN}-5.1.4-test.patch + fi + + if ! use readline ; then + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch + fi + + # Using dynamic linked lua is not recommended for performance + # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519 + # Mainly, this is of concern if your arch is poor with GPRs, like x86 + # Note that this only affects the interpreter binary (named lua), not the lua + # compiler (built statically) nor the lua libraries (both shared and static + # are installed) + if use static ; then + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch + fi + + # custom Makefiles + multilib_copy_sources +} + +multilib_src_configure() { + # We want packages to find our things... + sed -i \ + -e 's:/usr/local:'${EPREFIX}'/usr:' \ + -e "s:\([/\"]\)\<lib\>:\1$(get_libdir):g" \ + etc/lua.pc src/luaconf.h || die +} + +multilib_src_compile() { + tc-export CC + myflags= + # what to link to liblua + liblibs="-lm" + liblibs="${liblibs} $(dlopen_lib)" + + # what to link to the executables + mylibs= + if use readline; then + mylibs="-lreadline" + fi + + cd src + emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \ + RPATH="${EPREFIX}/usr/$(get_libdir)/" \ + LUA_LIBS="${mylibs}" \ + LIB_LIBS="${liblibs}" \ + V=${PV} \ + gentoo_all + + mv lua_test ../test/lua.static +} + +multilib_src_install() { + emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ + V=${PV} gentoo_install + + insinto /usr/$(get_libdir)/pkgconfig + doins etc/lua.pc +} + +multilib_src_install_all() { + dodoc HISTORY README + dohtml doc/*.html doc/*.png doc/*.css doc/*.gif + + doicon etc/lua.ico + + doman doc/lua.1 doc/luac.1 +} + +multilib_src_test() { + local positive="bisect cf echo env factorial fib fibfor hello printf sieve + sort trace-calls trace-globals" + local negative="readonly" + local test + + cd "${BUILD_DIR}" || die + for test in ${positive}; do + test/lua.static test/${test}.lua || die "test $test failed" + done + + for test in ${negative}; do + test/lua.static test/${test}.lua && die "test $test failed" + done +} diff --git a/dev-lang/lua/lua-5.2.3-r1.ebuild b/dev-lang/lua/lua-5.2.3-r1.ebuild new file mode 100644 index 000000000000..567461ddea91 --- /dev/null +++ b/dev-lang/lua/lua-5.2.3-r1.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.2.3-r1.ebuild,v 1.1 2014/06/12 21:46:47 mgorny Exp $ + +EAPI=5 + +inherit eutils autotools multilib multilib-minimal portability toolchain-funcs versionator + +DESCRIPTION="A powerful light-weight programming language designed for extending applications" +HOMEPAGE="http://www.lua.org/" +SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" + +LICENSE="MIT" +SLOT="5.2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux" +IUSE="+deprecated emacs readline static" + +RDEPEND="readline? ( sys-libs/readline ) + app-admin/eselect-lua + !dev-lang/lua:0" +DEPEND="${RDEPEND} + sys-devel/libtool" +PDEPEND="emacs? ( app-emacs/lua-mode )" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/lua${SLOT}/luaconf.h +) + +src_prepare() { + local PATCH_PV=$(get_version_component_range 1-2) + + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch + + [ -d "${FILESDIR}/${PV}" ] && \ + EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch + + # correct lua versioning + sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die + + sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die + + if ! use readline ; then + sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die + fi + + # Using dynamic linked lua is not recommended for performance + # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519 + # Mainly, this is of concern if your arch is poor with GPRs, like x86 + # Note that this only affects the interpreter binary (named lua), not the lua + # compiler (built statically) nor the lua libraries (both shared and static + # are installed) + if use static ; then + sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die + fi + + # upstream does not use libtool, but we do (see bug #336167) + cp "${FILESDIR}/configure.in" "${S}"/ || die + eautoreconf + + # custom Makefiles + multilib_copy_sources +} + +multilib_src_configure() { + sed -i \ + -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \ + -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \ + src/luaconf.h \ + || die "failed patching luaconf.h" + + econf +} + +multilib_src_compile() { + tc-export CC + + # what to link to liblua + liblibs="-lm" + liblibs="${liblibs} $(dlopen_lib)" + + # what to link to the executables + mylibs= + use readline && mylibs="-lreadline" + + cd src + + local myCFLAGS="" + use deprecated && myCFLAGS="-DLUA_COMPAT_ALL" + + case "${CHOST}" in + *-mingw*) : ;; + *) myCFLAGS+=" -DLUA_USE_LINUX" ;; + esac + + emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \ + SYSLDFLAGS="${LDFLAGS}" \ + RPATH="${EPREFIX}/usr/$(get_libdir)/" \ + LUA_LIBS="${mylibs}" \ + LIB_LIBS="${liblibs}" \ + V=$(get_version_component_range 1-2) \ + gentoo_all +} + +multilib_src_install() { + emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \ + V=${SLOT} gentoo_install + + # We want packages to find our things... + cp "${FILESDIR}/lua.pc" "${WORKDIR}" + sed -i \ + -e "s:^V=.*:V= ${PATCH_PV}:" \ + -e "s:^R=.*:R= ${PV}:" \ + -e "s:/,lib,:/$(get_libdir):g" \ + "${WORKDIR}/lua.pc" + + insinto "/usr/$(get_libdir)/pkgconfig" + newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc" +} + +multilib_src_install_all() { + dodoc README + dohtml doc/*.html doc/*.png doc/*.css doc/*.gif + + newman doc/lua.1 lua${SLOT}.1 + newman doc/luac.1 luac${SLOT}.1 +} + +# Makefile contains a dummy target that doesn't do tests +# but causes issues with slotted lua (bug #510360) +src_test() { :; } |