You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Rémi Denis-Courmont f2e67d22ff contrib: cmake: require a system name 5 years ago
..
a52 contrib: using make -C should spread the threads from "make -j" properly 8 years ago
aom contrib: aom: update to 3.2.0 5 years ago
aribb24 contrib: aribb24: require GPLv3 for now 9 years ago
aribb25 contrib: aribb25: don't build the sample app 6 years ago
asdcplib contrib: asdcp: fix a spelling error in the .pc template 5 years ago
ass contrib: remove deprecated platform 5 years ago
bluray Contribs: update libbluray to 1.3.0 5 years ago
bpg contrib: bpg: bump to 0.9.8 8 years ago
breakpad contrib: breakpad: correctly install dump_syms 5 years ago
caca contrib: caca: Disable build on darwin OS 6 years ago
cargo contrib: cargo: use the 0.6.13 cargo-c version 6 years ago
cddb contrib: cddb: add dependency to gettext 5 years ago
chromaprint contrib: support CMAKE_GENERATOR other than makefile 6 years ago
daala contrib: daala: update upstream URL 6 years ago
dav1d contribs: update dav1d to 0.9.1 5 years ago
dca contrib: dca: Bump to 0.0.7 6 years ago
decklink contrib: add the Decklink SDK headers 5 years ago
dvbpsi Contribs: update libdvbpsi to 1.3.3 5 years ago
dvdcss Contribs: update libdvcss to 1.4.3 5 years ago
dvdnav Contribs: update dvdnav to 6.1.1 5 years ago
dvdread Contribs: update dvdread to 6.1.2 5 years ago
ebml contribs: ebml: Fix build with GCC11 5 years ago
faad2 contribs: bump faad to 2.9.2 #24670 6 years ago
ffi contrib: use http links instead of ftp 5 years ago
ffmpeg contrib: ffmpeg: remove libav 5 years ago
flac contrib: flac: update the winstore fixes for 1.3.3 6 years ago
fluid contribs: Bump libfluidsynth to 2.1.8 5 years ago
fluidlite contrib: support CMAKE_GENERATOR other than makefile 6 years ago
fontconfig contrib: remove deprecated platform 5 years ago
freetype2 Contribs: update Freetype2 to 2.10.4 5 years ago
fribidi Contribs: update fribidi to 1.0.10 5 years ago
fxc2 contrib: avoid which 5 years ago
gcrypt contrib: remove deprecated platform 5 years ago
gettext contrib: gettext: Backport a gettext patch for fixing building on latest mingw-w64 6 years ago
glew contrib: support CMAKE_GENERATOR other than makefile 6 years ago
glib Contribs: move more contribs to VideoLAN mirror 10 years ago
glslang contrib: support CMAKE_GENERATOR other than makefile 6 years ago
gme contrib: support CMAKE_GENERATOR other than makefile 6 years ago
gmp contrib: remove deprecated platform 5 years ago
gnutls contrib: gnutls: fix CertEnumCRLsInStore in UWP builds 5 years ago
goom contrib: goom: remove unrecognized options 5 years ago
gpg-error contrib: remove deprecated platform 5 years ago
gsm contrib: gsm: official download is now hosted on quut.com 5 years ago
harfbuzz contribs: harfbuzz: Disable some unneeded components 5 years ago
iconv contrib: iconv: Rework the ANDROID_API check to not use bc 8 years ago
jack Contribs: move more contribs to VideoLAN mirror 10 years ago
jpeg contribs: jpeg: Don't build executables 8 years ago
kate contrib: {kate,tiger}: add Google Code archive location 5 years ago
lame contrib: lame: Don't use -mtune=native/-march=native 5 years ago
libarchive Contribs: update libarchive to 3.5.1 5 years ago
libdsm contrib: Bump libdsm to 0.3.2 6 years ago
libebur128 contrib: ebur128: use BUILD_SHARED_LIBS 6 years ago
libmpeg2 contrib: using make -C should spread the threads from "make -j" properly 8 years ago
libplacebo contrib: libplacebo: check version number 5 years ago
librist Add librist to contrib 5 years ago
libtasn1 contribs: libtasn1: Don't build executables 8 years ago
libxml2 contribs: libxml2: Update to 2.9.8 9 years ago
live555 contribs: live555: disable multicast intf lookups on android 6 years ago
lua contrib: lua: autodetect lua >= 5.1 6 years ago
mad contrib: mad: remove outdated autotools files 8 years ago
matroska contrib: matroska: update libmatroska to 1.6.3 6 years ago
medialibrary contrib: Bump medialibrary 5 years ago
mfx contrib: mfx: fix linking with x86 DLL on UWP 5 years ago
microdns contrib: microdns: don't build tests and examples 6 years ago
modplug contrib: modplug: Link against libc++ on macOS 6 years ago
mpcdec contrib: support CMAKE_GENERATOR other than makefile 6 years ago
mpg123 contrib: remove deprecated platform 5 years ago
mysofa contrib: support CMAKE_GENERATOR other than makefile 6 years ago
ncurses contrib: ncurses: update to 6.3 5 years ago
nettle contrib: use http links instead of ftp 5 years ago
nfs contrib: nfs: Patch win32_compat.h to not override snprintf 5 years ago
nvcodec contrib: nvcodec: replace \r\n by \n in hash 6 years ago
ogg contrib: ogg: use upstream patch 7 years ago
openjpeg contrib: openjpeg: add support for wasm-emscripten 5 years ago
opus contrib: opus: update to 1.3.1 7 years ago
orc Revert "contribs: orc: Don't build anything more than the library" 10 years ago
png contrib: png: update to 1.6.37 7 years ago
postproc contrib: remove deprecated platform 5 years ago
projectM contrib: support CMAKE_GENERATOR other than makefile 6 years ago
protobuf contrib: avoid which 5 years ago
pthread-stubs contrib: pthread-stubs: Use VideoLAN mirror if available 8 years ago
pthreads contrib: pthreads: patch dcomp.h from mingw64 to add gaussian effect 5 years ago
qt contribs: qt: Fix build with gcc11 5 years ago
qtdeclarative contribs: qtdeclarative: Fix build with gcc11 5 years ago
qtgraphicaleffects contrib: qt: update qt version to 5.15.1 6 years ago
qtquickcontrols2 contrib: qt: update qt version to 5.15.1 6 years ago
qtsvg contrib: qt: update qt version to 5.15.1 6 years ago
rav1e contrib: rav1e: update to v0.4.1 5 years ago
rav1e-vendor contrib: add rav1e 6 years ago
regex Contribs: change contribs URLs on our FTP 10 years ago
rnnoise contrib: rnnoise: disable on Android for now 6 years ago
samplerate contrib: ensure GPL is enabled if needed 9 years ago
schroedinger contrib: schroedinger: diracvideo.org no longer exists 5 years ago
shout Revert "contrib: shout: better fix the winstore build" 7 years ago
sidplay2 contrib: sidplay: Fix out of bound access 6 years ago
smb2 contrib: smb2: update to 4.0.0 5 years ago
soxr contrib: soxr: SF already contains URL protocol 5 years ago
sparkle contrib: sparkle: do not change install_name 5 years ago
spatialaudio contrib: support CMAKE_GENERATOR other than makefile 6 years ago
speex contrib: fixed pkg-static and remove direct invocations 7 years ago
speexdsp contrib: update to SpeexDSP 1.2.0 7 years ago
sqlite contrib: Bump sqlite version 5 years ago
srt contribs: srt: Fix build with gcc11 5 years ago
ssh2 Contribs: fix libssh2 linking to gpg-error 9 years ago
taglib contrib: Bump taglib to 1.12 5 years ago
theora contrib: theora: disable doc generation 7 years ago
tiff contrib: tiff: Ensure we only build & install the lib 6 years ago
tiger contrib: {kate,tiger}: add Google Code archive location 5 years ago
tremor contrib: update tremor download link 6 years ago
twolame contrib: using make -C should spread the threads from "make -j" properly 8 years ago
upnp contrib: upnp: hosting moved from SourceForge to GitHub 5 years ago
vncclient contribs: add vncclient GPL check 5 years ago
vorbis contrib: vorbis: do not use a fake target for vorbisenc 6 years ago
vpx contrib/vpx: fix compilation for aarch64 simulators on iOS/tvOS 5 years ago
wine-headers contrib: wine: add DXVA AV1 support 5 years ago
x262 contrib: x262: move the x262 target in its own folder 6 years ago
x264 contrib/x264: fix cross-compilation for aarch64 on macOS 6 years ago
x265 contrib: support CMAKE_GENERATOR other than makefile 6 years ago
xau contrib: libXau: bump to version 1.0.9 5 years ago
xcb contrib: xcb: bump to version 1.14 5 years ago
xcb-proto contrib: xcb-proto: bump to version 1.14 5 years ago
xorg-macros contrib: xorg-macros: Use VideoLAN mirror if available 8 years ago
xproto contrib: xproto: depend on xorg-macros 7 years ago
zlib contrib: zlib: Fix prefix replacement on win32 5 years ago
zvbi contrib/zvbi: remove no-longer needed hack 5 years ago
README.md contrib/src: Convert README to Markdown syntax 5 years ago
change_prefix.sh contrib: Don't expose change_prefix internal details to the caller 5 years ago
gen-meson-crossfile.py contrib: set pkg_config_libdir in meson crossfile 5 years ago
get-arch.sh contrib: Map armv*-* triplets to ARCH=arm 9 years ago
help.txt contribs: add "make help" 10 years ago
main-rust.mak contrib: rust: remove lto 6 years ago
main.mak contrib: cmake: require a system name 5 years ago
pkg-rewrite-absolute.py pkg-rewrite-absolute.py: use == instead of is for char comparison 7 years ago
pkg-static.sh pkg-static.sh: also merge Requires.private with Requires 12 years ago

