Re: patches from FreeBSD port



On Sun, 2006-04-23 at 20:31 -0400, Tom McLaughlin wrote:
> Hi, I have 4 patches that have been sitting in the FreeBSD ports tree
> that I'd like to get merged into f-spot.  All four are located here:
> 
> http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/f-spot/files/
> 
> patch-src_main.cs is simple, it adds an exception for OSes which lack
> prctl().
> 

Hi Tom,

Four patches, I count five ;-)

> 
> Do these patches cause any problems on Linux?
> 

I tested all of them and they don't seem to pose any problems on Linux.
In attachment you can find a patch that takes together all five patches
and works against current cvs head.

Could some more people check this out, just to make sure. ;-)

Regards,
Thomas
Index: libgphoto2-sharp/ErrorCodes.cs
===================================================================
RCS file: /cvs/gnome/f-spot/libgphoto2-sharp/ErrorCodes.cs,v
retrieving revision 1.3
diff -u -b -r1.3 ErrorCodes.cs
--- libgphoto2-sharp/ErrorCodes.cs	20 Feb 2005 21:37:12 -0000	1.3
+++ libgphoto2-sharp/ErrorCodes.cs	25 Apr 2006 18:26:51 -0000
@@ -79,7 +79,7 @@
 		[DllImport ("libgphoto2.so")]
 		internal static extern IntPtr gp_result_as_string (ErrorCode result);
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern IntPtr gp_port_result_as_string (ErrorCode result);
 	}
 	
Index: libgphoto2-sharp/Port.cs
===================================================================
RCS file: /cvs/gnome/f-spot/libgphoto2-sharp/Port.cs,v
retrieving revision 1.4
diff -u -b -r1.4 Port.cs
--- libgphoto2-sharp/Port.cs	27 Apr 2005 19:38:18 -0000	1.4
+++ libgphoto2-sharp/Port.cs	25 Apr 2006 18:26:52 -0000
@@ -83,49 +83,49 @@
 		PortPrivateLibrary *pl;
 		PortPrivateCore *pc;
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_new (out _Port *port);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_free (_Port *port);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_set_info (_Port *port, ref _PortInfo info);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_get_info (_Port *port, out _PortInfo info);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_open (_Port *port);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_close (_Port *port);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_read (_Port *port, [MarshalAs(UnmanagedType.LPTStr)] byte[] data, int size);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_write (_Port *port, [MarshalAs(UnmanagedType.LPTStr)] byte[] data, int size);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_get_settings (_Port *port, out PortSettings settings);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_set_settings (_Port *port, PortSettings settings);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_get_timeout (_Port *port, int *timeout);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_set_timeout (_Port *port, int timeout);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_get_pin (_Port *port, Pin pin, Level *level);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_set_pin (_Port *port, Pin pin, Level level);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern char* gp_port_get_error (_Port *port);
 
 		//[DllImport ("libgphoto2.so")]
@@ -135,7 +135,7 @@
 
 	public class Port : Object
 	{
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_new (out IntPtr port);
 
 		public Port()
@@ -147,7 +147,7 @@
 			this.handle = new HandleRef (this, native);
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_free (HandleRef port);
 		
 		protected override void Cleanup ()
@@ -155,7 +155,7 @@
 			Error.CheckError (gp_port_free (this.handle));
 		}
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_set_info (HandleRef port, ref _PortInfo info);
 
 		public void SetInfo (PortInfo info)
@@ -163,7 +163,7 @@
 		Error.CheckError (gp_port_set_info (this.Handle, ref info.Handle));
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_get_info (HandleRef port, out _PortInfo info);
 
 		public PortInfo GetInfo ()
@@ -175,7 +175,7 @@
 			return info;
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_open (HandleRef port);
 
 		public void Open ()
@@ -183,7 +183,7 @@
 			Error.CheckError (gp_port_open (this.Handle));
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_close (HandleRef port);
 
 		public void Close ()
@@ -191,7 +191,7 @@
 			Error.CheckError (gp_port_close (this.Handle));
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_read (HandleRef port, [MarshalAs(UnmanagedType.LPTStr)] byte[] data, int size);
 
 		public byte[] Read (int size)
@@ -203,7 +203,7 @@
 			return data;
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_write (HandleRef port, [MarshalAs(UnmanagedType.LPTStr)] byte[] data, int size);
 
 		public void Write (byte[] data)
