* [gentoo-desktop] First steps into X11 global multilib
@ 2013-01-20 19:08 Michał Górny
2013-01-20 19:08 ` [gentoo-desktop] [PATCH 1/3] Support XORG_MULTILIB to enable multilib support Michał Górny
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Michał Górny @ 2013-01-20 19:08 UTC (permalink / raw
To: gentoo-desktop; +Cc: x11
Hello,
A quick patch to xorg-2.eclass to support enabling multilib on packages
and a few example conversions to prove the point. I'd some feedback
before I continue with the packages.
In order to test those packages, you need a few patches to the gx86
eclasses, namely:
- http://article.gmane.org/gmane.linux.gentoo.devel/82764
- http://article.gmane.org/gmane.linux.gentoo.devel/83083 (optional)
- https://453206.bugs.gentoo.org/attachment.cgi?id=336232
I had to move two xproto .pc files to /usr/share/pkgconfig to get them
found by configure scripts. I checked the relevant packages whether
the installed includes are the same for amd64+x86 but I don't know if
there can be a case when they are different.
If there is, we will have to make the packages support multilib and use
a custom header install location on other ABIs. In any case, it can
be fixed in the future.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-desktop] [PATCH 1/3] Support XORG_MULTILIB to enable multilib support.
2013-01-20 19:08 [gentoo-desktop] First steps into X11 global multilib Michał Górny
@ 2013-01-20 19:08 ` Michał Górny
2013-01-20 19:08 ` [gentoo-desktop] [PATCH 2/3] Move necessary proto pkg-config files to /usr/share Michał Górny
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2013-01-20 19:08 UTC (permalink / raw
To: gentoo-desktop; +Cc: x11, Michał Górny
---
eclass/xorg-2.eclass | 37 ++++++++++++++++++++++++++++++-------
1 file changed, 30 insertions(+), 7 deletions(-)
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index 87d31f6..f63b882 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -37,10 +37,20 @@ if [[ ${PN} == font* \
FONT_ECLASS="font"
fi
+# @ECLASS-VARIABLE: XORG_MULTILIB
+# @DESCRIPTION:
+# If set to 'yes', the multilib support for package will be enabled. Set
+# before inheriting this eclass.
+: ${XORG_MULTILIB:="no"}
+
# we need to inherit autotools first to get the deps
inherit autotools autotools-utils eutils libtool multilib toolchain-funcs \
flag-o-matic ${FONT_ECLASS} ${GIT_ECLASS}
+if [[ ${XORG_MULTILIB} == yes ]]; then
+ inherit autotools-multilib
+fi
+
EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm"
case "${EAPI:-0}" in
3|4|5) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;;
@@ -438,7 +448,11 @@ xorg-2_src_configure() {
"${xorgconfadd[@]}"
)
- autotools-utils_src_configure "$@"
+ if [[ ${XORG_MULTILIB} == yes ]]; then
+ autotools-multilib_src_configure "$@"
+ else
+ autotools-utils_src_configure "$@"
+ fi
}
# @FUNCTION: xorg-2_src_compile
@@ -447,7 +461,11 @@ xorg-2_src_configure() {
xorg-2_src_compile() {
debug-print-function ${FUNCNAME} "$@"
- autotools-utils_src_compile "$@"
+ if [[ ${XORG_MULTILIB} == yes ]]; then
+ autotools-multilib_src_compile "$@"
+ else
+ autotools-utils_src_compile "$@"
+ fi
}
# @FUNCTION: xorg-2_src_install
@@ -457,13 +475,18 @@ xorg-2_src_compile() {
xorg-2_src_install() {
debug-print-function ${FUNCNAME} "$@"
+ local install_args=( docdir="${EPREFIX}/usr/share/doc/${PF}" )
+
if [[ ${CATEGORY} == x11-proto ]]; then
- autotools-utils_src_install \
- ${PN/proto/}docdir="${EPREFIX}/usr/share/doc/${PF}" \
- docdir="${EPREFIX}/usr/share/doc/${PF}"
+ install_args+=(
+ ${PN/proto/}docdir="${EPREFIX}/usr/share/doc/${PF}"
+ )
+ fi
+
+ if [[ ${XORG_MULTILIB} == yes ]]; then
+ autotools-multilib_src_install "${install_args[@]}"
else
- autotools-utils_src_install \
- docdir="${EPREFIX}/usr/share/doc/${PF}"
+ autotools-utils_src_install "${install_args[@]}"
fi
if [[ -n ${GIT_ECLASS} ]]; then
--
1.8.1.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-desktop] [PATCH 2/3] Move necessary proto pkg-config files to /usr/share.
2013-01-20 19:08 [gentoo-desktop] First steps into X11 global multilib Michał Górny
2013-01-20 19:08 ` [gentoo-desktop] [PATCH 1/3] Support XORG_MULTILIB to enable multilib support Michał Górny
@ 2013-01-20 19:08 ` Michał Górny
2013-01-20 19:08 ` [gentoo-desktop] [PATCH 3/3] Migrate a few chosen libraries to multilib Michał Górny
2013-01-21 21:39 ` [gentoo-desktop] First steps into X11 global multilib Michał Górny
3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2013-01-20 19:08 UTC (permalink / raw
To: gentoo-desktop; +Cc: x11, Michał Górny
Since we're using shared includes for multilib, the pkg-config needs
to lie in /usr/share. I have tested that on amd64 both versions
of the relevant headers are the same.
---
x11-proto/xcb-proto/xcb-proto-9999.ebuild | 11 +++++++++++
x11-proto/xproto/xproto-9999.ebuild | 12 +++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/x11-proto/xcb-proto/xcb-proto-9999.ebuild b/x11-proto/xcb-proto/xcb-proto-9999.ebuild
index 9fd53a0..793d323 100644
--- a/x11-proto/xcb-proto/xcb-proto-9999.ebuild
+++ b/x11-proto/xcb-proto/xcb-proto-9999.ebuild
@@ -25,6 +25,17 @@ src_prepare() {
xorg-2_src_prepare
}
+
+src_install() {
+ xorg-2_src_install
+
+ # We are using common includes for multilib, so we need
+ # to move the pkg-config file to the common location.
+ dodir /usr/share/pkgconfig
+ mv "${ED}"/usr/$(get_libdir)/pkgconfig/${PN}.pc \
+ "${ED}"/usr/share/pkgconfig || die
+}
+
pkg_postinst() {
python_mod_optimize xcbgen
}
diff --git a/x11-proto/xproto/xproto-9999.ebuild b/x11-proto/xproto/xproto-9999.ebuild
index d8e824c..6897f8f 100644
--- a/x11-proto/xproto/xproto-9999.ebuild
+++ b/x11-proto/xproto/xproto-9999.ebuild
@@ -5,7 +5,7 @@
EAPI=4
XORG_DOC=doc
-inherit xorg-2
+inherit multilib xorg-2
DESCRIPTION="X.Org xproto protocol headers"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
@@ -22,3 +22,13 @@ src_configure() {
)
xorg-2_src_configure
}
+
+src_install() {
+ xorg-2_src_install
+
+ # We are using common includes for multilib, so we need
+ # to move the pkg-config file to the common location.
+ dodir /usr/share/pkgconfig
+ mv "${ED}"/usr/$(get_libdir)/pkgconfig/${PN}.pc \
+ "${ED}"/usr/share/pkgconfig || die
+}
--
1.8.1.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-desktop] [PATCH 3/3] Migrate a few chosen libraries to multilib.
2013-01-20 19:08 [gentoo-desktop] First steps into X11 global multilib Michał Górny
2013-01-20 19:08 ` [gentoo-desktop] [PATCH 1/3] Support XORG_MULTILIB to enable multilib support Michał Górny
2013-01-20 19:08 ` [gentoo-desktop] [PATCH 2/3] Move necessary proto pkg-config files to /usr/share Michał Górny
@ 2013-01-20 19:08 ` Michał Górny
2013-01-21 21:39 ` [gentoo-desktop] First steps into X11 global multilib Michał Górny
3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2013-01-20 19:08 UTC (permalink / raw
To: gentoo-desktop; +Cc: x11, Michał Górny
---
dev-libs/libpthread-stubs/libpthread-stubs-0.3.ebuild | 1 +
x11-libs/libXau/libXau-9999.ebuild | 1 +
x11-libs/libXdmcp/libXdmcp-9999.ebuild | 1 +
x11-libs/libxcb/libxcb-9999.ebuild | 7 ++++---
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dev-libs/libpthread-stubs/libpthread-stubs-0.3.ebuild b/dev-libs/libpthread-stubs/libpthread-stubs-0.3.ebuild
index 3d3a73b..044f68f 100644
--- a/dev-libs/libpthread-stubs/libpthread-stubs-0.3.ebuild
+++ b/dev-libs/libpthread-stubs/libpthread-stubs-0.3.ebuild
@@ -3,6 +3,7 @@
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libpthread-stubs/libpthread-stubs-0.3.ebuild,v 1.10 2012/04/26 18:46:12 aballier Exp $
EAPI=4
+XORG_MULTILIB=yes
inherit xorg-2
DESCRIPTION="Pthread functions stubs for platforms missing them"
diff --git a/x11-libs/libXau/libXau-9999.ebuild b/x11-libs/libXau/libXau-9999.ebuild
index 0aecee6..ff53ab7 100644
--- a/x11-libs/libXau/libXau-9999.ebuild
+++ b/x11-libs/libXau/libXau-9999.ebuild
@@ -3,6 +3,7 @@
# $Header: $
EAPI=4
+XORG_MULTILIB=yes
inherit xorg-2
DESCRIPTION="X.Org Xau library"
diff --git a/x11-libs/libXdmcp/libXdmcp-9999.ebuild b/x11-libs/libXdmcp/libXdmcp-9999.ebuild
index dbd14b4..2c58ee3 100644
--- a/x11-libs/libXdmcp/libXdmcp-9999.ebuild
+++ b/x11-libs/libXdmcp/libXdmcp-9999.ebuild
@@ -5,6 +5,7 @@
EAPI=4
XORG_DOC=doc
+XORG_MULTILIB=yes
inherit xorg-2
DESCRIPTION="X.Org Xdmcp library"
diff --git a/x11-libs/libxcb/libxcb-9999.ebuild b/x11-libs/libxcb/libxcb-9999.ebuild
index dfe0a82..e4ab5be 100644
--- a/x11-libs/libxcb/libxcb-9999.ebuild
+++ b/x11-libs/libxcb/libxcb-9999.ebuild
@@ -5,6 +5,7 @@
EAPI=4
XORG_DOC=doc
+XORG_MULTILIB=yes
inherit xorg-2
DESCRIPTION="X C-language Bindings library"
@@ -16,9 +17,9 @@ EGIT_REPO_URI="git://anongit.freedesktop.org/git/xcb/libxcb"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="selinux"
-RDEPEND="dev-libs/libpthread-stubs
- x11-libs/libXau
- x11-libs/libXdmcp"
+RDEPEND="dev-libs/libpthread-stubs[${MULTILIB_USEDEP}]
+ x11-libs/libXau[${MULTILIB_USEDEP}]
+ x11-libs/libXdmcp[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}
dev-lang/python[xml]
dev-libs/libxslt
--
1.8.1.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [gentoo-desktop] First steps into X11 global multilib
2013-01-20 19:08 [gentoo-desktop] First steps into X11 global multilib Michał Górny
` (2 preceding siblings ...)
2013-01-20 19:08 ` [gentoo-desktop] [PATCH 3/3] Migrate a few chosen libraries to multilib Michał Górny
@ 2013-01-21 21:39 ` Michał Górny
3 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2013-01-21 21:39 UTC (permalink / raw
To: gentoo-desktop; +Cc: x11
[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]
On Sun, 20 Jan 2013 20:08:25 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> Hello,
>
> A quick patch to xorg-2.eclass to support enabling multilib on packages
> and a few example conversions to prove the point. I'd some feedback
> before I continue with the packages.
>
> In order to test those packages, you need a few patches to the gx86
> eclasses, namely:
>
> - http://article.gmane.org/gmane.linux.gentoo.devel/82764
> - http://article.gmane.org/gmane.linux.gentoo.devel/83083 (optional)
> - https://453206.bugs.gentoo.org/attachment.cgi?id=336232
>
> I had to move two xproto .pc files to /usr/share/pkgconfig to get them
> found by configure scripts. I checked the relevant packages whether
> the installed includes are the same for amd64+x86 but I don't know if
> there can be a case when they are different.
>
> If there is, we will have to make the packages support multilib and use
> a custom header install location on other ABIs. In any case, it can
> be fixed in the future.
A complete set of packages from emul-linux-x86-xlibs has been committed
to the 'multilib' branch of X11 overlay for testing.
So, if you're using live xorg and would like to test this, you should:
$ cd /var/lib/layman/x11 # or any other location
$ git checkout multilib
$ emerge -1v emul-linux-x86-xlibs
It shall pull in -r1 version which replaces the bundled libraries with
a bunch of multilib package dependencies.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-21 21:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-20 19:08 [gentoo-desktop] First steps into X11 global multilib Michał Górny
2013-01-20 19:08 ` [gentoo-desktop] [PATCH 1/3] Support XORG_MULTILIB to enable multilib support Michał Górny
2013-01-20 19:08 ` [gentoo-desktop] [PATCH 2/3] Move necessary proto pkg-config files to /usr/share Michał Górny
2013-01-20 19:08 ` [gentoo-desktop] [PATCH 3/3] Migrate a few chosen libraries to multilib Michał Górny
2013-01-21 21:39 ` [gentoo-desktop] First steps into X11 global multilib Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox