Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Nov 2017 03:41:13 +0800
From:      blubee blubeeme <gurenchan@gmail.com>
To:        Mathieu Arnold <mat@freebsd.org>
Cc:        FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: devel/py3-gobject3 fails to build
Message-ID:  <CALM2mEkfoU2vRqJvk%2BMSfYyJKasydobJ6H6gLWiWdDiEwDXwbQ@mail.gmail.com>
In-Reply-To: <b4790521-5fdb-0c22-f843-e9f71e2002b2@FreeBSD.org>
References:  <CALM2mEm=WLU3DoevT1CvKbDQQe6sP=93MoS6SC9k5N2EjPEU2w@mail.gmail.com> <b4790521-5fdb-0c22-f843-e9f71e2002b2@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I am porting an ibus library that needs
Python >=3D 3.2
the Python 3 GObject bindings
IBus >=3D 1.4.1 (note that its GObject-Introspection bindings must be enabl=
ed)

I've done this to my makefile:
PORTNAME=3D               ibus-cangjie
PORTVERSION=3D            2.4
DISTVERSIONPREFIX=3D      v
CATEGORIES=3D             chinese

MAINTAINER=3D     hello@blubee.me
COMMENT=3D        Sophisticated software synthesizer

LICENSE=3D        GPLv2+
LICENSE_FILE=3D   ${WRKSRC}/COPYING

RUN_DEPENDS=3D
${PREFIX}/lib/python3.6/site-packages/cangjie/_core.so:chinese/pycangjie
       \
                py3?-gobject3>=3D0:devel/py3-gobject3

LIB_DEPENDS=3D    libibus-1.0.so:textproc/ibus

USES=3D           autoreconf gmake        \
                libtool pkgconfig       \
                python:2.7,build

# USE_GNOME=3D    glib20 gtk30 pygobject3 introspection:run  #=3D=3D=3D=3D#=
this fails
because cairo requires <=3D py2.7
USE_GNOME=3D      introspection

GNU_CONFIGURE=3D          yes
USE_LDCONFIG=3D           yes

USE_GITHUB=3D             yes
GH_ACCOUNT=3D             Cangjians
GH_PROJECT=3D             ibus-cangjie

.include <bsd.port.pre.mk>
pre-configure:
        @(cd ${WRKSRC} && ./autogen.sh)
.include <bsd.port.post.mk>


This project doesn't build with python > 2.7 because ibus will fail, so I
added the run dependency but I don't know what to add to get the
introspection, if I add USE_GNOME that pulls in cairo, which then fails
because cairo needs python 2.7 or below.

pycangjie makefile looks like this:
BUILD_DEPENDS=3D  cython3>0:lang/cython3
LIB_DEPENDS=3D    libcangjie.so:chinese/libcangjie

USES=3D           autoreconf gmake        \
                libtool pkgconfig       \
                localbase python:3.6    \
                sqlite

BINARY_ALIAS=3D   cython=3Dcython-3.6
GNU_CONFIGURE=3D          yes
USE_LDCONFIG=3D           yes

USE_GITHUB=3D             yes
GH_ACCOUNT=3D             Cangjians
GH_PROJECT=3D             pycangjie

.include <bsd.port.pre.mk>
pre-configure:
        @(cd ${WRKSRC} && ./autogen.sh)
# post-build:
post-install:
        (cd ${STAGEDIR}${PREFIX} \
        && ${PYTHON_CMD} ${PYTHON_LIBDIR}/*.py \
        -d ${PREFIX} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})
        @(${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${
PYTHON_VERSION}/site-packages/cangjie/*.so)

.include <bsd.port.post.mk>

I get this compilation error below

checking for python3 platform... freebsd12
checking for python3 script directory... ${prefix}/lib/python3.6/site-
packages
checking for python3 extension module directory...
${exec_prefix}/lib/python3.6/site-packages
checking the cangjie Python module... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for IBus... yes
checking for IBus component dir... /usr/local/share/ibus/component
checking the IBus introspection-based bindings... no
configure: error: Please install the IBus introspection-based bindings
*** Error code 1

I've been trying to get this to work from ports for the past two days and
nothing that i've tried seems to work, especially since building and
running requires 2 versions of python.

how can I setup the introspection-based bindings?

On Tue, Nov 7, 2017 at 3:30 AM, Mathieu Arnold <mat@freebsd.org> wrote:

> Le 06/11/2017 =C3=A0 19:53, blubee blubeeme a =C3=A9crit :
> > When trying to build a port and including py3-gobject3 either through:
> > USE_GNOME=3D py3gobject3
> > or
> > RUN_DEPENDS=3D py3-gobject3:devel/py3-gobject3
> >
> > the build will fail because py3-gobject3 needs cairo but cairo cannot
> build
> > with python > 2.7
> >
> > Is this a bug in the port or am I doing something wrong?
>
> As it all works fine for everybody else, I'm sure you must be doing
> something wrong. graphics/cairo does not need python, py3-gobject3
> depends on py3-cairo which builds fine with Python 3.
>
> Please, provide logs of what you are doing, and where it fails,
> otherwise, nobody can try to figure out what you are doing wrong.
>
> --
> Mathieu Arnold
>
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALM2mEkfoU2vRqJvk%2BMSfYyJKasydobJ6H6gLWiWdDiEwDXwbQ>