From 9e0ca22f9add64bfa036b2ca80581a75cf81673c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Thu, 17 Dec 2015 10:11:10 -0700 Subject: [PATCH 1/2] Don't empty CMAKE_OSX_DEPLOYMENT_TARGET by default --- base/cmake_package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/cmake_package.py b/base/cmake_package.py index 853c85b95..f045b1660 100644 --- a/base/cmake_package.py +++ b/base/cmake_package.py @@ -18,6 +18,7 @@ def configure(ctx, stage_args): set_env_flags: true # default build_in_source: false # default debug: false # default + empty_osx_deployment_target: false # default If set_env_flags is set, CPPFLAGS and LDFLAGS will be set, as appropriate for the platform. @@ -34,7 +35,7 @@ def configure(ctx, stage_args): else: conf_lines.append('-DCMAKE_BUILD_TYPE:STRING=Release') - if ctx.parameters['platform'] == 'Darwin': + if stage_args.get('empty_osx_deployment_target', False): conf_lines.append('-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=""') #cmake needs to be given all the dependency dirs as prefix paths From 2fc48b8c224d3d429496573f62b7434ad9cdb221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Thu, 17 Dec 2015 10:34:23 -0700 Subject: [PATCH 2/2] Fix Doxygen on OSX The problem is that Doxygen defines LIBICONV_PLUG on OS X, which causes the `iconv.h` header file to not prefix the functions with `lib` and then linker cannot find it. --- pkgs/doxygen.yaml | 8 -------- pkgs/doxygen/doxygen.yaml | 17 +++++++++++++++++ pkgs/doxygen/libiconv_plug.patch | 13 +++++++++++++ 3 files changed, 30 insertions(+), 8 deletions(-) delete mode 100644 pkgs/doxygen.yaml create mode 100644 pkgs/doxygen/doxygen.yaml create mode 100644 pkgs/doxygen/libiconv_plug.patch diff --git a/pkgs/doxygen.yaml b/pkgs/doxygen.yaml deleted file mode 100644 index 693035283..000000000 --- a/pkgs/doxygen.yaml +++ /dev/null @@ -1,8 +0,0 @@ -extends: [cmake_package] - -dependencies: - build: [bison, flex, libiconv] - -sources: -- url: https://github.com/doxygen/doxygen.git - key: git:45e153f2238d0fa031d147cfe207e52b913845eb diff --git a/pkgs/doxygen/doxygen.yaml b/pkgs/doxygen/doxygen.yaml new file mode 100644 index 000000000..4a05783bf --- /dev/null +++ b/pkgs/doxygen/doxygen.yaml @@ -0,0 +1,17 @@ +extends: [cmake_package] + +dependencies: + build: [bison, flex, libiconv] + +sources: +- key: git:fdae7519a2e29f94e65c0e718513343f07302ddb + url: https://github.com/doxygen/doxygen + +build_stages: + - when: platform == 'Darwin' + name: patch + before: configure + files: [libiconv_plug.patch] + handler: bash + bash: | + patch -up1 < _hashdist/libiconv_plug.patch diff --git a/pkgs/doxygen/libiconv_plug.patch b/pkgs/doxygen/libiconv_plug.patch new file mode 100644 index 000000000..9dba23d33 --- /dev/null +++ b/pkgs/doxygen/libiconv_plug.patch @@ -0,0 +1,13 @@ +--- a/src/portable_c.c ++++ b/src/portable_c.c +@@ -1,9 +1,3 @@ +-#if (defined(__APPLE__) || defined(macintosh)) && !defined(DMG_BUILD) +-// define this before including iconv.h to avoid a mapping of +-// iconv_open and friends to libicon_open (done by mac ports), +-// while the symbols without 'lib' are linked from /usr/lib/libiconv +-#define LIBICONV_PLUG +-#endif + #include + + // These functions are implemented in a C file, because there are different +