Package Details: gpick-git 0.2.6.r22.g0e858d3-1

Git Clone URL: https://aur.archlinux.org/gpick-git.git (read-only, click to copy)
Package Base: gpick-git
Description: Advanced color picker written in C++ using GTK+ toolkit
Upstream URL: http://www.gpick.org/
Licenses: BSD
Conflicts: gpick
Provides: gpick
Submitter: flipflop97
Maintainer: reggiiie
Last Packager: reggiiie
Votes: 1
Popularity: 0.000000
First Submitted: 2019-01-01 19:14 (UTC)
Last Updated: 2021-11-06 12:02 (UTC)

Pinned Comments

jirido commented on 2022-06-09 02:00 (UTC) (edited on 2022-06-09 02:23 (UTC) by jirido)

Hi. It seams like gpick 0.3, that is what gpick-git is pulling now, needs a lua compiled with c++ support. There is no such a packet right now, we can just hope for a lua-c++

Any how, while waiting and hoping.. omegatron on #archlinux made an tutorial for me on how he installed lua with the cc=g++ flag enabled.

But he also Said: it installs now and runs, but immediately crashes with : gpick: cairo-surface.c:1733: cairo_surface_mark_dirty_rectangle: Assertion `! _cairo_surface_has_snapshots (surface)' failed.

I have reported this to thezbyg at https://github.com/thezbyg/gpick/issues/204 so maybe he get to looking at it.. whom knows.

Omegatron:

#   keep in mind, whenever it's necessary, a command might be run as root

#   also, I normally do a DESTDIR installation with '/tmp/destroot' as 
#   target directory





#   lua 5.4.4

#   this section is almost the same as Arch's for 'plain' lua-5.4.4
#   I just add 'CC=g++' to two commands ;
#   and of course need to patch and rename the *.pc (pkgconfig) files

patch -p1 -i ../06-Patches/liblua.so.patch

sed "s/%VER%/5.4/g;s/%REL%/5.4.4/g" ../06-Patches/lua.pc > lua.pc

make MYCFLAGS="${CFLAGS}" MYLDFLAGS="${LDFLAGS}" CC=g++ linux-readline

make \
    TO_LIB="liblua.a liblua.so liblua.so.5.4 liblua.so.5.4.4" \
    INSTALL_DATA='cp -d' \
    INSTALL_TOP=/tmp/destroot/opt/lua/5.4.4 \
    INSTALL_MAN=/tmp/destroot/opt/lua/5.4.4/share/man/man1 \
    CC=g++ \
    install

ln -sv /opt/lua/5.4.4/bin/lua                
/tmp/destroot/opt/lua/5.4.4/bin/lua5.4 ;
ln -sv /opt/lua/5.4.4/bin/luac               
/tmp/destroot/opt/lua/5.4.4/bin/luac5.4 ;
ln -sv /opt/lua/5.4.4/lib/liblua.so.5.4.4    
/tmp/destroot/opt/lua/5.4.4/lib/liblua5.4.so ;

install -Dvm644 lua.pc /tmp/destroot/opt/lua/5.4.4/lib/pkgconfig/lua54- 
c++.pc

ln -sv lua54-c++.pc /tmp/destroot/opt/lua/5.4.4/lib/pkgconfig/lua-c++.pc ;
ln -sv lua54-c++.pc /tmp/destroot/opt/lua/5.4.4/lib/pkgconfig/lua5.4-c++.pc ;
ln -sv lua54-c++.pc /tmp/destroot/opt/lua/5.4.4/lib/pkgconfig/lua-5.4-c++.pc ;

mkdir -pv /tmp/destroot/opt/lua/5.4.4/share/doc/lua-5.4.4

install -vm644 doc/*.{gif,png,css,html} 
/tmp/destroot/opt/lua/5.4.4/share/doc/lua-5.4.4

sed -e  's|-lm|-lm -lstdc++|' \
    -i  /tmp/destroot/opt/lua/5.4.4/lib/pkgconfig/lua54-c++.pc

#   the following is important, so that 'ld' might find this lua

mkdir -pv /tmp/destroot/etc/ld.so.conf.d

echo /opt/lua/5.4.4/lib > /tmp/destroot/etc/ld.so.conf.d/lua-5.4-c++.conf

#   run 'ldconfig' as root




#   gpick :

#   this one is somewhat picky and 0.3, after being installed, aborts when run immediately ;
#   might want to try this with a more recent checkout ...

git clone https://github.com/thezbyg/gpick
git checkout v0.3

mkdir -pv build
cd build

cmake -DCMAKE_INSTALL_PREFIX=/usr ..

#   the final link commands would fail, without this patching (i'm no cmake expert ..)

sed -e 's|lexpat|lexpat /opt/lua/5.4.4/lib/liblua5.4.so|' \
        CMakeFiles/gpick.dir/link.txt \
    >   CMakeFiles/gpick.dir/link.txt.new

touch -r CMakeFiles/gpick.dir/link.txt{,.new}

mv -v CMakeFiles/gpick.dir/link.txt{.new,}


sed -e 's|lexpat|lexpat /opt/lua/5.4.4/lib/liblua5.4.so|' \
        CMakeFiles/tests.dir/link.txt \
    >   CMakeFiles/tests.dir/link.txt.new

touch -r CMakeFiles/tests.dir/link.txt{,.new}

mv -v CMakeFiles/tests.dir/link.txt{.new,}

#   now compile as usual

make -w -j 16 VERBOSE=1

make -w -j 1 DESTDIR=/tmp/destroot install

Latest Comments

frankspace commented on 2024-05-11 16:33 (UTC)

This now compiles and runs fine without any lua tampering by doing the following:

  1. add -DLUA_TYPE="C" to the cmake line.

  2. add sed -i '23i #include <cstdint>' source/common/Span.h to a prepare() function.

Note that I compiled it in a chroot; I have no idea what would happen if you didn't do that.

jirido commented on 2022-06-09 02:00 (UTC) (edited on 2022-06-09 02:23 (UTC) by jirido)

Hi. It seams like gpick 0.3, that is what gpick-git is pulling now, needs a lua compiled with c++ support. There is no such a packet right now, we can just hope for a lua-c++

Any how, while waiting and hoping.. omegatron on #archlinux made an tutorial for me on how he installed lua with the cc=g++ flag enabled.

But he also Said: it installs now and runs, but immediately crashes with : gpick: cairo-surface.c:1733: cairo_surface_mark_dirty_rectangle: Assertion `! _cairo_surface_has_snapshots (surface)' failed.

