114 | | variant gpl description {allow use of GPL code, the resulting libav* and ffmpeg will be under GPL} { |
115 | | configure.args-append --enable-gpl |
116 | | } |
117 | | |
118 | | variant postproc requires gpl description {enable GPLed postprocessing support} { |
119 | | configure.args-append --enable-postproc |
120 | | } |
121 | | |
122 | | # Adds MP3 support |
123 | | variant lame description {enable MP3 encoding via libmp3lame} { |
124 | | depends_lib-append port:lame |
125 | | configure.args-append --enable-libmp3lame |
126 | | } |
127 | | |
128 | | variant extvorbis description {enable Vorbis encoding via libvorbis, native implementation exists} { |
129 | | depends_lib-append port:libvorbis port:libogg |
130 | | configure.args-append --enable-libvorbis |
131 | | } |
132 | | |
133 | | variant theora description {enable Theora encoding via libtheora} { |
134 | | depends_lib-append port:libtheora port:libogg |
135 | | configure.args-append --enable-libtheora |
136 | | } |
137 | | |
138 | | variant faac requires gpl description {enable FAAC support via libfaac} { |
139 | | depends_lib-append port:faac |
140 | | configure.args-append --enable-libfaac |
141 | | } |
142 | | |
143 | | variant faad requires gpl description {enable FAAD support via libfaad} { |
144 | | depends_lib-append port:faad2 |
145 | | configure.args-append --enable-libfaad |
146 | | } |
147 | | |
148 | | variant xvid requires gpl description {enable Xvid encoding via xvidcore, native MPEG-4/Xvid encoder exists} { |
149 | | depends_lib-append port:XviD |
150 | | configure.args-append --enable-libxvid |
151 | | } |
152 | | |
153 | | # depends build until x264 port supports shared libraries |
154 | | variant x264 requires gpl description {enable H.264 encoding via x264} { |
155 | | depends_build-append port:x264 |
156 | | configure.args-append --enable-libx264 |
157 | | } |
158 | | |
159 | | variant a52 requires gpl description {enable GPLed liba52 support} { |
| 136 | variant a52 description {enable GPLed liba52 support} { |
172 | | variant avfilter requires gpl description {video filter support (replaces vhook)} { |
173 | | configure.args-append --enable-swscale --enable-avfilter |
| 149 | variant no_gpl conflicts a52 description {disallow use of GPL code, license will be LGPL if +no_nonfree is selected} { |
| 150 | configure.args-delete --enable-gpl |
| 151 | configure.args-delete --enable-postproc |
| 152 | configure.args-delete --enable-swscale |
| 153 | configure.args-delete --enable-libfaad |
| 154 | depends_lib-delete port:faad2 |
| 155 | configure.args-delete --enable-libx264 |
| 156 | depends_build-delete port:x264 |
| 157 | configure.args-delete --enable-libxvid |
| 158 | depends_lib-delete port:XviD |
| 159 | } |
| 165 | post-activate { |
| 166 | if {![variant_isset no_nonfree]} { |
| 167 | ui_msg " |
| 168 | ******* |
| 169 | ******* This build of ${name} includes nonfree code. |
| 170 | ******* |
| 171 | ******* The following libraries and binaries may not be redistributed: |
| 172 | ******* |
| 173 | ******* ffmpeg |
| 174 | ******* libavcodec |
| 175 | ******* libavdevice |
| 176 | ******* libavfilter |
| 177 | ******* libavformat |
| 178 | ******* libavutil |
| 179 | ******* |
| 180 | ******* To remove this restriction use variant +no_nonfree |
| 181 | ******* |
| 182 | " |
| 183 | } elseif {![variant_isset no_gpl]} { |
| 184 | ui_msg " |
| 185 | ******* |
| 186 | ******* This build of ${name} includes GPLed code and |
| 187 | ******* is therefore licensed under GPL. |
| 188 | ******* |
| 189 | ******* The following modules are GPLed: |
| 190 | ******* |
| 191 | ******* postproc |
| 192 | ******* swscale |
| 193 | ******* liba52 |
| 194 | ******* libfaad |
| 195 | ******* libx264 |
| 196 | ******* libxvid |
| 197 | ******* |
| 198 | ******* To include only LGPLed code use variants +no_nonfree +no_gpl -a52 |
| 199 | ******* |
| 200 | " |
| 201 | } else { |
| 202 | ui_msg " |
| 203 | ******* |
| 204 | ******* This build of ${name} includes no GPLed or nonfree |
| 205 | ******* code and is therefore licensed under LGPL. |
| 206 | ******* |
| 207 | " |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | # |