aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-04-30 08:57:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-04-30 08:57:33 +0000
commitdff1fab4a4bd7a78ca0d7db932e05745f94cff64 (patch)
tree6d4de4bc099bca8caa5e41b73e05c76c60ac4b4c /main
parent131c8315b1cced8cc5e0a4c68a6387d69b234dad (diff)
downloadaports-dff1fab4a4bd7a78ca0d7db932e05745f94cff64.tar.bz2
aports-dff1fab4a4bd7a78ca0d7db932e05745f94cff64.tar.xz
main/gst-ffmpeg0.10: fix build with fortify
Diffstat (limited to 'main')
-rw-r--r--main/gst-ffmpeg0.10/APKBUILD13
-rw-r--r--main/gst-ffmpeg0.10/libavutil-fortify.patch41
2 files changed, 51 insertions, 3 deletions
diff --git a/main/gst-ffmpeg0.10/APKBUILD b/main/gst-ffmpeg0.10/APKBUILD
index ce600484b6..aa0eb90b23 100644
--- a/main/gst-ffmpeg0.10/APKBUILD
+++ b/main/gst-ffmpeg0.10/APKBUILD
@@ -1,14 +1,16 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gst-ffmpeg0.10
pkgver=0.10.13
-pkgrel=0
+pkgrel=1
pkgdesc="Gstreamer FFMpeg Plugin"
url="http://www.gstreamer.net"
arch="x86 x86_64"
license="GPL"
makedepends="gstreamer0.10-dev gst-plugins-base0.10-dev liboil-dev coreutils
orc-dev"
-source="http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-$pkgver.tar.bz2"
+source="http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-$pkgver.tar.bz2
+ libavutil-fortify.patch
+ "
_builddir="$srcdir"/gst-ffmpeg-$pkgver
prepare() {
@@ -42,4 +44,9 @@ package() {
| xargs rm -f
}
-md5sums="7f5beacaf1312db2db30a026b36888c4 gst-ffmpeg-0.10.13.tar.bz2"
+md5sums="7f5beacaf1312db2db30a026b36888c4 gst-ffmpeg-0.10.13.tar.bz2
+bcb461a6480dc46abdce021bc91e9e11 libavutil-fortify.patch"
+sha256sums="76fca05b08e00134e3cb92fa347507f42cbd48ddb08ed3343a912def187fbb62 gst-ffmpeg-0.10.13.tar.bz2
+17d7515db788e8c379d4995938e72312d9d32b096b4f7e80804f9673b6b480f3 libavutil-fortify.patch"
+sha512sums="f1141fc73b4bf1d774053ce53c4a67d5e600d6f0118ee7824cd2ff4fc8af8ba1dfbd5cf82d9e15872f3e6f8730112ddfc520a7d8df3cf605a9725e959f37e6ed gst-ffmpeg-0.10.13.tar.bz2
+7d387440912abb81a0561852b32d42583acc07aa1069c39d9d53eed84ad95e920704a6c4acaa68404db2d3aa4c8915a7add6316fa3ee05de495d078c980f2f62 libavutil-fortify.patch"
diff --git a/main/gst-ffmpeg0.10/libavutil-fortify.patch b/main/gst-ffmpeg0.10/libavutil-fortify.patch
new file mode 100644
index 0000000000..d7a3f0916d
--- /dev/null
+++ b/main/gst-ffmpeg0.10/libavutil-fortify.patch
@@ -0,0 +1,41 @@
+--- ./gst-libs/ext/libav/libavutil/internal.h.orig
++++ ./gst-libs/ext/libav/libavutil/internal.h
+@@ -124,38 +124,6 @@
+ level = (level ^ mask) - mask;
+ #endif
+
+-/* avoid usage of dangerous/inappropriate system functions */
+-#undef malloc
+-#define malloc please_use_av_malloc
+-#undef free
+-#define free please_use_av_free
+-#undef realloc
+-#define realloc please_use_av_realloc
+-#undef time
+-#define time time_is_forbidden_due_to_security_issues
+-#undef rand
+-#define rand rand_is_forbidden_due_to_state_trashing_use_av_lfg_get
+-#undef srand
+-#define srand srand_is_forbidden_due_to_state_trashing_use_av_lfg_init
+-#undef random
+-#define random random_is_forbidden_due_to_state_trashing_use_av_lfg_get
+-#undef sprintf
+-#define sprintf sprintf_is_forbidden_due_to_security_issues_use_snprintf
+-#undef strcat
+-#define strcat strcat_is_forbidden_due_to_security_issues_use_av_strlcat
+-#undef strncpy
+-#define strncpy strncpy_is_forbidden_due_to_security_issues_use_av_strlcpy
+-#undef exit
+-#define exit exit_is_forbidden
+-#undef printf
+-#define printf please_use_av_log_instead_of_printf
+-#undef fprintf
+-#define fprintf please_use_av_log_instead_of_fprintf
+-#undef puts
+-#define puts please_use_av_log_instead_of_puts
+-#undef perror
+-#define perror please_use_av_log_instead_of_perror
+-
+ #define FF_ALLOC_OR_GOTO(ctx, p, size, label)\
+ {\
+ p = av_malloc(size);\