Skip to content

Commit c492a7d

Browse files
iblislinararslan
authored andcommitted
libgit2: fix cmake options on FreeBSD (#22754)
Fix #22745
1 parent 79ea87f commit c492a7d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

deps/libgit2.mk

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,27 @@ else
3636
LIBGIT2_OPTS += -DCURL_INCLUDE_DIRS=$(build_includedir) -DCURL_LIBRARIES="-L$(build_shlibdir) -lcurl"
3737
endif
3838

39-
ifeq ($(OS),Linux)
39+
ifneq (,$(findstring $(OS),Linux FreeBSD))
4040
LIBGIT2_OPTS += -DUSE_HTTPS=ON -DTLS_BACKEND="mbedTLS" -DCMAKE_INSTALL_RPATH="\$$ORIGIN"
4141
endif
42-
ifeq ($(OS),FreeBSD)
43-
LIBGIT2_OPTS += -DCMAKE_INSTALL_RPATH="\$$ORIGIN"
44-
endif
4542

4643
# We need to bundle ca certs on linux now that we're using libgit2 with ssl
47-
ifeq ($(OS),Linux)
44+
ifneq (,$(findstring $(OS),Linux FreeBSD))
4845
OPENSSL_DIR=$(shell openssl version -d | cut -d '"' -f 2)
4946
# This certfile location observed on Ubuntu 16.04
5047
ifeq ($(shell [ -e $(OPENSSL_DIR)/certs/ca-certificates.crt ] && echo exists),exists)
5148
CERTFILE=$(OPENSSL_DIR)/certs/ca-certificates.crt
5249
# This certfile location observed on openSUSE Leap 42.1
5350
else ifeq ($(shell [ -e $(OPENSSL_DIR)/ca-bundle.pem ] && echo exists),exists)
5451
CERTFILE=$(OPENSSL_DIR)/ca-bundle.pem
55-
# This certfile location observed on Ubuntu 14.04
52+
# This certfile location observed on Ubuntu 14.04 and FreeBSD
5653
else ifeq ($(shell [ -e $(OPENSSL_DIR)/cert.pem ] && echo exists),exists)
5754
CERTFILE=$(OPENSSL_DIR)/cert.pem
5855
# This certfile location observed on Debian 7
5956
else ifeq ($(shell [ -e $(OPENSSL_DIR)/certs/ca.pem ] && echo exists),exists)
6057
CERTFILE=$(OPENSSL_DIR)/certs/ca.pem
6158
endif
62-
endif # Linux
59+
endif # Linux and FreeBSD
6360

6461
LIBGIT2_SRC_PATH := $(SRCDIR)/srccache/$(LIBGIT2_SRC_DIR)
6562

0 commit comments

Comments
 (0)