diff options
author | kwm <kwm@FreeBSD.org> | 2012-08-31 23:44:41 +0800 |
---|---|---|
committer | kwm <kwm@FreeBSD.org> | 2012-08-31 23:44:41 +0800 |
commit | 5fb75889ff78049c1801014ae2d2eb32fb4d68cb (patch) | |
tree | c01d4117663fc9a9ef270f7ff40505d240224275 /x11-servers | |
parent | 2db20fbac3f6c934dc2fb1dcd8c2a9c6d38da27c (diff) | |
download | freebsd-ports-gnome-5fb75889ff78049c1801014ae2d2eb32fb4d68cb.tar.gz freebsd-ports-gnome-5fb75889ff78049c1801014ae2d2eb32fb4d68cb.tar.zst freebsd-ports-gnome-5fb75889ff78049c1801014ae2d2eb32fb4d68cb.zip |
Solve libGL.so and libglx.so conflict situation between libGL, xorg-server and
the nvidia-driver. Install the libraries in port specific directories.
Use pkg-install and pkg-deinstall scripts to update the hardlinks to the
default locations of these files.
While here clean up some @dirrmtry lines in xorg-server plist for directories
that aren.t created by xorg-server.
Motivator: pkgng
Inspiration: irc, freebsd-x11@ mailinglist discussion (sorry can't find it
anymore to give credit the people)
Reviewed by: danfe@ (for nvidia parts), bapt@
Approved by: danfe@ (for nvidia parts)
With hat: x11@
Diffstat (limited to 'x11-servers')
-rw-r--r-- | x11-servers/xorg-server/Makefile | 22 | ||||
-rw-r--r-- | x11-servers/xorg-server/files/pkg-deinstall.in | 12 | ||||
-rw-r--r-- | x11-servers/xorg-server/files/pkg-install.in | 20 | ||||
-rw-r--r-- | x11-servers/xorg-server/pkg-plist | 12 |
4 files changed, 52 insertions, 14 deletions
diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile index bfd45300ccc3..8bd49608b56c 100644 --- a/x11-servers/xorg-server/Makefile +++ b/x11-servers/xorg-server/Makefile @@ -22,16 +22,17 @@ RUN_DEPENDS= ${LOCALBASE}/share/X11/xkb/rules/base.xml:${PORTSDIR}/x11/xkeyboard xkbcomp:${PORTSDIR}/x11/xkbcomp XORG_CAT= xserver +SLAVE_PORT?= no .if defined(WITH_NEW_XORG) XORG_VERSION= 1.10.6 -XORG_REVISION= 0 +XORG_REVISION= 1 PLIST_SUB+= OLD="@comment " NEW="" EXTRA_PATCHES+= ${FILESDIR}/extra-hw_dmx_glxProxy_compsize.h \ ${FILESDIR}/extra-hw_dmx_glxProxy_glxcmds.h .else XORG_VERSION= 1.7.7 -XORG_REVISION= 5 +XORG_REVISION= 6 PLIST_SUB+= OLD="" NEW="@comment " EXTRA_PATCHES+= ${FILESDIR}/extra-dix_events.c EXTRA_PATCHES+= ${FILESDIR}/extra-include_eventstr.h @@ -56,7 +57,8 @@ CONFIGURE_ARGS?=--disable-dmx --disable-xvfb --disable-xnest \ --localstatedir=/var --without-dtrace --disable-xephyr \ --enable-record=yes -.if !defined(SLAVE_PORT) +.if ${SLAVE_PORT} == "no" +SUB_FILES= pkg-install pkg-deinstall MAN1= Xorg.1 \ Xserver.1 \ cvt.1 \ @@ -151,10 +153,22 @@ pre-everything:: post-patch: @${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' \ ${WRKSRC}/configure +# build libglx.so but don't install it yet. which is done in pre-install. + @${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \ + -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \ + ${WRKSRC}/hw/xfree86/dixmods/Makefile.in + +.if ${SLAVE_PORT} == "no" +pre-su-install: + ${MKDIR} ${PREFIX}/lib/xorg/modules/extensions/.xorg + ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \ + ${PREFIX}/lib/xorg/modules/extensions/.xorg/ -.if defined(WITH_NEW_XORG) post-install: +.if defined(WITH_NEW_XORG) @${MKDIR} ${PREFIX}/share/X11/xorg.conf.d .endif + @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL +.endif .include <bsd.port.post.mk> diff --git a/x11-servers/xorg-server/files/pkg-deinstall.in b/x11-servers/xorg-server/files/pkg-deinstall.in new file mode 100644 index 000000000000..f1866839df71 --- /dev/null +++ b/x11-servers/xorg-server/files/pkg-deinstall.in @@ -0,0 +1,12 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +PREFIX="${PKG_PREFIX-/usr/local}" + +case $2 in +DEINSTALL) + /bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so* + ;; +esac diff --git a/x11-servers/xorg-server/files/pkg-install.in b/x11-servers/xorg-server/files/pkg-install.in new file mode 100644 index 000000000000..37c4fb8e6c56 --- /dev/null +++ b/x11-servers/xorg-server/files/pkg-install.in @@ -0,0 +1,20 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +PREFIX="${PKG_PREFIX-/usr/local}" + +case $2 in +POST-INSTALL) + if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then + /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \ + ${PREFIX}/lib/xorg/modules/extensions/libglx.so + /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \ + ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1 + else + /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \ + ${PREFIX}/lib/xorg/modules/extensions/libglx.so + fi + ;; +esac diff --git a/x11-servers/xorg-server/pkg-plist b/x11-servers/xorg-server/pkg-plist index 29e90c810158..48be23a5e47d 100644 --- a/x11-servers/xorg-server/pkg-plist +++ b/x11-servers/xorg-server/pkg-plist @@ -180,10 +180,9 @@ lib/xorg/modules/extensions/libdri2.la lib/xorg/modules/extensions/libdri2.so lib/xorg/modules/extensions/libextmod.la lib/xorg/modules/extensions/libextmod.so -lib/xorg/modules/extensions/libglx.la -lib/xorg/modules/extensions/libglx.so lib/xorg/modules/extensions/librecord.la lib/xorg/modules/extensions/librecord.so +lib/xorg/modules/extensions/.xorg/libglx.so lib/xorg/modules/libexa.la lib/xorg/modules/libexa.so lib/xorg/modules/libfb.la @@ -228,18 +227,11 @@ share/aclocal/xorg-server.m4 %%NEW%%@exec /bin/mkdir -p %D/share/X11/xorg.conf.d %%NEW%%@dirrm share/doc/xorg-server @dirrm include/xorg +@dirrm lib/xorg/modules/extensions/.xorg @dirrm lib/xorg/modules/extensions @dirrm lib/xorg/modules/multimedia %%OLD%%@dirrm lib/xorg/modules/linux @dirrm lib/xorg/modules @dirrm lib/xorg -@dirrmtry include/X11/bitmaps -@dirrmtry include/X11/pixmaps -@dirrmtry lib/X11/doc -@dirrmtry lib/X11/etc -@dirrmtry lib/X11/xserver -@dirrmtry lib/xorg/modules -@dirrmtry lib/xorg %%NEW%%@dirrmtry share/X11/xorg.conf.d -@dirrmtry share/X11/app-defaults @dirrmtry share/X11 |