ports/137373: x11/libX11: make dependance on x11/libxcb
Carlos A. M. dos Santos
unixmania at gmail.com
Sun Aug 2 23:50:03 UTC 2009
>Number: 137373
>Category: ports
>Synopsis: x11/libX11: make dependance on x11/libxcb
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Aug 02 23:50:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Carlos A. M. dos Santos
>Release: 8.0-BETA2
>Organization:
N.A.
>Environment:
FreeBSD avatar 8.0-BETA2 FreeBSD 8.0-BETA2 #2: Tue Jul 28 23:21:41 BRT 2009 root at avatar:/usr/obj/usr/src/sys/Compaq_nx6320 amd64
>Description:
The use of XCB is optional in libX11. This is good, because disabling XCB can reduce the number of packages that libX11 depends on. For instance, if XCB is enabled, all X11 packages will depend on Python.
>How-To-Repeat:
Build and install the x11/libX11 port as of version 1.2.1.1. It will require the installation of x11/libxcb and all the ports it depends on.
>Fix:
Apply the attached patch. It maked XCB optional, keeping it on by default for compatibility with previous versions.
Patch attached with submission follows:
diff -dur ports/x11/libX11/Makefile ports-local/x11/libX11/Makefile
--- ports.orig/x11/libX11/Makefile 2009-06-15 22:45:44.000000000 -0300
+++ ports/x11/libX11/Makefile 2009-08-02 20:30:34.000000000 -0300
@@ -7,16 +7,16 @@
PORTNAME= libX11
PORTVERSION= 1.2.1
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= x11
MAINTAINER= x11 at FreeBSD.org
COMMENT= X11 library
-BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/xcb.pc:${PORTSDIR}/x11/libxcb \
- ${LOCALBASE}/share/aclocal/xorg-macros.m4:${PORTSDIR}/devel/xorg-macros
-RUN_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/xcb.pc:${PORTSDIR}/x11/libxcb
+OPTIONS= XCB "Enable XCB (X C-language Binding) Support" on
+
+BUILD_DEPENDS+= ${LOCALBASE}/share/aclocal/xorg-macros.m4:${PORTSDIR}/devel/xorg-macros
XORG_CAT= lib
USE_XORG= bigreqsproto xau xcmiscproto xdmcp xextproto xtrans \
@@ -24,8 +24,19 @@
USE_AUTOTOOLS= aclocal:110 autoheader:262 automake:110 autoconf:262 libtool:15
ACLOCAL_ARGS= -I . -I ${LOCALBASE}/share/aclocal
AUTOMAKE_ARGS= --add-missing
-CONFIGURE_ARGS+= --datadir=${PREFIX}/lib \
- --with-xcb=yes
+CONFIGURE_ARGS+= --datadir=${PREFIX}/lib
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_XCB)
+BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/xcb.pc:${PORTSDIR}/x11/libxcb
+RUN_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/xcb.pc:${PORTSDIR}/x11/libxcb
+CONFIGURE_ARGS+= --with-xcb
+.else
+CONFIGURE_ARGS+= --without-xcb
+PLIST_SUB+= XCB="@comment "
+.endif
.include "${.CURDIR}/manpages"
-.include <bsd.port.mk>
+
+.include <bsd.port.post.mk>
diff -dur ports/x11/libX11/pkg-plist ports-local/x11/libX11/pkg-plist
--- ports/x11/libX11/pkg-plist 2009-04-11 10:03:50.000000000 -0300
+++ ports-local/x11/libX11/pkg-plist 2009-06-21 23:12:35.000000000 -0300
@@ -2,7 +2,7 @@
include/X11/XKBlib.h
include/X11/Xcms.h
include/X11/Xlib.h
-include/X11/Xlib-xcb.h
+%%XCB%%include/X11/Xlib-xcb.h
include/X11/XlibConf.h
include/X11/Xlibint.h
include/X11/Xlocale.h
@@ -15,12 +15,12 @@
lib/libX11.la
lib/libX11.so
lib/libX11.so.6
-lib/libX11-xcb.a
-lib/libX11-xcb.la
-lib/libX11-xcb.so
-lib/libX11-xcb.so.1
+%%XCB%%lib/libX11-xcb.a
+%%XCB%%lib/libX11-xcb.la
+%%XCB%%lib/libX11-xcb.so
+%%XCB%%lib/libX11-xcb.so.1
libdata/pkgconfig/x11.pc
-libdata/pkgconfig/x11-xcb.pc
+%%XCB%%libdata/pkgconfig/x11-xcb.pc
lib/X11/XErrorDB
lib/X11/XKeysymDB
lib/X11/locale/am_ET.UTF-8/XI18N_OBJS
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list