Skip to content
Permalink
Browse files

port luash: fix linking, move all patching to patchfiles, build unive…

…rsal, nomaintainer

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@118232 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
anddam committed Mar 26, 2014
1 parent 939723d commit f94e074ebb103a81529735f8d12bbfafc904ebd9
Showing with 33 additions and 6 deletions.
  1. +7 −6 shells/luash/Portfile
  2. +26 −0 shells/luash/files/patch-luash_cpp.diff
@@ -24,24 +24,25 @@ use_bzip2 yes
# patch for luash.lua addresses a change in API for os.execute() in 5.2
# remove it if a lua51 port is introduced and used to compile luash
patchfiles patch-makefile.diff \
patch-luash_cpp.diff \
patch-luash_lua.diff


use_configure no
universal_variant yes

variant universal {}

depends_lib port:lua \
port:lua-luafilesystem

post-patch {
reinplace "s|lua_open|luaL_newstate|" ${worksrcpath}/luash.cpp
pre-build {
build.args CXX=${configure.cxx} \
CXX_FLAGS="${configure.cppflags} ${configure.cxxflags} \
[get_canonical_archflags cxx] ${configure.ldflags}"
}

build.args-append CXX=${configure.cxx} \
CXX_FLAGS="${configure.cxxflags} [get_canonical_archflags cxx]"
destroot.destdir PREFIX=${destroot}${prefix}

destroot.args PREFIX=${prefix}

post-destroot {
xinstall -d -m 755 ${destroot}$prefix/share/doc/${name}
@@ -0,0 +1,26 @@
--- luash.cpp.orig 2014-03-26 20:57:07.000000000 +0100
+++ luash.cpp 2014-03-26 20:59:16.000000000 +0100
@@ -18,6 +18,7 @@
#include <sstream>
#include <stdlib.h>
#include <stdio.h>
+#include <unistd.h>
#include <readline/readline.h>
#include <readline/history.h>
#include <lua.hpp>
@@ -200,7 +201,7 @@

while(true)
{
- L = lua_open();
+ L = luaL_newstate();
luaL_openlibs(L);

lua_register(L, "readline", lua_readline);
@@ -238,4 +239,4 @@
}

return 0;
-}
\ No newline at end of file
+}

0 comments on commit f94e074

Please sign in to comment.
You can’t perform that action at this time.