summaryrefslogtreecommitdiff
path: root/multimedia/omxplayer/patches
diff options
context:
space:
mode:
authorjmcneill <jmcneill>2015-01-18 23:09:25 +0000
committerjmcneill <jmcneill>2015-01-18 23:09:25 +0000
commit659c8e0b732528a7cdfd1bbbfba1af42d71ba5a6 (patch)
tree6118104ca7e743e516c4a3598399760faa3aa2ce /multimedia/omxplayer/patches
parentecdcefbe35ca5551730623d3ca2ae7173725eab1 (diff)
downloadpkgsrc-659c8e0b732528a7cdfd1bbbfba1af42d71ba5a6.tar.gz
Import omxplayer-20150118 as multimedia/omxplayer.
OMXPlayer is a commandline OMX player for the Raspberry Pi. It was developed as a testbed for the XBMC Raspberry PI implementation and is quite handy to use standalone.
Diffstat (limited to 'multimedia/omxplayer/patches')
-rw-r--r--multimedia/omxplayer/patches/patch-Makefile24
-rw-r--r--multimedia/omxplayer/patches/patch-Makefile.include49
-rw-r--r--multimedia/omxplayer/patches/patch-OMXControl.cpp14
-rw-r--r--multimedia/omxplayer/patches/patch-OMXPlayerVideo.cpp20
-rw-r--r--multimedia/omxplayer/patches/patch-OMXVideo.h20
-rw-r--r--multimedia/omxplayer/patches/patch-help.h15
-rw-r--r--multimedia/omxplayer/patches/patch-linux_PlatformDefs.h31
-rw-r--r--multimedia/omxplayer/patches/patch-omxplayer.cpp25
8 files changed, 198 insertions, 0 deletions
diff --git a/multimedia/omxplayer/patches/patch-Makefile b/multimedia/omxplayer/patches/patch-Makefile
new file mode 100644
index 00000000000..2f25bf8aa2c
--- /dev/null
+++ b/multimedia/omxplayer/patches/patch-Makefile
@@ -0,0 +1,24 @@
+$NetBSD: patch-Makefile,v 1.1 2015/01/18 23:09:25 jmcneill Exp $
+
+--- Makefile.orig 2015-01-12 15:10:50.000000000 +0000
++++ Makefile
+@@ -2,9 +2,9 @@ include Makefile.include
+
+ CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
+
+-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz
++LDFLAGS+=-L./ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz
+
+-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include
++INCLUDES+=-I./ -Ilinux -I$(LOCALBASE)/include/dbus-1.0 -I$(LOCALBASE)/lib/dbus-1.0/include
+
+ DIST ?= omxplayer-dist
+
+@@ -52,7 +52,6 @@ version:
+
+ omxplayer.bin: version $(OBJS)
+ $(CXX) $(LDFLAGS) -o omxplayer.bin $(OBJS) -lvchiq_arm -lvcos -ldbus-1 -lrt -lpthread -lavutil -lavcodec -lavformat -lswscale -lswresample -lpcre
+- $(STRIP) omxplayer.bin
+
+ help.h: README.md Makefile
+ awk '/SYNOPSIS/{p=1;print;next} p&&/KEY BINDINGS/{p=0};p' $< \
diff --git a/multimedia/omxplayer/patches/patch-Makefile.include b/multimedia/omxplayer/patches/patch-Makefile.include
new file mode 100644
index 00000000000..cdc5d8627dc
--- /dev/null
+++ b/multimedia/omxplayer/patches/patch-Makefile.include
@@ -0,0 +1,49 @@
+$NetBSD: patch-Makefile.include,v 1.1 2015/01/18 23:09:25 jmcneill Exp $
+
+--- Makefile.include.orig 2015-01-12 15:10:50.000000000 +0000
++++ Makefile.include
+@@ -1,40 +1,7 @@
+-USE_BUILDROOT=0
+-FLOAT=hard
+-
+-ifeq ($(USE_BUILDROOT), 1)
+-BUILDROOT :=/opt/xbmc-bcm/buildroot
+-SDKSTAGE :=$(BUILDROOT)/output/staging
+-TARGETFS :=$(BUILDROOT)/output/target
+-TOOLCHAIN :=$(BUILDROOT)/output/host/usr/
+-HOST :=arm-unknown-linux-gnueabi
+-SYSROOT :=$(BUILDROOT)/output/host/usr/arm-unknown-linux-gnueabi/sysroot
+-else
+-BUILDROOT :=/opt/bcm-rootfs
+-SDKSTAGE :=/opt/bcm-rootfs
+-TARGETFS :=/opt/bcm-rootfs
+-TOOLCHAIN :=/home/dc4/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/
+-HOST :=arm-linux-gnueabihf
+-#SYSROOT :=$(TOOLCHAIN)/arm-bcm2708hardfp-linux-gnueabi/sysroot
+-SYSROOT :=/opt/bcm-rootfs
+-endif
+-
+-JOBS=7
+-
+-CFLAGS := -isystem$(PREFIX)/include
+-CXXFLAGS := $(CFLAGS)
+-CPPFLAGS := $(CFLAGS)
+-LDFLAGS := -L$(BUILDROOT)/lib
+-LD := $(TOOLCHAIN)/bin/$(HOST)-ld --sysroot=$(SYSROOT)
+-CC := $(TOOLCHAIN)/bin/$(HOST)-gcc --sysroot=$(SYSROOT)
+-CXX := $(TOOLCHAIN)/bin/$(HOST)-g++ --sysroot=$(SYSROOT)
+-OBJDUMP := $(TOOLCHAIN)/bin/$(HOST)-objdump
+-RANLIB := $(TOOLCHAIN)/bin/$(HOST)-ranlib
+-STRIP := $(TOOLCHAIN)/bin/$(HOST)-strip
+-AR := $(TOOLCHAIN)/bin/$(HOST)-ar
++LDFLAGS := -Wl,-R$(LOCALBASE)/lib -L$(LOCALBASE)/lib -Wl,-R$(LOCALBASE)/lib/ffmpeg2 -L$(LOCALBASE)/lib/ffmpeg2 -Wl,-R$(X11BASE)/lib -L$(X11BASE)/lib
+ CXXCP := $(CXX) -E
+-PATH := $(PREFIX)/bin:$(BUILDROOT)/output/host/usr/bin:$(PATH)
++STRIP := strip
++FLOAT := hard
+
+ CFLAGS += -pipe -mfloat-abi=$(FLOAT) -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -mno-apcs-stack-check -g -mstructure-size-boundary=32 -mno-sched-prolog
+-LDFLAGS += -L$(SDKSTAGE)/lib -L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/ -Lpcre/build
+-#INCLUDES += -isystem$(SDKSTAGE)/usr/include -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -isystem$(SDKSTAGE)/usr/include/freetype2
+-INCLUDES += -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -Ipcre/build -Iboost-trunk -Ifreetype2/include
++INCLUDES += -I$(LOCALBASE)/include -I$(LOCALBASE)/include/interface/vcos/pthreads -I$(LOCALBASE)/include/interface/vmcs_host/linux
diff --git a/multimedia/omxplayer/patches/patch-OMXControl.cpp b/multimedia/omxplayer/patches/patch-OMXControl.cpp
new file mode 100644
index 00000000000..e8b80f7a4ac
--- /dev/null
+++ b/multimedia/omxplayer/patches/patch-OMXControl.cpp
@@ -0,0 +1,14 @@
+$NetBSD: patch-OMXControl.cpp,v 1.1 2015/01/18 23:09:25 jmcneill Exp $
+
+--- OMXControl.cpp.orig 2015-01-12 15:10:50.000000000 +0000
++++ OMXControl.cpp
+@@ -2,7 +2,9 @@
+ #include <stdlib.h>
+ #include <stdint.h>
+ #include <sys/mman.h>
++#if defined(__linux__)
+ #include <linux/fb.h>
++#endif
+ #include <string.h>
+ #include <dbus/dbus.h>
+
diff --git a/multimedia/omxplayer/patches/patch-OMXPlayerVideo.cpp b/multimedia/omxplayer/patches/patch-OMXPlayerVideo.cpp
new file mode 100644
index 00000000000..fa5946d803e
--- /dev/null
+++ b/multimedia/omxplayer/patches/patch-OMXPlayerVideo.cpp
@@ -0,0 +1,20 @@
+$NetBSD: patch-OMXPlayerVideo.cpp,v 1.1 2015/01/18 23:09:25 jmcneill Exp $
+
+Workaround for old misc/raspberrypi-userland package.
+
+--- OMXPlayerVideo.cpp.orig 2015-01-12 15:10:50.000000000 +0000
++++ OMXPlayerVideo.cpp
+@@ -25,6 +25,13 @@
+ #include "system.h"
+ #endif
+
++#ifdef OLD_RASPBERRYPI_USERLAND
++typedef int OMX_IMAGEFILTERANAGLYPHTYPE;
++#define OMX_ImageFilterAnaglyphNone 0
++#define OMX_ImageFilterDeInterlaceFast OMX_ImageFilterDeInterlaceLineDouble
++#define OMX_ImageFilterAnaglyph OMX_ImageFilterNone
++#endif
++
+ #include "OMXPlayerVideo.h"
+
+ #include <stdio.h>
diff --git a/multimedia/omxplayer/patches/patch-OMXVideo.h b/multimedia/omxplayer/patches/patch-OMXVideo.h
new file mode 100644
index 00000000000..4492994a722
--- /dev/null
+++ b/multimedia/omxplayer/patches/patch-OMXVideo.h
@@ -0,0 +1,20 @@
+$NetBSD: patch-OMXVideo.h,v 1.1 2015/01/18 23:09:25 jmcneill Exp $
+
+Workaround for old misc/raspberrypi-userland package.
+
+--- OMXVideo.h.orig 2015-01-12 15:10:50.000000000 +0000
++++ OMXVideo.h
+@@ -35,6 +35,13 @@
+
+ #define VIDEO_BUFFERS 60
+
++#ifdef OLD_RASPBERRYPI_USERLAND
++typedef int OMX_IMAGEFILTERANAGLYPHTYPE;
++#define OMX_ImageFilterAnaglyphNone 0
++#define OMX_ImageFilterDeInterlaceFast OMX_ImageFilterDeInterlaceLineDouble
++#define OMX_ImageFilterAnaglyph OMX_ImageFilterNone
++#endif
++
+ enum EDEINTERLACEMODE
+ {
+ VS_DEINTERLACEMODE_OFF=0,
diff --git a/multimedia/omxplayer/patches/patch-help.h b/multimedia/omxplayer/patches/patch-help.h
new file mode 100644
index 00000000000..4ce42cf6d92
--- /dev/null
+++ b/multimedia/omxplayer/patches/patch-help.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-help.h,v 1.1 2015/01/18 23:09:25 jmcneill Exp $
+
+--- help.h.orig 2015-01-18 22:39:31.000000000 +0000
++++ help.h
+@@ -28,8 +28,8 @@
+ " --no-osd Do not display status information on screen\n"
+ " --no-keys Disable keyboard input (prevents hangs for certain TTYs)\n"
+ " --subtitles path External subtitles in UTF-8 srt format\n"
+-" --font path Default: /usr/share/fonts/truetype/freefont/FreeSans.ttf\n"
+-" --italic-font path Default: /usr/share/fonts/truetype/freefont/FreeSansOblique.ttf\n"
++" --font path Default: " PREFIX "/share/fonts/X11/TTF/FreeSans.ttf\n"
++" --italic-font path Default: " PREFIX "/share/fonts/X11/TTF/FreeSansOblique.ttf\n"
+ " --font-size size Font size in 1/1000 screen height (default: 55)\n"
+ " --align left/center Subtitle alignment (default: left)\n"
+ " --no-ghost-box No semitransparent boxes behind subtitles\n"
diff --git a/multimedia/omxplayer/patches/patch-linux_PlatformDefs.h b/multimedia/omxplayer/patches/patch-linux_PlatformDefs.h
new file mode 100644
index 00000000000..62dfa141c64
--- /dev/null
+++ b/multimedia/omxplayer/patches/patch-linux_PlatformDefs.h
@@ -0,0 +1,31 @@
+$NetBSD: patch-linux_PlatformDefs.h,v 1.1 2015/01/18 23:09:25 jmcneill Exp $
+
+--- linux/PlatformDefs.h.orig 2015-01-12 15:10:50.000000000 +0000
++++ linux/PlatformDefs.h
+@@ -39,11 +39,11 @@
+ #include <unistd.h>
+ #include <pthread.h>
+ #include <string.h>
+-#ifdef __APPLE__
++#if defined(__APPLE__)
+ #include <stdio.h>
+ #include <sys/sysctl.h>
+ #include <mach/mach.h>
+-#else
++#elif defined(__linux__)
+ #include <sys/sysinfo.h>
+ #endif
+ #include <sys/time.h>
+@@ -416,8 +416,12 @@ typedef struct _SECURITY_ATTRIBUTES {
+ #define FILE_CURRENT 1
+ #define FILE_END 2
+
++#ifndef _S_IFREG
+ #define _S_IFREG S_IFREG
++#endif
++#ifndef _S_IFDIR
+ #define _S_IFDIR S_IFDIR
++#endif
+ #define MAX_PATH PATH_MAX
+
+ #define _stat stat
diff --git a/multimedia/omxplayer/patches/patch-omxplayer.cpp b/multimedia/omxplayer/patches/patch-omxplayer.cpp
new file mode 100644
index 00000000000..cb4641fa124
--- /dev/null
+++ b/multimedia/omxplayer/patches/patch-omxplayer.cpp
@@ -0,0 +1,25 @@
+$NetBSD: patch-omxplayer.cpp,v 1.1 2015/01/18 23:09:25 jmcneill Exp $
+
+--- omxplayer.cpp.orig 2015-01-12 15:10:50.000000000 +0000
++++ omxplayer.cpp
+@@ -23,7 +23,9 @@
+ #include <stdint.h>
+ #include <termios.h>
+ #include <sys/mman.h>
++#if defined(__linux__)
+ #include <linux/fb.h>
++#endif
+ #include <sys/ioctl.h>
+ #include <getopt.h>
+ #include <string.h>
+@@ -90,8 +92,8 @@ bool m_osd
+ bool m_no_keys = false;
+ std::string m_external_subtitles_path;
+ bool m_has_external_subtitles = false;
+-std::string m_font_path = "/usr/share/fonts/truetype/freefont/FreeSans.ttf";
+-std::string m_italic_font_path = "/usr/share/fonts/truetype/freefont/FreeSansOblique.ttf";
++std::string m_font_path = PREFIX "/share/fonts/X11/TTF/FreeSans.ttf";
++std::string m_italic_font_path = PREFIX "/share/fonts/X11/TTF/FreeSansOblique.ttf";
+ std::string m_dbus_name = "org.mpris.MediaPlayer2.omxplayer";
+ bool m_asked_for_font = false;
+ bool m_asked_for_italic_font = false;