File: ftbfs-1075483.patch

package info (click to toggle)
ruby-xmlparser 0.7.3-7
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 984 kB
  • sloc: ruby: 9,342; ansic: 2,017; makefile: 11
file content (57 lines) | stat: -rw-r--r-- 2,042 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From: Piper McCorkle <contact@piperswe.me>
Date: Wed, 14 Aug 2024 23:49:00 -0500
Subject: Fix FTBFS from #1075483

---
 extconf.rb | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/extconf.rb b/extconf.rb
index e0401f4..83db273 100644
--- a/extconf.rb
+++ b/extconf.rb
@@ -8,6 +8,8 @@
 require 'mkmf'
 
 
+$CFLAGS += ' -Wno-int-conversion -Wno-incompatible-pointer-types'
+
 xml_enc_path = with_config("perl-enc-map")
 if xml_enc_path == true
   ## Encoding maps may be stored in $perl_archlib/XML/Parser/Encodins/
@@ -34,25 +36,25 @@ end
 
 #if have_header("xmlparse.h") || have_header("expat.h")
 if have_header("expat.h") || have_header("xmlparse.h")
-  if have_library("expat", "XML_ParserCreate") ||
+  if have_library("expat", "XML_ParserCreate", "expat.h") ||
       have_library("xmltok", "XML_ParserCreate") ||
       have_library("libexpat", "XML_ParserCreate")
-    if have_func("XML_SetNotStandaloneHandler")
+    if have_func("XML_SetNotStandaloneHandler", "expat.h")
       $CFLAGS += " -DNEW_EXPAT"
     end
-    if have_func("XML_SetParamEntityParsing")
+    if have_func("XML_SetParamEntityParsing", "expat.h")
       $CFLAGS += " -DXML_DTD"
     end
 #    if have_func("XML_SetExternalParsedEntityDeclHandler")
 #      $CFLAGS += " -DEXPAT_1_2"
 #    end
-    have_func("XML_SetDoctypeDeclHandler")
-    have_func("XML_ParserReset")
-    have_func("XML_SetSkippedEntityHandler")
-    have_func("XML_GetFeatureList")
-    have_func("XML_UseForeignDTD")
-    have_func("XML_GetIdAttributeIndex")
-    have_library("socket", "ntohl")
+    have_func("XML_SetDoctypeDeclHandler", "expat.h")
+    have_func("XML_ParserReset", "expat.h")
+    have_func("XML_SetSkippedEntityHandler", "expat.h")
+    have_func("XML_GetFeatureList", "expat.h")
+    have_func("XML_UseForeignDTD", "expat.h")
+    have_func("XML_GetIdAttributeIndex", "expat.h")
+    have_func("ntohl", "arpa/inet.h")
     have_library("wsock32") if RUBY_PLATFORM =~ /mswin32|mingw/
     create_makefile("xmlparser")
   end