Apply no-directory patch.
authorRichard W.M. Jones <rjones@redhat.com>
Sun, 16 Nov 2008 18:44:04 +0000 (18:44 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sun, 16 Nov 2008 18:44:04 +0000 (18:44 +0000)
flexdll/mingw32-flexdll-0.11-no-directory.patch [new file with mode: 0644]
flexdll/mingw32-flexdll.spec

diff --git a/flexdll/mingw32-flexdll-0.11-no-directory.patch b/flexdll/mingw32-flexdll-0.11-no-directory.patch
new file mode 100644 (file)
index 0000000..f990fe2
--- /dev/null
@@ -0,0 +1,16 @@
+Don't recognize directories as libraries.  eg. If we have system
+libvirt and OCaml bindings in $OCAML_LIB_DIR/libvirt, then we don't
+want '-lvirt' to "discover" the OCaml bindings directory.
+
+diff -ur flexdll/reloc.ml flexdll.mingw/reloc.ml
+--- flexdll/reloc.ml   2008-11-16 18:41:01.000000000 +0000
++++ flexdll.mingw/reloc.ml     2008-11-16 18:39:18.000000000 +0000
+@@ -109,7 +109,7 @@
+   Filename.dirname (get_output1 (Printf.sprintf "i686-pc-mingw32-gcc %s-print-libgcc-file-name" extra))\r
\r
+ let file_exists fn =\r
+-  if Sys.file_exists fn then Some fn\r
++  if Sys.file_exists fn && not (Sys.is_directory fn) then Some fn\r
+   else if !use_cygpath && Sys.file_exists (fn ^ ".lnk") then\r
+     Some (get_output1 (Printf.sprintf "cygpath -m %s" fn))\r
+   else None\r
index f744d9d..6e232b3 100644 (file)
@@ -11,7 +11,7 @@
 
 Name:           mingw32-flexdll
 Version:        0.11
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        FlexDLL Windows DLL plugin API which is like dlopen
 
 License:        zlib
@@ -24,6 +24,7 @@ Source1:        flexlink.exe
 # Patches for MinGW:
 Patch1000:      mingw32-flexdll-0.11-mingw-cross.patch
 Patch1001:      mingw32-flexdll-0.11-no-cygpath.patch
+Patch1002:      mingw32-flexdll-0.11-no-directory.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -73,6 +74,7 @@ make it easy to port applications developed for Unix.
 
 %patch1000 -p1
 %patch1001 -p1
+%patch1002 -p1
 
 for f in CHANGES LICENSE README; do
   chmod -x $f
@@ -129,6 +131,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.11-7
+- Apply no-directory patch.
+
 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.11-6
 - Permanently disable cygpath (avoids 'NUL' file being created).