I have reported this to thezbyg at https://github.com/thezbyg/gpick/issues/204 so maybe he get to looking at it.. whom knows.

Omegatron:

#   keep in mind, whenever it's necessary, a command might be run as root

#   also, I normally do a DESTDIR installation with '/tmp/destroot' as 
#   target directory





#   lua 5.4.4

#   this section is almost the same as Arch's for 'plain' lua-5.4.4
#   I just add 'CC=g++' to two commands ;
#   and of course need to patch and rename the *.pc (pkgconfig) files

patch -p1 -i ../06-Patches/liblua.so.patch

sed "s/%VER%/5.4/g;s/%REL%/5.4.4/g" ../06-Patches/lua.pc > lua.pc

make MYCFLAGS="${CFLAGS}" MYLDFLAGS="${LDFLAGS}" CC=g++ linux-readline

make \
    TO_LIB="liblua.a liblua.so liblua.so.5.4 liblua.so.5.4.4" \
    INSTALL_DATA='cp -d' \
    INSTALL_TOP=/tmp/destroot/opt/lua/5.4.4 \
    INSTALL_MAN=/tmp/destroot/opt/lua/5.4.4/share/man/man1 \
    CC=g++ \
    install

ln -sv /opt/lua/5.4.4/bin/lua                
/tmp/destroot/opt/lua/5.4.4/bin/lua5.4 ;
ln -sv /opt/lua/5.4.4/bin/luac               
/tmp/destroot/opt/lua/5.4.4/bin/luac5.4 ;
ln -sv /opt/lua/5.4.4/lib/liblua.so.5.4.4    
/tmp/destroot/opt/lua/5.4.4/lib/liblua5.4.so ;

install -Dvm644 lua.pc /tmp/destroot/opt/lua/5.4.4/lib/pkgconfig/lua54- 
c++.pc

ln -sv lua54-c++.pc /tmp/destroot/opt/lua/5.4.4/lib/pkgconfig/lua-c++.pc ;
ln -sv lua54-c++.pc /tmp/destroot/opt/lua/5.4.4/lib/pkgconfig/lua5.4-c++.pc ;
ln -sv lua54-c++.pc /tmp/destroot/opt/lua/5.4.4/lib/pkgconfig/lua-5.4-c++.pc ;

