>Number: 50318
>Category: ports
>Synopsis: New port: Python shared library.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 26 10:40:13 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Mike Meyer
>Release: FreeBSD 4.8-PRERELEASE i386
>Organization:
Meyer Consulting
>Environment:
System: FreeBSD guru.mired.org 4.8-PRERELEASE FreeBSD 4.8-PRERELEASE #18: Mon Feb 24 12:02:57 CST 2003 mwm@guru.mired.org:/sharetmp/obj/usr/src/sys/GURU i386
>Description:
This port builds and installs the python interpreter as a shared
library for use by other ports that want to embed python. Most
notably, the py-postgresql-plpython port that should be
submitted soon needs this.
>How-To-Repeat:
Note that there is no
${LOCALBASE}/lib/${PYTHON_VERSION}/config/lib*.so file.
>Fix:
Here's the port
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# py-shared-library
# py-shared-library/pkg-plist
# py-shared-library/pkg-descr
# py-shared-library/distinfo
# py-shared-library/Makefile
#
echo c - py-shared-library
mkdir -p py-shared-library > /dev/null 2>&1
echo x - py-shared-library/pkg-plist
sed 's/^X//' >py-shared-library/pkg-plist << 'END-of-py-shared-library/pkg-plist'
Xlib/lib%%PYTHON_VERSION%%.so.1
Xlib/lib%%PYTHON_VERSION%%.so
X%%PYTHON_LIBDIR%%/config/lib%%PYTHON_VERSION%%.so
END-of-py-shared-library/pkg-plist
echo x - py-shared-library/pkg-descr
sed 's/^X//' >py-shared-library/pkg-descr << 'END-of-py-shared-library/pkg-descr'
XThis port repackages the python static library into a shared library that can be
Xused by ports that build embedded python systems.
X
END-of-py-shared-library/pkg-descr
echo x - py-shared-library/distinfo
sed 's/^X//' >py-shared-library/distinfo << 'END-of-py-shared-library/distinfo'
X
END-of-py-shared-library/distinfo
echo x - py-shared-library/Makefile
sed 's/^X//' >py-shared-library/Makefile << 'END-of-py-shared-library/Makefile'
X# New ports collection makefile for: Python shared library
X# Date created: 25 Mar 2003
X# Whom: Mike Meyer <mwm@mired.org>
X#
X# $FreeBSD: $
X#
X
XPORTNAME= shared-library
XPORTVERSION= ${PYTHON_PORTVERSION}
XCATEGORIES= devel python
XPKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
XDISTFILES=
X
XMAINTAINER= mwm@mired.org
XCOMMENT= The Python library as a shared library
X
XUSE_PYTHON= yes
XINSTALLS_SHLIB= yes
XNO_WRKSUBDIR= yes
X
XPYTHON_STATIC= ${PYTHON_LIBDIR}/config/lib${PYTHON_VERSION}.a
XPYTHON_SHARED= ${PREFIX}/lib/lib${PYTHON_VERSION}.so
X
Xdo-build:
X @ cd ${WRKDIR}; ar x ${PYTHON_STATIC}; ld -shared -o libpython.so *.o
X
Xdo-install:
X ${INSTALL_DATA} ${WRKDIR}/libpython.so ${PYTHON_SHARED}.1
X ${LN} -fs ${PYTHON_SHARED}.1 ${PYTHON_LIBDIR}/config/lib${PYTHON_VERSION}.so
X ${LN} -fs ${PYTHON_SHARED}.1 ${PYTHON_SHARED}
X
X.include <bsd.port.mk>
END-of-py-shared-library/Makefile
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message