[gambas2] fix permissive issue, fix v4l code to use libv4l1
Tom Callaway
spot at fedoraproject.org
Mon Mar 21 16:27:05 UTC 2011
commit 169cadb33061c22bbdd2662df92d190ad7218a39
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date: Mon Mar 21 12:28:25 2011 -0400
fix permissive issue, fix v4l code to use libv4l1
gambas-2.22.0-firebird-permissive-fix.patch | 35 +++++++++++++++++++++++++++
gambas2-2.22.0-use-libv4l1.patch | 27 ++++++++++++++++++++
gambas2.spec | 15 ++++++++++-
3 files changed, 76 insertions(+), 1 deletions(-)
---
diff --git a/gambas-2.22.0-firebird-permissive-fix.patch b/gambas-2.22.0-firebird-permissive-fix.patch
new file mode 100644
index 0000000..2454c34
--- /dev/null
+++ b/gambas-2.22.0-firebird-permissive-fix.patch
@@ -0,0 +1,35 @@
+--- gambas2-2.22.0/gb.db.firebird/src/main.cpp 2010-11-23 22:42:03.000000000 +0100
++++ gambas2-2.22.0/gb.db.firebird/src/main.cpp 2011-03-16 12:30:42.000000000 +0100
+@@ -1216,7 +1216,8 @@ static int query_fill(DB_DATABASE *db, D
+ GB.StoreVariant(&fantom, &buffer[i]);
+ }
+ else{
+- GB.StoreVariant(&res->GetData(pos,i), &buffer[i]);
++ fantom = res->GetData(pos,i);
++ GB.StoreVariant(&fantom, &buffer[i]);
+ }
+ }
+ }
+@@ -1874,6 +1875,8 @@ static int field_info(DB_DATABASE *db, c
+ static char query[SQLMAXLEN];
+ int type;
+ std::string str1,str2;
++ GB_VARIANT value;
++
+ snprintf(query,SQLMAXLEN-1,"select b.RDB$field_name,a.RDB$field_type,b.rdb$null_flag,b.rdb$default_source,a.RDB$field_length from RDB$fields a,RDB$relation_fields b where a.RDB$field_name=b.RDB$field_source and b.RDB$relation_name=upper('%s') and b.rdb$field_name=upper('%s')",table,field);
+ if (do_query(db, query, &res, "Unable to get the field from the table")){
+ delete res;
+@@ -1900,9 +1903,11 @@ static int field_info(DB_DATABASE *db, c
+ str1=res->GetData(0,3).value.value._string;
+ if(str1!="")
+ str2=str1.assign(str1,8,str1.length()-8);
+- GB.FreeString(&res->GetData(0,3).value.value._string);
++ value = res->GetData(0,3);
++ GB.FreeString(&value.value.value._string);
+ res->SetData(0,3,str2);
+- GB.StoreVariant(&res->GetData(0,3), &info->def);
++ value = res->GetData(0,3);
++ GB.StoreVariant(&value, &info->def);
+ }
+ delete res;
+ return FALSE;
diff --git a/gambas2-2.22.0-use-libv4l1.patch b/gambas2-2.22.0-use-libv4l1.patch
new file mode 100644
index 0000000..9570224
--- /dev/null
+++ b/gambas2-2.22.0-use-libv4l1.patch
@@ -0,0 +1,27 @@
+diff -up gambas2-2.22.0/gb.v4l/configure.ac.BAD gambas2-2.22.0/gb.v4l/configure.ac
+--- gambas2-2.22.0/gb.v4l/configure.ac.BAD 2011-03-21 10:58:48.210501001 -0400
++++ gambas2-2.22.0/gb.v4l/configure.ac 2011-03-21 11:00:50.189501023 -0400
+@@ -10,9 +10,9 @@ GB_COMPONENT(
+ V4L,
+ [Video For Linux component],
+ [src],
+- [GB_FIND(png.h jpeglib.h linux/videodev.h linux/videodev2.h, /usr/local/lib /usr/local /usr/lib /usr, include)],
++ [GB_FIND(png.h jpeglib.h libv4l1-videodev.h linux/videodev2.h, /usr/local/lib /usr/local /usr/lib /usr, include)],
+ [GB_FIND(libpng.$SHLIBEXT libjpeg.$SHLIBEXT, /usr/local /usr, lib)],
+- [$C_LIB -ljpeg -lpng])
++ [$C_LIB -ljpeg -lpng -lv4l1])
+
+ AC_OUTPUT( \
+ Makefile \
+diff -up gambas2-2.22.0/gb.v4l/src/CWebcam.h.BAD gambas2-2.22.0/gb.v4l/src/CWebcam.h
+--- gambas2-2.22.0/gb.v4l/src/CWebcam.h.BAD 2011-03-21 10:59:11.383500624 -0400
++++ gambas2-2.22.0/gb.v4l/src/CWebcam.h 2011-03-21 10:59:24.582501047 -0400
+@@ -35,7 +35,7 @@
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <linux/types.h>
+-#include <linux/videodev.h>
++#include <libv4l1-videodev.h>
+ #include <linux/videodev2.h>
+
+ #include "gambas.h"
diff --git a/gambas2.spec b/gambas2.spec
index 8f7db6d..4939dc4 100644
--- a/gambas2.spec
+++ b/gambas2.spec
@@ -1,7 +1,7 @@
Name: gambas2
Summary: IDE based on a basic interpreter with object extensions
Version: 2.22.0
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPL+
Group: Development/Tools
URL: http://gambas.sourceforge.net/
@@ -18,10 +18,17 @@ BuildRequires: libxslt-devel, pcre-devel, SDL_image-devel, libICE-devel
BuildRequires: libXcursor-devel, libXft-devel, libtool-ltdl-devel
BuildRequires: xdg-utils, glibc-devel, libffi-devel, firebird-devel
BuildRequires: libtool
+# We need this since linux/videodev.h is dead
+BuildRequires: libv4l-devel
# Code is not endian clean.
ExcludeArch: ppc ppc64
Patch1: %{name}-2.0.0-nolintl.patch
Patch2: %{name}-2.0.0-noliconv.patch
+# Patch from Marek Kašík
+# Don't take address of temporary
+Patch3: gambas-2.22.0-firebird-permissive-fix.patch
+# Use libv4l1
+Patch4: gambas2-2.22.0-use-libv4l1.patch
%description
Gambas2 is a free development environment based on a Basic interpreter
@@ -487,6 +494,8 @@ Requires: %{name}-runtime = %{version}-%{release}
%setup -q
%patch1 -p1 -b .nolintl
%patch2 -p1 -b .noliconv
+%patch3 -p1 -b .temporary
+%patch4 -p1 -b .libv4l1
# We used to patch these out, but this is simpler.
for i in acinclude.m4 gb.compress.bzlib2/configure gb.compress.zlib/configure gb.corba/configure \
gb.crypt/configure gb.db.firebird/configure gb.db.mysql/configure gb.db.odbc/configure \
@@ -1604,6 +1613,10 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_datadir}/%{name}/info/gb.xml.xslt.*
%changelog
+* Mon Mar 21 2011 Tom Callaway <spot at fedoraproject.org> - 2.22.0-6
+- add Marek's patch to fix temporary usage
+- use libv4l1 since linux/videodev.h is dead
+
* Sun Mar 13 2011 Marek Kasik <mkasik at redhat.com> - 2.22.0-5
- Rebuild (poppler-0.16.3)
More information about the scm-commits
mailing list