File: 0001-pkg-config.patch

package info (click to toggle)
python-kyotocabinet 1.23-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 784 kB
  • sloc: cpp: 2,967; python: 1,241; javascript: 249; makefile: 85
file content (44 lines) | stat: -rw-r--r-- 1,374 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
From: Shawn Landden <shawnlandden@gmail.com>
Date: Fri, 8 Jun 2012 10:45:15 -0700
Subject: [PATCH 1/2] pkg-config

---
 setup.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/setup.py b/setup.py
index eca2974..421af4d 100644
--- a/setup.py
+++ b/setup.py
@@ -18,20 +18,18 @@ def getcmdout(cmdargs):
     return output.strip()
 
 include_dirs = []
-myincopts = getcmdout(['kcutilmgr', 'conf', '-i']).split()
+myincopts = getcmdout(['pkg-config', '--cflags-only-I', 'kyotocabinet']).split()
 for incopt in myincopts:
     if incopt.startswith('-I'):
         incdir = incopt[2:]
         include_dirs.append(incdir)
-if len(include_dirs) < 1:
-    include_dirs = ['/usr/local/include']
 
 extra_compile_args = []
 sources = ['kyotocabinet.cc']
 
 library_dirs = []
 libraries = []
-mylibopts = getcmdout(['kcutilmgr', 'conf', '-l']).split()
+mylibopts = getcmdout(['pkg-config', '--libs', 'kyotocabinet']).split()
 for libopt in mylibopts:
     if libopt.startswith('-L'):
         libdir = libopt[2:]
@@ -39,8 +37,6 @@ for libopt in mylibopts:
     elif libopt.startswith('-l'):
         libname = libopt[2:]
         libraries.append(libname)
-if len(library_dirs) < 1:
-    library_dirs = ['/usr/local/lib']
 if len(libraries) < 1:
     if (os.uname()[0] == "Darwin"):
         libraries = ['kyotocabinet', 'z', 'stdc++', 'pthread', 'm', 'c']