README.md

Writing rules

At the bare minimum, a package in contrib must provide two Makefile targets in src/foo/rules.mak:

  • .foo to build and install the package, and
  • .sum-foo to fetch or create a source tarball and verify it, where foo the package name.

Tarball

.sum-foo typically depends on a separate target that fetches the source code. In that case, .sum-foo needs only verify that the tarball is correct, e.g.:

$(TARBALLS)/libfoo-$(FOO_VERSION).tar.bz2:
	$(call download,$(FOO_URL))

# This will use the default rule: check SHA-512
.sum-foo: libfoo-$(FOO_VERSION).tar.bz2

NOTE: contrary to the previous VLC contribs, this system always uses a source tarball, even if the source code is downloaded from a VCS. This serves two purposes:

  • offline builds (or behind a firewall),
  • source code requirements compliance.

Compilation

Similarly, .foo typically depends on the source code directory. In this case, care must be taken that the directory name only exists if the source code is fully ready. Otherwise Makefile dependencies will break (this is not an issue for files, only directories).

libfoo: libfoo-$(FOO_VERSION).tar.bz2 .sum-foo
	$(UNPACK) # to libfoo-$(FOO_VERSION)
	### apply patches here ###
	# last command: make the target directory
	$(MOVE)

.foo: libfoo
	cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
	cd $< && $(MAKE) install
	touch $@

