summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNascher2015-08-23 23:17:53 +0000
committerNascher2015-08-23 23:17:53 +0000
commit4ed911a9ce2529130607f4532bcfa7faacce4d4c (patch)
tree9f2d28c35721365ce27231cf2f8bd4bdf10b2ce2
parent84f4da09cc0443e11220dadd2e0e0c8ba43ed70e (diff)
downloadaur-4ed911a9ce2529130607f4532bcfa7faacce4d4c.tar.gz
Update to 1508.00
-rwxr-xr-x.AURINFO5
-rwxr-xr-x.SRCINFO10
-rwxr-xr-xPKGBUILD23
-rw-r--r--cmakepatch.patch28
-rw-r--r--utilitypatch.patch230
5 files changed, 10 insertions, 286 deletions
diff --git a/.AURINFO b/.AURINFO
index a5f1c9434217..c352ae39ae6a 100755
--- a/.AURINFO
+++ b/.AURINFO
@@ -1,6 +1,6 @@
pkgbase = voxelands
pkgdesc = A fork of Minetest, an Infiniminer/Minecraft inspired game
- pkgver = 1507.00
+ pkgver = 1506.00
pkgrel = 1
url = http://voxelands.com
install = voxelands.install
@@ -24,8 +24,7 @@ pkgbase = voxelands
conflicts = minetest-classic-next-git
conflicts = voxelands-next-git
replaces = minetest-classic
- source =
-http://voxelands.com/downloads/voxelands-1507.00-src.tar.bz2
+ source = http://voxelands.com/downloads/voxelands-1506.00-src.tar.bz2
pkgname = voxelands
diff --git a/.SRCINFO b/.SRCINFO
index 4d47a08f6da7..5245417219a3 100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = voxelands
pkgdesc = A fork of Minetest, an Infiniminer/Minecraft inspired game
- pkgver = 1507.00
+ pkgver = 1508.00
pkgrel = 1
url = http://voxelands.com
install = voxelands.install
@@ -24,12 +24,8 @@ pkgbase = voxelands
conflicts = minetest-classic-next-git
conflicts = voxelands-next-git
replaces = minetest-classic
- source = http://voxelands.com/downloads/voxelands-1507.00-src.tar.bz2
- source = cmakepatch.patch
- source = utilitypatch.patch
- sha256sums = de0052401bb98f41b41bd4b8a0f3ea71e2469d3de2175edde93f8bdd5bfc0249
- sha256sums = 323b095473c8893ce3e30fe2c275d6e2946cc510a8b137e46dd4c717bf3cbf62
- sha256sums = f73e79928718a2ca3136d8b6b0305202774763069c8600b211755b3608453c71
+ source = http://voxelands.com/downloads/voxelands-1508.00-src.tar.bz2
+ sha256sums = 11e8d699a16a7c0ac136a77ac021bb31ed92a0e591c77e3b8315d6c52eab5acc
pkgname = voxelands
diff --git a/PKGBUILD b/PKGBUILD
index b3c6ad278d3b..3a1dd7afe736 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
-# Maintainer: Nascher <kevin at roschan dot de>
-# Contributor: Menche <menche_mt at yahoo dot com>
+# Maintainer: Nascher <kevin at nascher dot org>
+# Contributor: Menche <menche_mt at yahoo dot com>
pkgname=voxelands
-pkgver=1507.00
+pkgver=1508.00
pkgrel=1
pkgdesc="A fork of Minetest, an Infiniminer/Minecraft inspired game"
url="http://voxelands.com"
@@ -15,22 +15,9 @@ provides=('minetest-classic' 'voxelands')
conflicts=('minetest-classic' 'minetest-classic-next-git' 'voxelands-next-git')
install="${pkgname}.install"
-source=("http://voxelands.com/downloads/${pkgname}-${pkgver}-src.tar.bz2"
- cmakepatch.patch
- utilitypatch.patch
- )
+source=("http://voxelands.com/downloads/${pkgname}-${pkgver}-src.tar.bz2")
-sha256sums=('f73e79928718a2ca3136d8b6b0305202774763069c8600b211755b3608453c71'
- '5e91cb07b6ea049f4fdf03c2c0f4f225dd578c5b0a748e120a91c7be33cae3ad'
- '323b095473c8893ce3e30fe2c275d6e2946cc510a8b137e46dd4c717bf3cbf62')
-
-prepare() {
- cd "${srcdir}/${pkgname}"
-
- echo "Patching Voxelands ..."
- patch -p1 -i $srcdir/cmakepatch.patch
- patch -p1 -i $srcdir/utilitypatch.patch
-}
+sha256sums=('11e8d699a16a7c0ac136a77ac021bb31ed92a0e591c77e3b8315d6c52eab5acc')
build() {
cd "${srcdir}/${pkgname}"
diff --git a/cmakepatch.patch b/cmakepatch.patch
deleted file mode 100644
index fda9ad7eedca..000000000000
--- a/cmakepatch.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 0adff9e..a674581 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -382,8 +382,8 @@ else()
- set(OPT_FLAGS "-O2 -fomit-frame-pointer")
- endif()
-
-- set(CMAKE_CXX_FLAGS_RELEASE "${OPT_FLAGS} ${SAFETY_FLAGS} -Wall -std=c++11 -DNDEBUG -pipe")
-- set(CMAKE_CXX_FLAGS_DEBUG "${SAFETY_FLAGS} -Wall -std=c++11 -O0 -g2 -ggdb")
-+ set(CMAKE_CXX_FLAGS_RELEASE "${OPT_FLAGS} ${SAFETY_FLAGS} -Wall -DNDEBUG -pipe")
-+ set(CMAKE_CXX_FLAGS_DEBUG "${SAFETY_FLAGS} -Wall -O0 -g2 -ggdb")
- set(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
- set(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
-
-diff --git a/src/cmake_config.h.in b/src/cmake_config.h.in
-index 2a74e59..b0fd7fb 100644
---- a/src/cmake_config.h.in
-+++ b/src/cmake_config.h.in
-@@ -14,7 +14,7 @@
- #else
- #define BUILD_TYPE "Debug"
- #endif
--#define BUILD_INFO "VER=" VERSION_STRING " RUN_IN_PLACE=@RUN_IN_PLACE@ USE_GETTEXT=@USE_GETTEXT@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@ BUILD_TYPE=" BUILD_TYPE
-+#define BUILD_INFO "VER="VERSION_STRING" RUN_IN_PLACE=@RUN_IN_PLACE@ USE_GETTEXT=@USE_GETTEXT@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@ BUILD_TYPE="BUILD_TYPE
-
- #endif
-
diff --git a/utilitypatch.patch b/utilitypatch.patch
deleted file mode 100644
index e06b02f2de9b..000000000000
--- a/utilitypatch.patch
+++ /dev/null
@@ -1,230 +0,0 @@
-diff --git a/src/tile.cpp b/src/tile.cpp
-index 4de2d00..010519c 100644
---- a/src/tile.cpp
-+++ b/src/tile.cpp
-@@ -73,17 +73,23 @@ void TextureSource::processQueue()
- /*
- Fetch textures
- */
-- std::lock_guard<std::mutex> guard(m_get_texture_queue_mutex);
-- while (!m_get_texture_queue.empty())
-+ if(m_get_texture_queue.size() > 0)
- {
-- std::string name = m_get_texture_queue.front().first;
-+ GetRequest<std::string, u32, u8, u8>
-+ request = m_get_texture_queue.pop();
-+
- infostream<<"TextureSource::processQueue(): "
- <<"got texture request with "
-- <<"name=\""<< name <<"\""
-+ <<"name=\""<<request.key<<"\""
- <<std::endl;
-
-- m_get_texture_queue.front().second.set_value(getTextureIdDirect(name));
-- m_get_texture_queue.pop();
-+ GetResult<std::string, u32, u8, u8>
-+ result;
-+ result.key = request.key;
-+ result.callers = request.callers;
-+ result.item = getTextureIdDirect(request.key);
-+
-+ request.dest->push_back(result);
- }
- }
-
-@@ -110,21 +116,29 @@ u32 TextureSource::getTextureId(const std::string &name)
- }else{
- infostream<<"getTextureId(): Queued: name=\""<<name<<"\""<<std::endl;
-
-- std::future<u32> future;
-- {
-- std::lock_guard<std::mutex> guard(m_get_texture_queue_mutex);
-- // We're gonna ask the result to be put into here
-- std::promise<u32> promise;
-- future = promise.get_future();
-+ // We're gonna ask the result to be put into here
-+ ResultQueue<std::string, u32, u8, u8> result_queue;
-
-- // Throw a request in
-- m_get_texture_queue.push(std::make_pair(name, std::move(promise)));
-- }
-+ // Throw a request in
-+ m_get_texture_queue.add(name, 0, 0, &result_queue);
-
- infostream<<"Waiting for texture from main thread, name=\""
- <<name<<"\""<<std::endl;
-
-- return future.get();
-+ try{
-+ // Wait result for a second
-+ GetResult<std::string, u32, u8, u8>
-+ result = result_queue.pop_front(1000);
-+
-+ // Check that at least something worked OK
-+ if (result.key != name)
-+ return 0;
-+
-+ return result.item;
-+ }catch(ItemNotFoundException &e) {
-+ infostream<<"Waiting for texture timed out."<<std::endl;
-+ return 0;
-+ }
- }
-
- infostream<<"getTextureId(): Failed"<<std::endl;
-diff --git a/src/tile.h b/src/tile.h
-index 3251474..d8daaab 100644
---- a/src/tile.h
-+++ b/src/tile.h
-@@ -30,9 +30,6 @@
- #include "threads.h"
- #include "utility.h"
- #include <string>
--#include <future>
--#include <mutex>
--#include <queue>
-
- using namespace jthread;
-
-@@ -261,8 +258,7 @@ private:
- JMutex m_atlaspointer_cache_mutex;
-
- // Queued texture fetches (to be processed by the main thread)
-- std::queue<std::pair<std::string, std::promise<u32>>> m_get_texture_queue;
-- std::mutex m_get_texture_queue_mutex;
-+ RequestQueue<std::string, u32, u8, u8> m_get_texture_queue;
- };
-
- enum MaterialType{
-diff --git a/src/utility.h b/src/utility.h
-index f4190ec..d0cbdf6 100644
---- a/src/utility.h
-+++ b/src/utility.h
-@@ -1128,6 +1128,127 @@ protected:
- };
-
- /*
-+ A single worker thread - multiple client threads queue framework.
-+*/
-+
-+template<typename Caller, typename Data>
-+class CallerInfo
-+{
-+public:
-+ Caller caller;
-+ Data data;
-+};
-+
-+template<typename Key, typename T, typename Caller, typename CallerData>
-+class GetResult
-+{
-+public:
-+ Key key;
-+ T item;
-+ core::list<CallerInfo<Caller, CallerData> > callers;
-+};
-+
-+template<typename Key, typename T, typename Caller, typename CallerData>
-+class ResultQueue: public MutexedQueue< GetResult<Key, T, Caller, CallerData> >
-+{
-+};
-+
-+template<typename Key, typename T, typename Caller, typename CallerData>
-+class GetRequest
-+{
-+public:
-+ GetRequest()
-+ {
-+ dest = NULL;
-+ }
-+ GetRequest(ResultQueue<Key,T, Caller, CallerData> *a_dest)
-+ {
-+ dest = a_dest;
-+ }
-+ GetRequest(ResultQueue<Key,T, Caller, CallerData> *a_dest,
-+ Key a_key)
-+ {
-+ dest = a_dest;
-+ key = a_key;
-+ }
-+ ~GetRequest()
-+ {
-+ }
-+
-+ Key key;
-+ ResultQueue<Key, T, Caller, CallerData> *dest;
-+ core::list<CallerInfo<Caller, CallerData> > callers;
-+};
-+
-+template<typename Key, typename T, typename Caller, typename CallerData>
-+class RequestQueue
-+{
-+public:
-+ u32 size()
-+ {
-+ return m_queue.size();
-+ }
-+
-+ void add(Key key, Caller caller, CallerData callerdata,
-+ ResultQueue<Key, T, Caller, CallerData> *dest)
-+ {
-+ JMutexAutoLock lock(m_queue.getMutex());
-+
-+ /*
-+ If the caller is already on the list, only update CallerData
-+ */
-+ for(typename core::list< GetRequest<Key, T, Caller, CallerData> >::Iterator
-+ i = m_queue.getList().begin();
-+ i != m_queue.getList().end(); i++)
-+ {
-+ GetRequest<Key, T, Caller, CallerData> &request = *i;
-+
-+ if(request.key == key)
-+ {
-+ for(typename core::list< CallerInfo<Caller, CallerData> >::Iterator
-+ i = request.callers.begin();
-+ i != request.callers.end(); i++)
-+ {
-+ CallerInfo<Caller, CallerData> &ca = *i;
-+ if(ca.caller == caller)
-+ {
-+ ca.data = callerdata;
-+ return;
-+ }
-+ }
-+ CallerInfo<Caller, CallerData> ca;
-+ ca.caller = caller;
-+ ca.data = callerdata;
-+ request.callers.push_back(ca);
-+ return;
-+ }
-+ }
-+
-+ /*
-+ Else add a new request to the queue
-+ */
-+
-+ GetRequest<Key, T, Caller, CallerData> request;
-+ request.key = key;
-+ CallerInfo<Caller, CallerData> ca;
-+ ca.caller = caller;
-+ ca.data = callerdata;
-+ request.callers.push_back(ca);
-+ request.dest = dest;
-+
-+ m_queue.getList().push_back(request);
-+ }
-+
-+ GetRequest<Key, T, Caller, CallerData> pop(bool wait_if_empty=false)
-+ {
-+ return m_queue.pop_front(wait_if_empty);
-+ }
-+
-+private:
-+ MutexedQueue< GetRequest<Key, T, Caller, CallerData> > m_queue;
-+};
-+
-+/*
- Pseudo-random (VC++ rand() sucks)
- */
- int myrand(void);