@@ -212,7 +212,7 @@
 		}
 		
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_set_settings (HandleRef port, PortSettings settings);
 
 		public void SetSettings (PortSettings settings)
@@ -220,7 +220,7 @@
 			Error.CheckError (gp_port_set_settings (this.Handle, settings));
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_get_settings (HandleRef port, out PortSettings settings);
 
 		public PortSettings GetSettings ()
@@ -232,10 +232,10 @@
 			return settings;
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_get_timeout (HandleRef port, out int timeout);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_set_timeout (HandleRef port, int timeout);
 
 		public int Timeout
@@ -252,13 +252,13 @@
 			}
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_get_pin (HandleRef port, Pin pin, out Level level);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_set_pin (HandleRef port, Pin pin, Level level);
 
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern string gp_port_get_error (HandleRef port);
 	}
 }
Index: libgphoto2-sharp/PortInfoList.cs
===================================================================
RCS file: /cvs/gnome/f-spot/libgphoto2-sharp/PortInfoList.cs,v
retrieving revision 1.2
diff -u -b -r1.2 PortInfoList.cs
--- libgphoto2-sharp/PortInfoList.cs	20 Feb 2005 21:37:12 -0000	1.2
+++ libgphoto2-sharp/PortInfoList.cs	25 Apr 2006 18:26:52 -0000
@@ -5,7 +5,7 @@
 {
 	public class PortInfoList : Object 
 	{
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_info_list_new (out IntPtr handle);
 		
 		public PortInfoList()
@@ -17,7 +17,7 @@
 			this.handle = new HandleRef (this, native);
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_info_list_free (HandleRef handle);
 		
 		protected override void Cleanup ()
@@ -25,7 +25,7 @@
 			Error.CheckError (gp_port_info_list_free (this.Handle));
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_info_list_load (HandleRef handle);
 
 		public void Load ()
@@ -36,7 +36,7 @@
 				throw Error.ErrorException (result);
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_info_list_count (HandleRef handle);
 
 		public int Count()
@@ -44,7 +44,7 @@
 			return (int) Error.CheckError (gp_port_info_list_count (this.Handle));
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal unsafe static extern ErrorCode gp_port_info_list_get_info (HandleRef handle, int n, out _PortInfo info);
 
 		public PortInfo GetInfo (int n)
@@ -56,7 +56,7 @@
 			return info;
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_info_list_lookup_path (HandleRef handle, [MarshalAs(UnmanagedType.LPTStr)]string path);
 
 		public int LookupPath (string path)
@@ -64,7 +64,7 @@
 			return (int) Error.CheckError (gp_port_info_list_lookup_path(this.handle, path));
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal static extern ErrorCode gp_port_info_list_lookup_name (HandleRef handle, string name);
 
 		public int LookupName(string name)
@@ -72,7 +72,7 @@
 			return (int) Error.CheckError (gp_port_info_list_lookup_name (this.Handle, name));
 		}
 		
-		[DllImport ("libgphoto2.so")]
+		[DllImport ("libgphoto2_port.so")]
 		internal unsafe static extern ErrorCode gp_port_info_list_append (HandleRef handle, _PortInfo info);
 
 		public int Append (PortInfo info)
Index: src/f-spot.in
===================================================================
RCS file: /cvs/gnome/f-spot/src/f-spot.in,v
retrieving revision 1.15
diff -u -b -r1.15 f-spot.in
--- src/f-spot.in	1 Mar 2006 07:51:19 -0000	1.15
+++ src/f-spot.in	25 Apr 2006 18:26:52 -0000
@@ -17,4 +17,4 @@
 	echo "*** Running F-Spot in Debug Mode ***"
 esac
 
-exec -a @PACKAGE@ mono $MONO_OPTIONS $EXE_TO_RUN "$@"
+exec mono $MONO_OPTIONS $EXE_TO_RUN "$@"
Index: src/main.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/main.cs,v
retrieving revision 1.30
diff -u -b -r1.30 main.cs
--- src/main.cs	23 Mar 2006 20:11:04 -0000	1.30
+++ src/main.cs	25 Apr 2006 18:26:52 -0000
@@ -148,6 +148,8 @@
 			}
 		} catch (DllNotFoundException de) {
 			/* noop */
+		} catch (EntryPointNotFoundException de) {
+		    	/* noop */
 		}
 	}
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]