summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b531ffd6fd96d0dad289b820bec2f5d4d3176bf2 (plain)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# Maintainer: Daniel Bermond < yahoo-com: danielbermond >

# AUR dependencies
# ----------------
# libilbc kvazaar chromaprint-fftw libbs2b openh264 shine vo-amrwbenc
# nut-multimedia-git xavs flite-fpic libmfx-git libopenmpt-svn zimg-git

# AUR make dependencies
# ---------------------
# blackmagic-decklink-sdk

# AUR optional dependency
# -----------------------
# intel-media-sdk (experimental Intel QSV support only for x86_64)

pkgname=ffmpeg-full-git
pkgver=N.82833.gedb4f5d
pkgrel=1
pkgdesc="Record, convert and stream audio and video (Git version with all possible libs)"
arch=('i686' 'x86_64')
url="http://www.ffmpeg.org/"
license=('GPL3' 'custom:UNREDISTRIBUTABLE')
depends=(
    'alsa-lib' 'zlib' 'bzip2' 'xz' 'libpng' 'chromaprint-fftw' 'fontconfig' 'frei0r-plugins'
    'libgcrypt' 'gmp' 'gnutls' 'glibc' 'ladspa' 'libass' 'libbluray' 'libbs2b' 'libcaca' 'celt'
    'libcdio-paranoia' 'libdc1394' 'libfdk-aac' 'flite-fpic' 'freetype2' 'fribidi' 'libgme'
    'gsm' 'libiec61883' 'libilbc' 'kvazaar' 'libmodplug' 'lame' 'netcdf' 'nut-multimedia-git'
    'opencore-amr' 'opencv' 'openh264' 'openjpeg2' 'libopenmpt-svn' 'opus' 'pulseaudio'
    'rubberband' 'rtmpdump' 'schroedinger' 'shine' 'smbclient' 'libavc1394' 'snappy' 'libsoxr'
    'speex' 'libssh' 'tesseract' 'libtheora' 'twolame' 'v4l-utils' 'vid.stab' 'vo-amrwbenc'
    'libvorbis' 'libvpx' 'wavpack' 'libwebp' 'libx264.so' 'x265' 'libxcb' 'xvidcore' 'zimg-git'
    'zeromq' 'zvbi' 'openal' 'libva' 'libdrm' 'libva-intel-driver' 'opencl-icd-loader'
    'libvdpau' 'mesa' 'openssl' 'xavs' 'sdl2' 'java-environment' 'libmfx-git'
    'libomxil-bellagio'
)
depends_x86_64=('cuda')
optdepends_x86_64=('intel-media-sdk: for Intel QSV support (experimental)')
makedepends=('git' 'yasm' 'opencl-headers' 'blackmagic-decklink-sdk')
provides=(
    'ffmpeg' 'qt-faststart' 'ffmpeg-git' 'ffmpeg-full' 'ffmpeg-full-extra' 'ffmpeg-full-nvenc'
    'ffmpeg-libfdk_aac' 'libavutil.so' 'libavcodec.so' 'libavformat.so' 'libavdevice.so'
    'libavfilter.so' 'libavresample.so' 'libswscale.so' 'libswresample.so' 'libpostproc.so'
)
conflicts=(
    'ffmpeg' 'ffmpeg-git' 'ffmpeg-full' 'ffmpeg-full-extra' 'ffmpeg-full-nvenc'
    'ffmpeg-libfdk_aac')
source=("$pkgname"::'git://source.ffmpeg.org/ffmpeg.git'
        'UNREDISTRIBUTABLE.txt')
sha256sums=('SKIP'
            'e0c1b126862072a71e18b9580a6b01afc76a54aa6e642d2c413ba0ac9d3010c4')

pkgver() {
	cd "${srcdir}/${pkgname}"
	
	# Git, tags available
	        
	# Method showing version based on FFmpeg Git versioning system
	printf "%s" "$(git describe --tags --match N | tr '-' '.')"
}

prepare() {
	cd "${srcdir}/${pkgname}"
	
	# Add the ALSA library to the Flite LDFLAGS variable and enables the discovery of Flite
	sed -i 's/-lflite"/-lflite -lasound"/' configure
}

