--- a/components/fetchmail/Makefile Mon Mar 16 09:20:05 2015 -0700
+++ b/components/fetchmail/Makefile Mon Mar 16 15:45:32 2015 -0700
@@ -42,11 +42,18 @@
include ../../make-rules/ips.mk
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
-CONFIGURE_OPTIONS += am_cv_python_pythondir="$(PYTHON_VENDOR_PACKAGES)"
+CONFIGURE_OPTIONS += PYTHON="$(PYTHON.2.7.32)"
CONFIGURE_OPTIONS += --with-kerberos5
CONFIGURE_OPTIONS += --with-ssl
CONFIGURE_OPTIONS += --enable-NTLM
+# Change the shebang line to use Python 2.7 explicitly, and drop the
+# fixed file into /usr/bin, where our package manifest expects it.
+COMPONENT_POST_INSTALL_ACTION = \
+ $(GSED) -e "s|/usr/bin/env python|$(PYTHON.2.7.32)|" \
+ $(PROTO_DIR)/usr/lib/python2.7/site-packages/fetchmailconf.py > \
+ $(PROTO_DIR)$(USRBIN.32)/fetchmailconf
+
# common targets
build: $(BUILD_32)