diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ffde73f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/vifir-0.9.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index 3726517..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Upstream dead for years diff --git a/sources b/sources new file mode 100644 index 0000000..229c87a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +680a37d611253ec3b64e835e06c9207c vifir-0.9.tar.gz diff --git a/vifir-0.9-gpsd-2.96.patch b/vifir-0.9-gpsd-2.96.patch new file mode 100644 index 0000000..c0ae675 --- /dev/null +++ b/vifir-0.9-gpsd-2.96.patch @@ -0,0 +1,77 @@ +diff -up vifir-0.9/src/GPS.cpp.gpsd296 vifir-0.9/src/GPS.cpp +--- vifir-0.9/src/GPS.cpp.gpsd296 2010-10-12 08:36:14.000000000 -0400 ++++ vifir-0.9/src/GPS.cpp 2011-08-23 13:38:54.465863249 -0400 +@@ -54,14 +54,22 @@ bool GPS::Activate() { + { + case Config::gpsd: + /* gpsd.mainframe.cx:2947 and gpsd.rellim.com:2947 have gpsd data sources we can connect to for testing */ ++#if GPSD_API_MAJOR_VERSION >= 5 ++ if (!gps_open (Cfg->GetgpsdHost().c_str(),Cfg->GetgpsdPort().c_str(), &gpsdata_buf)) { ++ gpsddata = &gpsdata_buf; ++ } else { ++ gpsddata = NULL; ++ } ++#else + gpsddata=gps_open(Cfg->GetgpsdHost().c_str(),Cfg->GetgpsdPort().c_str()); ++#endif + if (!gpsddata) { + fprintf(stderr,"Failure in gps_open(%s,%s)\n",Cfg->GetgpsdHost().c_str(),Cfg->GetgpsdPort().c_str()); + return false; + } + #if GPSD_API_MAJOR_VERSION==3 + gps_query(gpsddata,"w+x\n"); +-#elif GPSD_API_MAJOR_VERSION==4 ++#elif GPSD_API_MAJOR_VERSION>=4 + gps_stream(gpsddata, WATCH_ENABLE, NULL); + #else + # error Unsupported GPSd library version +@@ -91,7 +99,11 @@ void GPS::Deactivate() { + #ifdef HAVE_LIBGPS + if (gpsddata) { + gps_close(gpsddata); ++#if GPSD_API_MAJOR_VERSION >= 5 ++ delete gpsddata; ++#else + gpsddata=NULL; ++#endif + } + ActiveFlag=false; + #endif +@@ -129,14 +141,24 @@ bool GPS::GetFix(double *Lon, double *La + if ((pfd.revents|POLLIN)==POLLIN) { + int result; + errno=0; ++#if GPSD_API_MAJOR_VERSION >= 5 ++ result=gps_read(gpsddata); ++ if (result > 0) ++ result=0; ++#else + result=gps_poll(gpsddata); ++#endif + if (result!=0) { + if (errno==0) { + /* Connection to gpsd closed */ + fprintf(stderr,"Connection to gpsd lost.\n"); + } else { + /* Read error */ ++#if GPSD_API_MAJOR_VERSION >= 5 ++ perror("gps_read()"); ++#else + perror("gps_poll()"); ++#endif + } + Deactivate(); + return false; +diff -up vifir-0.9/src/GPS.h.gpsd296 vifir-0.9/src/GPS.h +--- vifir-0.9/src/GPS.h.gpsd296 2010-05-23 00:10:44.000000000 -0400 ++++ vifir-0.9/src/GPS.h 2011-08-23 13:37:18.403202488 -0400 +@@ -47,6 +47,9 @@ public: + private: + #ifdef HAVE_LIBGPS + gps_data_t *gpsddata; ++#if GPSD_API_MAJOR_VERSION >= 5 ++ gps_data_t gpsdata_buf; ++#endif + pthread_t handler; + #endif + bool ActiveFlag; diff --git a/vifir.spec b/vifir.spec new file mode 100644 index 0000000..e543de2 --- /dev/null +++ b/vifir.spec @@ -0,0 +1,176 @@ +Name: vifir +Version: 0.9 +Release: 8%{?dist} +Summary: A viewer for electronic aviation charts +Group: Applications/Communications +License: GPLv3 +URL: http://vifir.sourceforge.net/ +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: vifir-0.9-gpsd-2.96.patch +BuildRequires: gtkmm24-devel +BuildRequires: gpsd-devel +BuildRequires: libgeotiff-devel +BuildRequires: dbus-devel +BuildRequires: dbus-glib-devel +BuildRequires: proj-devel +BuildRequires: poppler-devel +BuildRequires: poppler-glib-devel +BuildRequires: libxml++-devel +BuildRequires: libglademm24-devel +BuildRequires: libcurl-devel +BuildRequires: desktop-file-utils +BuildRequires: freetype-devel +BuildRequires: intltool +BuildRequires: libnova-devel +BuildRequires: libzip-devel + +Requires: evince + + +%description +Vifir processes and displays electronic aviation charts produced by the U.S. +National Aeronautical Charting Office in a similar way to an Electronic Flight +Bag. + + +%prep +%setup -q +%patch0 -p1 -b .gpsd296 + + +%build +export CXXFLAGS="$RPM_OPT_FLAGS" +%configure --prefix=%{_prefix} --libdir=%{_libdir} +make %{?_smp_mflags} + + +%install +make install DESTDIR=%{buildroot} INSTALL="install -p" +desktop-file-install \ + --delete-original \ + --dir=%{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/%{name}.desktop + + +%files +%doc AUTHORS ChangeLog COPYING DEVELOPERS README THANKS TODO +%{_bindir}/%{name} +%{_bindir}/llepdftopng +%{_datadir}/%{name}/ +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/*.png + + +%changelog +* Tue Feb 28 2012 Fedora Release Engineering - 0.9-8 +- Rebuilt for c++ ABI breakage + +* Sat Feb 04 2012 Remi Collet - 0.9-7 +- rebuild for new libzip + +* Sat Jan 14 2012 Fedora Release Engineering - 0.9-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Oct 28 2011 Rex Dieter - 0.9-5 +- rebuild(poppler) + +* Fri Sep 30 2011 Marek Kasik - 0.9-4 +- Rebuild (poppler-0.18.0) + +* Mon Sep 19 2011 Marek Kasik - 0.9-3 +- Rebuild (poppler-0.17.3) + +* Tue Aug 23 2011 Tom Callaway - 0.9-2 +- cleanup spec file (I have no idea how it got past review with those + redundant globals) +- enable gpsd 2.96+ support + +* Sun Jul 31 2011 Dave Ludlow - 0.9-1 +- Fix off-by-one error causing a crash upon loading a chart + +* Fri Jul 15 2011 Marek Kasik - 0.8-2 +- Rebuild (poppler-0.17.0) + +* Mon Mar 14 2011 Dave Ludlow - 0.8-1 +- Clip airport elevations to 32,767 feet when importing X-Plane data + +* Sun Mar 13 2011 Marek Kasik - 0.7-8 +- Rebuild (poppler-0.16.3) + +* Mon Feb 07 2011 Fedora Release Engineering - 0.7-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Jan 02 2011 Rex Dieter - 0.7-6 +- rebuild (poppler) + +* Wed Dec 15 2010 Rex Dieter - 0.7-5 +- rebuild (poppler) + +* Sat Nov 06 2010 Fabian Affolter - 0.7-4 +- rebuild (poppler) + +* Thu Sep 30 2010 Fabian Affolter - 0.7-3 +- rebuild (poppler) +- Duplicated variable definitions removed + +* Thu Aug 19 2010 Rex Dieter - 0.7-2 +- rebuild (poppler) + +* Tue Jul 20 2010 Dave Ludlow - 0.7-1 +- Improve handling of unexpected data/conditions from the GPS +- Improve signal-to-noise ratio on stderr output + +* Mon Jul 05 2010 Dave Ludlow - 0.6-1 +- Support the gpsd version 4 API +- Improve the gps data timeout calculation +- Fix checking for valid lat/lon data +- Add gpsd host/port configuration options +- Add ccache compiler-cache support +- Prevent crashes when no data volume is active + +* Fri May 14 2010 Dave Ludlow - 0.5-1 +- Add X-Plane 9.00 airport data import support +- Numerous tweaks for future Win32 support +- Code style/standardization support +- Fix runway headings import decimal shifting +- Data import performance tweaks +- Add airport info dialog +- Add i18n support +- Reduce nuisance warnings +- Incorporate some changes from Fabian Affolter's Fedora .spec file. + +* Sun May 09 2010 Fabian Affolter - 0.4-3 +- Rebuild for new gpsd + +* Thu May 06 2010 Fabian Affolter - 0.4-2 +- Rebuild for new poppler + +* Sun Jul 26 2009 Fabian Affolter - 0.4-1 +- Initial package for Fedora + +* Fri Jun 12 2009 Dave Ludlow 0.4-1 +- Aircraft data storage +- Performance improvements on slower systems +- METAR download and graphics support +- Add flashlight support +- Shapefile support +- Improve chart scrolling performance +- Simple on-screen keyboard support + +* Sat Jul 5 2008 Dave Ludlow 0.3-1 +- dTPP (approach plate) support +- National Flight Database support +- Route support +- Data overlay support +- Add screensaver & powersave disable hooks +- Multiple data volume support + +* Thu Aug 23 2007 Dave Ludlow 0.2-1 +- Improve look and feel somewhat +- Add GPSD integration and moving map support +- Make recent files menu actually functional +- Add a configuration dialog and persistent storage +- Add approach plate support + +* Thu Aug 9 2007 Dave Ludlow 0.1-1 +- Initial packaging