build() {
	cd "${srcdir}/${pkgname}"
	
	# Add x86_64 depends and optdepends to the build if architecture is x86_64
	if [ "$CARCH" = "x86_64" ]; then
	    _cuda="--enable-cuda"
	    _cudainc="-I/opt/cuda/include"
	    _cudalib="-L/opt/cuda/lib64"
	    _cuvid="--enable-cuvid"
	    _libnpp="--enable-libnpp"
	    _intelsdklib="-Wl,-rpath -Wl,/opt/intel/mediasdk/lib64"
	else
	    _cuda=""
	    _cudainc=""
	    _cudalib=""
	    _cuvid=""
	    _libnpp=""
	    _intelsdklib=""
	fi
	
	msg2 "Running ffmpeg configure script. Please wait..."
	
	./configure \
	        --prefix=/usr \
	        --extra-cflags="-I/usr/lib/jvm/$(archlinux-java get)/include \
	                        -I/usr/lib/jvm/$(archlinux-java get)/include/linux \
	                        ${_cudainc}" \
	        --extra-ldflags="${_cudalib} ${_intelsdklib}" \
	        \
	        --enable-rpath \
	        --enable-gpl \
	        --enable-version3 \
	        --enable-nonfree \
	        --enable-shared \
	        --disable-static \
	        --enable-gray \
	        --enable-avresample \
	        \
	        --enable-avisynth \
	        --enable-bzlib \
	        --enable-chromaprint \
	        --enable-frei0r \
	        --enable-gcrypt \
	        --enable-gmp \
	        --enable-gnutls \
	        --enable-iconv \
	        --enable-jni \
	        --enable-ladspa \
	        --enable-libass \
	        --enable-libbluray \
	        --enable-libbs2b \
	        --enable-libcaca \
	        --enable-libcelt \
	        --enable-libcdio \
	        --enable-libdc1394 \
	        --enable-libfdk-aac \
	        --enable-libflite \
	        --enable-fontconfig \
	        --enable-libfreetype \
	        --enable-libfribidi \
	        --enable-libgme \
	        --enable-libgsm \
	        --enable-libiec61883 \
	        --enable-libilbc \
	        --enable-libkvazaar \
	        --enable-libmodplug \
	        --enable-libmp3lame \
	        --enable-libnut \
	        --enable-libopencore-amrnb \
	        --enable-libopencore-amrwb \
	        --enable-libopencv \
	        --enable-libopenh264 \
	        --enable-libopenjpeg \
	        --enable-libopenmpt \
	        --enable-libopus \
	        --enable-libpulse \
	        --enable-librubberband \
	        --enable-librtmp  \
	        --enable-libschroedinger \
	        --enable-libshine \
	        --enable-libsmbclient \
	        --enable-libsnappy \
	        --enable-libsoxr \
	        --enable-libspeex \
	        --enable-libssh \
	        --enable-libtesseract \
	        --enable-libtheora \
	        --enable-libtwolame \
	        --enable-libv4l2 \
	        --enable-libvidstab \
	        --enable-libvo-amrwbenc \
	        --enable-libvorbis \
	        --enable-libvpx \
	        --enable-libwavpack \
	        --enable-libwebp \
	        --enable-libx264 \
	        --enable-libx265 \
	        --enable-libxavs \
	        --enable-libxcb \
	        --enable-libxcb-shm \
	        --enable-libxcb-xfixes \
	        --enable-libxcb-shape \
	        --enable-libxvid \
	        --enable-libzimg \
	        --enable-libzmq \
	        --enable-libzvbi \
	        --enable-lzma \
	        --enable-decklink \
	        --enable-mediacodec \
	        --enable-netcdf \
	        --enable-openal \
	        --enable-opencl \
	        --enable-opengl \
	        --enable-openssl \
	        --enable-sdl2 \
	        --enable-x11grab \
	        --enable-xlib \
	        --enable-zlib \
	        \
	        $_cuda \
	        $_cuvid \
	        --enable-libmfx \
	        $_libnpp \
	        --enable-nvenc \
	        --enable-omx \
	        --enable-omx-rpi \
	        --enable-vaapi \
	        --enable-vdpau \
	        --enable-videotoolbox
	
	make
	
	make tools/qt-faststart
}

package() {
	cd "${srcdir}/${pkgname}"
	
	make DESTDIR="$pkgdir/" install
	
	install -D -m755 tools/qt-faststart "${pkgdir}/usr/bin/qt-faststart"
	install -D -m644 "$srcdir"/UNREDISTRIBUTABLE.txt "${pkgdir}/usr/share/licenses/${pkgname}/UNREDISTRIBUTABLE.txt"
}