mkdir -pv /tmp/destroot/opt/lua/5.4.4/share/doc/lua-5.4.4

install -vm644 doc/*.{gif,png,css,html} 
/tmp/destroot/opt/lua/5.4.4/share/doc/lua-5.4.4

sed -e  's|-lm|-lm -lstdc++|' \
    -i  /tmp/destroot/opt/lua/5.4.4/lib/pkgconfig/lua54-c++.pc

#   the following is important, so that 'ld' might find this lua

mkdir -pv /tmp/destroot/etc/ld.so.conf.d

echo /opt/lua/5.4.4/lib > /tmp/destroot/etc/ld.so.conf.d/lua-5.4-c++.conf

#   run 'ldconfig' as root




#   gpick :

#   this one is somewhat picky and 0.3, after being installed, aborts when run immediately ;
#   might want to try this with a more recent checkout ...

git clone https://github.com/thezbyg/gpick
git checkout v0.3

mkdir -pv build
cd build

cmake -DCMAKE_INSTALL_PREFIX=/usr ..

#   the final link commands would fail, without this patching (i'm no cmake expert ..)

sed -e 's|lexpat|lexpat /opt/lua/5.4.4/lib/liblua5.4.so|' \
        CMakeFiles/gpick.dir/link.txt \
    >   CMakeFiles/gpick.dir/link.txt.new

touch -r CMakeFiles/gpick.dir/link.txt{,.new}

mv -v CMakeFiles/gpick.dir/link.txt{.new,}


sed -e 's|lexpat|lexpat /opt/lua/5.4.4/lib/liblua5.4.so|' \
        CMakeFiles/tests.dir/link.txt \
    >   CMakeFiles/tests.dir/link.txt.new

touch -r CMakeFiles/tests.dir/link.txt{,.new}

mv -v CMakeFiles/tests.dir/link.txt{.new,}

#   now compile as usual

make -w -j 16 VERBOSE=1

make -w -j 1 DESTDIR=/tmp/destroot install

actionless commented on 2020-10-09 00:31 (UTC) (edited on 2020-10-09 00:32 (UTC) by actionless)

@huyizheng

diff --git a/PKGBUILD b/PKGBUILD
index 55e294f..6616483 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@ pkgdesc="Advanced color picker written in C++ using GTK+ toolkit"
 arch=(i686 x86_64 armv7h aarch64)
 url="http://www.gpick.org/"
 license=(BSD)
-depends=(boost-libs gtk3 lua)
+depends=(boost-libs gtk3 lua53)
 makedepends=(boost cmake ragel)
 provides=(gpick)
 conflicts=(gpick)
@@ -18,11 +18,12 @@ sha256sums=(SKIP)

 pkgver() {
     cd gpick
+    git checkout 5e2a63b7d0e9069f1bd485d2a112c1690575e454  # last known working version, https://github.com/thezbyg/gpick/issues/182
     git describe --long --tags | sed 's/^gpick-//;s/\([^-]*-g\)/r\1/;s/-/./g'
 }

 build() {
-    mkdir build
+    mkdir -p build
     cd build
     cmake ../gpick -DCMAKE_INSTALL_PREFIX="/usr/"
     make

huyz commented on 2020-05-08 07:20 (UTC)

Got the following error:

In file included from /usr/include/boost/endian/detail/endian_reverse.hpp:13,
                 from /usr/include/boost/endian/conversion.hpp:11,
                 from /home/abc/.cache/yay/gpick-git/src/gpick/source/dynv/Types.cpp:23:
/usr/include/boost/endian/conversion.hpp: In instantiation of 'constexpr EndianReversible boost::endian::little_to_native(EndianReversible) [with EndianReversible = float]':
/home/abc/.cache/yay/gpick-git/src/gpick/source/dynv/Types.cpp:183:46:   required from here
/usr/include/boost/endian/conversion.hpp:191:5: error: static assertion failed: detail::is_endian_reversible<EndianReversible>::value
  191 |     BOOST_STATIC_ASSERT( detail::is_endian_reversible<EndianReversible>::value );
      |     ^~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/gpick-dynv.dir/build.make:109: CMakeFiles/gpick-dynv.dir/source/dynv/Types.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:340: CMakeFiles/gpick-dynv.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...