about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/luabind
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/luabind
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/luabind')
-rw-r--r--nixpkgs/pkgs/development/libraries/luabind/0.9.1_boost_1.57_fix.patch23
-rw-r--r--nixpkgs/pkgs/development/libraries/luabind/0.9.1_discover_luajit.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/luabind/0.9.1_modern_boost_fix.patch59
-rw-r--r--nixpkgs/pkgs/development/libraries/luabind/default.nix31
4 files changed, 135 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/luabind/0.9.1_boost_1.57_fix.patch b/nixpkgs/pkgs/development/libraries/luabind/0.9.1_boost_1.57_fix.patch
new file mode 100644
index 000000000000..7ac495777b54
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/luabind/0.9.1_boost_1.57_fix.patch
@@ -0,0 +1,23 @@
+diff --git a/luabind/object.hpp b/luabind/object.hpp
+index f7b7ca5..1c18e04 100644
+--- a/luabind/object.hpp
++++ b/luabind/object.hpp
+@@ -536,6 +536,8 @@ namespace detail
+       handle m_key;
+   };
+ 
++#if BOOST_VERSION < 105700
++
+ // Needed because of some strange ADL issues.
+ 
+ #define LUABIND_OPERATOR_ADL_WKND(op) \
+@@ -557,7 +559,8 @@ namespace detail
+   LUABIND_OPERATOR_ADL_WKND(!=)
+ 
+ #undef LUABIND_OPERATOR_ADL_WKND
+- 
++
++#endif // BOOST_VERSION < 105700 
+ } // namespace detail
+ 
+ namespace adl
diff --git a/nixpkgs/pkgs/development/libraries/luabind/0.9.1_discover_luajit.patch b/nixpkgs/pkgs/development/libraries/luabind/0.9.1_discover_luajit.patch
new file mode 100644
index 000000000000..6e5fe6aa6f82
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/luabind/0.9.1_discover_luajit.patch
@@ -0,0 +1,22 @@
+diff --git a/Jamroot b/Jamroot
+index 94494bf..83dfcbb 100755
+--- a/Jamroot
++++ b/Jamroot
+@@ -64,7 +64,7 @@ else if [ os.name ] in LINUX MACOSX FREEBSD
+         $(LUA_PATH) $(HOME)/Library/Frameworks /Library/Frameworks /usr /usr/local /opt/local /opt ;
+ 
+     local possible-suffixes =
+-        include/lua5.1 include/lua51 include/lua include ;
++        include/lua5.1 include/lua51 include/lua include include/luajit-2.0 ;
+ 
+     local includes = [ GLOB $(possible-prefixes)/$(possible-suffixes) : lua.h ] ;
+ 
+@@ -83,7 +83,7 @@ else if [ os.name ] in LINUX MACOSX FREEBSD
+ 
+     local lib = $(prefix)/lib ;
+ 
+-    local names = liblua5.1 liblua51 liblua ;
++    local names = liblua5.1 liblua51 liblua libluajit-5.1 ;
+     local extensions = .a .so ;
+ 
+     library = [ GLOB $(lib)/lua51 $(lib)/lua5.1 $(lib)/lua $(lib) :
diff --git a/nixpkgs/pkgs/development/libraries/luabind/0.9.1_modern_boost_fix.patch b/nixpkgs/pkgs/development/libraries/luabind/0.9.1_modern_boost_fix.patch
new file mode 100644
index 000000000000..92e32828a03c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/luabind/0.9.1_modern_boost_fix.patch
@@ -0,0 +1,59 @@
+diff --git luabind-0.9.1/luabind/detail/call_function.hpp luabind-0.9.1-fixed/luabind/detail/call_function.hpp
+index 1b45ec1..8f5afff 100644
+--- luabind-0.9.1/luabind/detail/call_function.hpp
++++ luabind-0.9.1-fixed/luabind/detail/call_function.hpp
+@@ -323,7 +323,8 @@ namespace luabind
+ 
+ #endif // LUABIND_CALL_FUNCTION_HPP_INCLUDED
+ 
+-#elif BOOST_PP_ITERATION_FLAGS() == 1
++#else
++#if BOOST_PP_ITERATION_FLAGS() == 1
+ 
+ #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n *
+ #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n
+@@ -440,4 +441,5 @@ namespace luabind
+ 
+ 
+ #endif
++#endif
+ 
+diff --git luabind-0.9.1/luabind/detail/call_member.hpp luabind-0.9.1-fixed/luabind/detail/call_member.hpp
+index de8d563..e63555b 100644
+--- luabind-0.9.1/luabind/detail/call_member.hpp
++++ luabind-0.9.1-fixed/luabind/detail/call_member.hpp
+@@ -316,7 +316,8 @@ namespace luabind
+ 
+ #endif // LUABIND_CALL_MEMBER_HPP_INCLUDED
+ 
+-#elif BOOST_PP_ITERATION_FLAGS() == 1
++#else
++#if BOOST_PP_ITERATION_FLAGS() == 1
+ 
+ #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n *
+ #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n
+@@ -360,4 +361,5 @@ namespace luabind
+ #undef LUABIND_TUPLE_PARAMS
+ 
+ #endif
++#endif
+ 
+diff --git luabind-0.9.1/luabind/wrapper_base.hpp luabind-0.9.1-fixed/luabind/wrapper_base.hpp
+index d54c668..0f88cc5 100755
+--- luabind-0.9.1/luabind/wrapper_base.hpp
++++ luabind-0.9.1-fixed/luabind/wrapper_base.hpp
+@@ -89,7 +89,8 @@ namespace luabind
+ 
+ #endif // LUABIND_WRAPPER_BASE_HPP_INCLUDED
+ 
+-#elif BOOST_PP_ITERATION_FLAGS() == 1
++#else
++#if BOOST_PP_ITERATION_FLAGS() == 1
+ 
+ #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n *
+ #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n
+@@ -188,3 +189,4 @@ namespace luabind
+ #undef N
+ 
+ #endif
++#endif
diff --git a/nixpkgs/pkgs/development/libraries/luabind/default.nix b/nixpkgs/pkgs/development/libraries/luabind/default.nix
new file mode 100644
index 000000000000..50baad6a7a0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/luabind/default.nix
@@ -0,0 +1,31 @@
+{stdenv, fetchurl, boost-build, lua, boost}:
+
+stdenv.mkDerivation rec {
+  name = "luabind-0.9.1";
+
+  src = fetchurl {
+    url = "https://github.com/luabind/luabind/archive/v0.9.1.tar.gz";
+    sha256 = "0e5ead50a07668d29888f2fa6f53220f900c886e46a2c99c7e8656842f05ff2d";
+  };
+
+  patches = [ ./0.9.1_modern_boost_fix.patch ./0.9.1_boost_1.57_fix.patch ./0.9.1_discover_luajit.patch ];
+
+  buildInputs = [ boost-build lua boost ];
+
+  propagatedBuildInputs = [ lua ];
+
+  buildPhase = "LUA_PATH=${lua} bjam release";
+
+  installPhase = "LUA_PATH=${lua} bjam --prefix=$out release install";
+
+  passthru = {
+    inherit lua;
+  };
+
+  meta = {
+    homepage = https://github.com/luabind/luabind;
+    description = "A library that helps you create bindings between C++ and Lua";
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}