Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: libhandy support #14

Open
ddevault opened this issue Dec 20, 2019 · 4 comments
Open

Feature request: libhandy support #14

ddevault opened this issue Dec 20, 2019 · 4 comments

Comments

@ddevault
Copy link

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

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

@pekim
Copy link
Owner

pekim commented Dec 21, 2019

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

@ddevault
Copy link
Author

Of course. Happy holidays!

@ddevault
Copy link
Author

Bump?

@pekim
Copy link
Owner

pekim commented Jan 19, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants