r465 - in vdr/vdr-plugin-weather/trunk/debian: . patches
Thomas Schmidt
pkg-vdr-dvb-changes@lists.alioth.debian.org
Sat, 16 Apr 2005 19:50:49 +0000
Author: tschmidt
Date: 2005-04-16 19:50:49 +0000 (Sat, 16 Apr 2005)
New Revision: 465
Added:
vdr/vdr-plugin-weather/trunk/debian/patches/02_vdr_1.3-fix.dpatch
Modified:
vdr/vdr-plugin-weather/trunk/debian/changelog
vdr/vdr-plugin-weather/trunk/debian/control
vdr/vdr-plugin-weather/trunk/debian/patches/00list
vdr/vdr-plugin-weather/trunk/debian/watch
Log:
vdr-plugin-weather:
- Added 02_vdr_1.3-fix.dpatch to allow compiling the plugin
for vdr (>=1.3.23)
- Depend/Build-Depend on vdr (>=1.3.23-1)
- Conflict with vdr (>=1.3.24)
- Updated debian/watch
(Note: The plugin compiles with vdr 1.3.23 and the dpatch, but
it does not produce any useful output in the osd atm, help is
very welcome.)
Modified: vdr/vdr-plugin-weather/trunk/debian/changelog
===================================================================
--- vdr/vdr-plugin-weather/trunk/debian/changelog 2005-04-16 12:58:40 UTC (rev 464)
+++ vdr/vdr-plugin-weather/trunk/debian/changelog 2005-04-16 19:50:49 UTC (rev 465)
@@ -1,3 +1,16 @@
+vdr-plugin-weather (0.2.1e-11) experimental; urgency=low
+
+ * NOT RELEASED YET (does not work atm !!!)
+
+ * Thomas Schmidt <tschmidt@debian.org>
+ - Added 02_vdr_1.3-fix.dpatch to allow compiling the plugin
+ for vdr (>=1.3.23)
+ - Depend/Build-Depend on vdr (>=1.3.23-1)
+ - Conflict with vdr (>=1.3.24)
+ - Updated debian/watch
+
+ -- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org> Thu, 14 Apr 2005 20:02:36 +0200
+
vdr-plugin-weather (0.2.1e-10) unstable; urgency=low
* Thomas Schmidt <tschmidt@debian.org>
Modified: vdr/vdr-plugin-weather/trunk/debian/control
===================================================================
--- vdr/vdr-plugin-weather/trunk/debian/control 2005-04-16 12:58:40 UTC (rev 464)
+++ vdr/vdr-plugin-weather/trunk/debian/control 2005-04-16 19:50:49 UTC (rev 465)
@@ -3,13 +3,13 @@
Priority: extra
Maintainer: Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>
Uploaders: Tobias Grimm <tg@e-tobi.net>, Thomas Schmidt <tschmidt@debian.org>
-Build-Depends: debhelper (>> 4.1.16), vdr-dev (>= 1.2.6-7), ftplib-dev (>=3.1-1-1), libmdsp-dev (>=0.11-6), dpatch (>= 2.0.9)
+Build-Depends: debhelper (>> 4.1.16), vdr-dev (>= 1.3.23-1), ftplib-dev (>=3.1-1-1), libmdsp-dev (>=0.11-6), dpatch (>= 2.0.9)
Standards-Version: 3.6.1
Package: vdr-plugin-weather
Architecture: any
-Depends: ${shlibs:Depends}, vdr (>= 1.2.6)
-Conflicts: vdr (>= 1.2.7)
+Depends: ${shlibs:Depends}, vdr (>= 1.3.23-1)
+Conflicts: vdr (>= 1.3.24)
Description: Weather plugin for vdr
Displays the current weather conditions for a selected location.
It gets the METAR data from ftp://weather.noaa.gov.
Modified: vdr/vdr-plugin-weather/trunk/debian/patches/00list
===================================================================
--- vdr/vdr-plugin-weather/trunk/debian/patches/00list 2005-04-16 12:58:40 UTC (rev 464)
+++ vdr/vdr-plugin-weather/trunk/debian/patches/00list 2005-04-16 19:50:49 UTC (rev 465)
@@ -1 +1,2 @@
01_Makefile-fPIC-fix
+02_vdr_1.3-fix
Added: vdr/vdr-plugin-weather/trunk/debian/patches/02_vdr_1.3-fix.dpatch
===================================================================
--- vdr/vdr-plugin-weather/trunk/debian/patches/02_vdr_1.3-fix.dpatch 2005-04-16 12:58:40 UTC (rev 464)
+++ vdr/vdr-plugin-weather/trunk/debian/patches/02_vdr_1.3-fix.dpatch 2005-04-16 19:50:49 UTC (rev 465)
@@ -0,0 +1,358 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_vdr_1.3-fix.dpatch by Thomas Schmidt <tschmidt@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Allows the plugin to be compiled for vdr 1.3.x
+
+@DPATCH@
+diff -urNad vdr-plugin-weather-0.2.1e/display.c /tmp/dpep.VbJUoh/vdr-plugin-weather-0.2.1e/display.c
+--- vdr-plugin-weather-0.2.1e/display.c 2005-04-16 20:21:10.490690344 +0200
++++ /tmp/dpep.VbJUoh/vdr-plugin-weather-0.2.1e/display.c 2005-04-16 20:22:19.365219824 +0200
+@@ -16,130 +16,132 @@
+ }
+
+
+-void cWeatherOsd::initBitmap(cBitmap &b, char*xpm[], eDvbColor col, bool setBg) {
++void cWeatherOsd::initBitmap(cBitmap &b, char*xpm[], tColor col, bool setBg) {
+ for (int y=0; y<100; y++) {
+ for (int x=0; x<100; x++) {
+ if (setBg) {
+- b.SetPixel(x, y, (xpm[y][x] == YES) ? col : clrBackground);
++ b.DrawPixel(x, y, (xpm[y][x] == YES) ? col : clrTransparent);
+ } else {
+ if (xpm[y][x] == YES) {
+- b.SetPixel(x, y, col);
++ b.DrawPixel(x, y, col);
+ }
+ }
+ }
+ }
+ }
+
+-void cWeatherOsd::initEastBitmap(cBitmap &b, eDvbColor col) {
++void cWeatherOsd::initEastBitmap(cBitmap &b, tColor col) {
+ for (int y=0; y<100; y++) {
+ for (int x=0; x<100; x++) {
+ if (e_xpm[y][x] == YES) {
+- b.SetPixel(x, y, col);
++ b.DrawPixel(x, y, col);
+ }
+ }
+ }
+ }
+
+-void cWeatherOsd::initNorthBitmap(cBitmap &b, eDvbColor col) {
++void cWeatherOsd::initNorthBitmap(cBitmap &b, tColor col) {
+ for (int y=0; y<100; y++) {
+ for (int x=0; x<100; x++) {
+ if (e_xpm[y][x] == YES) {
+- b.SetPixel(y, 100 - x, col);
++ b.DrawPixel(y, 100 - x, col);
+ }
+ }
+ }
+ }
+
+-void cWeatherOsd::initWestBitmap(cBitmap &b, eDvbColor col) {
++void cWeatherOsd::initWestBitmap(cBitmap &b, tColor col) {
+ for (int y=0; y<100; y++) {
+ for (int x=99; x>=0; x--) {
+ if (e_xpm[y][x] == YES) {
+- b.SetPixel(100 - x, y, col);
++ b.DrawPixel(100 - x, y, col);
+ }
+ }
+ }
+ }
+
+-void cWeatherOsd::initSouthBitmap(cBitmap &b, eDvbColor col) {
++void cWeatherOsd::initSouthBitmap(cBitmap &b, tColor col) {
+ for (int y=0; y<100; y++) {
+ for (int x=0; x<100; x++) {
+ if (e_xpm[y][x] == YES) {
+- b.SetPixel(y, x, col);
++ b.DrawPixel(y, x, col);
+ }
+ }
+ }
+ }
+
+-void cWeatherOsd::initSouthEastBitmap(cBitmap &b, eDvbColor col) {
++void cWeatherOsd::initSouthEastBitmap(cBitmap &b, tColor col) {
+ for (int y=0; y<100; y++) {
+ for (int x=0; x<100; x++) {
+ if (se_xpm[y][x] == YES) {
+- b.SetPixel(x, y, col);
++ b.DrawPixel(x, y, col);
+ }
+ }
+ }
+ }
+
+-void cWeatherOsd::initNorthEastBitmap(cBitmap &b, eDvbColor col) {
++void cWeatherOsd::initNorthEastBitmap(cBitmap &b, tColor col) {
+ for (int y=0; y<100; y++) {
+ for (int x=0; x<100; x++) {
+ if (se_xpm[y][x] == YES) {
+- b.SetPixel(y, 100 - x, col);
++ b.DrawPixel(y, 100 - x, col);
+ }
+ }
+ }
+ }
+
+
+-void cWeatherOsd::initNorthWestBitmap(cBitmap &b, eDvbColor col) {
++void cWeatherOsd::initNorthWestBitmap(cBitmap &b, tColor col) {
+ for (int y=0; y<100; y++) {
+ for (int x=0; x<100; x++) {
+ if (se_xpm[y][x] == YES) {
+- b.SetPixel(100-x, 100-y, col);
++ b.DrawPixel(100-x, 100-y, col);
+ }
+ }
+ }
+ }
+
+-void cWeatherOsd::initSouthWestBitmap(cBitmap &b, eDvbColor col) {
++void cWeatherOsd::initSouthWestBitmap(cBitmap &b, tColor col) {
+ for (int y=0; y<100; y++) {
+ for (int x=99; x>=0; x--) {
+ if (se_xpm[y][x] == YES) {
+- b.SetPixel(100 - x, y, col);
++ b.DrawPixel(100 - x, y, col);
+ }
+ }
+ }
+ }
+
+-void cWeatherOsd::initBorderBitmap(cBitmap &b, eDvbColor col) {
++void cWeatherOsd::initBorderBitmap(cBitmap &b, tColor col) {
+ for (int y=0; y<100; y++) {
+ for (int x=99; x>=0; x--) {
+ if (border_xpm[x][y] == YES) {
+- b.SetPixel(x, y, col);
++ b.DrawPixel(x, y, col);
+ }
+ }
+ }
+ }
+
+-void cWeatherOsd::printMetar (cOsdBase *osd, Decoded_METAR *Mptr, int x, int y) {
+- cFont *font = new cFont((eDvbFont)0);
+- osd->SetFont((eDvbFont)0);
++void cWeatherOsd::printMetar (cOsd *osd, Decoded_METAR *Mptr, int x, int y) {
++ //cFont *font = new cFont();
++ const cFont *font = cFont::GetFont((eDvbFont)0);
+ //int cy = 0;
+
+
+ int lineY = y;
+
+- osd->Text(x + 80 - font->Width(tr("Weather")) - gapX, y, tr("Weather"));
++ osd->DrawText(x + 80 - font->Width(tr("Weather")) - gapX, y, tr("Weather"),
++ clrWhite, clrTransparent, font);
+ lineY += font->Height(tr("Weather")) + gapY;
+
+- osd->Fill(x, lineY, x+80, lineY+lineHeight, clrBlue);
+- osd->Fill(x+80, lineY, x+80+lineHeight, lineY+20, clrBlue);
++ osd->DrawRectangle(x, lineY, x+80, lineY+lineHeight, clrBlue);
++ osd->DrawRectangle(x+80, lineY, x+80+lineHeight, lineY+20, clrBlue);
+ drawWeather(osd, Mptr, x, lineY+20);
+ x += 120;
+
+- osd->Text(x + 80 - font->Width(tr("Wind")) - gapX, y, tr("Wind"));
+- osd->Fill(x, lineY, x+80, lineY+lineHeight, clrBlue);
+- osd->Fill(x+80, lineY, x+80+lineHeight, lineY+20, clrBlue);
++ osd->DrawText(x + 80 - font->Width(tr("Wind")) - gapX, y, tr("Wind"),
++ clrWhite, clrTransparent, font);
++ osd->DrawRectangle(x, lineY, x+80, lineY+lineHeight, clrBlue);
++ osd->DrawRectangle(x+80, lineY, x+80+lineHeight, lineY+20, clrBlue);
+
+ if (Mptr->winData.windDir != MAXINT) {
+ drawWindRose(osd, Mptr->winData.windDir, x, lineY+20);
+@@ -150,17 +152,17 @@
+ drawData(osd, Mptr, 0, font, x, y);
+ }
+
+-void cWeatherOsd::drawWeather(cOsdBase *osd, Decoded_METAR *mptr, int x, int y) {
++void cWeatherOsd::drawWeather(cOsd *osd, Decoded_METAR *mptr, int x, int y) {
+ //char* filename;
+
+ // sprintf("%s%s.xpm", coverage[mptr->], phenomen[]);
+ cBitmap weather(100, 100, 3, false);
+ initBitmap(weather, sun_xpm, clrYellow, true);
+ initBorderBitmap(weather, clrBlue);
+- osd->SetBitmap(x, y, weather);
++ osd->DrawBitmap(x, y, weather);
+ }
+
+-void cWeatherOsd::drawWindRose(cOsdBase *osd, int degree, int x, int y) {
++void cWeatherOsd::drawWindRose(cOsd *osd, int degree, int x, int y) {
+ cBitmap windRose(100, 100, 3, false);
+ initBitmap(windRose, windrose_xpm, clrYellow, true);
+
+@@ -185,5 +187,5 @@
+ }
+
+ initBorderBitmap(windRose, clrBlue);
+- osd->SetBitmap(x, y, windRose);
++ osd->DrawBitmap(x, y, windRose);
+ }
+diff -urNad vdr-plugin-weather-0.2.1e/display.h /tmp/dpep.VbJUoh/vdr-plugin-weather-0.2.1e/display.h
+--- vdr-plugin-weather-0.2.1e/display.h 2005-04-16 20:21:10.490690344 +0200
++++ /tmp/dpep.VbJUoh/vdr-plugin-weather-0.2.1e/display.h 2005-04-16 20:21:10.943621488 +0200
+@@ -11,20 +11,20 @@
+ public:
+ cWeatherOsd(cUpdate *metarReader);
+ protected:
+- virtual void printMetar (cOsdBase *osd, Decoded_METAR *Mptr, int x, int y);
+- void initWeatherBitmap(cBitmap &b, Decoded_METAR *mptr, eDvbColor col, bool setBg);
+- void initBitmap(cBitmap &b, char *xpm[], eDvbColor col, bool setBg);
+- void initNorthBitmap(cBitmap &b, eDvbColor col);
+- void initSouthBitmap(cBitmap &b, eDvbColor col);
+- void initWestBitmap(cBitmap &b, eDvbColor col);
+- void initEastBitmap(cBitmap &b, eDvbColor col);
+- void initNorthWestBitmap(cBitmap &b, eDvbColor col);
+- void initNorthEastBitmap(cBitmap &b, eDvbColor col);
+- void initSouthWestBitmap(cBitmap &b, eDvbColor col);
+- void initSouthEastBitmap(cBitmap &b, eDvbColor col);
+- void initBorderBitmap(cBitmap &b, eDvbColor col);
+- void drawWindRose(cOsdBase *osd, int degree, int x, int y);
+- void drawWeather(cOsdBase *osd, Decoded_METAR *mptr, int x, int y);
++ virtual void printMetar (cOsd *osd, Decoded_METAR *Mptr, int x, int y);
++ void initWeatherBitmap(cBitmap &b, Decoded_METAR *mptr, tColor col, bool setBg);
++ void initBitmap(cBitmap &b, char *xpm[], tColor col, bool setBg);
++ void initNorthBitmap(cBitmap &b, tColor col);
++ void initSouthBitmap(cBitmap &b, tColor col);
++ void initWestBitmap(cBitmap &b, tColor col);
++ void initEastBitmap(cBitmap &b, tColor col);
++ void initNorthWestBitmap(cBitmap &b, tColor col);
++ void initNorthEastBitmap(cBitmap &b, tColor col);
++ void initSouthWestBitmap(cBitmap &b, tColor col);
++ void initSouthEastBitmap(cBitmap &b, tColor col);
++ void initBorderBitmap(cBitmap &b, tColor col);
++ void drawWindRose(cOsd *osd, int degree, int x, int y);
++ void drawWeather(cOsd *osd, Decoded_METAR *mptr, int x, int y);
+ std::string cWeatherOsd::getIntensity(const std::string weather);
+ std::string cWeatherOsd::getPrecipitation(const std::string weather);
+ std::string cWeatherOsd::getCoverage(const std::string weather);
+diff -urNad vdr-plugin-weather-0.2.1e/simpleDisplay.c /tmp/dpep.VbJUoh/vdr-plugin-weather-0.2.1e/simpleDisplay.c
+--- vdr-plugin-weather-0.2.1e/simpleDisplay.c 2005-04-16 20:21:10.490690344 +0200
++++ /tmp/dpep.VbJUoh/vdr-plugin-weather-0.2.1e/simpleDisplay.c 2005-04-16 20:21:10.943621488 +0200
+@@ -18,21 +18,17 @@
+ }
+
+ void cSimpleWeatherOsd::Show(void) {
+- osd = cOsd::OpenRaw(50, 50);
++ osd = cOsdProvider::NewOsd(50, 50);
++ const cFont *font = cFont::GetFont((eDvbFont)0);
+ if (osd) {
+- osd->Create(0, 240, 612, 250, 4);
+- osd->AddColor(clrBackground);
+- osd->AddColor(clrRed);
+- osd->AddColor(clrGreen);
+- osd->AddColor(clrYellow);
+- osd->AddColor(clrBlue);
+- osd->Clear();
++ tArea Area = {0, 240, 612, 250, 4};
++ osd->SetAreas(&Area, 1);
+
+ if (metarReader->isDataAvailable()) {
+ Decoded_METAR *decodedMetar = metarReader->getDecodedMetar();
+ this->printMetar(osd, decodedMetar, 10, 250);
+ } else {
+- osd->Text(10, 250, tr("No Data available"));
++ osd->DrawText(10, 250, tr("No Data available"),clrWhite, clrTransparent, font);
+ }
+ osd->Flush();
+ }
+@@ -54,14 +50,13 @@
+ return state;
+ }
+
+-void cSimpleWeatherOsd::printMetar (cOsdBase *osd, Decoded_METAR *Mptr, int x, int y) {
++void cSimpleWeatherOsd::printMetar (cOsd *osd, Decoded_METAR *Mptr, int x, int y) {
+
+- cFont *font = new cFont((eDvbFont)0);
+- osd->SetFont((eDvbFont)0);
++ const cFont *font = cFont::GetFont((eDvbFont)0);
+ drawData(osd, Mptr, 0, font, x, y);
+ }
+
+-int cSimpleWeatherOsd::calculateMaxDescriptionFontWidth(measurement measurements[], int size, cFont *font) {
++int cSimpleWeatherOsd::calculateMaxDescriptionFontWidth(measurement measurements[], int size, const cFont *font) {
+ int maxSize = 0;
+ int strSize = 0;
+
+@@ -75,7 +70,7 @@
+ return maxSize;
+ }
+
+-int cSimpleWeatherOsd::calculateMaxValueFontWidth(measurement measurements[], int size, cFont *font) {
++int cSimpleWeatherOsd::calculateMaxValueFontWidth(measurement measurements[], int size, const cFont *font) {
+ int maxSize = 0;
+ int strSize = 0;
+
+@@ -89,7 +84,7 @@
+ return maxSize;
+ }
+
+-void cSimpleWeatherOsd::drawData(cOsdBase *osd, Decoded_METAR *Mptr, int cy, cFont *font, int x, int y) {
++void cSimpleWeatherOsd::drawData(cOsd *osd, Decoded_METAR *Mptr, int cy, const cFont *font, int x, int y) {
+ measurement measurements[10];
+
+ for(int i=0; i<10; i++) {
+@@ -174,18 +169,21 @@
+
+
+ int maxSize = x + calculateMaxDescriptionFontWidth(measurements, cy, font) + gapX;
+- osd->Text(maxSize-font->Width(measurements[0].description)-gapX, y, measurements[0].description);
++ osd->DrawText(maxSize-font->Width(measurements[0].description)-gapX, y,
++ measurements[0].description, clrWhite, clrTransparent, font);
+ y += font->Height(measurements[0].description) + gapY;
+ int lineY = y;
+- osd->Fill(x, y, maxSize+gapX, y+lineHeight, clrBlue);
++ osd->DrawRectangle(x, y, maxSize+gapX, y+lineHeight, clrBlue);
+ y += lineHeight+gapY;
+
+ for (int i=1; i<=cy; i++) {
+- osd->Text(maxSize-font->Width(measurements[i].description)-gapX, y, measurements[i].description);
+- osd->Text(maxSize+lineHeight+gapX+gapX, y, measurements[i].value);
+- osd->Fill(maxSize, y+(font->Height(measurements[0].description)/2), maxSize+gapX, y+(font->Height(measurements[0].description)/2)+lineHeight, clrBlue);
++ osd->DrawText(maxSize-font->Width(measurements[i].description)-gapX, y,
++ measurements[i].description, clrWhite, clrTransparent, font);
++ osd->DrawText(maxSize+lineHeight+gapX+gapX, y, measurements[i].value,
++ clrWhite, clrTransparent, font);
++ osd->DrawRectangle(maxSize, y+(font->Height(measurements[0].description)/2), maxSize+gapX, y+(font->Height(measurements[0].description)/2)+lineHeight, clrBlue);
+ y += font->Height(measurements[0].description) + gapY;
+ }
+
+- osd->Fill(maxSize+gapX, lineY, maxSize+gapX+lineHeight, y, clrBlue);
++ osd->DrawRectangle(maxSize+gapX, lineY, maxSize+gapX+lineHeight, y, clrBlue);
+ }
+diff -urNad vdr-plugin-weather-0.2.1e/simpleDisplay.h /tmp/dpep.VbJUoh/vdr-plugin-weather-0.2.1e/simpleDisplay.h
+--- vdr-plugin-weather-0.2.1e/simpleDisplay.h 2005-04-16 20:21:10.491690192 +0200
++++ /tmp/dpep.VbJUoh/vdr-plugin-weather-0.2.1e/simpleDisplay.h 2005-04-16 20:21:10.943621488 +0200
+@@ -17,14 +17,14 @@
+ virtual void Show(void);
+ virtual eOSState ProcessKey(eKeys Key);
+ protected:
+- cOsdBase *osd;
+- eDvbColor color;
++ cOsd *osd;
++ tColor color;
+ cUpdate *metarReader;
+- virtual void printMetar (cOsdBase *osd, Decoded_METAR *Mptr, int x, int y);
+- void drawData(cOsdBase *osd, Decoded_METAR *Mptr, int cy, cFont *font, int x, int y);
+- int calculateMaxDescriptionFontWidth(measurement measurements[], int size, cFont *font);
+- int calculateMaxValueFontWidth(measurement measurements[], int size, cFont *font);
+- int calculateMaxFontWidth(char strings[][500], int size, cFont *font);
++ virtual void printMetar (cOsd *osd, Decoded_METAR *Mptr, int x, int y);
++ void drawData(cOsd *osd, Decoded_METAR *Mptr, int cy, const cFont *font, int x, int y);
++ int calculateMaxDescriptionFontWidth(measurement measurements[], int size, const cFont *font);
++ int calculateMaxValueFontWidth(measurement measurements[], int size, const cFont *font);
++ int calculateMaxFontWidth(char strings[][500], int size, const cFont *font);
+ };
+
+ #endif //SIMPLE_WEATHER_DISPLAY_H
Property changes on: vdr/vdr-plugin-weather/trunk/debian/patches/02_vdr_1.3-fix.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Modified: vdr/vdr-plugin-weather/trunk/debian/watch
===================================================================
--- vdr/vdr-plugin-weather/trunk/debian/watch 2005-04-16 12:58:40 UTC (rev 464)
+++ vdr/vdr-plugin-weather/trunk/debian/watch 2005-04-16 19:50:49 UTC (rev 465)
@@ -1,2 +1,2 @@
version=2
-http://www.moldaner.de/vdr/ download/vdr-weather-(.*)\.tgz
+http://www.moldaner.de/vdr/ download/vdr-1.3-weather-(.*)\.tgz