78d7c9a3e28b475615b0328961813c6621dc76f5
[vlc.git] / contrib / src / srt / rules.mak
1 # srt
2
3 SRT_VERSION := 1.2.2
4 SRT_URL := $(GITHUB)/Haivision/srt/archive/v$(SRT_VERSION).tar.gz
5
6 ifndef HAVE_WIN32
7 ifdef BUILD_NETWORK
8 PKGS += srt
9 endif
10 endif
11 ifeq ($(call need_pkg,"srt >= 1.2.2"),)
12 PKGS_FOUND += srt
13 endif
14
15 ifdef HAVE_DARWIN_OS
16 SRT_DARWIN=CFLAGS="$(CFLAGS) -Wno-error=partial-availability" CXXFLAGS="$(CXXFLAGS) -Wno-error=partial-availability"
17 endif
18
19 $(TARBALLS)/srt-$(SRT_VERSION).tar.gz:
20         $(call download_pkg,$(SRT_URL),srt)
21
22 .sum-srt: srt-$(SRT_VERSION).tar.gz
23
24 srt: srt-$(SRT_VERSION).tar.gz .sum-srt
25         $(UNPACK)
26         $(call pkg_static,"scripts/haisrt.pc.in")
27         mv srt-$(SRT_VERSION) $@ && touch $@
28
29 DEPS_srt = gnutls $(DEPS_gnutls)
30
31 .srt: srt toolchain.cmake
32         cd $< && $(HOSTVARS_PIC) $(SRT_DARWIN) $(CMAKE) \
33                 -DENABLE_SHARED=OFF -DUSE_GNUTLS=ON -DENABLE_CXX11=OFF
34         cd $< && $(MAKE) install
35         touch $@