diff options
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | oxine1.patch | 11 | ||||
-rw-r--r-- | oxine_0.7.1_triangle.patch | 221 |
4 files changed, 288 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e4f6fcb593c6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = oxine-vdr + pkgdesc = Oxine is a lightweight pure OSD (on screen display) GUI for the famous xine engine with VDR support. + pkgver = 0.7.1 + pkgrel = 2 + url = http://oxine.sourceforge.net/ + arch = i686 + arch = x86_64 + license = GPL + makedepends = pkgconfig + depends = xine-lib + depends = libexif + depends = eject + depends = libcdio + depends = curl + depends = libxinerama + depends = gdk-pixbuf2 + conflicts = oxine + source = http://downloads.sourceforge.net/sourceforge/oxine/oxine-0.7.1.tar.gz + source = oxine_0.7.1_triangle.patch + source = oxine1.patch + md5sums = 2a2d05ee21892624e35cf539e532c0dd + md5sums = 80f259f8d4b3f0e4ab00d6b784502f44 + md5sums = 46a3ce145554547bba46c015e627b442 + +pkgname = oxine-vdr + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..78fc0ed4ec7c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +# Contributor: Franz Burgmann <f dot burgmann at gmail dot com> +# Maintainer: Yarema aka Knedlyk <yarpry at gmail dot com> + +pkgname=oxine-vdr +pkgver=0.7.1 +pkgrel=2 +pkgdesc="Oxine is a lightweight pure OSD (on screen display) GUI for the famous xine engine with VDR support." +arch=('i686' 'x86_64') +depends=('xine-lib' 'libexif' 'eject' 'libcdio' 'curl' 'libxinerama' 'gdk-pixbuf2') +privides=('oxine') +conflicts=('oxine') +makedepends=('pkgconfig') +license=('GPL') +source=(http://downloads.sourceforge.net/sourceforge/oxine/oxine-${pkgver}.tar.gz + oxine_0.7.1_triangle.patch + oxine1.patch) +url="http://oxine.sourceforge.net/" +md5sums=('2a2d05ee21892624e35cf539e532c0dd' + '80f259f8d4b3f0e4ab00d6b784502f44' + '46a3ce145554547bba46c015e627b442') + +package() { + cd ${startdir}/src/oxine-${pkgver} + + cat ../../oxine_0.7.1_triangle.patch | patch -p0 + patch -p1 < ../../oxine1.patch + ./configure --prefix=/usr --enable-vdr --without-imagemagick + make || return 1 + make DESTDIR=${pkgdir} install +} diff --git a/oxine1.patch b/oxine1.patch new file mode 100644 index 000000000000..90c342900cf6 --- /dev/null +++ b/oxine1.patch @@ -0,0 +1,11 @@ +diff -rupN oxine-0.7.1/src/vdr.c oxine-0.7.1-patched/src/vdr.c +--- oxine-0.7.1/src/vdr.c 2007-08-23 11:40:02.000000000 +0200 ++++ oxine-0.7.1-patched/src/vdr.c 2013-07-04 22:24:33.152330674 +0200 +@@ -28,6 +28,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#define __USE_XOPEN + #include <time.h> + #include <unistd.h> + #include <netinet/in.h> diff --git a/oxine_0.7.1_triangle.patch b/oxine_0.7.1_triangle.patch new file mode 100644 index 000000000000..b9576d71c5cc --- /dev/null +++ b/oxine_0.7.1_triangle.patch @@ -0,0 +1,221 @@ +Index: src/odk_osd.c +=================================================================== +--- src/odk_osd.c (Revision 3677) ++++ src/odk_osd.c (Arbeitskopie) +@@ -57,40 +57,22 @@ + #include "odk_private.h" + #include "utils.h" + +- +-#ifdef DEBUG +-#define VALIDATE_POINT(x,y) { \ +- if ((x < 0) \ +- || (x >= odk->osd.width)) { \ +- fatal ("x-value is outside " \ +- "the valid drawing " \ +- "area: 0 <= %d <= %d", \ +- x, odk->osd.width); \ +- assert (x >= 0); \ +- assert (x < odk->osd.width); \ +- } \ +- if ((y < 0) \ +- || (y >= odk->osd.height)) { \ +- fatal ("y-value is outside " \ +- "the valid drawing " \ +- "area: 0 <= %d <= %d", \ +- y, odk->osd.height); \ +- assert (y >= 0); \ +- assert (y < odk->osd.height); \ +- } \ ++#define VALIDATE_POINT(x,y) { \ ++ if (((x) < 0) || ((x) >= odk->osd.width)) { \ ++ debug ("x-value is outside " \ ++ "the valid drawing " \ ++ "area: 0 <= %d < %d", \ ++ x, odk->osd.width); \ ++ return; \ ++ } \ ++ if (((y) < 0) || ((y) >= odk->osd.height)) {\ ++ debug ("y-value is outside " \ ++ "the valid drawing " \ ++ "area: 0 <= %d < %d", \ ++ y, odk->osd.height); \ ++ return; \ ++ } \ + } +-#else +-#define VALIDATE_POINT(x,y) { \ +- if ((x < 0) \ +- || (x >= odk->osd.width)) { \ +- return; \ +- } \ +- if ((y < 0) \ +- || (y >= odk->osd.height)) { \ +- return; \ +- } \ +-} +-#endif + + #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) + +@@ -1294,11 +1276,11 @@ + case OSD_VECTOR_ARROW_DOWN: + { + int x1 = x; +- int y1 = y; ++ int y1 = y + (h / 2); + int x2 = x + w; +- int y2 = y; ++ int y2 = y + (h / 2); + int x3 = x + (w / 2); +- int y3 = y + (h / 2); ++ int y3 = y + h; + odk_draw_triangle (odk, x1, y1, x2, y2, x3, y3, color, true); + } + { +@@ -1438,24 +1420,26 @@ + + + typedef struct { +- double x; +- double y; ++ int x; ++ int y; + } point_t; + ++ + static void + swap_points (point_t * p1, point_t * p2) + { +- double x = p1->x; +- double y = p1->y; ++ int x = p1->x; ++ int y = p1->y; + p1->x = p2->x; + p1->y = p2->y; + p2->x = x; + p2->y = y; + } + ++ + static void +-line_draw (odk_t * odk, int minx, int miny, int maxx, int maxy, point_t * p1, +- point_t * p2, int color) ++line_draw (odk_t * odk, int minx, int miny, int maxx, int maxy, ++ point_t * p1, point_t * p2, int color) + { + if (p1->x > maxx) + p1->x = maxx; +@@ -1488,7 +1472,9 @@ + if (!(odk->osd.hscale && odk->osd.vscale)) + return; + +- point_t p[3]; ++ /* This is necessary for this code to work in some versions of gcc. I have ++ * no idea why this is the case though... */ ++ volatile point_t p[3]; + + p[0].x = round ((double) x1 * odk->osd.hscale); + p[0].y = round ((double) y1 * odk->osd.vscale); +@@ -1502,47 +1488,55 @@ + int j = i; + for (; j < 3; j++) { + if (p[i].y > p[j].y) { +- swap_points (&p[i], &p[j]); ++ swap_points ((point_t *) & p[i], (point_t *) & p[j]); + } +- else if ((p[i].y == p[j].y) +- && (p[i].x > p[j].x)) { +- swap_points (&p[i], &p[j]); ++ else if ((p[i].y == p[j].y) && (p[i].x > p[j].x)) { ++ swap_points ((point_t *) & p[i], (point_t *) & p[j]); + } + } + } + ++#ifdef DEBUG + assert (p[0].y <= p[1].y); + assert (p[1].y <= p[2].y); ++#endif + + int minx = odk->osd.width; + int maxx = 0; + int miny = odk->osd.height; + int maxy = 0; + for (i = 0; i < 3; i++) { +- if (p[i].x < minx) ++ if (p[i].x < minx) { + minx = p[i].x; +- if (p[i].x > maxx) ++ } ++ if (p[i].x > maxx) { + maxx = p[i].x; +- if (p[i].y < miny) ++ } ++ if (p[i].y < miny) { + miny = p[i].y; +- if (p[i].y > maxy) ++ } ++ if (p[i].y > maxy) { + maxy = p[i].y; ++ } + } + + if (filled) { +- point_t *A = &p[0]; +- point_t *B = &p[1]; +- point_t *C = &p[2]; ++ point_t *A = (point_t *) & p[0]; ++ point_t *B = (point_t *) & p[1]; ++ point_t *C = (point_t *) & p[2]; + +- double dx1 = 0; +- if (B->y - A->y > 0) ++ int dx1 = 0; ++ if (B->y - A->y > 0) { + dx1 = (B->x - A->x) / (B->y - A->y); +- double dx2 = 0; +- if (C->y - A->y > 0) ++ } ++ int dx2 = 0; ++ if (C->y - A->y > 0) { + dx2 = (C->x - A->x) / (C->y - A->y); +- double dx3 = 0; +- if (C->y - B->y > 0) ++ } ++ int dx3 = 0; ++ if (C->y - B->y > 0) { + dx3 = (C->x - B->x) / (C->y - B->y); ++ } + + point_t s; + point_t *S = &s; +@@ -1553,20 +1547,24 @@ + E->x = A->x; + E->y = A->y; + if (dx1 > dx2) { +- for (; S->y <= B->y; S->y++, E->y++, S->x += dx2, E->x += dx1) ++ for (; S->y <= B->y; S->y++, E->y++, S->x += dx2, E->x += dx1) { + line_draw (odk, minx, miny, maxx, maxy, S, E, color); ++ } + E->x = B->x; + E->y = B->y; +- for (; S->y <= C->y; S->y++, E->y++, S->x += dx2, E->x += dx3) ++ for (; S->y <= C->y; S->y++, E->y++, S->x += dx2, E->x += dx3) { + line_draw (odk, minx, miny, maxx, maxy, S, E, color); ++ } + } + else { +- for (; S->y <= B->y; S->y++, E->y++, S->x += dx1, E->x += dx2) ++ for (; S->y <= B->y; S->y++, E->y++, S->x += dx1, E->x += dx2) { + line_draw (odk, minx, miny, maxx, maxy, S, E, color); ++ } + S->x = B->x; + S->y = B->y; +- for (; S->y <= C->y; S->y++, E->y++, S->x += dx3, E->x += dx2) ++ for (; S->y <= C->y; S->y++, E->y++, S->x += dx3, E->x += dx2) { + line_draw (odk, minx, miny, maxx, maxy, S, E, color); ++ } + } + } + |