Skip to content

Commit

Permalink
Small changes needed to compile on MacOS.
Browse files Browse the repository at this point in the history
Using libarchive, libcurl and openssl from pkg-config.
  • Loading branch information
Keve committed Nov 10, 2024
1 parent d94a952 commit 8dd2822
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*.log
*.gz
*.pc
*.dylib
jimsh0
tags
TAGS
Expand Down
4 changes: 4 additions & 0 deletions auto.def
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ if {[pkg-config-init 0]} {
if {[opt-bool with-libcurl]} {
if {![pkg-config libcurl]} {
user-error "Unable to find libcurl"
} else {
define PKG_LIBCURL_CFLAGS [exec pkg-config --static --cflags libcurl ]
define PKG_LIBCURL_LDFLAGS [exec pkg-config --static --libs-only-L libcurl ]
define PKG_LIBCURL_LIBS [exec pkg-config --static --libs-only-l libcurl ]
}
}
if {[opt-bool with-libarchive.pc]} {
Expand Down
2 changes: 1 addition & 1 deletion libpkg/pkg_repo_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ pkg_create_repo_thread(void *arg)
return (NULL);
}

#ifdef __linux__
#if defined (__linux__) || defined(_DARWIN_C_SOURCE) || defined (__APPLE__)
typedef const FTSENT *FTSENTP;
#else
typedef const FTSENT *const FTSENTP;
Expand Down
6 changes: 6 additions & 0 deletions src/Makefile.autosetup
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ OTHER_LIBS+= @PKG_OPENSSL_LIBS@
OTHER_LIBS+= -lssl -lcrypto
@endif

@if PKG_LIBCURL_LIBS
LOCAL_CFLAGS+= @PKG_LIBCURL_CFLAGS@
LOCAL_LDFLAGS+= @PKG_LIBCURL_LDFLAGS@
OTHER_LIBS+= @PKG_LIBCURL_LIBS@
@endif

@if libmachista
LOCAL_LDFLAGS= $(LIBPKGFLAT) $(LIBS) $(OTHER_LIBS) -lresolv
STATIC_LDFLAGS= $(LIBPKGFLAT) $(LIBS) $(OTHER_LIBS) -lresolv
Expand Down

0 comments on commit 8dd2822

Please sign in to comment.