[vlc-devel] [PATCH 1/2] contrib: add bpg

Tristan Matthews tmatth at videolan.org
Tue Jan 6 02:51:57 CET 2015


Currently libbpg is only available as a static library.
---
 contrib/src/bpg/SHA512SUMS |  1 +
 contrib/src/bpg/pic.patch  | 11 +++++++++++
 contrib/src/bpg/rules.mak  | 22 ++++++++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 100644 contrib/src/bpg/SHA512SUMS
 create mode 100644 contrib/src/bpg/pic.patch
 create mode 100644 contrib/src/bpg/rules.mak

diff --git a/contrib/src/bpg/SHA512SUMS b/contrib/src/bpg/SHA512SUMS
new file mode 100644
index 0000000..0746c8c
--- /dev/null
+++ b/contrib/src/bpg/SHA512SUMS
@@ -0,0 +1 @@
+8b97327d7bd9af41e88daa226e8791d797e6ff1ac01fe3ab25e2a64e193d80b51364ff76371dc9b99fa19da2d5d3e9301b5a2fe396b4014601175f5e8d0274ba  libbpg-0.9.4.tar.gz
diff --git a/contrib/src/bpg/pic.patch b/contrib/src/bpg/pic.patch
new file mode 100644
index 0000000..7a0e980
--- /dev/null
+++ b/contrib/src/bpg/pic.patch
@@ -0,0 +1,11 @@
+--- libbpg-0.9.4/Makefile.old	2015-01-05 19:40:25.930553071 -0500
++++ libbpg-0.9.4/Makefile	2015-01-05 19:40:52.978552277 -0500
+@@ -78,7 +78,7 @@
+ 
+ LIBBPG_JS8_OBJS:=$(patsubst %.o, %.js8.o, $(LIBBPG_OBJS)) tmalloc.js8.o
+ 
+-$(LIBBPG_OBJS): CFLAGS+=-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -std=c99 -D_GNU_SOURCE=1 -DUSE_VAR_BIT_DEPTH
++$(LIBBPG_OBJS): CFLAGS+=-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -std=c99 -D_GNU_SOURCE=1 -DUSE_VAR_BIT_DEPTH -fPIC
+ 
+ $(LIBBPG_JS_OBJS): EMCFLAGS+=-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -std=c99 -D_GNU_SOURCE=1 -DUSE_VAR_BIT_DEPTH
+ 
diff --git a/contrib/src/bpg/rules.mak b/contrib/src/bpg/rules.mak
new file mode 100644
index 0000000..cc2d0d2
--- /dev/null
+++ b/contrib/src/bpg/rules.mak
@@ -0,0 +1,22 @@
+# BPG
+BPG_VERSION := 0.9.4
+BPG_URL := http://bellard.org/bpg/libbpg-$(BPG_VERSION).tar.gz
+
+# default disabled
+# PKGS += bpg
+
+$(TARBALLS)/libbpg-$(BPG_VERSION).tar.gz:
+	$(call download,$(BPG_URL))
+
+.sum-bpg: libbpg-$(BPG_VERSION).tar.gz
+
+bpg: libbpg-$(BPG_VERSION).tar.gz .sum-bpg
+	$(UNPACK)
+	$(APPLY) $(SRC)/bpg/pic.patch
+	$(MOVE)
+
+.bpg: bpg
+	cd $< && $(MAKE) libbpg.a
+	mkdir -p $(PREFIX)/include/ && cp $</libbpg.h $(PREFIX)/include/
+	mkdir -p $(PREFIX)/lib/ && cp $</libbpg.a $(PREFIX)/lib/
+	touch $@
-- 
2.1.4




More information about the vlc-devel mailing list