Commit Graph

266 Commits

Author SHA1 Message Date
Carlos Martín Nieto
01fe83741a Revert "Get rid of libssh2 embedding"
The embedding was removed as a libssh2 release with Windows crypto
support became available, but dependencies are still annoying so this
ahs been requested again.

This reverts commit 20dcb7315c.
2015-09-03 13:35:15 +02:00
Carlos Martín Nieto
b445940e2d CMake: fall back to OpenSSL on older OS X
Starting at OS X 10.8, the Security framework offers some functions
which are unified across OS X and iOS. These are the functions that we
use.

Older versions of OS X do not have these functions and we fail to
compile. In these situations, fall back to using OpenSSL for our TLS
stream instead.
2015-08-19 12:53:31 +02:00
Slava Karpenko
c27b4afcdd Forcing libssh2 lib location
OS X may have libssh2 in diff locations, so CHECK_LIBRARY_EXISTS may check the wrong lib; forcing it to use a found directory.
2015-08-06 11:06:17 +03:00
Ben Chatelain
2da64edb80 Add -Wdocumentation flag if supported 2015-07-27 18:28:29 -06:00
Edward Thomson
a522d8c1e7 Merge pull request #3292 from tkelman/patch-1
Increase required version of cmake to 2.8
2015-07-11 17:35:59 -05:00
Tony Kelman
37c84dc58f Increase required version of cmake to 2.8 2015-07-10 12:10:47 -07:00
Jeff Hostetler
93b4272895 Include stacktrace summary in memory leak output. 2015-06-29 16:39:11 -04:00
Carlos Martín Nieto
fd2d11a178 CMake: treat the ld flags as a list
These are treated as a list by CMake itself, which means that treating
them as a simple string can put semicolons in our ld command-line if we
have libraries which are not installed on the standard locations.

Treat the variable as a CMake list and replace it with the space-delimited
list just before writing it out to our pc file.
2015-06-28 13:57:06 +02:00
Carlos Martín Nieto
790cabf06a pc: Put libcurl and libssh2 in Libs.private
Pass on to whoever wants to link to libgit2 statically the flags that we
would have used for these libraries.

Putting them in Requires.private as we do now makes pkg-config put their
dependencies in the linker arguments as well, which is not what we want.
2015-06-26 13:51:41 +02:00
Arthur Schreiber
65f2d15561 List libcurl in the generated libgit2.pc 2015-06-25 21:49:48 +02:00
Carlos Martín Nieto
cf9d5f7602 curl: find and link with the library if it's available by default 2015-06-24 17:25:05 +02:00
Marius Ungureanu
e488bef42c Quote LIBSSH2_LIBRARIES call
Credits to @directhex

It is possible for PKG_CHECK_MODULES(LIBSSH2 libssh2) to LIBSSH2_LIBRARIES to a string with more than one library in it - e.g. if your libssh2 was built against libgcrypt, it will be "ssh2;gcrypt"

Quoting the string is needed, or CHECK_LIBRARY_EXISTS will fail.
2015-06-19 12:54:51 +03:00
Michał Górny
1679ec1204 cmake: Add CMake check for libssh2 memory credential passing support 2015-05-27 20:36:53 +02:00
Carlos Martín Nieto
20dcb7315c Get rid of libssh2 embedding
It was added as a workaround while the project had code to use WinCNG
but had not made a release with it. There is now a release of libssh2
with WinCNG support, so this option is redundant. Let's get rid of it
before people start liking it too much.
2015-05-12 11:33:45 +02:00
Carlos Martín Nieto
25f355cbed Merge pull request #3086 from yongthecoder/master
Android build doesn't need deps/regex
2015-05-06 18:39:39 +02:00
Arthur Schreiber
7a5c755989 Ensure frameworks are mentioned in libgit2.pc
When building on Mac OS X, the `CoreFoundation` and `Security` frameworks where missing from `Libs.private` in the generated `libgit2.pc` file.
2015-05-05 22:36:24 +02:00
Yong Li
57aa839caf Android build doesn't need deps/regex
deps/regex was included in Android build because Android NDK 4 has
a packaging bug and doesn't have the regular expression functions defined
in its libc.so. The bug has been fixed in subsequent Android NDK releases.

