Skip to content

Commit

Permalink
add libcurl to deps, builds now
Browse files Browse the repository at this point in the history
  • Loading branch information
b-camacho committed Oct 26, 2024
1 parent ba417a2 commit 87e0bc9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/libfetchers/git-utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ struct GitRepoImpl : GitRepo, std::enable_shared_from_this<GitRepoImpl>

std::vector<std::tuple<Submodule, Hash>> getSubmodules(const Hash & rev, bool exportIgnore) override;

void smudgeLfs() override;

std::string resolveSubmoduleUrl(const std::string & url) override
{
git_buf buf = GIT_BUF_INIT;
Expand Down Expand Up @@ -1103,8 +1105,8 @@ std::vector<std::tuple<GitRepoImpl::Submodule, Hash>> GitRepoImpl::getSubmodules
}

void GitRepoImpl::smudgeLfs() {
const auto metadatas = lfs::parse_lfs_files(this->repo);
const auto [url, host, path] = lfs::get_lfs_endpoint_url(this->repo);
const auto metadatas = lfs::parse_lfs_files(&(*repo));
const auto [url, host, path] = lfs::get_lfs_endpoint_url(&(*repo));
// TODO: handle public lfs repos without ssh?
const auto token = lfs::get_lfs_api_token(host, path);
auto urls = lfs::fetch_urls(url, token, metadatas);
Expand Down
4 changes: 0 additions & 4 deletions src/libfetchers/git-utils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ struct GitRepo

virtual std::string resolveSubmoduleUrl(const std::string & url) = 0;

virtual std::string resolveSubmoduleUrl(
const std::string & url,
const std::string & base) = 0;

virtual bool hasObject(const Hash & oid) = 0;

virtual ref<SourceAccessor> getAccessor(const Hash & rev, bool exportIgnore) = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/libfetchers/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ INCLUDE_libfetchers := -I $(d)

libfetchers_CXXFLAGS += $(INCLUDE_libutil) $(INCLUDE_libstore) $(INCLUDE_libfetchers)

libfetchers_LDFLAGS += $(THREAD_LDFLAGS) $(LIBGIT2_LIBS) -larchive
libfetchers_LDFLAGS += $(THREAD_LDFLAGS) $(LIBGIT2_LIBS) $(LIBCURL_LIBS) -larchive

libfetchers_LIBS = libutil libstore
3 changes: 3 additions & 0 deletions src/libfetchers/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ deps_public += nlohmann_json
libgit2 = dependency('libgit2')
deps_private += libgit2

curl = dependency('libcurl', 'curl')
deps_private += curl

add_project_arguments(
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
# It would be nice for our headers to be idempotent instead.
Expand Down

0 comments on commit 87e0bc9

Please sign in to comment.