summaryrefslogtreecommitdiffhomepage
path: root/patches
diff options
context:
space:
mode:
authorNeal Gompa <ngompa13@gmail.com>2018-04-29 15:57:25 -0400
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2018-04-29 20:03:56 +0000
commitf4e464deb22a275345930938916f2d92e3613ebb (patch)
treee228bd3aeb1a2e4abb7004a806ea366edb148f79 /patches
parentfd487a2fe34c91ae098a81e603ac3ca5c4114e75 (diff)
downloadmidipix_build-f4e464deb22a275345930938916f2d92e3613ebb.tar.bz2
midipix_build-f4e464deb22a275345930938916f2d92e3613ebb.tar.xz
patches/tdnf-2.0.0-alpha.1.local.patch: massively rework to fix tdnf build
Signed-off-by: Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>
Diffstat (limited to 'patches')
-rw-r--r--patches/tdnf-2.0.0-alpha.1.local.patch120
1 files changed, 115 insertions, 5 deletions
diff --git a/patches/tdnf-2.0.0-alpha.1.local.patch b/patches/tdnf-2.0.0-alpha.1.local.patch
index a0f2e8c1..bfacd87b 100644
--- a/patches/tdnf-2.0.0-alpha.1.local.patch
+++ b/patches/tdnf-2.0.0-alpha.1.local.patch
@@ -1,6 +1,44 @@
---- tdnf-2.0.0-alpha.1/configure.ac.orig 2018-01-12 22:48:40.000000000 +0000
-+++ tdnf-2.0.0-alpha.1/configure.ac 2018-04-29 16:08:28.672000000 +0000
-@@ -2,7 +2,7 @@
+From f2fe2c648454bc5885366c93d4075ca5777ddbda Mon Sep 17 00:00:00 2001
+From: Neal Gompa <ngompa13@gmail.com>
+Date: Sun, 29 Apr 2018 15:52:26 -0400
+Subject: [PATCH] Fix TDNF build configuration to use pkgconfig data to find
+ dependencies
+
+With the notable exception of identifying that we're using rpm.org rpm,
+all the configuration of how to use dependencies to compile and link
+TDNF and its libraries should come from pkgconfig. That way, TDNF
+will reliably build across more platforms.
+
+In addition, trivial changes to drop -Werror and specify that -std=gnu99
+is required for the build are included so that it will compile properly
+on compilers that do not default to newer C standards and not make
+assumptions about what is coerced from a warning to an error by default.
+---
+ client/Makefile.am | 5 ++---
+ configure.ac | 25 +++++++++++++------------
+ solv/Makefile.am | 4 ++--
+ tdnf-cli-libs.pc.in | 2 +-
+ tdnf.pc.in | 2 +-
+ 5 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/client/Makefile.am b/client/Makefile.am
+index 9bd3deb..6857c3f 100644
+--- a/client/Makefile.am
++++ b/client/Makefile.am
+@@ -26,6 +26,5 @@ libtdnf_la_LIBADD = \
+ @top_builddir@/solv/libtdnfsolv.la \
+ $(top_builddir)/common/libcommon.la \
+ @LIBCURL_LIBS@ \
+- -lrpm \
+- -lsolv \
+- -lsolvext
++ @RPM_LIBS@ \
++ @LIBSOLVEXT_LIBS@
+diff --git a/configure.ac b/configure.ac
+index d78bb8c..d5c4a51 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,7 +2,7 @@ AC_INIT(tdnf, 2.0.0)
AC_MSG_NOTICE([tdnf configuration])
AC_CANONICAL_SYSTEM
@@ -9,12 +47,84 @@
AC_CONFIG_TESTDIR(tests)
-@@ -15,7 +15,7 @@
+@@ -15,29 +15,30 @@ AC_PROG_LIBTOOL
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_GNU_SOURCE -fPIC"
AM_CPPFLAGS="$AM_CPPFLAGS -I${top_srcdir}/include"
-AM_CFLAGS="$AM_CFLAGS -Wall -Werror -fno-strict-aliasing"
-+AM_CFLAGS="$AM_CFLAGS -Wall -fno-strict-aliasing"
++AM_CFLAGS="$AM_CFLAGS -std=gnu99 -Wall -fno-strict-aliasing"
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_GNU_SOURCE -fPIC"
AC_SUBST(AM_CPPFLAGS)
+ AC_SUBST(AM_CFLAGS)
+
+ #libsolv
+-echo "Looking for libsolv headers"
+-AC_CHECK_HEADERS(solv/pool.h)
++PKG_CHECK_MODULES([LIBSOLV], [libsolv], [have_libsolv=yes], [have_libsolv=no])
++PKG_CHECK_MODULES([LIBSOLVEXT], [libsolvext], [have_libsolvext=yes], [have_libsolvext=no])
++AM_CONDITIONAL([LIBSOLV], [test "$have_libsolv" = "yes"])
++AM_CONDITIONAL([LIBSOLVEXT], [test "$have_libsolvext" = "yes"])
+
+-echo "Looking for libsolv libs"
+-AC_CHECK_LIB(solv, pool_create)
+-
+-#licurl
++#libcurl
+ PKG_CHECK_MODULES([LIBCURL], [libcurl], [have_libcurl=yes], [have_libcurl=no])
+ AM_CONDITIONAL([LIBCURL], [test "$have_libcurl" = "yes"])
+
+ #rpm
+-echo "Looking for librpm headers"
+-AC_CHECK_HEADERS(rpm/rpmlib.h)
++PKG_CHECK_MODULES([RPM], [rpm], [have_rpm=yes], [have_rpm=no])
++AM_CONDITIONAL([RPM], [test "$have_rpm" = "yes"])
++
++# test to prove rpm.org rpm
++echo "Looking for rpm.org librpm headers"
++AC_CHECK_HEADERS(rpm/header.h)
+
+-echo "Looking for librpm libs"
+-AC_CHECK_LIB(rpm, rpmtsCreate)
+
+ #makefiles
+ AC_CONFIG_FILES([Makefile
+diff --git a/solv/Makefile.am b/solv/Makefile.am
+index 6625b3b..ef546a9 100644
+--- a/solv/Makefile.am
++++ b/solv/Makefile.am
+@@ -10,5 +10,5 @@ libtdnfsolv_la_SOURCES = \
+
+ libtdnfsolv_la_LDFLAGS = \
+ -static \
+- -lrpm \
+- -lsolv
++ @RPM_LIBS@ \
++ @LIBSOLV_LIBS@
+diff --git a/tdnf-cli-libs.pc.in b/tdnf-cli-libs.pc.in
+index 0912b68..4523e4d 100644
+--- a/tdnf-cli-libs.pc.in
++++ b/tdnf-cli-libs.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@/tdnf
+ Name: tdnf-cli-libs
+ Description: tdnf cli libs
+ Version: @VERSION@
+-Requires:
++Requires: tdnf
+ Libs: -L${libdir} -ltdnfcli
+ Cflags: -I${includedir}
+diff --git a/tdnf.pc.in b/tdnf.pc.in
+index 811568d..4ad7a07 100644
+--- a/tdnf.pc.in
++++ b/tdnf.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@/tdnf
+ Name: tdnf
+ Description: tiny dandified yum
+ Version: @VERSION@
+-Requires:libsolv rpm
++Requires: libsolv libsolvext rpm libcurl
+ Libs: -L${libdir} -ltdnf
+ Cflags: -I${includedir}
+--
+2.17.0
+