[arch-commits] Commit in primus/repos (6 files)
Date: Monday, February 27, 2017 @ 20:26:16 Author: heftig Revision: 214099 archrelease: copy trunk to community-testing-i686, community-testing-x86_64 Added: primus/repos/community-testing-i686/ primus/repos/community-testing-i686/PKGBUILD (from rev 214098, primus/trunk/PKGBUILD) primus/repos/community-testing-i686/register_cleanup.patch (from rev 214098, primus/trunk/register_cleanup.patch) primus/repos/community-testing-x86_64/ primus/repos/community-testing-x86_64/PKGBUILD (from rev 214098, primus/trunk/PKGBUILD) primus/repos/community-testing-x86_64/register_cleanup.patch (from rev 214098, primus/trunk/register_cleanup.patch) -+ community-testing-i686/PKGBUILD | 43 community-testing-i686/register_cleanup.patch | 47 ++ community-testing-x86_64/PKGBUILD | 43 community-testing-x86_64/register_cleanup.patch | 47 ++ 4 files changed, 180 insertions(+) Copied: primus/repos/community-testing-i686/PKGBUILD (from rev 214098, primus/trunk/PKGBUILD) === --- community-testing-i686/PKGBUILD (rev 0) +++ community-testing-i686/PKGBUILD 2017-02-27 20:26:16 UTC (rev 214099) @@ -0,0 +1,43 @@ +# $Id$ +# Maintainer: Sven-Hendrik Haase+# Contributor: Alexander Monakov + +pkgname=primus +pkgver=20151110 +pkgrel=7 +pkgdesc="Faster OpenGL offloading for Bumblebee" +arch=('i686' 'x86_64') +url="https://github.com/amonakov/primus; +license=('custom:ISC') +depends=('bumblebee') +makedepends=('git') +_commit=d1afbf6fce2778c0751eddf19db9882e04f18bfd # master +source=("git+https://github.com/amonakov/primus#commit=$_commit; +"register_cleanup.patch") +sha1sums=('SKIP' + 'fd48f89c55c1ad854d7a985781faed2c52c0135f') + +prepare() { + cd primus + patch -Np1 -i ../register_cleanup.patch +} + +build() { + cd primus + make +} + +package() { + cd primus + + sed -e '/^PRIMUS_libGL=/cPRIMUS_libGL=/usr/\\$LIB/primus' \ + -e '/^exec/iexport __GLVND_DISALLOW_PATCHING=1' \ +primusrun | install -D /dev/stdin "$pkgdir/usr/bin/primusrun" + + install -D lib/libGL.so.1 "$pkgdir/usr/lib/primus/libGL.so.1" + install -D primus.bash-completion "$pkgdir/usr/share/bash-completion/completions/primusrun" + install -D primusrun.1 "$pkgdir/usr/share/man/man1/primusrun.1" + install -D -m644 LICENSE.txt "$pkgdir/usr/share/licenses/primus/LICENSE" +} + +# vim:set ts=2 sw=2 et: Copied: primus/repos/community-testing-i686/register_cleanup.patch (from rev 214098, primus/trunk/register_cleanup.patch) === --- community-testing-i686/register_cleanup.patch (rev 0) +++ community-testing-i686/register_cleanup.patch 2017-02-27 20:26:16 UTC (rev 214099) @@ -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(, 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-testing-x86_64/PKGBUILD (from rev 214098, primus/trunk/PKGBUILD) === --- community-testing-x86_64/PKGBUILD (rev 0) +++ community-testing-x86_64/PKGBUILD 2017-02-27 20:26:16 UTC (rev 214099) @@ -0,0 +1,43 @@ +# $Id$ +# Maintainer: Sven-Hendrik Haase +# Contributor: Alexander Monakov + +pkgname=primus +pkgver=20151110
[arch-commits] Commit in primus/repos (6 files)
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+# Contributor: Alexander Monakov + +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(, 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(); ++}
[arch-commits] Commit in primus/repos (6 files)
Date: Friday, January 22, 2016 @ 05:31:31 Author: svenstaro Revision: 158484 archrelease: copy trunk to community-i686, community-x86_64 Added: primus/repos/community-i686/PKGBUILD (from rev 158483, primus/trunk/PKGBUILD) primus/repos/community-i686/register_cleanup.patch (from rev 158483, primus/trunk/register_cleanup.patch) primus/repos/community-x86_64/PKGBUILD (from rev 158483, primus/trunk/PKGBUILD) primus/repos/community-x86_64/register_cleanup.patch (from rev 158483, primus/trunk/register_cleanup.patch) Deleted: primus/repos/community-i686/PKGBUILD primus/repos/community-x86_64/PKGBUILD -+ /PKGBUILD | 90 ++ community-i686/PKGBUILD | 37 community-i686/register_cleanup.patch | 47 +++ community-x86_64/PKGBUILD | 37 community-x86_64/register_cleanup.patch | 47 +++ 5 files changed, 184 insertions(+), 74 deletions(-) Deleted: community-i686/PKGBUILD === --- community-i686/PKGBUILD 2016-01-22 04:31:18 UTC (rev 158483) +++ community-i686/PKGBUILD 2016-01-22 04:31:31 UTC (rev 158484) @@ -1,37 +0,0 @@ -# Maintainer: Sven-Hendrik Haase-# Contributor: Alexander Monakov - -pkgname=primus -pkgver=20151110 -pkgrel=4 -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") -sha1sums=('SKIP') - -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: Copied: primus/repos/community-i686/PKGBUILD (from rev 158483, primus/trunk/PKGBUILD) === --- community-i686/PKGBUILD (rev 0) +++ community-i686/PKGBUILD 2016-01-22 04:31:31 UTC (rev 158484) @@ -0,0 +1,45 @@ +# Maintainer: Sven-Hendrik Haase +# Contributor: Alexander Monakov + +pkgname=primus +pkgver=20151110 +pkgrel=4 +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: Copied: primus/repos/community-i686/register_cleanup.patch (from rev 158483, primus/trunk/register_cleanup.patch) === --- community-i686/register_cleanup.patch (rev 0) +++ community-i686/register_cleanup.patch 2016-01-22 04:31:31 UTC (rev 158484) @@ -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(, 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