aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/okle/Makefile
blob: 0e1916bdedfc14a123deab85da21fd3a5bab809b (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
# New ports collection makefile for:    Ogle KDE GUI
# Date created:         Tue Jul 9 20:24:02 UTC 2002
# Whom:         Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   okle
PORTVERSION=    0.2.2
CATEGORIES= graphics kde
MASTER_SITES=   http://okle.sourceforge.net/

MAINTAINER= lioux@FreeBSD.org

BUILD_DEPENDS=  ${LOCALBASE}/lib/ogle/libdvdcontrol.so.7:${PORTSDIR}/graphics/ogle \
        autoconf:${PORTSDIR}/devel/autoconf
RUN_DEPENDS=    ogle:${PORTSDIR}/graphics/ogle

USE_KDELIBS_VER=    3
USE_REINPLACE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-ogle-dir=${LOCALBASE}/bin \
        --with-ogle-includes=${LOCALBASE}/include \
        --with-ogle-libs=${LOCALBASE}/lib/ogle

# location of okle ogle_gui
DVDP_UI=${PREFIX}/lib/okle/ogle_gui
OGLE=${LOCALBASE}/bin/ogle

pre-everything::
.ifndef(WITH_DVD_DEVICE)
    @${ECHO_MSG} '===> The default DVD device is /dev/acd0c'
    @${ECHO_MSG} "===> You can choose any DVD device at Ogle's command line"
    @${ECHO_MSG} '===> Define WITH_DVD_DEVICE if you want to change the default'
    @${ECHO_MSG} "===> For example, 'make WITH_DVD_DEVICE=\"/dev/somedevice\"'"
.endif

pre-configure:
    @cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf && ${LOCALBASE}/bin/autoheader

post-install:
    @${MKDIR} ${PREFIX}/lib/okle
    @${INSTALL_PROGRAM} ${WRKSRC}/src/ogle_gui ${PREFIX}/lib/okle
    @${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/${PORTNAME}

.include <bsd.port.pre.mk>

.ifdef(WITH_DVD_DEVICE)
DEFAULT_DVD_DEVICE=${WITH_DVD_DEVICE}
.else
DEFAULT_DVD_DEVICE=/dev/acd0c
.endif

post-patch:
# wrapper hack to allow ogle to have both ogle-gui and oKle installed
# at same time
    @${SED} -e "s|%%DVDP_UI%%|${DVDP_UI}|; \
        s|%%ENV%%|${SETENV}|; \
        s|%%OGLE%%|${OGLE}|" \
        ${FILESDIR}/wrapper.sh > \
        ${WRKDIR}/wrapper.sh
    @${REINPLACE_CMD} -E -e 's|^(Exec=).+$$|\1${PORTNAME}|' \
        ${WRKSRC}/src/okle.desktop
# point to specific device
    @${REINPLACE_CMD} -e "s|\"/dev/dvd\"|\"${DEFAULT_DVD_DEVICE}\"|" \
        ${WRKSRC}/src/okle_win.cpp
# do not use version names
    @${REINPLACE_CMD} -E -e 's|^(PACKAGE[[:space:]]+=).+$$|\1${PORTNAME}|' \
        ${WRKSRC}/po/Makefile.in

.include <bsd.port.post.mk>