pkgsrc/security/mixminion/patches/patch-ab
joerg 601ef90e28 Make the setup.py hack a bit more likely to work:
/usr/pkg/include and /usr/include can appear in any order, PREFIX can be
!= /usr/pkg.

XXX Why this hack and not split + filter to remove the include pathes?
2006-01-27 17:13:56 +00:00

54 lines
1.7 KiB
Text

$NetBSD: patch-ab,v 1.2 2006/01/27 17:13:56 joerg Exp $
--- setup.py.orig 2004-05-10 19:36:22.000000000 +0200
+++ setup.py
@@ -492,6 +492,9 @@ if os.path.exists("/usr/kerberos/include
INCLUDE_DIRS.append("src")
+INCLUDE_DIRS.append('/usr/pkg/include')
+INCLUDE_DIRS.append('/usr/include')
+
EXTRA_CFLAGS = []
if sys.platform != 'win32':
EXTRA_CFLAGS += [ '-Wno-strict-prototypes' ]
@@ -534,6 +537,30 @@ elif sys.platform != 'win32':
else:
EXTRA = {}
+EXTRA = {'data_files':
+ [('man/man1', ['etc/mixminion.1']),
+ ('man/man5', ['etc/mixminionrc.5', 'etc/mixminiond.conf.5']),
+ ('man/man8', ['etc/mixminiond.8'])]}
+
+orig_opts = sysconfig.get_config_vars('OPT')
+if orig_opts == ['-DNDEBUG -O2 -I@PREFIX@/include -I/usr/include']:
+ sysconfig._config_vars['OPT'] = '-DNDEBUG -O2'
+elif orig_opts == ['-DNDEBUG -O2 -I/usr/include -I@PREFIX@/include']:
+ sysconfig._config_vars['OPT'] = '-DNDEBUG -O2'
+elif orig_opts == ['-DNDEBUG -O2 -I/usr/include']:
+ sysconfig._config_vars['OPT'] = '-DNDEBUG -O2'
+elif orig_opts == ['-O2 -I/usr/include']:
+ sysconfig._config_vars['OPT'] = '-O2'
+elif orig_opts == ['-DNDEBUG -g -O3 -Wall -Wstrict-prototypes']:
+ pass
+elif orig_opts == ['-g -O2 -Wall -Wstrict-prototypes']:
+ pass
+else:
+ # The package defines the Python packages it can rely upon.
+ # If we get here, this assumption is invalid.
+ print "Looks like the Python we are using has unexpected properties."
+ sys.exit(1)
+
setup(name='Mixminion',
version=VERSION,
license="LGPL",
@@ -550,6 +575,8 @@ setup(name='Mixminion',
**EXTRA
)
+sysconfig._config_vars['OPT'] = orig_opts
+
try:
for s in SCRIPTS:
os.unlink(s)