[arch-commits] Commit in primus/repos (6 files)

Sven-Hendrik Haase svenstaro at archlinux.org
Fri Jan 22 04:33:46 UTC 2016


    Date: Friday, January 22, 2016 @ 05:33:46
  Author: svenstaro
Revision: 158487

archrelease: copy trunk to community-i686, community-x86_64

Added:
  primus/repos/community-i686/PKGBUILD
    (from rev 158486, primus/trunk/PKGBUILD)
  primus/repos/community-i686/register_cleanup.patch
    (from rev 158486, primus/trunk/register_cleanup.patch)
  primus/repos/community-x86_64/PKGBUILD
    (from rev 158486, primus/trunk/PKGBUILD)
  primus/repos/community-x86_64/register_cleanup.patch
    (from rev 158486, primus/trunk/register_cleanup.patch)
Deleted:
  primus/repos/community-i686/register_cleanup.patch
  primus/repos/community-x86_64/register_cleanup.patch

-----------------------------------------+
 /register_cleanup.patch                 |   94 ++++++++++++++++++++++++++++++
 community-i686/PKGBUILD                 |   45 ++++++++++++++
 community-i686/register_cleanup.patch   |   47 ---------------
 community-x86_64/PKGBUILD               |   45 ++++++++++++++
 community-x86_64/register_cleanup.patch |   47 ---------------
 5 files changed, 184 insertions(+), 94 deletions(-)

Copied: primus/repos/community-i686/PKGBUILD (from rev 158486, primus/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2016-01-22 04:33:46 UTC (rev 158487)
@@ -0,0 +1,45 @@
+# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Contributor: Alexander Monakov <amonakov at gmail.com>
+
+pkgname=primus
+pkgver=20151110
+pkgrel=5
+pkgdesc="Faster OpenGL offloading for Bumblebee"
+arch=('i686' 'x86_64')
+url="https://github.com/amonakov/primus"
+license=('custom:ISC')
+depends=('bumblebee')
+makedepends=('git')
+source=("git://github.com/amonakov/primus.git#commit=d1afbf6"
+        "register_cleanup.patch")
+sha1sums=('SKIP'
+          'fd48f89c55c1ad854d7a985781faed2c52c0135f')
+
+prepare() {
+  cd primus
+
+  patch -Np1 < "$srcdir/register_cleanup.patch"
+}
+
+build() {
+  cd primus
+
+  make
+}
+
+package() {
+  cd primus
+
+  install -D "lib/libGL.so.1" "$pkgdir/usr/lib/primus/libGL.so.1"
+  sed -e "s#^PRIMUS_libGL=.*#PRIMUS_libGL='/usr/\$LIB/primus:/usr/lib/nvidia:/usr/lib32/nvidia'#" primusrun > primusrun.dist
+  install -D "primusrun.dist" "$pkgdir/usr/bin/primusrun"
+
+  install -D "primus.bash-completion" "$pkgdir/etc/bash_completion.d/primusrun"
+
+  gzip -9 "primusrun.1"
+  install -D "primusrun.1.gz" "$pkgdir/usr/share/man/man1/primusrun.1.gz"
+
+  install -D -m644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: community-i686/register_cleanup.patch
===================================================================
--- community-i686/register_cleanup.patch	2016-01-22 04:33:10 UTC (rev 158486)
+++ community-i686/register_cleanup.patch	2016-01-22 04:33:46 UTC (rev 158487)
@@ -1,47 +0,0 @@
-diff --git a/libglfork.cpp b/libglfork.cpp
-index 03f514f..bb42f0d 100644
---- a/libglfork.cpp
-+++ b/libglfork.cpp
-@@ -259,6 +259,22 @@ static struct PrimusInfo {
-   }
- } primus;
-
-+static void cleanup()
-+{
-+  primus.drawables.clear();
-+}
-+
-+static void register_cleanup_1()
-+{
-+  atexit(cleanup);
-+}
-+
-+static void register_cleanup()
-+{
-+  static pthread_once_t once = PTHREAD_ONCE_INIT;
-+  pthread_once(&once, register_cleanup_1);
-+}
-+
- // Thread-specific data
- static __thread struct {
-   Display *dpy;
-@@ -622,11 +638,6 @@ GLXContext glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config, GLXConte
- void glXDestroyContext(Display *dpy, GLXContext ctx)
- {
-   primus.contexts.erase(ctx);
--  // kludge: reap background tasks when deleting the last context
--  // otherwise something will deadlock during unloading the library
--  if (primus.contexts.empty())
--    for (DrawablesInfo::iterator i = primus.drawables.begin(); i != primus.drawables.end(); i++)
--      i->second.reap_workers();
-   primus.afns.glXDestroyContext(primus.adpy, ctx);
- }
-
-@@ -720,6 +731,7 @@ void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
-     di.actx = ctx;
-     di.d.spawn_worker(drawable, display_work);
-     di.r.spawn_worker(drawable, readback_work);
-+    register_cleanup();
-   }
-   // Readback thread needs a sync object to avoid reading an incomplete frame
-   di.sync = primus.afns.glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);

