Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.8
perl-BSSolv
BSSolv-0.13-Align-Debian-and-Arch-support-to-li...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File BSSolv-0.13-Align-Debian-and-Arch-support-to-libsolv.patch of Package perl-BSSolv
From f12883a449aae715096456e89fb34aa2703f23c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Mon, 6 Jun 2016 13:43:49 +0200 Subject: [PATCH] Align Debian and Arch support to libsolv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libsolv can be built without support for Debian or Arch repositories. This patch allows to build perl-BSSolv against libsolv that does not support them. https://bugzilla.redhat.com/show_bug.cgi?id=1342160 Signed-off-by: Petr Písař <ppisar@redhat.com> --- BSSolv.xs | 8 +++++++- Makefile.PL | 16 +++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/BSSolv.xs b/BSSolv.xs index 726b4ff..a01016b 100644 --- a/BSSolv.xs +++ b/BSSolv.xs @@ -26,8 +26,10 @@ #include "repo_solv.h" #include "repo_write.h" #include "repo_rpmdb.h" +#ifdef HAVE_DEBIAN #include "repo_deb.h" -#if 1 +#endif +#ifdef HAVE_ARCH #include "repo_arch.h" #endif #if defined(LIBSOLV_FEATURE_COMPLEX_DEPS) @@ -2865,8 +2867,10 @@ repodata_addbin(Repodata *data, char *prefix, char *s, int sl, char *sid) path = solv_dupjoin(prefix, "/", s); if (sl >= 4 && !strcmp(s + sl - 4, ".rpm")) p = repo_add_rpm(data->repo, (const char *)path, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|REPO_NO_LOCATION|RPM_ADD_WITH_PKGID|RPM_ADD_NO_FILELIST|RPM_ADD_NO_RPMLIBREQS); +#ifdef HAVE_DEBIAN else if (sl >= 4 && !strcmp(s + sl - 4, ".deb")) p = repo_add_deb(data->repo, (const char *)path, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|REPO_NO_LOCATION|DEBS_ADD_WITH_PKGID); +#endif else if (sl >= 10 && !strcmp(s + sl - 10, ".obsbinlnk")) { p = repo_add_obsbinlnk(data->repo, (const char *)path, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|REPO_NO_LOCATION); @@ -2877,8 +2881,10 @@ repodata_addbin(Repodata *data, char *prefix, char *s, int sl, char *sid) return p; } #ifdef ARCH_ADD_WITH_PKGID +#ifdef HAVE_ARCH else if (sl >= 11 && (!strcmp(s + sl - 11, ".pkg.tar.gz") || !strcmp(s + sl - 11, ".pkg.tar.xz"))) p = repo_add_arch_pkg(data->repo, (const char *)path, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|REPO_NO_LOCATION|ARCH_ADD_WITH_PKGID); +#endif #endif solv_free(path); if (!p) diff --git a/Makefile.PL b/Makefile.PL index 58604f3..fc735d4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -2,21 +2,31 @@ use ExtUtils::MakeMaker; my $solvprefix = '/usr'; -my $inc = "-I$solvprefix/include/solv"; +my @inc_dirs = ("$solvprefix/include/solv"); my $lib; if (grep {$_ eq '--bundled-libsolv'} @ARGV) { my $builddir = 'libsolv'; - $inc = "-I$builddir/src -I$builddir/ext"; + @inc_dirs = ("$builddir/src", "$builddir/ext"); $lib = "-L$builddir/src -L$builddir/ext -lsolvext -lsolv -lz -llzma"; } else { $lib = '-lsolvext -lsolv'; } +my $def = ''; + +if (grep {-e "$_/repo_deb.h"} @inc_dirs) { + $def .= ' -DHAVE_DEBIAN'; +} +if (grep {-e "$_/repo_arch.h"} @inc_dirs) { + $def .= ' -DHAVE_ARCH'; +} + WriteMakefile( NAME => 'BSSolv', VERSION_FROM => 'BSSolv.pm', - INC => $inc, + DEFINE => $def, + INC => join(' ', map("-I$_", @inc_dirs)), LIBS => [ $lib ], ) -- 2.14.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor