diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2015-01-18 23:09:25 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2015-01-18 23:09:25 +0000 |
commit | 89efb363d211ed26329da066aa8df936b609d714 (patch) | |
tree | 6118104ca7e743e516c4a3598399760faa3aa2ce /multimedia | |
parent | 9d3c9794811a5a30172b367c593431d453ee72b5 (diff) | |
download | pkgsrc-89efb363d211ed26329da066aa8df936b609d714.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')
-rw-r--r-- | multimedia/omxplayer/DESCR | 3 | ||||
-rw-r--r-- | multimedia/omxplayer/Makefile | 42 | ||||
-rw-r--r-- | multimedia/omxplayer/PLIST | 5 | ||||
-rw-r--r-- | multimedia/omxplayer/distinfo | 13 | ||||
-rw-r--r-- | multimedia/omxplayer/patches/patch-Makefile | 24 | ||||
-rw-r--r-- | multimedia/omxplayer/patches/patch-Makefile.include | 49 | ||||
-rw-r--r-- | multimedia/omxplayer/patches/patch-OMXControl.cpp | 14 | ||||
-rw-r--r-- | multimedia/omxplayer/patches/patch-OMXPlayerVideo.cpp | 20 | ||||
-rw-r--r-- | multimedia/omxplayer/patches/patch-OMXVideo.h | 20 | ||||
-rw-r--r-- | multimedia/omxplayer/patches/patch-help.h | 15 | ||||
-rw-r--r-- | multimedia/omxplayer/patches/patch-linux_PlatformDefs.h | 31 | ||||
-rw-r--r-- | multimedia/omxplayer/patches/patch-omxplayer.cpp | 25 |
12 files changed, 261 insertions, 0 deletions
diff --git a/multimedia/omxplayer/DESCR b/multimedia/omxplayer/DESCR new file mode 100644 index 00000000000..1e50100adcf --- /dev/null +++ b/multimedia/omxplayer/DESCR @@ -0,0 +1,3 @@ +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. diff --git a/multimedia/omxplayer/Makefile b/multimedia/omxplayer/Makefile new file mode 100644 index 00000000000..090f5d6e5c9 --- /dev/null +++ b/multimedia/omxplayer/Makefile @@ -0,0 +1,42 @@ +# $NetBSD: Makefile,v 1.1 2015/01/18 23:09:25 jmcneill Exp $ + +DISTNAME= omxplayer-20150118 +CATEGORIES= multimedia +MASTER_SITES= http://www.invisible.ca/packages/distfiles/ +EXTRACT_SUFX= .zip + +MAINTAINER= port-arm@NetBSD.org +HOMEPAGE= https://github.com/popcornmix/omxplayer +COMMENT= Raspberry Pi video player +LICENSE= gnu-gpl-v2 + +WRKSRC= ${WRKDIR}/omxplayer-master +USE_LANGUAGES= c++ +USE_TOOLS+= gmake bash:build +BUILD_TARGET= omxplayer.bin +INSTALLATION_DIRS+= bin share/docs/omxplayer +REPLACE_BASH= omxplayer + +ONLY_FOR_PLATFORM= NetBSD-*-earm*hf + +CFLAGS+= -DPREFIX=\"${PREFIX}\" +CFLAGS+= -Dfopen64=fopen -Dfseeko64=fseeko -Dftello64=ftello + +# Remove this when raspberrypi-userland is updated with anaglyph support +CFLAGS+= -DOLD_RASPBERRYPI_USERLAND + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/omxplayer.bin ${DESTDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/omxplayer ${DESTDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/share/docs/omxplayer + ${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/docs/omxplayer/README + +DEPENDS+= freefont-ttf-[0-9]*:../../fonts/freefont-ttf +.include "../../devel/boost-libs/buildlink3.mk" +.include "../../devel/pcre/buildlink3.mk" +.include "../../graphics/freetype2/buildlink3.mk" +.include "../../misc/raspberrypi-userland/buildlink3.mk" +.include "../../multimedia/ffmpeg2/buildlink3.mk" +.include "../../sysutils/dbus/buildlink3.mk" + +.include "../../mk/bsd.pkg.mk" diff --git a/multimedia/omxplayer/PLIST b/multimedia/omxplayer/PLIST new file mode 100644 index 00000000000..2d4e4f0abf9 --- /dev/null +++ b/multimedia/omxplayer/PLIST @@ -0,0 +1,5 @@ +@comment $NetBSD: PLIST,v 1.1 2015/01/18 23:09:25 jmcneill Exp $ +bin/omxplayer +bin/omxplayer.bin +share/docs/omxplayer/COPYING +share/docs/omxplayer/README diff --git a/multimedia/omxplayer/distinfo b/multimedia/omxplayer/distinfo new file mode 100644 index 00000000000..5a291196bec --- /dev/null +++ b/multimedia/omxplayer/distinfo @@ -0,0 +1,13 @@ +$NetBSD: distinfo,v 1.1 2015/01/18 23:09:25 jmcneill Exp $ + +SHA1 (omxplayer-20150118.zip) = 95522df16247bd1ece40cbccac05f9e73f1c1d2a +RMD160 (omxplayer-20150118.zip) = 0d3678c8ae71ed3ae507b7f0aaab2a482ee87691 +Size (omxplayer-20150118.zip) = 1265704 bytes +SHA1 (patch-Makefile) = fe45c59a7cb1282c48f16bd56be9f64422fa4bf2 +SHA1 (patch-Makefile.include) = c78979b5b0e2d76f4e83f80bd6144d5b892eff34 +SHA1 (patch-OMXControl.cpp) = 55e3e73b29c1e8cf1999271a0fbf298e3e0eaa8e +SHA1 (patch-OMXPlayerVideo.cpp) = e5cdfa000c45538848375dac8846ac05cddf346e +SHA1 (patch-OMXVideo.h) = 6cb8d4f02b3ad43536d4c2d19219fde53acb236a +SHA1 (patch-help.h) = 49e329a67791221b5ea40733086ae627802e22b2 +SHA1 (patch-linux_PlatformDefs.h) = 1918a2b87e33074a08cd36f3b932c8d6b3273457 +SHA1 (patch-omxplayer.cpp) = 6746573a66ccdf6791afe3e38f07330d8444dd0b 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; |