gobbi icon indicating copy to clipboard operation
gobbi copied to clipboard

Feature request: libhandy support

Open ddevault opened this issue 5 years ago • 4 comments

https://source.puri.sm/Librem5/libhandy

Would be nice if bindings to libhandy could be generated for gobbi.

ddevault avatar Dec 20 '19 19:12 ddevault

I'll certainly look in to this, but it might not be for a week or two.

pekim avatar Dec 21 '19 06:12 pekim

Of course. Happy holidays!

ddevault avatar Dec 21 '19 13:12 ddevault

Bump?

ddevault avatar Jan 18 '20 16:01 ddevault

I can't easily install install all of libhandy's build dependencies locally. So I'm resorting to exploring this in a docker image.

A (rather crude) Dockerfile results in generation of some plausible looking files in /gobbi/lib/handy/.

FROM ubuntu:19.10

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt install -y \
  git \
  wget \
  libatk1.0-dev \
  libcairo2-dev \
  libglib2.0-dev \
  libgtk-3-dev \
  libgtksourceview-3.0-dev \
  libpango1.0-dev \
  libwebkit2gtk-4.0-dev \
  xvfb

# install go
RUN wget https://dl.google.com/go/go1.13.6.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.13.6.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"

# clone and build libhandy
RUN git clone https://source.puri.sm/Librem5/libhandy.git /libhandy
WORKDIR /libhandy
RUN apt-get build-dep -y .
RUN meson . _build
RUN ninja -C _build
RUN ninja -C _build install

# clone gobbi
RUN git clone https://github.com/pekim/gobbi.git /gobbi
# copy libhandy's gir file
WORKDIR /gobbi
RUN cp /libhandy/_build/src/Handy-0.0.gir internal/gir-files/
# include libhandy in generation
RUN sed -i '/{version: "4.0", name: "WebKit2"},/a\\t{version: "0.0", name: "Handy"},' internal/cmd/generate/main.go
# generate and test
WORKDIR /gobbi/internal
RUN ./gobbi generate
# RUN ./gobbi test

So it looks promising so far.

pekim avatar Jan 19 '20 15:01 pekim