- Suport PEP 3149 -- ABI version tagged .so files

This fixes building with UCS4 or PYMALLOC turned off.
This commit is contained in:
Li-Wen Hsu 2011-02-27 15:39:49 +00:00
parent 65c6970d70
commit 2c49e3321b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=269915
2 changed files with 120 additions and 114 deletions

View file

@ -31,9 +31,12 @@ USE_PYTHON= yes
PYTHON_VERSION= python3.2
PYTHON_NO_DEPENDS= yes
PYABIVER= # default empty, for after appending
SHARED_WRKSRC= ${PYTHON_WRKSRC}/portbld.shared
PLIST_SUB= PYVER=${PYTHON_VERSION:S/python//} \
PYVER_WITHPAT=${PORTVERSION:S/.rc/rc/}
PYVER_WITHPAT=${PORTVERSION:S/.rc/rc/} \
PYABIVER=${PYABIVER}
EXAMPLESDIR= ${PREFIX}/share/examples/${PYTHON_VERSION}
DATADIR= ${PREFIX}/share/${PYTHON_VERSION}
@ -83,10 +86,13 @@ CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
.if !defined(WITHOUT_UCS4) && !defined(WITH_UCS2)
CONFIGURE_ARGS+= --with-wide-unicode
PYABIVER:= ${PYABIVER}u
.endif
.if defined(WITHOUT_PYMALLOC)
CONFIGURE_ARGS+= --without-pymalloc
.else
PYABIVER:= m${PYABIVER}
.endif
.if ${ARCH} == sparc64
@ -153,8 +159,8 @@ post-configure:
pre-build:
cd ${SHARED_WRKSRC}; \
${SETENV} ${MAKE_ENV} ${MAKE} lib${PYTHON_VERSION}mu.so python; \
${LN} -f lib${PYTHON_VERSION}mu.so lib${PYTHON_VERSION}mu.so.1; \
${SETENV} ${MAKE_ENV} ${MAKE} lib${PYTHON_VERSION}${PYABIVER}.so python; \
${LN} -f lib${PYTHON_VERSION}${PYABIVER}.so lib${PYTHON_VERSION}${PYABIVER}.so.1; \
${LN} -f python ${PYTHON_VERSION:S/thon/thon-shared/}
pre-su-install:
@ -172,11 +178,11 @@ post-install:
${INSTALL_SCRIPT} ${WRKDIR}/${PYTHON_VERSION:S/thon/thon-shared/}-config ${PREFIX}/bin
@# shared version of executable and library
${INSTALL_PROGRAM} ${SHARED_WRKSRC}/lib${PYTHON_VERSION}mu.so.1 \
${INSTALL_PROGRAM} ${SHARED_WRKSRC}/lib${PYTHON_VERSION}${PYABIVER}.so.1 \
${PREFIX}/lib
cd ${PREFIX}/lib; ${LN} -sf lib${PYTHON_VERSION}mu.so.1 \
cd ${PREFIX}/lib; ${LN} -sf lib${PYTHON_VERSION}${PYABIVER}.so.1 \
lib${PYTHON_VERSION}.so
${LN} -sf ${PREFIX}/lib/lib${PYTHON_VERSION}mu.so ${PYTHONPREFIX_LIBDIR}/config
${LN} -sf ${PREFIX}/lib/lib${PYTHON_VERSION}${PYABIVER}.so ${PYTHONPREFIX_LIBDIR}/config
${INSTALL_PROGRAM} \
${SHARED_WRKSRC}/${PYTHON_VERSION:S/thon/thon-shared/} \
${PREFIX}/bin

View file

@ -12,104 +12,104 @@ bin/python%%PYVER%%-config
bin/python-shared%%PYVER%%
%%IF_DEFAULT%%bin/python-shared-config
bin/python-shared%%PYVER%%-config
bin/python%%PYVER%%mu
bin/python%%PYVER%%mu-config
lib/lib%%PYTHON_VERSION%%mu.a
bin/python%%PYVER%%%%PYABIVER%%
bin/python%%PYVER%%%%PYABIVER%%-config
lib/lib%%PYTHON_VERSION%%%%PYABIVER%%.a
lib/lib%%PYTHON_VERSION%%.so
lib/lib%%PYTHON_VERSION%%mu.so.1
lib/lib%%PYTHON_VERSION%%%%PYABIVER%%.so.1
libdata/pkgconfig/python-3.2.pc
%%PYTHON_INCLUDEDIR%%mu/Python-ast.h
%%PYTHON_INCLUDEDIR%%mu/Python.h
%%PYTHON_INCLUDEDIR%%mu/abstract.h
%%PYTHON_INCLUDEDIR%%mu/asdl.h
%%PYTHON_INCLUDEDIR%%mu/ast.h
%%PYTHON_INCLUDEDIR%%mu/bitset.h
%%PYTHON_INCLUDEDIR%%mu/bltinmodule.h
%%PYTHON_INCLUDEDIR%%mu/boolobject.h
%%PYTHON_INCLUDEDIR%%mu/bytearrayobject.h
%%PYTHON_INCLUDEDIR%%mu/bytes_methods.h
%%PYTHON_INCLUDEDIR%%mu/bytesobject.h
%%PYTHON_INCLUDEDIR%%mu/cellobject.h
%%PYTHON_INCLUDEDIR%%mu/ceval.h
%%PYTHON_INCLUDEDIR%%mu/classobject.h
%%PYTHON_INCLUDEDIR%%mu/code.h
%%PYTHON_INCLUDEDIR%%mu/codecs.h
%%PYTHON_INCLUDEDIR%%mu/compile.h
%%PYTHON_INCLUDEDIR%%mu/complexobject.h
%%PYTHON_INCLUDEDIR%%mu/datetime.h
%%PYTHON_INCLUDEDIR%%mu/descrobject.h
%%PYTHON_INCLUDEDIR%%mu/dictobject.h
%%PYTHON_INCLUDEDIR%%mu/dtoa.h
%%PYTHON_INCLUDEDIR%%mu/dynamic_annotations.h
%%PYTHON_INCLUDEDIR%%mu/enumobject.h
%%PYTHON_INCLUDEDIR%%mu/errcode.h
%%PYTHON_INCLUDEDIR%%mu/eval.h
%%PYTHON_INCLUDEDIR%%mu/fileobject.h
%%PYTHON_INCLUDEDIR%%mu/fileutils.h
%%PYTHON_INCLUDEDIR%%mu/floatobject.h
%%PYTHON_INCLUDEDIR%%mu/frameobject.h
%%PYTHON_INCLUDEDIR%%mu/funcobject.h
%%PYTHON_INCLUDEDIR%%mu/genobject.h
%%PYTHON_INCLUDEDIR%%mu/graminit.h
%%PYTHON_INCLUDEDIR%%mu/grammar.h
%%PYTHON_INCLUDEDIR%%mu/import.h
%%PYTHON_INCLUDEDIR%%mu/intrcheck.h
%%PYTHON_INCLUDEDIR%%mu/iterobject.h
%%PYTHON_INCLUDEDIR%%mu/listobject.h
%%PYTHON_INCLUDEDIR%%mu/longintrepr.h
%%PYTHON_INCLUDEDIR%%mu/longobject.h
%%PYTHON_INCLUDEDIR%%mu/marshal.h
%%PYTHON_INCLUDEDIR%%mu/memoryobject.h
%%PYTHON_INCLUDEDIR%%mu/metagrammar.h
%%PYTHON_INCLUDEDIR%%mu/methodobject.h
%%PYTHON_INCLUDEDIR%%mu/modsupport.h
%%PYTHON_INCLUDEDIR%%mu/moduleobject.h
%%PYTHON_INCLUDEDIR%%mu/node.h
%%PYTHON_INCLUDEDIR%%mu/object.h
%%PYTHON_INCLUDEDIR%%mu/objimpl.h
%%PYTHON_INCLUDEDIR%%mu/opcode.h
%%PYTHON_INCLUDEDIR%%mu/osdefs.h
%%PYTHON_INCLUDEDIR%%mu/parsetok.h
%%PYTHON_INCLUDEDIR%%mu/patchlevel.h
%%PYTHON_INCLUDEDIR%%mu/pgen.h
%%PYTHON_INCLUDEDIR%%mu/pgenheaders.h
%%PYTHON_INCLUDEDIR%%mu/py_curses.h
%%PYTHON_INCLUDEDIR%%mu/pyarena.h
%%PYTHON_INCLUDEDIR%%mu/pyatomic.h
%%PYTHON_INCLUDEDIR%%mu/pycapsule.h
%%PYTHON_INCLUDEDIR%%mu/pyconfig.h
%%PYTHON_INCLUDEDIR%%mu/pyctype.h
%%PYTHON_INCLUDEDIR%%mu/pydebug.h
%%PYTHON_INCLUDEDIR%%mu/pyerrors.h
%%PYTHON_INCLUDEDIR%%mu/pyexpat.h
%%PYTHON_INCLUDEDIR%%mu/pyfpe.h
%%PYTHON_INCLUDEDIR%%mu/pygetopt.h
%%PYTHON_INCLUDEDIR%%mu/pymacconfig.h
%%PYTHON_INCLUDEDIR%%mu/pymath.h
%%PYTHON_INCLUDEDIR%%mu/pymem.h
%%PYTHON_INCLUDEDIR%%mu/pyport.h
%%PYTHON_INCLUDEDIR%%mu/pystate.h
%%PYTHON_INCLUDEDIR%%mu/pystrcmp.h
%%PYTHON_INCLUDEDIR%%mu/pystrtod.h
%%PYTHON_INCLUDEDIR%%mu/pythonrun.h
%%PYTHON_INCLUDEDIR%%mu/pythread.h
%%PYTHON_INCLUDEDIR%%mu/pytime.h
%%PYTHON_INCLUDEDIR%%mu/rangeobject.h
%%PYTHON_INCLUDEDIR%%mu/setobject.h
%%PYTHON_INCLUDEDIR%%mu/sliceobject.h
%%PYTHON_INCLUDEDIR%%mu/structmember.h
%%PYTHON_INCLUDEDIR%%mu/structseq.h
%%PYTHON_INCLUDEDIR%%mu/symtable.h
%%PYTHON_INCLUDEDIR%%mu/sysmodule.h
%%PYTHON_INCLUDEDIR%%mu/timefuncs.h
%%PYTHON_INCLUDEDIR%%mu/token.h
%%PYTHON_INCLUDEDIR%%mu/traceback.h
%%PYTHON_INCLUDEDIR%%mu/tupleobject.h
%%PYTHON_INCLUDEDIR%%mu/typeslots.h
%%PYTHON_INCLUDEDIR%%mu/ucnhash.h
%%PYTHON_INCLUDEDIR%%mu/unicodeobject.h
%%PYTHON_INCLUDEDIR%%mu/warnings.h
%%PYTHON_INCLUDEDIR%%mu/weakrefobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/Python-ast.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/Python.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/abstract.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/asdl.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/ast.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/bitset.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/bltinmodule.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/boolobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/bytearrayobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/bytes_methods.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/bytesobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/cellobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/ceval.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/classobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/code.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/codecs.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/compile.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/complexobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/datetime.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/descrobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/dictobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/dtoa.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/dynamic_annotations.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/enumobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/errcode.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/eval.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/fileobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/fileutils.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/floatobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/frameobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/funcobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/genobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/graminit.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/grammar.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/import.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/intrcheck.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/iterobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/listobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/longintrepr.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/longobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/marshal.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/memoryobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/metagrammar.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/methodobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/modsupport.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/moduleobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/node.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/object.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/objimpl.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/opcode.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/osdefs.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/parsetok.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/patchlevel.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pgen.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pgenheaders.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/py_curses.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pyarena.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pyatomic.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pycapsule.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pyconfig.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pyctype.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pydebug.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pyerrors.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pyexpat.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pyfpe.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pygetopt.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pymacconfig.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pymath.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pymem.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pyport.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pystate.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pystrcmp.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pystrtod.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pythonrun.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pythread.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/pytime.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/rangeobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/setobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/sliceobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/structmember.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/structseq.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/symtable.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/sysmodule.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/timefuncs.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/token.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/traceback.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/tupleobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/typeslots.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/ucnhash.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/unicodeobject.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/warnings.h
%%PYTHON_INCLUDEDIR%%%%PYABIVER%%/weakrefobject.h
%%PYTHON_LIBDIR%%/LICENSE.txt
%%PYTHON_LIBDIR%%/__future__.py
%%PYTHON_LIBDIR%%/__phello__.foo.py
@ -462,16 +462,16 @@ libdata/pkgconfig/python-3.2.pc
%%PYTHON_LIBDIR%%/concurrent/futures/process.py
%%PYTHON_LIBDIR%%/concurrent/futures/thread.py
%%PYTHON_LIBDIR%%/config
%%PYTHON_LIBDIR%%/config-%%PYVER%%mu/Makefile
%%PYTHON_LIBDIR%%/config-%%PYVER%%mu/Setup
%%PYTHON_LIBDIR%%/config-%%PYVER%%mu/Setup.config
%%PYTHON_LIBDIR%%/config-%%PYVER%%mu/Setup.local
%%PYTHON_LIBDIR%%/config-%%PYVER%%mu/config.c
%%PYTHON_LIBDIR%%/config-%%PYVER%%mu/config.c.in
%%PYTHON_LIBDIR%%/config-%%PYVER%%mu/install-sh
%%PYTHON_LIBDIR%%/config-%%PYVER%%mu/lib%%PYTHON_VERSION%%mu.a
%%PYTHON_LIBDIR%%/config-%%PYVER%%mu/makesetup
%%PYTHON_LIBDIR%%/config-%%PYVER%%mu/python.o
%%PYTHON_LIBDIR%%/config-%%PYVER%%%%PYABIVER%%/Makefile
%%PYTHON_LIBDIR%%/config-%%PYVER%%%%PYABIVER%%/Setup
%%PYTHON_LIBDIR%%/config-%%PYVER%%%%PYABIVER%%/Setup.config
%%PYTHON_LIBDIR%%/config-%%PYVER%%%%PYABIVER%%/Setup.local
%%PYTHON_LIBDIR%%/config-%%PYVER%%%%PYABIVER%%/config.c
%%PYTHON_LIBDIR%%/config-%%PYVER%%%%PYABIVER%%/config.c.in
%%PYTHON_LIBDIR%%/config-%%PYVER%%%%PYABIVER%%/install-sh
%%PYTHON_LIBDIR%%/config-%%PYVER%%%%PYABIVER%%/lib%%PYTHON_VERSION%%%%PYABIVER%%.a
%%PYTHON_LIBDIR%%/config-%%PYVER%%%%PYABIVER%%/makesetup
%%PYTHON_LIBDIR%%/config-%%PYVER%%%%PYABIVER%%/python.o
%%PYTHON_LIBDIR%%/configparser.py
%%PYTHON_LIBDIR%%/contextlib.py
%%PYTHON_LIBDIR%%/copy.py
@ -4199,7 +4199,7 @@ libdata/pkgconfig/python-3.2.pc
@dirrm %%PYTHON_LIBDIR%%/concurrent/futures/__pycache__
@dirrm %%PYTHON_LIBDIR%%/concurrent/futures
@dirrm %%PYTHON_LIBDIR%%/concurrent
@dirrm %%PYTHON_LIBDIR%%/config-3.2mu
@dirrm %%PYTHON_LIBDIR%%/config-3.2%%PYABIVER%%
@dirrm %%PYTHON_LIBDIR%%/ctypes/__pycache__
@dirrm %%PYTHON_LIBDIR%%/ctypes/macholib/__pycache__
@dirrm %%PYTHON_LIBDIR%%/ctypes/macholib
@ -4328,7 +4328,7 @@ libdata/pkgconfig/python-3.2.pc
@dirrm %%PYTHON_LIBDIR%%/xmlrpc/__pycache__
@dirrm %%PYTHON_LIBDIR%%/xmlrpc
@dirrm %%PYTHON_LIBDIR%%
@dirrm %%PYTHON_INCLUDEDIR%%mu
@dirrm %%PYTHON_INCLUDEDIR%%%%PYABIVER%%
%%PORTDATA%%%%DATADIR%%/Tools/README
%%PORTDATA%%%%DATADIR%%/Tools/buildbot/README.tcltk-AMD64
%%PORTDATA%%%%DATADIR%%/Tools/buildbot/build-amd64.bat