Conditional builds

As far as possible, build rules should determine automatically whether a package is useful (for VLC media player) or not. Useful packages should be listed in the PKGS special variable. See some examples:

# FFmpeg is always useful
PKGS += ffmpeg

# DirectX headers are useful only on Windows
ifdef HAVE_WIN32
PKGS += directx
endif

# x264 is only useful when stream output is enabled
ifdef BUILD_ENCODERS
PKGS += x264
endif

If a package is a dependency of another package, but it is not a direct dependency of VLC, then it should NOT be added to PKGS. The build system will automatically build it via dependencies (see below).

Some packages may be provided by the target system. This is especially common when building natively on Linux or BSD. When this situation is detected, the package name should be added to the PKGS_FOUND special variable. The build system will then skip building this package:

# Asks pkg-config if foo version 1.2.3 or later is present:
ifeq ($(call need_pkg,'foo >= 1.2.3'),)
PKGS_FOUND += foo
endif

Dependencies

If package bar depends on package foo, the special DEPS_bar variable should be defined as follow:

DEPS_bar = foo $(DEPS_foo)

Note that dependency resolution is unfortunately not recursive. Therefore $(DEPS_foo) really should be specified explicitly as shown above. (In practice, this will not make any difference insofar as there are no pure second-level nested dependencies. For instance, libass depends on FontConfig, which depends on FreeType, but libass depends directly on FreeType anyway.)

Also note that DEPS_bar is set "recursively" with =, rather than "immediately" with :=. This is so that $(DEPS_foo) is expanded correctly, even if DEPS_foo it is defined after DEPS_bar.

Implementation note:

If you must know, the main.mak build hackery will automatically
emit a dependency from .bar onto .dep-foo:

	.bar: .dep-foo

...whereby .dep-foo will depend on .foo:

	.dep-foo: .foo
        touch $@

...unless foo was detected in the target distribution:

	.dep-foo:
        touch $@

So you really only need to set DEPS_bar.