Skip to content

Instantly share code, notes, and snippets.

@ryancdotorg
Created September 24, 2013 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryancdotorg/6690445 to your computer and use it in GitHub Desktop.
Save ryancdotorg/6690445 to your computer and use it in GitHub Desktop.
Fixes to humblehacker/kspec to allow compile on ubuntu 12.04
diff --git a/main.cc b/main.cc
index 4bfc287..bb0ada7 100644
--- a/main.cc
+++ b/main.cc
@@ -180,7 +180,7 @@ generate_code(po::variables_map &options, hh::Keyboard::Ptr &kb)
{
try
{
- if (fs::is_regular_file(dir_itr->status()) && boost::iends_with(dir_itr->path().stem(), ".elu"))
+ if (fs::is_regular_file(dir_itr->status()) && boost::iends_with(dir_itr->path().stem().string(), ".elu"))
{
generate(dir_itr->path(), output_dir, L, options);
}
@@ -250,9 +250,9 @@ generate(const fs::path &template_filename, const fs::path &output_dir, lua_Stat
const po::variables_map &options)
{
// build the template filename from the output filename, and open it
- string stem = template_filename.stem();
+ string stem = template_filename.stem().string();
boost::replace_all(stem, ".elu", "");
- fs::path output_filename(stem + template_filename.extension());
+ fs::path output_filename(stem + template_filename.extension().string());
output_filename = output_dir / output_filename;
cout << "generating " << output_filename << " from " << template_filename << endl;
diff --git a/SConstruct b/SConstruct
index fab0901..6f03c01 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2,7 +2,7 @@ import os
PLATFORM = os.uname()[0].lower()
-libs = ['lua',
+libs = ['lua5.1',
'boost_system-mt',
'boost_filesystem-mt',
'boost_program_options-mt']
@@ -51,4 +51,4 @@ env.Program(target = 'kspec',
env.Command(target = ['Parser.cpp', 'Parser.h', 'Scanner.cpp', 'Scanner.h'],
source = 'kspec.atg',
- action = "coco $SOURCE")
+ action = "cococpp $SOURCE")
diff --git a/lua_helpers.h b/lua_helpers.h
index 95ec637..ae23792 100644
--- a/lua_helpers.h
+++ b/lua_helpers.h
@@ -9,9 +9,9 @@
extern "C"
{
- #include "lua.h"
- #include "lualib.h"
- #include "lauxlib.h"
+ #include <lua5.1/lua.h>
+ #include <lua5.1/lualib.h>
+ #include <lua5.1/lauxlib.h>
}
#include "utils.h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment