1 |
commit: bb4c0a9279c138aecd51766a8ac993f100f78fc4 |
2 |
Author: Mike Auty <mike.auty <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Jan 14 03:17:24 2011 +0000 |
4 |
Commit: Mike Auty <ikelos <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 14 03:17:24 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/ikelos.git;a=commit;h=bb4c0a9279c138aecd51766a8ac993f100f78fc4 |
7 |
|
8 |
Add in libbls live ebuild with proper python bindings. |
9 |
|
10 |
--- |
11 |
dev-util/libbls/Manifest | 5 +- |
12 |
.../libbls/files/libbls-9999-python-fixes.patch | 74 ++++++++++++++++++++ |
13 |
dev-util/libbls/libbls-0.3.0.ebuild | 25 ------- |
14 |
dev-util/libbls/libbls-9999.ebuild | 22 ++++-- |
15 |
4 files changed, 90 insertions(+), 36 deletions(-) |
16 |
|
17 |
diff --git a/dev-util/libbls/Manifest b/dev-util/libbls/Manifest |
18 |
index 3f0a311..6abb300 100644 |
19 |
--- a/dev-util/libbls/Manifest |
20 |
+++ b/dev-util/libbls/Manifest |
21 |
@@ -1,3 +1,2 @@ |
22 |
-DIST libbls-0.3.0.tar.gz 102304 RMD160 c6ef188d0f1e7bef95f4fdca18a07eec4d663a7e SHA1 285c479257c260487dca460efc25adfbdea34b34 SHA256 90ec2c5ab826c47e8dce0e8809ea9dc7cce288c50778db6a2abf2326bbb62ed2 |
23 |
-EBUILD libbls-0.3.0.ebuild 534 RMD160 e9e56108f3c0aa9521cbe72ea8b96ac8df62de24 SHA1 370f9e17284e0ff1ba57f4f8aad380a448a91fa1 SHA256 ace5c8369d294fdcc9fd4cef857e8f2a3f4547ee4cda3c3f54a0d0dc265a3f78 |
24 |
-EBUILD libbls-9999.ebuild 539 RMD160 5a72997484818c0dfb82296870cdc26f2f47e49a SHA1 1b3005aed09351a2b5938e29db38c3c7ce85fd6c SHA256 b80c3877a8391bb78aeb1b9d15fb94556515f0d6fa630c7cab4c7de89b475e34 |
25 |
+AUX libbls-9999-python-fixes.patch 2860 RMD160 9e524a76d12eb89bd14f5374b11fcf4f156c691a SHA1 8aa7026a9a080571339d36578feac1533097aab3 SHA256 e9665409ee3edee2f3a1517ad99655683cdbcc6f5965587fc00641615a97b892 |
26 |
+EBUILD libbls-9999.ebuild 644 RMD160 4a5f674befe7b439905f737fdb7982fcac369939 SHA1 a9f846ec4619fa6e16ae20a7b90409bb6dd48dc4 SHA256 be4c8303bca89718175180962d74672f3d604996eb93dc3da29e5a8ddf4f8979 |
27 |
|
28 |
diff --git a/dev-util/libbls/files/libbls-9999-python-fixes.patch b/dev-util/libbls/files/libbls-9999-python-fixes.patch |
29 |
new file mode 100644 |
30 |
index 0000000..e3f46a7 |
31 |
--- /dev/null |
32 |
+++ b/dev-util/libbls/files/libbls-9999-python-fixes.patch |
33 |
@@ -0,0 +1,74 @@ |
34 |
+diff --git a/bindings/wscript_build b/bindings/wscript_build |
35 |
+index 36de9c9..1084c2b 100644 |
36 |
+--- a/bindings/wscript_build |
37 |
++++ b/bindings/wscript_build |
38 |
+@@ -4,24 +4,27 @@ import Build |
39 |
+ |
40 |
+ bld.use_the_magic() |
41 |
+ |
42 |
+-Task.simple_task_type('swig_python', '${SWIG} -o ${TGT} -python ${SRC}', before = 'cc') |
43 |
++Task.simple_task_type('swig_python', '${SWIG} -o ${TGT} -python ${SRC}', before = 'cc', ext_out = ['.c', '.py']) |
44 |
+ |
45 |
+ @TaskGen.extension('.i') |
46 |
+ def process_swig(self, node): |
47 |
+ cc_node = node.change_ext('.c') |
48 |
+- self.create_task('swig_python', node, cc_node) |
49 |
++ py_node = node.change_ext('.py') |
50 |
++ task = self.create_task('swig_python', node, cc_node) |
51 |
+ self.allnodes.append(cc_node) |
52 |
+- |
53 |
++ self.allnodes.append(py_node) |
54 |
++ |
55 |
+ if 'python' in bld.env.bindings: |
56 |
+ if 'SWIG' not in bld.env: |
57 |
+ raise Build.BuildError('Swig is needed to build python bindings') |
58 |
+ py_bindings = bld( |
59 |
+- features = ['cc', 'cshlib'], |
60 |
++ features = ['py', 'cc', 'cshlib'], |
61 |
+ source = 'libbls.i', |
62 |
+- includes = ['/usr/include/python2.6'], |
63 |
++ includes = bld.env.CPPPATH_PYEXT, |
64 |
+ uselib_local = 'bls-%s' % bld.env.LIBBLS_VERSION_NO_PATCH, |
65 |
+ target = '_libbls', |
66 |
+- env = bld.env_of_name('visibility-public').copy() |
67 |
++ env = bld.env_of_name('visibility-public').copy(), |
68 |
++ install_path = bld.env.PYTHONDIR |
69 |
+ ) |
70 |
+ py_bindings.env.shlib_PATTERN = py_bindings.env.shlib_PATTERN.replace('lib%s', '%s') |
71 |
+ |
72 |
+diff --git a/doc/user/wscript_build b/doc/user/wscript_build |
73 |
+index 17e733a..437ad3e 100644 |
74 |
+--- a/doc/user/wscript_build |
75 |
++++ b/doc/user/wscript_build |
76 |
+@@ -3,7 +3,7 @@ import Options |
77 |
+ user_doc = bld( |
78 |
+ target = 'user_guide.html', |
79 |
+ source = ['user_guide.txt', 'user_guide.css'], |
80 |
+- rule = 'rst2html --initial-header-level 2 --stylesheet-path ${SRC[1].abspath()} ${SRC[0].abspath()} > ${TGT}', |
81 |
++ rule = 'rst2html.py --initial-header-level 2 --stylesheet-path ${SRC[1].abspath()} ${SRC[0].abspath()} > ${TGT}', |
82 |
+ install_path = '${PREFIX}/share/doc/libbls-%s' % bld.env.LIBBLS_VERSION_NO_PATCH |
83 |
+ ) |
84 |
+ bld.install_files('${PREFIX}/share/doc/libbls-${LIBBLS_VERSION_NO_PATCH}', ['user_guide.txt', 'user_guide.css']) |
85 |
+diff --git a/wscript b/wscript |
86 |
+index 4369638..b496758 100644 |
87 |
+--- a/wscript |
88 |
++++ b/wscript |
89 |
+@@ -31,6 +31,7 @@ def set_options(opt): |
90 |
+ |
91 |
+ def configure(conf): |
92 |
+ conf.check_tool('compiler_cc') |
93 |
++ conf.check_tool('python') |
94 |
+ conf.check_tool('misc') |
95 |
+ |
96 |
+ # Check required headers |
97 |
+@@ -89,6 +90,10 @@ def configure(conf): |
98 |
+ (conf.env.LIBBLS_VERSION_MAJOR, conf.env.LIBBLS_VERSION_MINOR, conf.env.LIBBLS_VERSION_PATCH) = VERSION.split('.') |
99 |
+ conf.env.LIBBLS_VERSION_NO_PATCH = '%s.%s' % (conf.env.LIBBLS_VERSION_MAJOR, conf.env.LIBBLS_VERSION_MINOR) |
100 |
+ |
101 |
++ # Check for python |
102 |
++ conf.check_python_version((2,6,0)) |
103 |
++ conf.check_python_headers() |
104 |
++ |
105 |
+ # Create a environment with default (public) symbol visibility |
106 |
+ env = conf.env.copy() |
107 |
+ env.append_unique('CCFLAGS', '-fvisibility=default'.split()) |
108 |
|
109 |
diff --git a/dev-util/libbls/libbls-0.3.0.ebuild b/dev-util/libbls/libbls-0.3.0.ebuild |
110 |
deleted file mode 100644 |
111 |
index 9f91ed9..0000000 |
112 |
--- a/dev-util/libbls/libbls-0.3.0.ebuild |
113 |
+++ /dev/null |
114 |
@@ -1,25 +0,0 @@ |
115 |
-# Copyright 1999-2009 Gentoo Foundation |
116 |
-# Distributed under the terms of the GNU General Public License v2 |
117 |
-# $Header: $ |
118 |
- |
119 |
-DESCRIPTION="Highly efficient, flexible and robust data manipulation library." |
120 |
-HOMEPAGE="http://libbls.hellug.gr" |
121 |
-SRC_URI="http://libbls.hellug.gr/${P}.tar.gz" |
122 |
- |
123 |
-LICENSE="LGPL-3" |
124 |
-SLOT="0" |
125 |
-KEYWORDS="~x86 ~amd64" |
126 |
-IUSE="" |
127 |
- |
128 |
-DEPEND="dev-util/scons" |
129 |
-RDEPEND="" |
130 |
- |
131 |
-src_compile() { |
132 |
- cd ${S} |
133 |
- scons || die "Failed to compile" |
134 |
-} |
135 |
- |
136 |
-src_install() { |
137 |
- cd ${S} |
138 |
- scons prefix=/usr destdir="${D}" install || die "Failed to install" |
139 |
-} |
140 |
|
141 |
diff --git a/dev-util/libbls/libbls-9999.ebuild b/dev-util/libbls/libbls-9999.ebuild |
142 |
index 4a09f96..1251117 100644 |
143 |
--- a/dev-util/libbls/libbls-9999.ebuild |
144 |
+++ b/dev-util/libbls/libbls-9999.ebuild |
145 |
@@ -2,7 +2,9 @@ |
146 |
# Distributed under the terms of the GNU General Public License v2 |
147 |
# $Header: $ |
148 |
|
149 |
-inherit bzr |
150 |
+EAPI="3" |
151 |
+ |
152 |
+inherit eutils waf-utils bzr |
153 |
|
154 |
EBZR_REPO_URI="lp:libbls" |
155 |
|
156 |
@@ -15,15 +17,19 @@ SLOT="0" |
157 |
KEYWORDS="-x86 -amd64" |
158 |
IUSE="" |
159 |
|
160 |
-DEPEND="dev-util/scons" |
161 |
+DEPEND="dev-python/docutils" |
162 |
RDEPEND="" |
163 |
|
164 |
-src_compile() { |
165 |
- cd ${S} |
166 |
- scons || die "Failed to compile" |
167 |
+src_prepare() { |
168 |
+ epatch "${FILESDIR}/libbls-9999-python-fixes.patch" |
169 |
} |
170 |
|
171 |
-src_install() { |
172 |
- cd ${S} |
173 |
- scons prefix=/usr destdir="${D}" install || die "Failed to install" |
174 |
+src_configure() { |
175 |
+ # Dummy function to do nothing |
176 |
+ ${S}/waf configure --prefix="/usr" --bindings="python" |
177 |
} |
178 |
+ |
179 |
+#src_install() { |
180 |
+# waf-utils_src_install |
181 |
+# die |
182 |
+#} |