aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/target/libdvdcss
diff options
context:
space:
mode:
authorwsnipex <wsnipex@a1.net>2016-02-14 11:06:08 +0100
committerAnton Fedchin <afedchin@ruswizards.com>2016-02-23 22:22:16 +0300
commit4a3fa567894eea1f676098e25c550e0f4cde1352 (patch)
tree1f7ad41627b303539b92bbc201fc103a4a1269ca /tools/depends/target/libdvdcss
parente64bddeb74a011b0fb1465bc3e7692036d5be69c (diff)
[depends] add libdvdcss
Diffstat (limited to 'tools/depends/target/libdvdcss')
-rw-r--r--tools/depends/target/libdvdcss/DVDCSS-VERSION4
-rw-r--r--tools/depends/target/libdvdcss/Makefile60
2 files changed, 64 insertions, 0 deletions
diff --git a/tools/depends/target/libdvdcss/DVDCSS-VERSION b/tools/depends/target/libdvdcss/DVDCSS-VERSION
new file mode 100644
index 0000000000..e8ae23b76b
--- /dev/null
+++ b/tools/depends/target/libdvdcss/DVDCSS-VERSION
@@ -0,0 +1,4 @@
+LIBNAME=libdvdcss
+BASE_URL=https://github.com/xbmc/libdvdcss
+VERSION=master
+
diff --git a/tools/depends/target/libdvdcss/Makefile b/tools/depends/target/libdvdcss/Makefile
new file mode 100644
index 0000000000..a27629e986
--- /dev/null
+++ b/tools/depends/target/libdvdcss/Makefile
@@ -0,0 +1,60 @@
+-include ../../Makefile.include
+include DVDCSS-VERSION
+DEPS= DVDCSS-VERSION Makefile
+
+ifeq ($(CROSS_COMPILING), yes)
+ DEPS += ../../Makefile.include
+else
+ ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+ PREFIX := $(ROOT_DIR)/dvdcss-install
+ AUTORECONF := autoreconf
+
+ ifeq ($(PLATFORM),)
+ PLATFORM = native
+ TARBALLS_LOCATION = $(ROOT_DIR)
+ endif
+endif
+
+RETRIEVE_TOOL := curl -Ls --create-dirs --retry 10 --retry-delay 3
+ARCHIVE_TOOL := tar --strip-components=1 -xf
+
+# configuration settings
+config = --prefix=$(PREFIX) --disable-shared --enable-static --with-pic
+
+CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
+
+GITREV=$(shell git ls-remote $(BASE_URL) $(VERSION) | awk '{print $$1}')
+ifeq ($(GITREV),)
+ ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
+else
+ ARCHIVE=$(LIBNAME)-$(GITREV).tar.gz
+endif
+
+
+all: .installed-$(PLATFORM)
+
+download: $(TARBALLS_LOCATION)/$(ARCHIVE)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) -o $(TARBALLS_LOCATION)/$(ARCHIVE) $(BASE_URL)/archive/$(VERSION).tar.gz
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); $(AUTORECONF) -vif && ./configure $(config)
+
+$(PLATFORM)/.libs/$(LIBNAME).a: $(PLATFORM)
+ [ -d $(PLATFORM)/.libs ] && [ ! -f $@ ] && $(MAKE) -C $(PLATFORM) clean || :
+ $(MAKE) -C $(PLATFORM)
+
+.installed-$(PLATFORM): $(PLATFORM)/.libs/$(LIBNAME).a
+ $(MAKE) -C $(PLATFORM) install
+ touch $@
+
+clean:
+ $(MAKE) -C $(PLATFORM) clean
+ rm -f .installed-$(PLATFORM)
+
+distclean::
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
+