summaryrefslogtreecommitdiff
path: root/dev-perl/X11-XCB/files/X11-XCB-0.09-dynamic-linking.patch
blob: 817d3ee86f21a0c363f88b66543fa5111edb107d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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