diff options
author | Dejan Lesjak <lesi@FreeBSD.org> | 2007-07-02 17:56:11 +0000 |
---|---|---|
committer | Dejan Lesjak <lesi@FreeBSD.org> | 2007-07-02 17:56:11 +0000 |
commit | f259712642cf5ac50476de97f2274a03d2877c31 (patch) | |
tree | b37ead2f3548e205b4a443090769fe7b7667ee12 /x11/xorg-libraries | |
parent | 9489d9d32aefd211c4c434f7d5c5fb46eb1f6b3c (diff) | |
download | ports-f259712642cf5ac50476de97f2274a03d2877c31.tar.gz ports-f259712642cf5ac50476de97f2274a03d2877c31.zip |
Notes
Diffstat (limited to 'x11/xorg-libraries')
-rw-r--r-- | x11/xorg-libraries/Makefile | 16 | ||||
-rw-r--r-- | x11/xorg-libraries/pkg-install | 53 |
2 files changed, 67 insertions, 2 deletions
diff --git a/x11/xorg-libraries/Makefile b/x11/xorg-libraries/Makefile index e6b3c877b5a2..cad8ca1a46a5 100644 --- a/x11/xorg-libraries/Makefile +++ b/x11/xorg-libraries/Makefile @@ -7,7 +7,7 @@ PORTNAME= xorg-libraries PORTVERSION= 7.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 MASTER_SITES= # none DISTFILES= # none @@ -67,7 +67,16 @@ RUN_DEPENDS= ${X11BASE}/libdata/pkgconfig/x11.pc:${PORTSDIR}/x11/libX11 \ .if !defined(XORG_UPGRADE) && !defined(PACKAGE_BUILDING) && exists(/usr/X11R6) pre-everything:: - @test -L /usr/X11R6 || ( echo "Read ${PORTSDIR}/UPDATING for the procedure to upgrade or install xorg 7.2." && /usr/bin/false ) + @if [ ! -L /usr/X11R6 ]; then \ + echo -n "/usr/X11R6 exists, but it is not a symlink. "; \ + echo "Installation cannot proceed."; \ + echo -n "This looks like an incompletely removed old version "; \ + echo -n "of X. In the current version, /usr/X11R6 must be "; \ + echo -n "a symlink if it exists at all."; \ + echo -n "Please read ${PORTSDIR}/UPDATING (entry of 20070519) "; \ + echo -n "for the procedure to upgrade X.org related ports."; \ + /usr/bin/false; \ + fi .elif !exists(/usr/X11R6) && !defined(WITHOUT_X11R6_SYMLINK) pre-everything:: ${LN} -s ${X11BASE} /usr/X11R6 || ${TRUE} @@ -77,4 +86,7 @@ do-install: ${MKDIR} ${PREFIX}/libdata/xorg ${TOUCH} ${PREFIX}/libdata/xorg/libraries +post-install: + @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + .include <bsd.port.mk> diff --git a/x11/xorg-libraries/pkg-install b/x11/xorg-libraries/pkg-install new file mode 100644 index 000000000000..a20a8f28af05 --- /dev/null +++ b/x11/xorg-libraries/pkg-install @@ -0,0 +1,53 @@ +#!/bin/sh + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +X11BASE=/usr/X11R6 +LOCALBASE=/usr/local + +if [ ${X11BASE} -ef ${LOCALBASE} ]; then + echo "Spamming files in /etc..." +else + exit 0 +fi + +# periodic.conf +local_periodic=`. /etc/defaults/periodic.conf && source_periodic_confs ; echo ${local_periodic}` +for lp in ${local_periodic}; do + if (expr ${lp} : "^${X11BASE}" >/dev/null); then + continue + else + new_periodic="${new_periodic} ${lp}" + fi +done +if [ "${local_periodic}x" != "${new_periodic## }x" ]; then + echo "==> Removing ${X11BASE}/etc/periodic from periodic setup..." + echo "# added by xorg-libraries port" >> /etc/periodic.conf + echo "local_periodic=\"${new_periodic## }\"" >> /etc/periodic.conf + ppath_done=1 +fi + +# manpath.config +if (PATH="/sbin:/bin:/usr/sbin:/usr/bin" manpath -q | grep -q "${X11BASE}");then echo "==> Removing ${X11BASE}/man from MANPATH..." + sed -i ".bak.xorg" -e "s,^[^#]*${X11BASE}.*$,# (disabled by xorg-libraries port) &," \ + /etc/manpath.config + mpath_done=1 +fi + +# rc.conf +rcdirs=`. /etc/defaults/rc.conf && source_rc_confs && echo ${local_startup}` +for rd in ${rcdirs}; do + if (expr ${rd} : "${X11BASE}" >/dev/null); then + continue + else + new_rcdirs="${new_rcdirs} ${rd}" + fi +done +if [ "${rcdirs}x" != "${new_rcdirs## }x" ]; then + echo "==> Removing ${X11BASE} from rc sequence..." + echo "# added by xorg-libraries port" >> /etc/rc.conf + echo "local_startup=\"${new_rcdirs## }\"" >> /etc/rc.conf + rcconf_done=1 +fi |