Fix compilation of the python module for rpm; and fix plist [1]

Add an OPTION to install this module

PR:		ports/149886 [1]
Submitted by:	Anders.F.Björklund
This commit is contained in:
Johan van Selst 2010-08-23 17:46:45 +00:00
parent c0588c64af
commit 8869fdeb3a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=259846
2 changed files with 17 additions and 4 deletions

View file

@ -6,7 +6,7 @@
PORTNAME= rpm
PORTVERSION= 4.8.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= archivers
MASTER_SITES= http://rpm.org/releases/rpm-${PORTVERSION:R}.x/ \
ftp://ftp.mirrorservice.org/sites/ftp.rpm.org/pub/rpm/dist/rpm-${PORTVERSION:E}.x/
@ -19,6 +19,8 @@ LIB_DEPENDS= popt.0:${PORTSDIR}/devel/popt \
lzma:${PORTSDIR}/archivers/xz
BUILD_DEPENDS= ${LOCALBASE}/bin/gsed:${PORTSDIR}/textproc/gsed
OPTIONS= PYTHON "Build Python rpm module" Off
USE_AUTOTOOLS= libtool:22
USE_BZIP2= yes
USE_GMAKE= yes
@ -34,14 +36,16 @@ CPPFLAGS+= -I${LOCALBASE}/include/nspr -I${LOCALBASE}/include/nss/nss \
LDFLAGS+= -L${LOCALBASE}/lib/nss -L${BDB_LIB_DIR} -L${LUA_LIBDIR}
CONFIGURE_ARGS+=--with-external-db
.include <bsd.port.options.mk>
.ifdef WITH_PYTHON
CONFIGURE_ARGS+=--with-python=auto
USE_PYTHON= yes
CONFIGURE_ARGS+=--enable-python
USE_PYTHON= 2.6+
PLIST_SUB+= PYTHON=""
CPPFLAGS+= -I${PYTHON_INCLUDEDIR}
LDFLAGS+= -L${PYTHON_LIBDIR}
.else
CONFIGURE_ARGS+=--without-python
CONFIGURE_ARGS+=--disable-python
PLIST_SUB+= PYTHON="@comment "
.endif

View file

@ -123,6 +123,14 @@ lib/rpm/tgpg
%%NLS%%share/locale/sv/LC_MESSAGES/rpm.mo
%%NLS%%share/locale/tr/LC_MESSAGES/rpm.mo
%%NLS%%share/locale/zh_TW/LC_MESSAGES/rpm.mo
%%PYTHON%%%%PYTHON_SITELIBDIR%%/rpm/__init__.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/rpm/_rpmmodule.a
%%PYTHON%%%%PYTHON_SITELIBDIR%%/rpm/_rpmmodule.la
%%PYTHON%%%%PYTHON_SITELIBDIR%%/rpm/_rpmmodule.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/rpm/_rpmbmodule.a
%%PYTHON%%%%PYTHON_SITELIBDIR%%/rpm/_rpmbmodule.la
%%PYTHON%%%%PYTHON_SITELIBDIR%%/rpm/_rpmbmodule.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/rpm/transaction.py
libdata/pkgconfig/rpm.pc
@dirrm lib/rpm
@dirrm include/rpm
@ -151,3 +159,4 @@ libdata/pkgconfig/rpm.pc
@dirrmtry src
%%NLS%%@dirrmtry share/locale/sr@latin/LC_MESSAGES
%%NLS%%@dirrmtry share/locale/sr@latin
%%PYTHON%%@dirrm %%PYTHON_SITELIBDIR%%/rpm