@@ -132,11 +132,9 @@ command_exists () {
132
132
}
133
133
134
134
library_exists () {
135
- if ! command_exists " ldconfig" ; then
136
- return 1
137
- fi
138
-
139
- if ! [ -n " $( ldconfig -p | grep " $1 " ) " ]; then
135
+ local result=0
136
+ local output=$( pkg-config --exists --print-errors " $1 " 2>&1 > /dev/null) || result=$?
137
+ if [ ! " $result " = " 0" ]; then
140
138
return 1
141
139
fi
142
140
@@ -238,62 +236,11 @@ if ! command_exists "curl"; then
238
236
exit 1
239
237
fi
240
238
241
- if [[ " $OSTYPE " == " linux-gnu" ]]; then
242
- if ! command_exists " python3" ; then
243
- echo " python3 not installed." ;
244
- exit 1
245
- fi
246
- fi
247
239
248
240
# #
249
241
# # build tools
250
242
# #
251
243
252
- if build " m4" ; then
253
- download " https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz"
254
- # https://lists.gnu.org/archive/html/bug-m4/2018-08/msg00000.html
255
- # No new version of M4 has been released, so a patch has been applied.
256
- execute curl -sLJO https://github.com/easybuilders/easybuild-easyconfigs/raw/master/easybuild/easyconfigs/m/M4/M4-1.4.18_glibc_2.28.patch
257
- execute patch -p1 -d . < M4-1.4.18_glibc_2.28.patch
258
- execute ./configure --prefix=" ${WORKSPACE} "
259
- execute make -j $MJOBS
260
- execute make install
261
- build_done " m4"
262
- fi
263
-
264
- if build " autoconf" ; then
265
- download " https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz"
266
- execute ./configure --prefix=" ${WORKSPACE} "
267
- execute make -j $MJOBS
268
- execute make install
269
- build_done " autoconf"
270
- fi
271
-
272
- if build " automake" ; then
273
- download " https://ftp.gnu.org/gnu/automake/automake-1.16.tar.xz"
274
- execute ./configure --prefix=" ${WORKSPACE} "
275
- execute make -j $MJOBS
276
- execute make install
277
- build_done " automake"
278
- fi
279
-
280
- if build " libtool" ; then
281
- download " https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz"
282
- execute ./configure --prefix=" ${WORKSPACE} " --disable-shared --enable-static
283
- execute make -j $MJOBS
284
- execute make install
285
- build_done " libtool"
286
- fi
287
-
288
- if build " util-macros" ; then
289
- download " https://gitlab.freedesktop.org/xorg/util/macros/-/archive/util-macros-1.19.2/macros-util-macros-1.19.2.tar.bz2" " util-macros-1.19.2.tar.bz2"
290
- execute autoreconf --force --verbose --install
291
- execute ./configure --prefix=" ${WORKSPACE} "
292
- execute make -j $MJOBS
293
- execute make install
294
- build_done " util-macros"
295
- fi
296
-
297
244
if build " yasm" ; then
298
245
download " https://github.com/yasm/yasm/releases/download/v1.3.0/yasm-1.3.0.tar.gz"
299
246
execute ./configure --prefix=" ${WORKSPACE} "
@@ -311,7 +258,7 @@ if build "nasm"; then
311
258
fi
312
259
313
260
if build " pkg-config" ; then
314
- download " https://gitlab .freedesktop.org/pkg-config /pkg-config/-/archive/pkg-config- 0.29.2/pkg-config-pkg-config-0.29.2. tar.bz2 " " pkg-config-0.29.2.tar.bz2 "
261
+ download " https://pkgconfig .freedesktop.org/releases /pkg-config- 0.29.2. tar.gz "
315
262
execute autoreconf --force --verbose --install
316
263
execute ./configure --silent --prefix=" ${WORKSPACE} " --with-pc-path=" ${WORKSPACE} " /lib/pkgconfig --with-internal-glib
317
264
execute make -j $MJOBS
@@ -345,23 +292,6 @@ if build "cmake"; then
345
292
build_done " cmake"
346
293
fi
347
294
348
- # Required for building vaapi tools so linux only
349
- if [[ " $OSTYPE " == " linux-gnu" ]]; then
350
- if build " meson" ; then
351
- download " https://github.com/mesonbuild/meson/releases/download/0.55.3/meson-0.55.3.tar.gz"
352
- execute ln -s $( pwd) /meson.py ${WORKSPACE} /bin/meson
353
- build_done " meson"
354
- fi
355
-
356
- if build " ninja" ; then
357
- download " https://github.com/ninja-build/ninja/archive/v1.10.1.tar.gz" " ninja-1.10.1.tar.gz"
358
- execute cmake -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " .
359
- execute make -j $MJOBS
360
- execute make install
361
- build_done " ninja"
362
- fi
363
- fi
364
-
365
295
366
296
# #
367
297
# # video library
@@ -580,43 +510,9 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
580
510
CONFIGURE_OPTIONS+=(" --nvccflags=-gencode arch=compute_52,code=sm_52" )
581
511
fi
582
512
583
- if build " amf" ; then
584
- download " https://github.com/GPUOpen-LibrariesAndSDKs/AMF/archive/1.4.16.1.tar.gz" " amf-1.4.16.1.tar.gz"
585
- execute mkdir -p " ${WORKSPACE} " /include/AMF
586
- execute cp -r amf/public/include/* " ${WORKSPACE} " /include/AMF/
587
- build_done " amf"
588
- fi
589
- CONFIGURE_OPTIONS+=(" --enable-amf" )
590
-
591
513
# Vaapi doesn't work well with static links ffmpeg.
592
514
if [ -z " $LDEXEFLAGS " ]; then
593
515
if library_exists " libva" ; then
594
- if build " libpciaccess" ; then
595
- download " https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/archive/libpciaccess-0.16/libpciaccess-libpciaccess-0.16.tar.bz2" " libpciaccess-0.16.tar.bz2"
596
- execute autoreconf --force --verbose --install
597
- execute ./configure --prefix=" ${WORKSPACE} " --disable-shared --enable-static CFLAGS=-fPIC
598
- execute make -j $MJOBS
599
- execute make install
600
- build_done " libpciaccess"
601
- fi
602
-
603
- # https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/28
604
- # Since libdrm should not be statically linked, neither should libva or intel-vaapi-driver, on which it depends, be statically linked.
605
- # They should be installed as drivers in your host OS.
606
- if build " libdrm" ; then
607
- download " https://gitlab.freedesktop.org/mesa/drm/-/archive/libdrm-2.4.102/drm-libdrm-2.4.102.tar.bz2" " libdrm-2.4.102.tar.bz2"
608
- execute meson --prefix=" ${WORKSPACE} " --libdir=" ${WORKSPACE} " /lib builddir/
609
- execute ninja -C builddir/ install
610
- build_done " libdrm"
611
- fi
612
-
613
- if build " libva" ; then
614
- download " https://github.com/intel/libva/releases/download/2.9.0/libva-2.9.0.tar.bz2"
615
- execute ./configure --prefix=" ${WORKSPACE} " --disable-static --enable-shared
616
- execute make -j $MJOBS
617
- execute make install
618
- build_done " libva"
619
- fi
620
516
CONFIGURE_OPTIONS+=(" --enable-vaapi" )
621
517
fi
622
518
fi
0 commit comments