Permalink
Browse files

Fix build on ubuntu bionic

  • Loading branch information...
proller committed May 26, 2018
1 parent c291133 commit 1944104681b74088e9c397cf292df07462479fd1
View
@@ -7,8 +7,8 @@
# curl https://raw.githubusercontent.com/freeminer/freeminer/master/build/debian_ogles.sh | sh
#1. To compile need to install packages:
sudo apt-get install -y git subversion build-essential cmake libbz2-dev libpng12-dev libjpeg-dev libfreetype6-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libvorbis-dev
sudo apt-get install -y libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev libleveldb-dev libsnappy-dev libgettextpo0 libmsgpack-dev libgles1-mesa-dev libgles2-mesa-dev
sudo apt-get install -y git subversion build-essential cmake libbz2-dev "libpng12-dev|libpng-dev" libjpeg-dev libfreetype6-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libvorbis-dev
sudo apt-get install -y libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev libleveldb-dev libsnappy-dev libgettextpo0 libmsgpack-dev "libgles1-mesa-dev|libgles2-mesa-dev" libgles2-mesa-dev
#2. get and compile irrlicht with oppengl es support:
@@ -9,7 +9,7 @@
FIND_PATH(LUA_INCLUDE_DIR luajit.h
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES include/luajit-2.0 include/luajit-5_1-2.0 include
PATH_SUFFIXES include/luajit-2.1 include/luajit-2.0 include/luajit-5_1-2.0 include
PATHS
~/Library/Frameworks
/Library/Frameworks
View
@@ -46,6 +46,7 @@ endif()
set(CMAKE_REQUIRED_FLAGS "${STD_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "-lstdc++")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
CHECK_CXX_SOURCE_RUNS("
#include <string>
@@ -541,9 +541,14 @@ Buffer<u8> NetworkPacket::oldForgePacket()
//freeminer:
bool parse_msgpack_packet(char *data, u32 datasize, MsgpackPacket *packet, int *command, msgpack::unpacked &msg) {
try {
//msgpack::unpacked msg;
msgpack::unpack(msg, data, datasize);
msgpack::object obj = msg.get();
/* todo: msgpack2+ ?
msgpack::object_handle result;
msgpack::unpack(result, data, datasize);
msgpack::object obj = result.get();
*/
*packet = obj.as<MsgpackPacket>();
*command = (*packet)[MSGPACK_COMMAND].as<int>();
@@ -380,7 +380,7 @@ void LuaAreaStore::Register(lua_State *L)
}
const char LuaAreaStore::className[] = "AreaStore";
const luaL_reg LuaAreaStore::methods[] = {
const luaL_Reg LuaAreaStore::methods[] = {
luamethod(LuaAreaStore, get_area),
luamethod(LuaAreaStore, get_areas_for_pos),
luamethod(LuaAreaStore, get_areas_in_area),
@@ -29,7 +29,7 @@ class LuaAreaStore : public ModApiBase {
private:
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
static int gc_object(lua_State *L);
@@ -466,7 +466,7 @@ void InvRef::Register(lua_State *L)
}
const char InvRef::className[] = "InvRef";
const luaL_reg InvRef::methods[] = {
const luaL_Reg InvRef::methods[] = {
luamethod(InvRef, is_empty),
luamethod(InvRef, get_size),
luamethod(InvRef, set_size),
@@ -39,7 +39,7 @@ class InvRef : public ModApiBase {
InventoryLocation m_loc;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
static InvRef *checkobject(lua_State *L, int narg);
@@ -438,7 +438,7 @@ void LuaItemStack::Register(lua_State *L)
}
const char LuaItemStack::className[] = "ItemStack";
const luaL_reg LuaItemStack::methods[] = {
const luaL_Reg LuaItemStack::methods[] = {
luamethod(LuaItemStack, is_empty),
luamethod(LuaItemStack, get_name),
luamethod(LuaItemStack, set_name),
@@ -31,7 +31,7 @@ class LuaItemStack : public ModApiBase {
ItemStack m_stack;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
// Exported functions
@@ -349,7 +349,7 @@ void NodeMetaRef::Register(lua_State *L)
}
const char NodeMetaRef::className[] = "NodeMetaRef";
const luaL_reg NodeMetaRef::methods[] = {
const luaL_Reg NodeMetaRef::methods[] = {
luamethod(NodeMetaRef, get_string),
luamethod(NodeMetaRef, set_string),
luamethod(NodeMetaRef, get_int),
@@ -38,7 +38,7 @@ class NodeMetaRef : public ModApiBase {
ServerEnvironment *m_env;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
static NodeMetaRef *checkobject(lua_State *L, int narg);
@@ -165,7 +165,7 @@ void NodeTimerRef::Register(lua_State *L)
}
const char NodeTimerRef::className[] = "NodeTimerRef";
const luaL_reg NodeTimerRef::methods[] = {
const luaL_Reg NodeTimerRef::methods[] = {
luamethod(NodeTimerRef, start),
luamethod(NodeTimerRef, set),
luamethod(NodeTimerRef, stop),
@@ -34,7 +34,7 @@ class NodeTimerRef : public ModApiBase {
ServerEnvironment *m_env;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
static int gc_object(lua_State *L);
@@ -138,7 +138,7 @@ void LuaPerlinNoise::Register(lua_State *L)
const char LuaPerlinNoise::className[] = "PerlinNoise";
const luaL_reg LuaPerlinNoise::methods[] = {
const luaL_Reg LuaPerlinNoise::methods[] = {
luamethod(LuaPerlinNoise, get2d),
luamethod(LuaPerlinNoise, get3d),
{0,0}
@@ -396,7 +396,7 @@ void LuaPerlinNoiseMap::Register(lua_State *L)
const char LuaPerlinNoiseMap::className[] = "PerlinNoiseMap";
const luaL_reg LuaPerlinNoiseMap::methods[] = {
const luaL_Reg LuaPerlinNoiseMap::methods[] = {
luamethod(LuaPerlinNoiseMap, get2dMap),
luamethod(LuaPerlinNoiseMap, get2dMap_flat),
luamethod(LuaPerlinNoiseMap, calc2dMap),
@@ -501,7 +501,7 @@ void LuaPseudoRandom::Register(lua_State *L)
const char LuaPseudoRandom::className[] = "PseudoRandom";
const luaL_reg LuaPseudoRandom::methods[] = {
const luaL_Reg LuaPseudoRandom::methods[] = {
luamethod(LuaPseudoRandom, next),
{0,0}
};
@@ -600,7 +600,7 @@ void LuaPcgRandom::Register(lua_State *L)
const char LuaPcgRandom::className[] = "PcgRandom";
const luaL_reg LuaPcgRandom::methods[] = {
const luaL_Reg LuaPcgRandom::methods[] = {
luamethod(LuaPcgRandom, next),
luamethod(LuaPcgRandom, rand_normal_dist),
{0,0}
@@ -714,7 +714,7 @@ void LuaSecureRandom::Register(lua_State *L)
}
const char LuaSecureRandom::className[] = "SecureRandom";
const luaL_reg LuaSecureRandom::methods[] = {
const luaL_Reg LuaSecureRandom::methods[] = {
luamethod(LuaSecureRandom, next_bytes),
{0,0}
};
@@ -34,7 +34,7 @@ class LuaPerlinNoise : public ModApiBase {
private:
NoiseParams np;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
// Exported functions
@@ -65,7 +65,7 @@ class LuaPerlinNoiseMap : public ModApiBase {
Noise *noise;
bool m_is3d;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
// Exported functions
@@ -103,7 +103,7 @@ class LuaPseudoRandom : public ModApiBase {
PseudoRandom m_pseudo;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
// Exported functions
@@ -134,7 +134,7 @@ class LuaPcgRandom : public ModApiBase {
PcgRandom m_rnd;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
// Exported functions
@@ -171,7 +171,7 @@ class LuaSecureRandom : public ModApiBase {
private:
static const size_t RAND_BUF_SIZE = 2048;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
u32 m_rand_idx;
char m_rand_buf[RAND_BUF_SIZE];
@@ -1806,7 +1806,7 @@ void ObjectRef::Register(lua_State *L)
}
const char ObjectRef::className[] = "ObjectRef";
const luaL_reg ObjectRef::methods[] = {
const luaL_Reg ObjectRef::methods[] = {
// ServerActiveObject
luamethod(ObjectRef, remove),
luamethod(ObjectRef, getpos),
@@ -40,7 +40,7 @@ class ObjectRef : public ModApiBase {
ServerActiveObject *m_object;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
public:
static ObjectRef *checkobject(lua_State *L, int narg);
@@ -217,7 +217,7 @@ LuaSettings* LuaSettings::checkobject(lua_State* L, int narg)
}
const char LuaSettings::className[] = "Settings";
const luaL_reg LuaSettings::methods[] = {
const luaL_Reg LuaSettings::methods[] = {
luamethod(LuaSettings, get),
luamethod(LuaSettings, get_bool),
luamethod(LuaSettings, set),
@@ -30,7 +30,7 @@ class Settings;
class LuaSettings : public ModApiBase {
private:
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
// garbage collector
static int gc_object(lua_State* L);
@@ -468,7 +468,7 @@ void LuaVoxelManip::Register(lua_State *L)
}
const char LuaVoxelManip::className[] = "VoxelManip";
const luaL_reg LuaVoxelManip::methods[] = {
const luaL_Reg LuaVoxelManip::methods[] = {
luamethod(LuaVoxelManip, read_from_map),
luamethod(LuaVoxelManip, get_data),
luamethod(LuaVoxelManip, set_data),
@@ -40,7 +40,7 @@ class LuaVoxelManip : public ModApiBase {
bool is_mapgen_vm;
static const char className[];
static const luaL_reg methods[];
static const luaL_Reg methods[];
static int gc_object(lua_State *L);
View
@@ -108,10 +108,16 @@ std::unique_ptr<recursive_lock<unique_lock, mutex>> locker<mutex, unique_lock, s
return std::unique_ptr<lock_rec_unique>(new lock_rec_unique (mtx, thread_id, true));
}
template<class mutex, class unique_lock, class shared_lock>
/*template<class mutex, class unique_lock, class shared_lock>
std::unique_ptr<recursive_lock<shared_lock, mutex>> locker<mutex, unique_lock, shared_lock>::lock_shared_rec() {
SCOPE_PROFILE("locker::lock_shared_rec");
return std::unique_ptr<lock_rec_shared>(new lock_rec_shared (mtx, thread_id));
}*/
template<class mutex, class unique_lock, class shared_lock>
std::unique_ptr<recursive_lock<shared_lock, mutex>> locker<mutex, unique_lock, shared_lock>::lock_shared_rec() const {
SCOPE_PROFILE("locker::lock_shared_rec");
return std::unique_ptr<lock_rec_shared>(new lock_rec_shared (mtx, thread_id));
}
template<class mutex, class unique_lock, class shared_lock>
View
@@ -124,7 +124,8 @@ class locker {
std::unique_ptr<sharedlock> try_lock_shared();
std::unique_ptr<lock_rec_unique> lock_unique_rec();
std::unique_ptr<lock_rec_unique> try_lock_unique_rec();
std::unique_ptr<lock_rec_shared> lock_shared_rec();
//std::unique_ptr<lock_rec_shared> lock_shared_rec();
std::unique_ptr<lock_rec_shared> lock_shared_rec() const;
std::unique_ptr<lock_rec_shared> try_lock_shared_rec();
};

0 comments on commit 1944104

Please sign in to comment.