aboutsummaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2010-09-23 10:48:04 +0000
committerPav Lucistnik <pav@FreeBSD.org>2010-09-23 10:48:04 +0000
commit13b18226f707c910aede9745b1d4584ae29f2eb7 (patch)
tree283256368fa5b64668aeb1f1694ae8e68304b719 /archivers
parentc577403b72c4c409fe6c585bae463fa33d65ec0b (diff)
downloadports-13b18226f707c910aede9745b1d4584ae29f2eb7.tar.gz
ports-13b18226f707c910aede9745b1d4584ae29f2eb7.zip
- Fix build on 6.X
- Fix build with python 2.5+ Submitted by: Anders F Bjorklund <afb@rpm5.org> (maintainer)
Notes
Notes: svn path=/head/; revision=261694
Diffstat (limited to 'archivers')
-rw-r--r--archivers/rpm5/Makefile11
-rw-r--r--archivers/rpm5/files/patch-configure.ac32
2 files changed, 42 insertions, 1 deletions
diff --git a/archivers/rpm5/Makefile b/archivers/rpm5/Makefile
index ac970351548a..c39f24112970 100644
--- a/archivers/rpm5/Makefile
+++ b/archivers/rpm5/Makefile
@@ -59,6 +59,7 @@ CONFIGURE_ARGS+=--without-lua
.if defined(WITH_PERL)
CONFIGURE_ARGS+=--with-perl
+CONFIGURE_ENV+=__PERL=${PERL}
USE_PERL5= yes
PLIST_SUB+= PERL=""
.else
@@ -67,7 +68,8 @@ PLIST_SUB+= PERL="@comment "
.endif
.if defined(WITH_PYTHON)
-CONFIGURE_ARGS+=--with-python
+CONFIGURE_ARGS+=--with-python=${PYTHON_VER}
+CONFIGURE_ENV+=__PYTHON=${PYTHON_CMD}
USE_PYTHON= yes
PLIST_SUB+= PYTHON=""
CPPFLAGS+= -I${PYTHON_INCLUDEDIR}
@@ -139,6 +141,13 @@ post-configure:
${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile
.endif
+.if ${OSVERSION} < 700000
+# on FreeBSD 6.x, <sys/mount.h> first requires <sys/param.h> (for NGROUPS)
+post-configure::
+ @${REINPLACE_CMD} -e "s:/\* #undef HAVE_SYS_MOUNT_H \*/:#define HAVE_SYS_MOUNT_H 1:" \
+ ${WRKSRC}/config.h
+.endif
+
post-build:
.if !defined(NOPORTDOCS)
${MAKE} -C ${WRKSRC} apidocs
diff --git a/archivers/rpm5/files/patch-configure.ac b/archivers/rpm5/files/patch-configure.ac
new file mode 100644
index 000000000000..78bad2bafa1f
--- /dev/null
+++ b/archivers/rpm5/files/patch-configure.ac
@@ -0,0 +1,32 @@
+--- configure.ac.orig 2010-09-22 23:22:07.000000000 +0200
++++ configure.ac 2010-09-22 23:41:59.000000000 +0200
+@@ -809,14 +809,14 @@
+ AC_ARG_WITH(python, AS_HELP_STRING([--with-python], [build with RPM Python language bindings]), [
+ if test ".$withval" != .no; then
+ case "$withval" in
+- 2.x|2.3|2.4|2.5)
++ 2.x|2.3|2.4|2.5|2.6|2.7)
+ python_version=$withval
+ ;;
+ yes)
+- python_version="2.5 2.4 2.3 2.x"
++ python_version="2.7 2.6 2.5 2.4 2.3 2.x"
+ ;;
+ *)
+- AC_MSG_WARN([--with-python only supports values 2.x, 2.3, 2.4, or 2.5, ignoring...])
++ AC_MSG_WARN([--with-python only supports values 2.x, 2.3, 2.4, 2.5, 2.6, or 2.7, ignoring...])
+ python_version=""
+ ;;
+ esac
+@@ -894,9 +894,9 @@
+ done
+ fi
+ AC_ARG_WITH(python-inc-dir, AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
+- [WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`python -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()'`"])
++ [WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`${__PYTHON} -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()'`"])
+ AC_ARG_WITH(python-lib-dir, AS_HELP_STRING([--with-python-lib-dir=DIR], [directory with Python library]),
+- [WITH_PYTHON_LIBDIR="$withval"], [WITH_PYTHON_LIBDIR="`python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'`"])
++ [WITH_PYTHON_LIBDIR="$withval"], [WITH_PYTHON_LIBDIR="`${__PYTHON} -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'`"])
+ ])
+ AC_SUBST(WITH_PYTHON_SUBDIR)
+ AC_SUBST(WITH_PYTHON_SUBPACKAGE)