aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openssl/Makefile19
-rw-r--r--pow/POW-0.7/setup.py45
2 files changed, 43 insertions, 21 deletions
diff --git a/openssl/Makefile b/openssl/Makefile
index 912b6e5f..425a7457 100644
--- a/openssl/Makefile
+++ b/openssl/Makefile
@@ -2,8 +2,23 @@
VERSION = SNAP-20090310
+# Kludge alert:
+#
+# The --prefix=`pwd` and LIBRPATH=`pwd` settings below are to force
+# OpenSSL's baroque configuration mechansim to build shared libraries
+# that will run out of the build tree. This is temporary. Once we
+# write "make install" code, we'll have to change that to point to the
+# directory where the OpenSSL shared libraries will be installed.
+#
+# I would have avoided shared libraries entirely if I could, but the
+# GNU linker isn't able to build POW (see ../pow/) from static
+# libraries on 64-bit hardware.
+#
+# "You are lost in a maze of twisty programs, all broken in different
+# ways"
+
all: openssl-${VERSION}/Makefile
- cd openssl-${VERSION}; ${MAKE} $@
+ cd openssl-${VERSION}; ${MAKE} $@ LIBRPATH=`pwd`
ln -sf openssl-${VERSION} openssl
clean:
@@ -11,7 +26,7 @@ clean:
cd tests; ${MAKE} $@
openssl-${VERSION}/Makefile: openssl-${VERSION}/config
- cd openssl-${VERSION}; PERL=/usr/bin/perl ./config enable-rfc3779 enable-cms no-dso
+ cd openssl-${VERSION}; PERL=/usr/bin/perl ./config enable-rfc3779 enable-cms no-dso enable-shared --prefix=`pwd`
openssl-${VERSION}/config: openssl-${VERSION}.tar.gz
gzip -c -d openssl-${VERSION}.tar.gz | tar -xf -
diff --git a/pow/POW-0.7/setup.py b/pow/POW-0.7/setup.py
index 3275b09f..21862805 100644
--- a/pow/POW-0.7/setup.py
+++ b/pow/POW-0.7/setup.py
@@ -13,26 +13,33 @@ oidinfo.dumpobjs('lib/_objects.py')
print 'writing oid module'
oidinfo.dumpoids('lib/_oids.py')
-library_dirs = [ "../../openssl/openssl" ]
-include_dirs = [ library_dirs[0] + "/include" ]
-libraries = [ "ssl", "crypto" ]
+# Setting -rpath to point to the OpenSSL build directory is temporary.
+# Once we figure out how and where to install this stuff, we'll need
+# to adjust this to point to the installation location. We wouldn't
+# be using shared libraries at all except for a GNU linker bug. Ick.
-setup(name='POW',
- version='0.7',
- description='Python OpenSSL Wrappers',
- author='Peter Shannon',
- author_email='peter_shannon@yahoo.com',
- license='BSD',
- url='http://www.sourceforge.net/projects/pow',
- packages=['POW'],
- package_dir={'POW':'lib'},
- ext_modules=[
- Extension('POW._POW',
- ['POW.c'],
- libraries=libraries,
- library_dirs=library_dirs,
- include_dirs=include_dirs)
- ])
+openssl_dir = os.path.realpath(os.path.join(os.getcwd(), "../../openssl/openssl"))
+
+library_dirs = [ openssl_dir ]
+include_dirs = [ openssl_dir + "/include" ]
+libraries = [ "ssl", "crypto" ]
+extra_link_args = [ "-Wl,-rpath", openssl_dir ]
+
+setup(name = 'POW',
+ version = '0.7',
+ description = 'Python OpenSSL Wrappers',
+ author = 'Peter Shannon',
+ author_email = 'peter_shannon@yahoo.com',
+ license = 'BSD',
+ url = 'http://www.sourceforge.net/projects/pow',
+ packages = ['POW'],
+ package_dir = {'POW':'lib'},
+ ext_modules = [ Extension('POW._POW',
+ ['POW.c'],
+ libraries = libraries,
+ library_dirs = library_dirs,
+ include_dirs = include_dirs,
+ extra_link_args = extra_link_args) ])
os.remove('lib/_objects.py')
os.remove('lib/_oids.py')