aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/gmencoder/Makefile
blob: 000712761db5bf49d462e0dcf28ceb89b430f8e1 (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
# Ports collection makefile for:  gmencoder
# Date created:           Wed Feb 25 03:20:50 EST 2004
# Whom:               Michael Johnson <ahze@ahze.net>
#
# $FreeBSD$
#

PORTNAME=   gmencoder
PORTVERSION=    0.1.0
PORTREVISION=   4
CATEGORIES= multimedia
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
EXTRACT_SUFX=   .tgz

MAINTAINER= ahze@FreeBSD.org
COMMENT=    Gmencoder is Gnome2 front-end to mplayer/mencoder

BUILD_DEPENDS=  mencoder:${PORTSDIR}/multimedia/mplayer
RUN_DEPENDS=    mencoder:${PORTSDIR}/multimedia/mplayer

GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LIBS="-L${LOCALBASE}/lib"
USE_GMAKE=  yes
USE_GNOME=  gnomehack gnomeprefix libgnomeui
USE_REINPLACE=  yes

MAN1=       gmencoder.1

.include <bsd.port.pre.mk>

.if defined(WITH_DVD_DEVICE)
DEFAULT_DVD_DEVICE=${WITH_DVD_DEVICE}
.else
.if ${OSVERSION} < 500000
DEFAULT_DVD_DEVICE=/dev/acd0c
.else
DEFAULT_DVD_DEVICE=/dev/acd0
.endif
.endif

pre-everything::
.if !defined(WITH_DVD_DEVICE)
    @${ECHO_MSG} "===> The default DVD device is ${DEFAULT_DVD_DEVICE}"
    @${ECHO_MSG} "===> Define WITH_DVD_DEVICE if you want to change the default"
    @${ECHO_MSG} "===> For example, 'make WITH_DVD_DEVICE=\"/dev/somedevice\"'"
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-O4||; s|type -path|which|' \
        ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|' \
        ${WRKSRC}/src/main.c ${WRKSRC}/src/interface.c

post-install:
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for i in README
    ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif
    ${INSTALL_MAN}  ${WRKSRC}/man/gmencoder.1 ${MANPREFIX}/man/man1

.include <bsd.port.post.mk>