Bump multimedia/ffmpeg to version 2.8.8_2,1
[dports.git] / multimedia / ogmrip / Makefile
1 # Created by: Herve Quiroz <hq@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       ogmrip
5 PORTVERSION=    1.0.1
6 PORTREVISION=   6
7 CATEGORIES=     multimedia
8 MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R}/${PORTVERSION}
9
10 MAINTAINER=     ports@FreeBSD.org
11 COMMENT=        Application and libraries for encoding DVDs into DivX/OGM files
12
13 LICENSE=        GPLv2 LGPL21
14 LICENSE_COMB=   multi
15
16 BUILD_DEPENDS=  mencoder:multimedia/mencoder \
17                 mplayer:multimedia/mplayer \
18                 gsed:textproc/gsed
19 LIB_DEPENDS=    libenca.so:converters/enca \
20                 libpng.so:graphics/png \
21                 libtiff.so:graphics/tiff \
22                 libdvdread.so:multimedia/libdvdread
23 RUN_DEPENDS=    lame:audio/lame \
24                 oggenc:audio/vorbis-tools \
25                 mencoder:multimedia/mencoder \
26                 mplayer:multimedia/mplayer \
27                 ogmmerge:multimedia/ogmtools
28
29 OPTIONS_DEFINE= GTK2 ENCHANT MATROSKA MP4BOX NLS THEORA FAAC SRT DEBUG
30 OPTIONS_DEFAULT=GTK2
31 ENCHANT_DESC=   Enable spell checking for text subtitles
32 MATROSKA_DESC=  Enable Matroska container support
33 MP4BOX_DESC=    Enable Mpeg-4 container support
34 THEORA_DESC=    Enable Ogg Theora video codec support
35 SRT_DESC=       Enable SRT text subtitles support
36
37 USES=           desktop-file-utils gmake libtool pathfix pkgconfig
38 USE_GNOME=      glib20 intlhack libxml2
39 USE_LDCONFIG=   yes
40
41 GNU_CONFIGURE=  yes
42 INSTALL_TARGET= install-strip
43
44 CPPFLAGS+=      -I${LOCALBASE}/include
45 LDFLAGS+=       -L${LOCALBASE}/lib
46
47 .include <bsd.port.options.mk>
48
49 .if ${PORT_OPTIONS:MGTK2}
50 CONFIGURE_ARGS+=        --enable-gtk-support --enable-dbus-support \
51                         --enable-libnotify-support
52 LIB_DEPENDS+=           libdbus-glib-1.so:devel/dbus-glib \
53                         libnotify.so:devel/libnotify
54 USE_GNOME+=             gconf2 libglade2
55 GCONF_SCHEMAS=          ogmrip.schemas
56 PLIST_SUB+=             GTK2_SUPPORT=""
57 .else
58 CONFIGURE_ARGS+=        --disable-gtk-support --disable-dbus-support \
59                         --disable-libnotify-support
60 PLIST_SUB+=             GTK2_SUPPORT="@comment "
61 .endif
62
63 .if ${PORT_OPTIONS:MENCHANT}
64 CONFIGURE_ARGS+=        --enable-enchant-support
65 LIB_DEPENDS+=           libenchant.so:textproc/enchant
66 PLIST_SUB+=             ENCHANT_SUPPORT=""
67 .else
68 CONFIGURE_ARGS+=        --disable-enchant-support
69 PLIST_SUB+=             ENCHANT_SUPPORT="@comment "
70 .endif
71
72 .if ${PORT_OPTIONS:MMATROSKA}
73 CONFIGURE_ARGS+=        --enable-mkv-support
74 RUN_DEPENDS+=           mkvmerge:multimedia/mkvtoolnix
75 PLIST_SUB+=             MATROSKA_SUPPORT=""
76 .else
77 CONFIGURE_ARGS+=        --disable-mkv-support
78 PLIST_SUB+=             MATROSKA_SUPPORT="@comment "
79 .endif
80
81 .if ${PORT_OPTIONS:MMP4BOX}
82 CONFIGURE_ARGS+=        --enable-mp4-support
83 RUN_DEPENDS+=           mp4box:multimedia/gpac-mp4box
84 PLIST_SUB+=             MP4BOX_SUPPORT=""
85 .else
86 CONFIGURE_ARGS+=        --disable-mp4-support
87 PLIST_SUB+=             MP4BOX_SUPPORT="@comment "
88 .endif
89
90 .if ${PORT_OPTIONS:MNLS}
91 USES+=                  gettext
92 PLIST_SUB+=             NLS=""
93 .else
94 CONFIGURE_ARGS+=        --disable-nls
95 PLIST_SUB+=             NLS="@comment "
96 .endif
97
98 .if ${PORT_OPTIONS:MTHEORA}
99 CONFIGURE_ARGS+=        --enable-theora-support
100 LIB_DEPENDS+=           libtheora.so:multimedia/libtheora
101 PLIST_SUB+=             THEORA_SUPPORT=""
102 .else
103 CONFIGURE_ARGS+=        --disable-theora-support
104 PLIST_SUB+=             THEORA_SUPPORT="@comment "
105 .endif
106
107 .if ${PORT_OPTIONS:MFAAC}
108 CONFIGURE_ARGS+=        --enable-aac-support
109 RUN_DEPENDS+=           faac:audio/faac
110 PLIST_SUB+=             FAAC_SUPPORT=""
111 .else
112 CONFIGURE_ARGS+=        --disable-aac-support
113 PLIST_SUB+=             FAAC_SUPPORT="@comment "
114 .endif
115
116 .if ${PORT_OPTIONS:MSRT}
117 CONFIGURE_ARGS+=        --enable-srt-support
118 RUN_DEPENDS+=           gocr:graphics/gocr
119 MAN1+=                  subp2pgm.1 subptools.1
120 PLIST_SUB+=             SRT_SUPPORT=""
121 .else
122 CONFIGURE_ARGS+=        --disable-srt-support
123 PLIST_SUB+=             SRT_SUPPORT="@comment "
124 .endif
125
126 .if ${PORT_OPTIONS:MDEBUG}
127 CONFIGURE_ARGS+=        --enable-maintainer-mode --enable-devel-mode
128 .endif
129
130 pre-everything::
131         @${ECHO_MSG} ""
132         @${ECHO_MSG} "This port requires a version of MEncoder compiled with XviD and/or"
133         @${ECHO_MSG} "x264 support if you want to use these codecs."
134         @${ECHO_MSG} ""
135
136 post-patch:
137         @${REINPLACE_CMD} -e '/local/s|^CFLAGS=|#CFLAGS=|g ; \
138                  /local/s|^CPPFLAGS=|#CPPFLAGS=|g ; \
139                  /local/s|^LDFLAGS=|#LDFLAGS=|g ; \
140                  s|libpng zlib|libpng|g' ${WRKSRC}/configure
141         @${REINPLACE_CMD} -e 's|^SUBDIRS|#SUBDIRS|g' ${WRKSRC}/docs/Makefile.in
142         @${REINPLACE_CMD} -e \
143                 '/PROGRAM/s|MP4Box|mp4box|g' ${WRKSRC}/libogmrip/ogmrip-mp4.c
144
145 .include <bsd.port.mk>