Skip to content
Permalink
Browse files

py*-qscintilla: make +universal.

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@117747 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
michaelld committed Mar 10, 2014
1 parent 8b1f4b0 commit 31355cb58a5af52ab6b83d24192394b6b82e52f5
Showing with 40 additions and 2 deletions.
  1. +13 −2 python/py-qscintilla/Portfile
  2. +27 −0 python/py-qscintilla/files/patch-Python-configure.py.diff
@@ -41,18 +41,29 @@ if {${name} ne ${subport}} {
# Can use either py*-pyqt4 or py*-pyqt4-devel.
depends_lib-append path:share/py${python.version}-sip/PyQt4:py${python.version}-pyqt4

universal_variant no
patchfiles-append patch-Python-configure.py.diff

use_configure yes

pre-configure {
foreach arch ${qt_arch_types} {
configure.args-append --use-arch=$arch
}
}

set python_ver_dot [join [split ${python.version} ""] "."]

configure.pre_args
configure.dir ${worksrcpath}/Python
configure.cmd ${python.bin} configure.py \
configure.cmd ${python.bin} configure.py
configure.args-append \
--sip=${prefix}/bin/sip-${python_ver_dot} \
--pyqt-sipdir=${prefix}/share/py${python.version}-sip/PyQt4 \
--apidir=${qt_data_dir}/qsci

# --disable-dependency-tracking is not recognized.
configure.universal_args-delete --disable-dependency-tracking

build.dir ${worksrcpath}/Python
build.cmd make
build.target
@@ -0,0 +1,27 @@
--- Python/configure.py.orig 2014-03-10 15:27:40.000000000 -0400
+++ Python/configure.py 2014-03-10 15:56:30.000000000 -0400
@@ -496,6 +496,13 @@
action='store_true',
help="suppress timestamps in the header comments of generated "
"code [default: include timestamps]")
+ if sys.platform == 'darwin':
+ g = optparse.OptionGroup(p, title="MacOS X Configuration")
+ g.add_option("--use-arch", action="append", metavar="ARCH",
+ dest="use_arch", choices=["x86", "x86_64", "ppc", "ppc64"],
+ help="the architecture to use when building Qscintilla "
+ "[default: system default]")
+ p.add_option_group(g)

return p

@@ -660,6 +667,10 @@
pro.write('TEMPLATE = lib\n')
pro.write('CONFIG += %s\n' % ('debug' if opts.debug else 'release'))
pro.write('CONFIG += %s\n' % ('staticlib' if opts.static else 'plugin'))
+ if sys.platform == 'darwin' and opts.use_arch is not None:
+ # convert opts.use_arch from a list to a string
+ use_arch = ' '.join(iter(opts.use_arch))
+ pro.write('CONFIG += %s\n' % use_arch)

pro.write('''
greaterThan(QT_MAJOR_VERSION, 4) {

0 comments on commit 31355cb

Please sign in to comment.
You can’t perform that action at this time.