Skip to content
Snippets Groups Projects
Select Git revision
  • 51d552f67709cf26a85cad0446b0eb40c89143b4
  • master default protected
  • release/202005
  • release/202001
  • release/201912
  • release/201911
  • release/releaseWindowsTestOne
  • release/windowsReleaseTest
  • release/releaseTest
  • release/releaseWindowsTest
  • release/201910
  • release/qt/201910
  • release/windows-test/201910
  • release/201908
  • release/201906
  • release/201905
  • release/201904
  • release/201903
  • release/201902
  • release/201901
  • release/201812
  • 4.0.0
  • 2.2.0
  • 2.1.0
  • 2.0.1
  • 2.0.0
  • 1.4.1
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
31 results

src

  • Open with
  • Download source code
  • Download directory
  • Your workspaces

      A workspace is a virtual sandbox environment for your code in GitLab.

      No agents available to create workspaces. Please consult Workspaces documentation for troubleshooting.

  • Adrien Beraud's avatar
    Adrien Béraud authored
    * attempt to fix crash on Android
    * move from sourceforge to bintray for hosting
    
    Change-Id: Iadf789293b7302c768f79bd8388b25049bd44d51
    Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
    51d552f6
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    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
    
    Note: The need_pkg function always return 1 during cross-compilation.
    This is a known bug.
    
    
    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.