Copied: primus/repos/community-i686/register_cleanup.patch (from rev 158486, primus/trunk/register_cleanup.patch)
===================================================================
--- community-i686/register_cleanup.patch	                        (rev 0)
+++ community-i686/register_cleanup.patch	2016-01-22 04:33:46 UTC (rev 158487)
@@ -0,0 +1,47 @@
+diff --git a/libglfork.cpp b/libglfork.cpp
+index 03f514f..bb42f0d 100644
+--- a/libglfork.cpp
++++ b/libglfork.cpp
+@@ -259,6 +259,22 @@ static struct PrimusInfo {
+   }
+ } primus;
+
++static void cleanup()
++{
++  primus.drawables.clear();
++}
++
++static void register_cleanup_1()
++{
++  atexit(cleanup);
++}
++
++static void register_cleanup()
++{
++  static pthread_once_t once = PTHREAD_ONCE_INIT;
++  pthread_once(&once, register_cleanup_1);
++}
++
+ // Thread-specific data
+ static __thread struct {
+   Display *dpy;
+@@ -622,11 +638,6 @@ GLXContext glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config, GLXConte
+ void glXDestroyContext(Display *dpy, GLXContext ctx)
+ {
+   primus.contexts.erase(ctx);
+-  // kludge: reap background tasks when deleting the last context
+-  // otherwise something will deadlock during unloading the library
+-  if (primus.contexts.empty())
+-    for (DrawablesInfo::iterator i = primus.drawables.begin(); i != primus.drawables.end(); i++)
+-      i->second.reap_workers();
+   primus.afns.glXDestroyContext(primus.adpy, ctx);
+ }
+
+@@ -720,6 +731,7 @@ void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
+     di.actx = ctx;
+     di.d.spawn_worker(drawable, display_work);
+     di.r.spawn_worker(drawable, readback_work);
++    register_cleanup();
+   }
+   // Readback thread needs a sync object to avoid reading an incomplete frame
+   di.sync = primus.afns.glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);