If it is still necessary to work around the bug in Android NDK 4, we
should consider to use an option like ANDROID_NDK_RELEASE or
ANDROID_NDK_RELEASE_NUM.
2015-05-04 09:41:34 -04:00
Carlos Martín Nieto
24e53d2fba Rename GIT_SSL to GIT_OPENSSL
This is what it's meant all along, but now we actually have multiple
implementations, it's clearer to use the name of the library.
2015-04-23 17:39:51 +02:00
Carlos Martín Nieto
6bb54cbff3 Add a SecureTransport TLS channel
As an alternative to OpenSSL when we're on OS X. This one can actually
take advantage of stacking the streams.
2015-04-23 17:39:51 +02:00
Jeff Hostetler
d06c589f48 Add MSVC CRTDBG memory leak reporting. 2015-04-15 10:25:09 -04:00
Tony Kelman
b631e0d96d Use swprintf_s everywhere except mingw.org 2015-03-19 08:42:45 -07:00
Tony Kelman
547517d7f9 use a different .def file for 64 bit 2015-03-16 14:59:20 -07:00
Tony Kelman
d612e48ecc Fix out-of-tree build
link against crypt32 for CertFreeCertificateContext
2015-03-16 13:59:33 -07:00
Philip Kelley
8f426d7dd2 Win32: Enable WinHTTP for MinGW 2015-03-16 12:59:55 -07:00
Tony Kelman
063532825c Only run -ionline tests IF (WINHTTP OR OPENSSL_FOUND) 2015-03-05 15:48:08 -08:00
Jeff Hostetler
9a859ef55a Added cl_perf_timer. Updated global trace to include timers. 2015-03-02 09:21:55 -05:00
Jeff Hostetler
6b5c0886b6 Provide mechanism to let CLAR globally setup git_trace() 2015-03-02 08:20:27 -05:00
Leo Yang
2d2aa1ff6e Fix Mac build without OpenSSL
If OpenSSL is disabled on Mac the SHA1 implementation goes
to the CommonCrypto from the system. In this case we should
not include the generic hash impl. Otherwise there would be
duplicated impls which fail the build.
2015-02-17 12:03:25 -05:00
Carlos Martín Nieto
5a2a5771fe Merge pull request #2845 from rakuco/libssh2-detection-fix
Add libssh2's library and include directories.
2015-02-12 00:34:48 +01:00
Yury G. Kudryashov
e15a0849eb Tell user if libssh was not found
Fixes #2665
2015-02-04 00:29:09 +03:00
Raphael Kubo da Costa
461fd5a0c7 Add libssh2's library and include directories.
Follow-up to 4f91bfa ("Find libssh2 via pkg-config"): FindPkgConfig sets
<foo>_INCLUDE_DIRS, not <foo>_INCLUDE_DIR like FindLIBSSH2 did.

Additionally, if using only FindPkgConfig to find libssh2, we have to
call LINK_DIRECTORIES() as well to pass the appropriate -L entries,
otherwise the build will only work if libssh2.so is in a directory
searched automatically by the linker.
2015-01-25 22:33:34 +02:00
Leo Yang
7641327c8b Add option to turn off OpenSSL 2015-01-13 16:53:07 -05:00
Edward Thomson
6e1205ef62 cmake: include FindPkgConfig for windows
Apparently FindPkgConfig is not included by default on VS builds,
only Unix and Unix-like (mingw) builds.
2014-12-22 12:40:04 -06:00
Carlos Martín Nieto
4f91bfa32b Find libssh2 via pkg-config
We don't really need our own module to find libssh2. Using pkg-config
lets the standard tool do the work for us and let us fit more naturally
in the workflow as we respect the pkg-config search paths.
2014-12-05 10:41:54 +01:00
Carlos Martín Nieto
79b0ae4e24 Flip THREADSAFE's default to ON
Threads are here to stay; and for a while now, users have had to call
the initialization function which sets up threads and crypto regardless
of whether the library was built threadsafe or not.
2014-10-27 10:30:57 +01:00
Edward Thomson
a747ea49c9 Merge pull request #2647 from ethomson/clar_tmpname
clar: use a custom temp directory name
2014-10-24 14:01:13 -07:00
Edward Thomson
29eed1c74d clar: use a custom temp directory name 2014-10-24 10:50:57 -04:00
Carlos Martín Nieto
d9c0dbb042 hash: use CommonCrypto on OSX for SHA-1
OSX has its own cryptographic library, let's make use of it instead of
calling out to OpenSSL.
2014-10-24 13:31:18 +02:00
Carlos Martín Nieto
3753110aed Provide option to embed libssh2 2014-10-05 12:13:40 +02:00
Edward Thomson
23135afa6f Introduce proper http authentication API 2014-08-15 14:11:56 -04:00
Edward Thomson
315cb38e1e Add GSSAPI support for SPNEGO/Kerberos auth over HTTP 2014-08-15 11:12:42 -04:00
Carlos Martín Nieto
9980767205 Change SOVERSION at API breaks
Since the SOVERSION doesn't need to follow the library's version and
simply needs to be monotonically increasing whenever we release
something that breaks the ABI, we can set some number and allow multiple
versions of the library to be installed side-by-side.

We start here with the minor version as that's what we release for now,
and it allows to backport this change to earlier versions.
2014-06-08 19:42:54 +02:00
Jeff King
6bcb098755 cmake: s/ICONV/Iconv/ in FIND_PACKAGE
The cmake module we provide is in the file FindIconv.cmake,
so we must match the case correctly. It happens to work in
practice because we only turn on ICONV on Darwin, and people
generally have case-insensitive filesystems there.

Note that we only need to update the package name here. The
package itself still sets the all-uppercase ICONV_FOUND
flag, so we continue to use uppercase in the rest of cmake.
2014-05-08 15:48:49 -04:00
Vicent Marti
9d878fc420 Merge pull request #2304 from jacquesg/solaris
Solaris!
2014-05-01 01:23:10 -07:00
Jacques Germishuys
98b8fcff4f Build regex.c for Solaris. Added required defines for Solaris 2014-04-30 17:05:13 +02:00
Carlos Martín Nieto
f5fc63bc0c Don't exclude libssh2 from MinGW
It reportedly works. It does not however work when cross-compiling on
Travis, so let's disable it there.

This fixes #2311.
2014-04-30 11:15:41 +02:00
Ting-Wei Lan
096ac799a3 Workaround missing .pc files on FreeBSD
This fixes #2118
2014-04-30 10:51:44 +02:00
Carlos Martín Nieto
04739e9f4a Unquiet CMake output
The point of this phase is to know what we have and not. Show the user a
clear indication of what we have.
2014-04-30 10:15:44 +02:00
Marcin Sawicki
7f0de93a0d Make the build CMake 2.6 compatible 2014-04-28 15:24:36 +01:00
Jacques Germishuys
5c8d5eac35 Introduce AddCFlagIfSupported CMake macro 2014-04-19 23:07:50 +02:00