summaryrefslogtreecommitdiffstats
path: root/x11/gnome-screensaver/Makefile
blob: f062dc2710d87dbe10924acdb01e4a77ce357a33 (plain) (blame)
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
71
72
73
# New ports collection makefile for:    gnome-screensaver
# Date created:     09 June 2005
# Whom:         Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
#   $MCom: ports/x11/gnome-screensaver/Makefile,v 1.48 2006/07/11 15:41:07 marcus Exp $
#

PORTNAME=   gnome-screensaver
PORTVERSION=    2.15.4
CATEGORIES= x11 gnome
MASTER_SITES=   ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}

MAINTAINER= gnome@FreeBSD.org
COMMENT=    GNOME screen saver and locker

LIB_DEPENDS=    dbus-1.2:${PORTSDIR}/devel/dbus
RUN_DEPENDS=    xscreensaver-gl-helper:${PORTSDIR}/x11/xscreensaver-gnome-hacks

USE_BZIP2=  yes
USE_X_PREFIX=   yes
USE_GMAKE=  yes
USE_GETTEXT=    yes
GNU_CONFIGURE=  yes
USE_GNOME=  gnomeprefix gnomehack intlhack libgnomeui gnomemenus
CONFIGURE_ARGS= --with-gdm-config=${LOCALBASE}/etc/gdm/custom.conf \
        --with-xscreensaverdir=${XSCREENSAVER_DIR} \
        --with-xscreensaverhackdir=${LOCALBASE}/bin/xscreensaver-hacks
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib"
GCONF_SCHEMAS=  gnome-screensaver.schemas

PLIST=  ${WRKDIR}/pkg-plist

XSCREENSAVER_DIR=   ${LOCALBASE}/share/xscreensaver/config
SCREENSAVER_DIR=    share/gnome/applications/screensavers

XSCREENSAVER_EXCLUDE=   "(popsquares.xml)"

OPTIONS=    PAM "Pluggable Authentication Module support" off

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
BROKEN= Does not build on 4.X
.endif

.if !defined(WITH_PAM)
CONFIGURE_ARGS+=    --disable-pam
.endif

pre-install:
    @${CP} ${.CURDIR}/pkg-plist ${PLIST}
    @cd ${XSCREENSAVER_DIR} && ${FIND} -s * -maxdepth 1 -type f -name "*.xml" | \
        ${GREP} -Ev ${XSCREENSAVER_EXCLUDE} | \
        ${SED} -e 's:^:${SCREENSAVER_DIR}/:' | \
        ${SED} -e 's:[.]xml$$:.desktop:' >> ${PLIST}
    @${ECHO_CMD} @dirrm ${SCREENSAVER_DIR} >> ${PLIST}

post-patch:
    @${REINPLACE_CMD} -e 's|%%X11BASE%%|${X11BASE}|g' \
        ${WRKSRC}/configure

post-install:
    ${CHOWN} root ${PREFIX}/libexec/gnome-screensaver-dialog
    ${CHMOD} +s ${PREFIX}/libexec/gnome-screensaver-dialog
    cd ${PREFIX}/${SCREENSAVER_DIR} && \
        ${FIND} -s ${XSCREENSAVER_DIR} -maxdepth 1 -type f -name "*.xml" | \
            ${GREP} -Ev ${XSCREENSAVER_EXCLUDE} | \
            ${XARGS} ${WRKSRC}/data/migrate-xscreensaver-config.sh

.include <bsd.port.post.mk>