Copied: primus/repos/community-x86_64/PKGBUILD (from rev 158486, primus/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2016-01-22 04:33:46 UTC (rev 158487)
@@ -0,0 +1,45 @@
+# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Contributor: Alexander Monakov <amonakov at gmail.com>
+
+pkgname=primus
+pkgver=20151110
+pkgrel=5
+pkgdesc="Faster OpenGL offloading for Bumblebee"
+arch=('i686' 'x86_64')
+url="https://github.com/amonakov/primus"
+license=('custom:ISC')
+depends=('bumblebee')
+makedepends=('git')
+source=("git://github.com/amonakov/primus.git#commit=d1afbf6"
+        "register_cleanup.patch")
+sha1sums=('SKIP'
+          'fd48f89c55c1ad854d7a985781faed2c52c0135f')
+
+prepare() {
+  cd primus
+
+  patch -Np1 < "$srcdir/register_cleanup.patch"
+}
+
+build() {
+  cd primus
+
+  make
+}
+
+package() {
+  cd primus
+
+  install -D "lib/libGL.so.1" "$pkgdir/usr/lib/primus/libGL.so.1"
+  sed -e "s#^PRIMUS_libGL=.*#PRIMUS_libGL='/usr/\$LIB/primus:/usr/lib/nvidia:/usr/lib32/nvidia'#" primusrun > primusrun.dist
+  install -D "primusrun.dist" "$pkgdir/usr/bin/primusrun"
+
+  install -D "primus.bash-completion" "$pkgdir/etc/bash_completion.d/primusrun"
+
+  gzip -9 "primusrun.1"
+  install -D "primusrun.1.gz" "$pkgdir/usr/share/man/man1/primusrun.1.gz"
+
+  install -D -m644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: community-x86_64/register_cleanup.patch
===================================================================
--- community-x86_64/register_cleanup.patch	2016-01-22 04:33:10 UTC (rev 158486)
+++ community-x86_64/register_cleanup.patch	2016-01-22 04:33:46 UTC (rev 158487)
@@ -1,47 +0,0 @@
-diff --git a/libglfork.cpp b/libglfork.cpp
-index 03f514f..bb42f0d 100644
---- a/libglfork.cpp
-+++ b/libglfork.cpp
-@@ -259,6 +259,22 @@ static struct PrimusInfo {
-   }
- } primus;
-
-+static void cleanup()
-+{
-+  primus.drawables.clear();
-+}
-+
-+static void register_cleanup_1()
-+{
-+  atexit(cleanup);
-+}
-+
-+static void register_cleanup()
-+{
-+  static pthread_once_t once = PTHREAD_ONCE_INIT;
-+  pthread_once(&once, register_cleanup_1);
-+}
-+
- // Thread-specific data
- static __thread struct {
-   Display *dpy;
-@@ -622,11 +638,6 @@ GLXContext glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config, GLXConte
- void glXDestroyContext(Display *dpy, GLXContext ctx)
- {
-   primus.contexts.erase(ctx);
--  // kludge: reap background tasks when deleting the last context
--  // otherwise something will deadlock during unloading the library
--  if (primus.contexts.empty())
--    for (DrawablesInfo::iterator i = primus.drawables.begin(); i != primus.drawables.end(); i++)
--      i->second.reap_workers();
-   primus.afns.glXDestroyContext(primus.adpy, ctx);
- }
-
-@@ -720,6 +731,7 @@ void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
-     di.actx = ctx;
-     di.d.spawn_worker(drawable, display_work);
-     di.r.spawn_worker(drawable, readback_work);
-+    register_cleanup();
-   }
-   // Readback thread needs a sync object to avoid reading an incomplete frame
-   di.sync = primus.afns.glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);

Copied: primus/repos/community-x86_64/register_cleanup.patch (from rev 158486, primus/trunk/register_cleanup.patch)
===================================================================
--- community-x86_64/register_cleanup.patch	                        (rev 0)
+++ community-x86_64/register_cleanup.patch	2016-01-22 04:33:46 UTC (rev 158487)
@@ -0,0 +1,47 @@
+diff --git a/libglfork.cpp b/libglfork.cpp
+index 03f514f..bb42f0d 100644
+--- a/libglfork.cpp
++++ b/libglfork.cpp
+@@ -259,6 +259,22 @@ static struct PrimusInfo {
+   }
+ } primus;
+
++static void cleanup()
++{
++  primus.drawables.clear();
++}
++
++static void register_cleanup_1()
++{
++  atexit(cleanup);
++}
++
++static void register_cleanup()
++{
++  static pthread_once_t once = PTHREAD_ONCE_INIT;
++  pthread_once(&once, register_cleanup_1);
++}
++
+ // Thread-specific data
+ static __thread struct {
+   Display *dpy;
+@@ -622,11 +638,6 @@ GLXContext glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config, GLXConte
+ void glXDestroyContext(Display *dpy, GLXContext ctx)
+ {
+   primus.contexts.erase(ctx);
+-  // kludge: reap background tasks when deleting the last context
+-  // otherwise something will deadlock during unloading the library
+-  if (primus.contexts.empty())
+-    for (DrawablesInfo::iterator i = primus.drawables.begin(); i != primus.drawables.end(); i++)
+-      i->second.reap_workers();
+   primus.afns.glXDestroyContext(primus.adpy, ctx);
+ }
+
+@@ -720,6 +731,7 @@ void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
+     di.actx = ctx;
+     di.d.spawn_worker(drawable, display_work);
+     di.r.spawn_worker(drawable, readback_work);
++    register_cleanup();
+   }
+   // Readback thread needs a sync object to avoid reading an incomplete frame
+   di.sync = primus.afns.glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);



More information about the arch-commits mailing list