Skip to content

Commit dfe7a29

Browse files
author
Arnon Yaari
committed
HPT-2159 fix for SUSE on ppc64 and ppc64le
1 parent bc289bb commit dfe7a29

3 files changed

Lines changed: 61 additions & 3 deletions

File tree

buildout-build-suse-ppc64.cfg

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[buildout]
2+
extends = buildout-build.cfg
3+
4+
[environment]
5+
CC = gcc -static-libgcc -fPIC
6+
LDFLAGS = -L${options:prefix}/lib64 -Wl,-rpath,\$$ORIGIN,-rpath,\$$ORIGIN/../lib64,-rpath-link,\$$ORIGIN,-rpath-link,\$$ORIGIN/../lib64
7+
SHARED_LDFLAGS = -L${options:prefix}/lib64 -Wl,-rpath,-rpath,\$$ORIGIN,\$$ORIGIN/../lib64,-rpath-link,\$$ORIGIN,-rpath-link,\$$ORIGIN/../lib64
8+
LIBPATH = -L${options:prefix}/lib64
9+
DYLD_LIBRARY_PATH = ${options:prefix}/lib64
10+
LD_LIBRARY_PATH = ${:DYLD_LIBRARY_PATH}
11+
12+
[openssl]
13+
configure-command = ./Configure
14+
configure-options = linux-ppc64 --prefix=${:prefix} --shared --libdir=lib64
15+
16+
[libgcrypt]
17+
configure-options = ${options:configure-options} --with-gpg-error-prefix=${:prefix} --enable-static --libdir=${options:prefix}/lib64
18+
19+
[readline]
20+
configure-options = --prefix=${options:prefix} --libdir=${options:prefix}/lib64
21+
22+
[cyrus-sasl]
23+
configure-options = --prefix=${options:prefix} --without-saslauthd --without-authdaemond --disable-java --disable-dependency-tracking --disable-rpath --disable-java --without-gdbm --without-dblib --disable-macos-framework --enable-static --libdir=${options:prefix}/lib64 --build=ppc
24+
patches = ${:patches-dir}/${:name}-${:version}-configure.patch
25+
${:patches-dir}/${:name}-${:version}-ltconfig.patch
26+
${:patches-dir}/${:name}-${:version}-digestmd5.patch
27+
${:patches-dir}/${:name}-${:version}-redhat-lib64.patch
28+
29+
[python]
30+
configure-options = --prefix=${options:prefix} --enable-shared --enable-ipv6 --with-dbmliborder=gdbm --with-gcc --with-system-ffi --libdir=${options:prefix}/lib64
31+
patches = ${:patches-dir}/${:name}-${:version}-sysconfig.py.patch
32+
${:patches-dir}/${:name}-${:version}-disutils-sysconfig.py.patch
33+
${:patches-dir}/${:name}-${:version}-pythonhome-pythonrun.c.patch
34+
${:patches-dir}/${:name}-${:version}-redhat-lib64.patch
35+
${:patches-dir}/${:name}-${:version}-linux-symlink.patch
36+
37+
[python-environment]
38+
CFLAGS = ${environment:CFLAGS} -I${options:prefix}/include/gnutls -I${options:prefix}/include/graphviz -I${options:prefix}/include/libexslt -I${options:prefix}/include/libxml2 -I${options:prefix}/include/libxslt -I${options:prefix}/include/ncurses -I${options:prefix}/include/openssl -I${options:prefix}/include/readline -I${options:prefix}/include/sasl -I${options:prefix}/lib64/libffi-${libffi:version}/include
39+
LDFLAGS = ${environment:LDFLAGS} -Wl,-rpath,\$$ORIGIN/../.. -L${options:prefix}/lib64/engines -L${options:prefix}/lib64/gettext -L${options:prefix}/lib64/graphviz -L${options:prefix}/lib64/libxslt-plugins -L${options:prefix}/lib64/pkgconfig -L${options:prefix}/lib64/python2.7 -L${options:prefix}/lib64/sasl2

buildout-build-suse-ppc64le.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[buildout]
2+
extends = buildout-build-suse-ppc64.cfg buildout-build-redhat-ppc64le.cfg
3+
4+
[openssl]
5+
# we extend from redhat-ppc64le where --openssldir is set - we don't need that here
6+
configure-options = linux-ppc64le --prefix=${:prefix} --shared --libdir=lib64
7+
8+
[readline]
9+
# openssl will fail with "version READLINE_6.3 not defined in file libreadline.so.6"
10+
# if we're not using 6.3 (default in buildout-build.cfg is 6.2)
11+
version = 6.3
12+
configure-options = ppc64le-linux-gnu --prefix=${options:prefix} --libdir=${options:prefix}/lib64

src/scripts/__init__.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test():
2121
def execte_buildout(buildout_file, env=None):
2222
import sys
2323
argv = ' '.join(sys.argv[1:])
24-
command = "./bin/buildout -c {} {}".format(buildout_file, argv)
24+
command = "./bin/buildout -c {0} {1}".format(buildout_file, argv)
2525
print 'executing "%s"' % command
2626
process = Popen(command.split(), env=env)
2727
stdout, stderr = process.communicate()
@@ -59,8 +59,15 @@ def build():
5959
buildout_file = 'buildout-build-redhat-4-32bit.cfg'
6060
else:
6161
buildout_file = 'buildout-build-redhat-32bit.cfg'
62-
if dist_name in ['suse'] and version in ['10']:
63-
buildout_file = 'buildout-build-suse-10.cfg'
62+
if dist_name in ['suse']:
63+
if version in ['10']:
64+
buildout_file = 'buildout-build-suse-10.cfg'
65+
else:
66+
arch = execute_assert_success(["uname", "-i"]).get_stdout().lower()
67+
if 'ppc64le' in arch:
68+
buildout_file = 'buildout-build-suse-ppc64le.cfg'
69+
elif 'ppc64' in arch:
70+
buildout_file = 'buildout-build-suse-ppc64.cfg'
6471
elif system() == 'Darwin':
6572
from platform import mac_ver
6673
environ["MACOSX_DEPLOYMENT_TARGET"] = '.'.join(mac_ver()[0].split('.', 2)[:2])

0 commit comments

Comments
 (0)