[SCM] osgearth branch, jessie, updated. debian/2.4-5-7-g2c48f7d

2013-10-08 Thread Bas Couwenberg
The following commit has been merged in the jessie branch:
commit 2c48f7d78bb7a5ad52b6f0190b2715c42ef4748c
Author: Bas Couwenberg sebas...@xs4all.nl
Date:   Wed Oct 9 01:36:40 2013 +0200

Add patch to use thr_self syscall on kFreeBSD.

diff --git a/debian/changelog b/debian/changelog
index 44e18f4..bfe70a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ osgearth (2.4.0+dfsg-6) unstable; urgency=low
   * Add patch to fix FTBFS on kfreebsd-*, use pthread_self instead of gettid.
 Thanks Steven Chamberlain for the patch.
 (closes: #725383)
+  * Add patch to use thr_self syscall on kFreeBSD.
+Thanks Petr Salinger, Robert Millan and Ed Maste for the advice.
 
  -- Bas Couwenberg sebas...@xs4all.nl  Tue, 24 Sep 2013 16:59:37 +0200
 
diff --git a/debian/patches/kfreebsd-getCurrentThreadId.patch 
b/debian/patches/kfreebsd-getCurrentThreadId.patch
new file mode 100644
index 000..c4eacab
--- /dev/null
+++ b/debian/patches/kfreebsd-getCurrentThreadId.patch
@@ -0,0 +1,25 @@
+Description: Use thr_self syscall on kFreeBSD.
+Author: Bas Couwenberg sebas...@xs4all.nl
+Last-Update: 2013-10-09
+--- a/src/osgEarth/ThreadingUtils.cpp
 b/src/osgEarth/ThreadingUtils.cpp
+@@ -20,7 +20,7 @@
+ 
+ #ifdef _WIN32
+ extern C unsigned long __stdcall GetCurrentThreadId();
+-#elif defined(__APPLE__) || defined(__LINUX__)
++#elif defined(__APPLE__) || defined(__LINUX__) || defined(__FreeBSD__) || 
defined(__FreeBSD_kernel__)
+ #   include unistd.h
+ #   include sys/syscall.h
+ #else
+@@ -42,6 +42,10 @@ unsigned osgEarth::Threading::getCurrent
+   return ::syscall(SYS_thread_selfid);
+ #elif __LINUX__
+   return (unsigned)::syscall(SYS_gettid);
++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++  long  tid;
++  syscall(SYS_thr_self, tid);
++  return (unsigned)tid;
+ #else
+   /* :XXX: this truncates to 32 bits, but better than nothing */
+   return (unsigned)pthread_self();
diff --git a/debian/patches/series b/debian/patches/series
index 213f5c1..2779e52 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ soversion.patch
 MPGeometry-OpenSceneGraph-3.1.8.patch
 becuase-typo.patch
 fallback-getCurrentThreadId.patch
+kfreebsd-getCurrentThreadId.patch

-- 
osgEarth terrain rendering toolkit

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


[SCM] osgearth branch, jessie, updated. debian/2.4-5-7-g2c48f7d

2013-10-08 Thread Bas Couwenberg
The following commit has been merged in the jessie branch:
commit 492423dbf0d24c533b72b8f26e2c767a4fe4e830
Author: Bas Couwenberg sebas...@xs4all.nl
Date:   Wed Oct 9 01:42:31 2013 +0200

Add header for thread ID patch.

diff --git a/debian/patches/kfreebsd-getCurrentThreadId.patch 
b/debian/patches/fallback-getCurrentThreadId.patch
similarity index 61%
rename from debian/patches/kfreebsd-getCurrentThreadId.patch
rename to debian/patches/fallback-getCurrentThreadId.patch
index 00e559c..711d05e 100644
--- a/debian/patches/kfreebsd-getCurrentThreadId.patch
+++ b/debian/patches/fallback-getCurrentThreadId.patch
@@ -1,7 +1,9 @@
-Index: osgearth-2.4.0+dfsg/src/osgEarth/ThreadingUtils.cpp
-===
 osgearth-2.4.0+dfsg.orig/src/osgEarth/ThreadingUtils.cpp   2013-04-11 
19:07:39.0 +0100
-+++ osgearth-2.4.0+dfsg/src/osgEarth/ThreadingUtils.cpp2013-10-04 
22:04:38.898332000 +0100
+Description: Fallback to pthread_self() for thread ID on non-Linux kernels.
+Author: Steven Chamberlain ste...@pyro.eu.org
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725383
+Last-Update: 2013-10-04
+--- a/src/osgEarth/ThreadingUtils.cpp
 b/src/osgEarth/ThreadingUtils.cpp
 @@ -20,9 +20,11 @@
  
  #ifdef _WIN32
@@ -15,7 +17,7 @@ Index: osgearth-2.4.0+dfsg/src/osgEarth/ThreadingUtils.cpp
  #endif
  
  using namespace osgEarth::Threading;
-@@ -38,7 +40,10 @@
+@@ -38,7 +40,10 @@ unsigned osgEarth::Threading::getCurrent
return (unsigned)::GetCurrentThreadId();
  #elif __APPLE__
return ::syscall(SYS_thread_selfid);
diff --git a/debian/patches/series b/debian/patches/series
index 5fb7e42..213f5c1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,4 @@
 soversion.patch
 MPGeometry-OpenSceneGraph-3.1.8.patch
 becuase-typo.patch
-kfreebsd-getCurrentThreadId.patch
+fallback-getCurrentThreadId.patch

-- 
osgEarth terrain rendering toolkit

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel