make sure to have correct access to /usr/local, fixes build with clang

also use .beforesubst so regenerating patches is less of a pain
This commit is contained in:
espie 2017-05-13 18:26:03 +00:00
parent a891be2780
commit 2d2ae2280e
2 changed files with 9 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.59 2017/04/21 11:51:24 sthen Exp $
# $OpenBSD: Makefile,v 1.60 2017/05/13 18:26:03 espie Exp $
COMMENT = ebook management application
@ -80,7 +80,7 @@ MODPY_DISTUTILS_INSTALL = install --prefix=${LOCALBASE} \
# Remove bundled cherrypy so it uses the system version
pre-configure:
cd ${WRKSRC} && (rm -rf src/cherrypy ; \
find . -name '*.py' -print0 | xargs -0 perl -pi -e \
find . -name '*.py' -print0 | xargs -0 perl -pi.beforesubst -e \
's,#!/usr/bin/env python(2)?,#!${MODPY_BIN},' )
cd ${WRKSRC}/setup && ${SUBST_CMD} build.py build_environment.py
cp ${FILESDIR}/fake-xdg ${WRKDIR}/bin; chmod +x ${WRKDIR}/bin/fake-xdg

View File

@ -1,6 +1,7 @@
$OpenBSD: patch-setup_build_py,v 1.3 2017/03/28 10:57:51 sthen Exp $
--- setup/build.py.orig Sat Mar 18 04:19:33 2017
+++ setup/build.py Tue Mar 28 11:48:35 2017
$OpenBSD: patch-setup_build_py,v 1.4 2017/05/13 18:26:03 espie Exp $
Index: setup/build.py
--- setup/build.py.orig
+++ setup/build.py
@@ -36,13 +36,6 @@ class Extension(object):
self.cflags = d['cflags'] = kwargs.get('cflags', [])
self.ldflags = d['ldflags'] = kwargs.get('ldflags', [])
@ -15,11 +16,12 @@ $OpenBSD: patch-setup_build_py,v 1.3 2017/03/28 10:57:51 sthen Exp $
self.qt_private_headers = d['qt_private_headers'] = kwargs.get('qt_private', [])
@@ -156,6 +149,7 @@ def init_env():
@@ -156,6 +149,8 @@ def init_env():
cflags.append('-pthread')
ldflags.append('-shared')
cflags.append('-I'+sysconfig.get_python_inc())
+ ldflags.append('-L'+os.path.join(sysconfig.PREFIX))
+ cflags.append('-I'+os.path.join(sysconfig.PREFIX, 'include'))
+ ldflags.append('-L'+os.path.join(sysconfig.PREFIX, 'lib'))
ldflags.append('-lpython'+sysconfig.get_python_version())
if ishaiku: