summaryrefslogtreecommitdiff
path: root/devel/py-pysvn/patches/patch-setup__configure.py
blob: 440c9eb95634e815701fb953820eed2ed0a9fafc (plain)
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
58
59
$NetBSD: patch-setup__configure.py,v 1.1 2021/09/30 16:15:10 hauke Exp $

Add support for NetBSD toolchain.

--- setup_configure.py.orig	2021-09-29 20:38:06.063225727 +0000
+++ setup_configure.py
@@ -184,6 +184,9 @@ class Setup:
             elif sys.platform.startswith('freebsd'):
                 self.platform = 'freebsd'
 
+            elif sys.platform.startswith('netbsd'):
+                self.platform = 'netbsd'
+
             elif sys.platform == 'cygwin':
                 self.platform = 'cygwin'
 
@@ -214,6 +217,10 @@ class Setup:
             self.c_utils = FreeBsdCompilerGCC( self )
             self.c_pysvn = FreeBsdCompilerGCC( self )
 
+        elif self.platform == 'netbsd':
+            self.c_utils = NetBsdCompilerGCC( self )
+            self.c_pysvn = NetBsdCompilerGCC( self )
+
         elif self.platform == 'cygwin':
             self.c_utils = CygwinCompilerGCC( self )
             self.c_pysvn = CygwinCompilerGCC( self )
@@ -1348,6 +1355,31 @@ class FreeBsdCompilerGCC(UnixCompilerGCC
                 ] )
         return py_ld_libs
 
+class NetBsdCompilerGCC(UnixCompilerGCC):
+    def __init__( self, setup ):
+        UnixCompilerGCC.__init__( self, setup )
+
+    def _getLdLibs( self ):
+        py_ld_libs = [
+                '-L%(SVN_LIB)s',
+                '-L%(APR_LIB)s',
+                '-Wl,-R',
+                '-Wl,@PREFIX@/lib',
+                '-lsvn_client-1',
+                '-lsvn_diff-1',
+                '-lsvn_repos-1',
+                ]
+
+        if os.path.exists( '/usr/lib/libkrb5.so' ):
+            py_ld_libs.append( '-lkrb5' )
+
+        py_ld_libs.extend( [
+                '-lcom_err',
+                '-lexpat',
+                '-lneon',
+                ] )
+        return py_ld_libs
+
 class CygwinCompilerGCC(UnixCompilerGCC):
     def __init__( self, setup ):
         UnixCompilerGCC.__init__( self, setup )