Skip to content
Snippets Groups Projects

Remove libdir from xcb-proto.pc

Merged Matt Turner requested to merge mattst88/xcbproto:build-improvements into master
  • Patch 1

    Remove libdir from xcb-proto.pc

    Added by 17ab095a ("add libdir/exec_prefix to xcb-xproto.pc") with the rationale of using it to find the python path, but later commits bd7a481a ("pkg-config: Add sysroot prefix") and be9c255b ("Adjust to automake 1.16.4 changes") make this directly accessible.

    By removing libdir from the pkgconfig file, the file becomes identical for different ABIs.

  • Patch 2

    Install xcb-proto to $(datarootdir)

    ... i.e. to /usr/share/pkgconfig.

  • Patch 3

    Call AC_OUTPUT without arguments

    configure.ac:22: warning: AC_OUTPUT should be used without arguments. configure.ac:22: You should run autoupdate.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • assigned to @mattst88

  • I am not entirely sure about this, but... let's see what happens.

  • Sadly the libdir removal is regressing libxcb:

    | configure: error: Package requirements (xcb-proto >= 1.14) were not met:
    | 
    | Variable 'libdir' not defined in '/srv/work/alex/poky/build-64-alt/tmp/work/core2-64-poky-linux/libxcb/1.15-r0/recipe-sysroot/usr/share/pkgconfig/xcb-proto.pc'
    | 
  • Author Developer

    FWIW, on Gentoo /usr/share/pkgconfig/xcb-proto.pc looks like this:

    prefix=/usr
    exec_prefix=${prefix}
    datarootdir=${prefix}/share
    datadir=/usr/share
    xcbincludedir=${pc_sysrootdir}${datadir}/xcb
    PYTHON_PREFIX=${prefix}
    pythondir=${pc_sysrootdir}
    
    Name: XCB Proto
    Description: X protocol descriptions for XCB
    Version: 1.15.2

    We configure xcb-proto with

    /var/tmp/portage/x11-base/xcb-proto-1.15.2/work/xcb-proto-1.15.2/configure \
    --prefix=/usr \
    --build=x86_64-pc-linux-gnu \
    --host=x86_64-pc-linux-gnu \
    --mandir=/usr/share/man \
    --infodir=/usr/share/info \
    --datadir=/usr/share \
    --sysconfdir=/etc \
    --localstatedir=/var/lib \
    --disable-silent-rules \
    --docdir=/usr/share/doc/xcb-proto-1.15.2 \
    --htmldir=/usr/share/doc/xcb-proto-1.15.2/html \
    --libdir=/usr/lib64

    Hm, but we also have some Python-related things as well:

    src_configure() {
    	# Don't use Python to find sitedir here.
    	PYTHON=true default
    }
    [...]
    xcbgen_install() {
    	# Use eclass to find sitedir instead.
    	emake -C xcbgen install DESTDIR="${D}" pythondir="$(python_get_sitedir)"
    	python_optimize
    }
    
    src_install() {
    	# Restrict SUBDIRS to prevent xcbgen with empty sitedir.
    	emake install DESTDIR="${D}" SUBDIRS=src
    	python_foreach_impl xcbgen_install
    }

    But Python should always be in lib, regardless of the default ABI's libdir, I think? Running just ./configure I get xcb-proto.pc that looks like this:

    prefix=/usr/local
    exec_prefix=${prefix}
    datarootdir=${prefix}/share
    datadir=${datarootdir}
    xcbincludedir=${pc_sysrootdir}${datadir}/xcb
    PYTHON_PREFIX=${prefix}
    pythondir=${pc_sysrootdir}${PYTHON_PREFIX}/lib/python3.11/site-packages
    
    Name: XCB Proto
    Description: X protocol descriptions for XCB
    Version: 1.15.2

    I don't understand what problem there is with the way things are. It sounds like somehow people are getting pythondir defined in terms of libdir which doesn't make sense to me.

  • I checked: we do indeed patch automake to not hardcode 'lib', presumably to enable multiple (i.e. 32/64 bit) python installations: https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/automake/automake/0001-automake-Update-for-python.m4-to-respect-libdir.patch

    Anyway, this is our local issue and not a concern for xcbproto upstream.

Please register or sign in to reply
Loading