aboutsummaryrefslogtreecommitdiff
path: root/multimedia/ogmrip/Makefile
blob: d7443b0b7f267c943d6421052a32ec28ca3809f9 (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
74
75
76
77
78
79
80
81
# New ports collection makefile for:	ogmrip
# Date created:				2004-11-19
# Whom:					Herve Quiroz <hq@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	ogmrip
PORTVERSION=	0.9.0
PORTREVISION=	1
CATEGORIES=	multimedia
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}

MAINTAINER=	hq@FreeBSD.org
COMMENT=	Application and libraries for encoding DVDs into DivX/OGM files

BUILD_DEPENDS=	mencoder:${PORTSDIR}/multimedia/mplayer \
		oggenc:${PORTSDIR}/audio/vorbis-tools \
		ogmmerge:${PORTSDIR}/multimedia/ogmtools \
		lame:${PORTSDIR}/audio/lame \
		gsed:${PORTSDIR}/textproc/gsed \
		gocr:${PORTSDIR}/graphics/gocr
RUN_DEPENDS=	${BUILD_DEPENDS}
LIB_DEPENDS=	xvidcore:${PORTSDIR}/multimedia/xvid \
		dvdread:${PORTSDIR}/multimedia/libdvdread \
		enchant:${PORTSDIR}/textproc/enchant

USE_REINPLACE=	yes
USE_GNOME=	gtk20 glib20 gconf2 libglade2
USE_LIBTOOL_VER=15
USE_X_PREFIX=	yes
USE_GMAKE=	yes
INSTALLS_SHLIB=	yes
GCONF_SCHEMAS=	ogmrip.schemas

CONFIGURE_ARGS=	--sharedstatedir=${PREFIX}/libdata

.if defined(WITH_DEBUG)
CONFIGURE_ARGS+=	--enable-maintainer-mode --enable-devel-mode
.endif

.include <bsd.port.pre.mk>

.if exists(${LOCALBASE}/bin/mkvmerge)
BUILD_DEPENDS+=	mkvmerge:${PORTSDIR}/multimedia/mkvtoolnix
RUN_DEPENDS+=	mkvmerge:${PORTSDIR}/multimedia/mkvtoolnix
PLIST_SUB+=	MKV_SUPPORT=""
.else
PLIST_SUB+=	MKV_SUPPORT="@comment "
.endif

.if !defined(WITH_DEBUG)
pre-extract:
	@${ECHO_MSG} ""
	@${ECHO_MSG} " *** Define WITH_DEBUG to enable debug symbols ***"
	@${ECHO_MSG} ""
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|g' \
	  ${WRKSRC}/data/Makefile.in

pre-configure:
	@if ${LOCALBASE}/mencoder -ovc help 2> /dev/null | ${GREP} -q "^ *xvid *- .*" ; then \
	  ${ECHO_MSG} "" ; \
	  ${ECHO_MSG} "This port requires a version of MEncoder compiled with XviD support." ; \
	  ${ECHO_MSG} "" ; \
	  ${FALSE} ; \
	fi

pre-install:
	@${LOCALBASE}/bin/mencoder -ovc help 2> /dev/null | ${GREP} -q "^ *x264 *- .*$$" \
	  && ${ECHO_CMD} "include/ogmrip/ogmrip-x264.h" >>${TMPPLIST} || ${TRUE}

post-install:
	@${ECHO_CMD} ""
	@${CAT} ${PKGMESSAGE}
	@${ECHO_CMD} ""

.include <bsd.port.post.mk>