kumquat-buildroot/package/rpm/rpm.mk
Peter Korsgaard 95c6848e81 rpm: use pkg-config to detect zlib and popt
Fixes:
http://autobuild.buildroot.net/results/98b/98b70ea09ecef214f13a622dcb926e01a6d6f7d9/
http://autobuild.buildroot.net/results/d13/d1343c3be9710d5be3cf6e4369dd5c75102e7b92/
http://autobuild.buildroot.net/results/457/457d3d9231f1422b19ffbac6d4a6ab02c6d6c22f/
http://autobuild.buildroot.net/results/ed8/ed8efe3985e6b423e4c18f9c200aa042ccb9ed23/

And many more.

Using --with-zlib=$(STAGING_DIR) causes the configure script to basically do
a find $(STAGING_DIR) -name zlib.h to figure out the correct include path
for zlib.  That is normally ok, but if botan is enabled and built before
rpm, then it installs a zlib.h header in
$(STAGING_DIR)/usr/include/botan-1.10/botan which confuses this logic and
causes configure to fail.

Fix it by using --with-zlib=external instead which causes the configure
script to use pkg-config to get the CFLAGS/LDFLAGS. Also do it for popt so
we don't end up with a similar issue in the future. We unfortunately cannot
do it for beecrypt as it doesn't install a .pc file.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-02-06 10:29:17 +01:00

65 lines
1.6 KiB
Makefile

################################################################################
#
# rpm
#
################################################################################
RPM_VERSION_MAJOR = 5.2
RPM_VERSION = $(RPM_VERSION_MAJOR).0
RPM_SITE = http://rpm5.org/files/rpm/rpm-$(RPM_VERSION_MAJOR)
RPM_DEPENDENCIES = host-pkgconf zlib beecrypt neon popt openssl
RPM_LICENSE = LGPLv2.1
RPM_LICENSE_FILES = COPYING.LIB
RPM_CONF_ENV = \
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/beecrypt -I$(STAGING_DIR)/usr/include/neon -DHAVE_MUTEX_THREAD_ONLY" \
ac_cv_va_copy=yes
RPM_CONF_OPTS = \
--disable-build-versionscript \
--disable-rpath \
--without-selinux \
--without-python \
--without-perl \
--with-openssl=external \
--with-zlib=external \
--with-libbeecrypt=$(STAGING_DIR) \
--with-popt=external
ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
RPM_DEPENDENCIES += gettext
endif
ifeq ($(BR2_PACKAGE_PCRE),y)
RPM_DEPENDENCIES += pcre
RPM_CONF_OPTS += --with-pcre=external
else
RPM_CONF_OPTS += --with-pcre=none
endif
ifeq ($(BR2_PACKAGE_FILE),y)
RPM_DEPENDENCIES += file
RPM_CONF_OPTS += --with-file=external
else
RPM_CONF_OPTS += --with-file=none
endif
# xz payload support needs a toolchain w/ C++
ifeq ($(BR2_PACKAGE_XZ)$(BR2_INSTALL_LIBSTDCPP),yy)
RPM_DEPENDENCIES += xz
RPM_CONF_OPTS += --with-xz=external
else
RPM_CONF_OPTS += --with-xz=none
endif
ifeq ($(BR2_PACKAGE_BZIP2),y)
RPM_CONF_OPTS += --with-bzip2
RPM_DEPENDENCIES += bzip2
endif
RPM_MAKE = $(MAKE1)
RPM_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) program_transform_name= install
$(eval $(autotools-package))