summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2013-11-13 18:36:26 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2013-11-13 18:36:26 +0100
commit62ba11f48005b19c38fbbb2093aa110cb76486aa (patch)
treedac0759ec70d7b5c2124227c38f38530c6de86be
parent96295e7b72555144b7d6422000437c01d633019b (diff)
downloadoverlay-62ba11f48005b19c38fbbb2093aa110cb76486aa.tar.gz
overlay-62ba11f48005b19c38fbbb2093aa110cb76486aa.tar.bz2
overlay-62ba11f48005b19c38fbbb2093aa110cb76486aa.zip
X11-XCB: dynamic linking against libxcb
-rw-r--r--dev-perl/X11-XCB/X11-XCB-0.09.ebuild28
-rw-r--r--dev-perl/X11-XCB/files/X11-XCB-0.09-dynamic-linking.patch70
-rw-r--r--dev-perl/X11-XCB/files/X11-XCB-0.09-fix-xcb-includes.patch15
3 files changed, 101 insertions, 12 deletions
diff --git a/dev-perl/X11-XCB/X11-XCB-0.09.ebuild b/dev-perl/X11-XCB/X11-XCB-0.09.ebuild
index 0a14738..9892d8d 100644
--- a/dev-perl/X11-XCB/X11-XCB-0.09.ebuild
+++ b/dev-perl/X11-XCB/X11-XCB-0.09.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="2"
+EAPI="5"
MODULE_AUTHOR="MSTPLBG"
-inherit perl-module
+inherit eutils perl-module
DESCRIPTION="X11::XCB - perl bindings for libxcb"
@@ -17,17 +17,21 @@ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-f
IUSE=""
-MAKEOPTS="${MAKEOPTS} -j1"
-
DEPEND="dev-perl/XS-Object-Magic
- dev-perl/extutils-depend
- perl-core/ExtUtils-ParseXS"
+ dev-perl/extutils-depends
+ dev-perl/extutils-pkgconfig
+ virtual/perl-ExtUtils-ParseXS
+ x11-libs/libxcb"
RDEPEND="dev-perl/Mouse
- dev-perl/MouseX-NativeTraits
- dev-perl/Try-Tiny
- virtual/perl-XSLoader"
+ dev-perl/MouseX-NativeTraits
+ dev-perl/Try-Tiny
+ virtual/perl-XSLoader
+ x11-libs/libxcb"
+
+src_prepare() {
+ epatch "${FILESDIR}/X11-XCB-0.09-dynamic-linking.patch"
+ epatch "${FILESDIR}/X11-XCB-0.09-fix-xcb-includes.patch"
-# HACK! Just make sure all deps of libxcb are there
-DEPEND="${DEPEND} x11-libs/libxcb"
-RDEPEND="${RDEPEND} x11-libs/libxcb"
+ perl-module_src_prepare
+}
diff --git a/dev-perl/X11-XCB/files/X11-XCB-0.09-dynamic-linking.patch b/dev-perl/X11-XCB/files/X11-XCB-0.09-dynamic-linking.patch
new file mode 100644
index 0000000..817d3ee
--- /dev/null
+++ b/dev-perl/X11-XCB/files/X11-XCB-0.09-dynamic-linking.patch
@@ -0,0 +1,70 @@
+diff --git a/Makefile.PL b/Makefile.PL
+index 6dff406..67f54c4 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -63,61 +63,11 @@ use_ppport;
+ cc_warnings if $ENV{X11_XCB_CC_WARNINGS};
+
+ require ExtUtils::Depends;
++require ExtUtils::PkgConfig;
+
+-cc_include_paths 'bundled-libs/libxcb-1.8.1/src';
+-
+-# We link the bundled xcb libraries statically so we don’t have to install them
+-# on the system (that might not be possible due to missing permissions).
+-makemaker_args->{MYEXTLIB} = join(' ', qw(
+- bundled-libs/libxcb-1.8.1/src/.libs/libxcb.a
+- bundled-libs/libxcb-1.8.1/src/.libs/libxcb-xinerama.a
+-));
+-makemaker_args->{LDLOADLIBS} = '-lXau -lXdmcp';
+-
+-{
+- package MY;
+- sub postamble {
+- <<'__EOF__';
+-$(MYEXTLIB):
+- echo "xcbincludedir=$$(pwd)/bundled-libs/xcb-proto-1.7.1/src" > bundled-libs/xcb-proto.pc
+- echo "pythondir=$$(pwd)/bundled-libs/xcb-proto-1.7.1/" >> bundled-libs/xcb-proto.pc
+- echo "" >> bundled-libs/xcb-proto.pc
+- echo "Name: XCB Proto" >> bundled-libs/xcb-proto.pc
+- echo "Description: X protocol descriptions for XCB" >> bundled-libs/xcb-proto.pc
+- echo "Version: 1.7.1" >> bundled-libs/xcb-proto.pc
+- cd bundled-libs/libxcb-1.8.1/ && PKG_CONFIG_PATH=$$(pwd)/.. ./configure --with-pic --disable-shared \
+- --disable-composite \
+- --disable-damage \
+- --disable-dpms \
+- --disable-dri2 \
+- --disable-glx \
+- --disable-randr \
+- --disable-record \
+- --disable-render \
+- --disable-resource \
+- --disable-screensaver \
+- --disable-shape \
+- --disable-shm \
+- --disable-sync \
+- --disable-xevie \
+- --disable-xfixes \
+- --disable-xfree86-dri \
+- --disable-xinput \
+- --disable-xkb \
+- --disable-xprint \
+- --disable-selinux \
+- --disable-xtest \
+- --disable-xv \
+- --disable-xvmc && $(MAKE)
+-
+-__EOF__
+- }
+-}
+-
+-if ($Module::Install::AUTHOR or $ENV{X11_XCB_GENERATE}) {
+- require _GenerateMyXS;
+- _GenerateMyXS::generate();
+-}
++makemaker_args->{INC} = ExtUtils::PkgConfig->cflags_only_I('xcb');
++makemaker_args->{CFLAGS} = ExtUtils::PkgConfig->cflags_only_other('xcb');
++makemaker_args->{LIBS} = ExtUtils::PkgConfig->libs('xcb');
+
+ WriteMakefile(
+ ExtUtils::Depends
diff --git a/dev-perl/X11-XCB/files/X11-XCB-0.09-fix-xcb-includes.patch b/dev-perl/X11-XCB/files/X11-XCB-0.09-fix-xcb-includes.patch
new file mode 100644
index 0000000..9cfdd87
--- /dev/null
+++ b/dev-perl/X11-XCB/files/X11-XCB-0.09-fix-xcb-includes.patch
@@ -0,0 +1,15 @@
+diff --git a/XCB.xs b/XCB.xs
+index 152a5aa..d3060df 100644
+--- a/XCB.xs
++++ b/XCB.xs
+@@ -1,8 +1,8 @@
+ #include "EXTERN.h"
+ #include "perl.h"
+ #include "XSUB.h"
+-#include <xcb.h>
+-#include <xinerama.h>
++#include <xcb/xcb.h>
++#include <xcb/xinerama.h>
+
+ #include "ppport.h"
+