From e6129b69bf5105b71ad6f8261943f571ea66b04e Mon Sep 17 00:00:00 2001 From: Kostiantyn Moroz Date: Sun, 19 Aug 2018 10:23:26 +0100 Subject: [PATCH 1/6] fix #43 mac libs should be linked against @rpath libs and list of @rpaths should be added; link only against libcurl --- binding.gyp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/binding.gyp b/binding.gyp index 37d0d9eea..d6f37e35a 100644 --- a/binding.gyp +++ b/binding.gyp @@ -85,13 +85,17 @@ 'WARNING_CFLAGS':[ '-Wno-c++11-narrowing', '-Wno-constant-conversion' + ], + 'LD_RUNPATH_SEARCH_PATHS': [ + '/opt/local/lib', + '/usr/lib' ] }, 'include_dirs' : [ ' Date: Sun, 19 Aug 2018 13:14:07 +0100 Subject: [PATCH 2/6] add Brew standard lib path to search path list; change install prefix to point to one of standard locations --- .travis.yml | 2 +- binding.gyp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d34ff3ffa..f896566f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ before_install: git clone --branch "$TAG" --depth 1 https://github.com/bagder/curl.git "$TAG"; fi - cd "$TAG" - - ./buildconf && ./configure --prefix=$HOME --with-ssl && make && make install + - ./buildconf && ./configure --prefix=/opt/local --with-ssl && make && make install - cd $TRAVIS_BUILD_DIR # output curl version info - curl --version diff --git a/binding.gyp b/binding.gyp index d6f37e35a..96d196516 100644 --- a/binding.gyp +++ b/binding.gyp @@ -88,6 +88,7 @@ ], 'LD_RUNPATH_SEARCH_PATHS': [ '/opt/local/lib', + '/usr/local/lib', '/usr/lib' ] }, From d0754c21f99c7617dcca5a70d9c04fbb3b3cd1e6 Mon Sep 17 00:00:00 2001 From: Kostiantyn Moroz Date: Sun, 19 Aug 2018 21:54:23 +0100 Subject: [PATCH 3/6] replace libcurl install prefix path with that user expected to have write permissions --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f896566f6..687dc65c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ before_install: git clone --branch "$TAG" --depth 1 https://github.com/bagder/curl.git "$TAG"; fi - cd "$TAG" - - ./buildconf && ./configure --prefix=/opt/local --with-ssl && make && make install + - ./buildconf && ./configure --prefix=/usr/local --with-ssl && make && make install - cd $TRAVIS_BUILD_DIR # output curl version info - curl --version From 637209237fb823f0098ee5350b2085b934f24553 Mon Sep 17 00:00:00 2001 From: Kostiantyn Moroz Date: Sun, 19 Aug 2018 23:07:45 +0100 Subject: [PATCH 4/6] revert curl install prefix for linux --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 687dc65c7..1b2ae9a5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,11 @@ before_install: git clone --branch "$TAG" --depth 1 https://github.com/bagder/curl.git "$TAG"; fi - cd "$TAG" - - ./buildconf && ./configure --prefix=/usr/local --with-ssl && make && make install + - CURL_PREFIX=$HOME + - if [[ $TRAVIS_OS_NAME == "osx" ]]; then + CURL_PREFIX=/usr/local + fi + - ./buildconf && ./configure --prefix=$CURL_PREFIX --with-ssl && make && make install - cd $TRAVIS_BUILD_DIR # output curl version info - curl --version From 9fc5272e4e28d930175695b1f7dea4c1c17a515c Mon Sep 17 00:00:00 2001 From: Kostiantyn Moroz Date: Mon, 20 Aug 2018 10:05:26 +0100 Subject: [PATCH 5/6] fix travis script typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1b2ae9a5a..4eb52a0ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,7 +85,7 @@ before_install: - cd "$TAG" - CURL_PREFIX=$HOME - if [[ $TRAVIS_OS_NAME == "osx" ]]; then - CURL_PREFIX=/usr/local + CURL_PREFIX=/usr/local; fi - ./buildconf && ./configure --prefix=$CURL_PREFIX --with-ssl && make && make install - cd $TRAVIS_BUILD_DIR From ff2ee094e40746d0607491071f527bd43d9848f7 Mon Sep 17 00:00:00 2001 From: Kostiantyn Moroz Date: Mon, 20 Aug 2018 19:13:24 +0100 Subject: [PATCH 6/6] add one more @rpath for case when Brew do not want to mess with system curl and puts curl in special folder --- binding.gyp | 1 + 1 file changed, 1 insertion(+) diff --git a/binding.gyp b/binding.gyp index 96d196516..7a33c90bb 100644 --- a/binding.gyp +++ b/binding.gyp @@ -88,6 +88,7 @@ ], 'LD_RUNPATH_SEARCH_PATHS': [ '/opt/local/lib', + '/usr/local/opt/curl/lib', '/usr/local/lib', '/usr/lib' ]