From 38d5c27896b1af55dfb664ea1f90aadcc246aaa8 Mon Sep 17 00:00:00 2001 From: Nick Overdijk Date: Wed, 27 Apr 2016 17:50:44 +0200 Subject: Adds yaml-cpp --- index.html | 4 ++++ src/yaml-cpp.mk | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/yaml-cpp.mk diff --git a/index.html b/index.html index 6f9feb4..fde5786 100644 --- a/index.html +++ b/index.html @@ -2742,6 +2742,10 @@ local-pkg-list: $(LOCAL_PKG_LIST) XZ + yaml-cpp + yaml-cpp + + yasm Yasm diff --git a/src/yaml-cpp.mk b/src/yaml-cpp.mk new file mode 100644 index 0000000..cdb5ae1 --- /dev/null +++ b/src/yaml-cpp.mk @@ -0,0 +1,20 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := yaml-cpp +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.5.3 +$(PKG)_CHECKSUM := ac50a27a201d16dc69a881b80ad39a7be66c4d755eda1f76c3a68781b922af8f +$(PKG)_SUBDIR := $(PKG)-release-$($(PKG)_VERSION) +$(PKG)_FILE := release-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/jbeder/yaml-cpp/archive/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_BUILD + cd '$(1)' && cmake \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),OFF,ON) + + $(MAKE) -C '$(1)' -j $(JOBS) VERBOSE=1 + $(MAKE) -C '$(1)' -j $(JOBS) install +endef -- cgit v0.12 From 7398ee1f25d1fc5b764d08b670f7f169c2bcfbba Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 16 Jul 2016 00:24:45 +0300 Subject: yaml-cpp: rename file to yaml-cpp-$VERSION.tar.gz --- src/yaml-cpp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yaml-cpp.mk b/src/yaml-cpp.mk index cdb5ae1..b5ec13e 100644 --- a/src/yaml-cpp.mk +++ b/src/yaml-cpp.mk @@ -6,8 +6,8 @@ $(PKG)_IGNORE := $(PKG)_VERSION := 0.5.3 $(PKG)_CHECKSUM := ac50a27a201d16dc69a881b80ad39a7be66c4d755eda1f76c3a68781b922af8f $(PKG)_SUBDIR := $(PKG)-release-$($(PKG)_VERSION) -$(PKG)_FILE := release-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://github.com/jbeder/yaml-cpp/archive/$($(PKG)_FILE) +$(PKG)_FILE := yaml-cpp-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/jbeder/yaml-cpp/archive/release-$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := gcc define $(PKG)_BUILD -- cgit v0.12 From f61c053d1357ce07945f55d1f0e03c091959d28b Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 16 Jul 2016 00:25:48 +0300 Subject: yaml-cpp: provide updater --- src/yaml-cpp.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/yaml-cpp.mk b/src/yaml-cpp.mk index b5ec13e..2fd9860 100644 --- a/src/yaml-cpp.mk +++ b/src/yaml-cpp.mk @@ -10,6 +10,10 @@ $(PKG)_FILE := yaml-cpp-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/jbeder/yaml-cpp/archive/release-$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := gcc +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, jbeder/yaml-cpp, \(yaml-cpp-\|release-\)) +endef + define $(PKG)_BUILD cd '$(1)' && cmake \ -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ -- cgit v0.12 From aa85d819dc60252644996268d988e644af73b13c Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 16 Jul 2016 00:30:33 +0300 Subject: yaml-cpp: use cmake wrapper --- src/yaml-cpp.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/yaml-cpp.mk b/src/yaml-cpp.mk index 2fd9860..99f60a6 100644 --- a/src/yaml-cpp.mk +++ b/src/yaml-cpp.mk @@ -15,8 +15,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1)' && $(TARGET)-cmake \ -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),OFF,ON) $(MAKE) -C '$(1)' -j $(JOBS) VERBOSE=1 -- cgit v0.12 From de305c205e3d668189e717c5385c80e1a57f5a10 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 16 Jul 2016 00:38:48 +0300 Subject: yaml-cpp: use SOURCE_DIR and BUILD_DIR variables --- src/yaml-cpp.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/yaml-cpp.mk b/src/yaml-cpp.mk index 99f60a6..d602d42 100644 --- a/src/yaml-cpp.mk +++ b/src/yaml-cpp.mk @@ -15,9 +15,10 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && $(TARGET)-cmake \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),OFF,ON) + cd '$(BUILD_DIR)' && $(TARGET)-cmake \ + -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),OFF,ON) \ + '$(SOURCE_DIR)' - $(MAKE) -C '$(1)' -j $(JOBS) VERBOSE=1 - $(MAKE) -C '$(1)' -j $(JOBS) install + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) VERBOSE=1 + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) install endef -- cgit v0.12 From a239f4ae925ca95366bb79ff91c650c5883dbe83 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 16 Jul 2016 00:39:41 +0300 Subject: yaml-cpp: use CMAKE_SHARED_BOOL variable --- src/yaml-cpp.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yaml-cpp.mk b/src/yaml-cpp.mk index d602d42..7f38ef0 100644 --- a/src/yaml-cpp.mk +++ b/src/yaml-cpp.mk @@ -16,7 +16,7 @@ endef define $(PKG)_BUILD cd '$(BUILD_DIR)' && $(TARGET)-cmake \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),OFF,ON) \ + -DBUILD_SHARED_LIBS=$(CMAKE_SHARED_BOOL) \ '$(SOURCE_DIR)' $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) VERBOSE=1 -- cgit v0.12 From 4e9a20bf4ed80daf5129a6e19ef239762e34ba19 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 16 Jul 2016 00:40:01 +0300 Subject: yaml-cpp: install with -j 1 --- src/yaml-cpp.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yaml-cpp.mk b/src/yaml-cpp.mk index 7f38ef0..2b32a00 100644 --- a/src/yaml-cpp.mk +++ b/src/yaml-cpp.mk @@ -20,5 +20,5 @@ define $(PKG)_BUILD '$(SOURCE_DIR)' $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) VERBOSE=1 - $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) install + $(MAKE) -C '$(BUILD_DIR)' -j 1 install endef -- cgit v0.12 From a7b14633233af00aef0035509ecfcba03e21ff11 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 16 Jul 2016 00:42:27 +0300 Subject: yaml-cpp: add dependency on boost Shared targets were broken. It tries to find boost which is not declared as a dependency of yaml-cpp. The upstream says "yaml-cpp 0.5.3 has been released! This is a bug fix release. It also will be the last release that uses Boost; futures releases will require C++11 instead." Build log: https://gist.github.com/2e8ada031d3ffd37f4a06324908a4d4a --- src/yaml-cpp.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yaml-cpp.mk b/src/yaml-cpp.mk index 2b32a00..30a0ecb 100644 --- a/src/yaml-cpp.mk +++ b/src/yaml-cpp.mk @@ -8,7 +8,7 @@ $(PKG)_CHECKSUM := ac50a27a201d16dc69a881b80ad39a7be66c4d755eda1f76c3a68781b922a $(PKG)_SUBDIR := $(PKG)-release-$($(PKG)_VERSION) $(PKG)_FILE := yaml-cpp-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/jbeder/yaml-cpp/archive/release-$($(PKG)_VERSION).tar.gz -$(PKG)_DEPS := gcc +$(PKG)_DEPS := gcc boost define $(PKG)_UPDATE $(call MXE_GET_GITHUB_TAGS, jbeder/yaml-cpp, \(yaml-cpp-\|release-\)) -- cgit v0.12 From b309c85202cf92f38e287836633eb105a97151e0 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 16 Jul 2016 01:35:16 +0300 Subject: index.html: description of yaml-cpp from upstream --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index fde5786..3c1030a 100644 --- a/index.html +++ b/index.html @@ -2743,7 +2743,7 @@ local-pkg-list: $(LOCAL_PKG_LIST) yaml-cpp - yaml-cpp + A YAML parser and emitter for C++ yasm -- cgit v0.12 From 1d6bc5b243592f882f5ee9e5e9290ca60c13fe7e Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 16 Jul 2016 01:53:45 +0300 Subject: yaml-cpp: install .pc file --- src/yaml-cpp-1-fixes.patch | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/yaml-cpp-1-fixes.patch diff --git a/src/yaml-cpp-1-fixes.patch b/src/yaml-cpp-1-fixes.patch new file mode 100644 index 0000000..73102ea --- /dev/null +++ b/src/yaml-cpp-1-fixes.patch @@ -0,0 +1,29 @@ +This file is part of MXE. +See index.html for further information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev +Date: Sat, 16 Jul 2016 00:24:39 +0200 +Subject: [PATCH] generate .pc file on MinGW + +Install to lib/pkgconfig, not to bin/pkgconfig. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -317,10 +317,10 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config-version.cmake.in + "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" @ONLY) + +-if(UNIX) ++if(UNIX OR MINGW) + set(PC_FILE ${CMAKE_BINARY_DIR}/yaml-cpp.pc) + configure_file("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY) +- install(FILES ${PC_FILE} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) ++ install(FILES ${PC_FILE} DESTINATION lib/pkgconfig) + endif() + + -- cgit v0.12 From e0d07d5e8b020ed02e19b2838fc99b42f00af729 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 16 Jul 2016 01:54:43 +0300 Subject: yaml-cpp: add test --- src/yaml-cpp-test.cpp | 8 ++++++++ src/yaml-cpp.mk | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 src/yaml-cpp-test.cpp diff --git a/src/yaml-cpp-test.cpp b/src/yaml-cpp-test.cpp new file mode 100644 index 0000000..2b91ba4 --- /dev/null +++ b/src/yaml-cpp-test.cpp @@ -0,0 +1,8 @@ +#include +#include + +int main() { + YAML::Node node = YAML::Load("[1, 2, 3]"); + assert(node.IsSequence()); + return 0; +} diff --git a/src/yaml-cpp.mk b/src/yaml-cpp.mk index 30a0ecb..40adc0f 100644 --- a/src/yaml-cpp.mk +++ b/src/yaml-cpp.mk @@ -21,4 +21,9 @@ define $(PKG)_BUILD $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) VERBOSE=1 $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` endef -- cgit v0.12