From 73174e13cf616381fe9e474796d0ce2af38732a6 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Sat, 1 Mar 2014 17:09:46 +0100 Subject: [PATCH] libpoco: using cmake in version 1.5.2 (resolves #138, #151, #152) --- ...for-CONFIGURE_FILE-in-CMakeLists.txt.patch | 42 ++++++++++ recipes-extended/libpoco/libpoco/OE | 78 ------------------- .../libpoco/add_pcre_utf8_objects.patch | 11 --- recipes-extended/libpoco/libpoco_1.4.6p1.bb | 35 --------- recipes-extended/libpoco/libpoco_1.5.2.bb | 18 +++++ 5 files changed, 60 insertions(+), 124 deletions(-) create mode 100644 recipes-extended/libpoco/libpoco/0001-correct-path-for-CONFIGURE_FILE-in-CMakeLists.txt.patch delete mode 100644 recipes-extended/libpoco/libpoco/OE delete mode 100644 recipes-extended/libpoco/libpoco/add_pcre_utf8_objects.patch delete mode 100644 recipes-extended/libpoco/libpoco_1.4.6p1.bb create mode 100644 recipes-extended/libpoco/libpoco_1.5.2.bb diff --git a/recipes-extended/libpoco/libpoco/0001-correct-path-for-CONFIGURE_FILE-in-CMakeLists.txt.patch b/recipes-extended/libpoco/libpoco/0001-correct-path-for-CONFIGURE_FILE-in-CMakeLists.txt.patch new file mode 100644 index 0000000..77661ce --- /dev/null +++ b/recipes-extended/libpoco/libpoco/0001-correct-path-for-CONFIGURE_FILE-in-CMakeLists.txt.patch @@ -0,0 +1,42 @@ +From ee7e02737b599d90f628252202e5a9969d050f5e Mon Sep 17 00:00:00 2001 +From: Lukas Bulwahn +Date: Sat, 1 Mar 2014 16:32:32 +0100 +Subject: [PATCH] correct path for CONFIGURE_FILE in CMakeLists.txt + +If CMAKE_MODULE_PATH is empty before appending +'${CMAKE_CURRENT_SOURCE_DIR}/cmake' to it (CMakeLists.txt:27), +CONFIGURE_FILE (CMakeLists.txt:182) works as intended. +However, when CMAKE_MODULE_PATH is not empty, e.g., because of +further tool-chain settings, CONFIGURE_FILE fails with: + +CMake Error: File ;/cmake/cmake_uninstall.cmake.in does not exist. +| CMake Error at CMakeLists.txt:182 (CONFIGURE_FILE): +| configure_file Problem configuring file + +This commit addresses this problem by only using +'${CMAKE_CURRENT_SOURCE_DIR}/cmake' in CONFIGURE_FILE. +The problem was discovered in the meta-ros layer project +(http://github.com/bmwcarit/meta-ros) when creating a libpoco +bitbake recipe, which uses poco's cmake installation scripts. + +Signed-off-by: Lukas Bulwahn +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8d02f13..1c9f523 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -180,7 +180,7 @@ endif(APRUTIL_FOUND AND APACHE_FOUND) + ############################################################# + # Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ + CONFIGURE_FILE( +- "${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in" ++ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + +-- +1.8.3.1 + diff --git a/recipes-extended/libpoco/libpoco/OE b/recipes-extended/libpoco/libpoco/OE deleted file mode 100644 index 516b5cb..0000000 --- a/recipes-extended/libpoco/libpoco/OE +++ /dev/null @@ -1,78 +0,0 @@ -# -# $Id: //poco/1.3/build/config/Angstrom#1 $ -# -# Angstrom -# -# Make settings for Open Embedded/Angstrom -# -# ^^^ I wonder what the guy who wrote the above lines was thinking... -# Yeah, right, Angstrom is only for ARM, and why would we want to override -# the compiler name? What, uclibc, what is that? And please also explain us -# what environment variables are! - - -# -# General Settings -# -LINKMODE = SHARED -POCO_TARGET_OSNAME = Linux -POCO_TARGET_OSARCH ?= armv5te -TOOL ?= arm-angstrom-linux-gnueabi - -# -# Define Tools -# -CC ?= $(TOOL)-gcc -CXX ?= $(TOOL)-g++ -LINK ?= $(CXX) -STRIP ?= $(TOOL)-strip -LIB ?= $(TOOL)-ar -cr -RANLIB ?= $(TOOL)-ranlib -SHLIB ?= $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@ -SHLIBLN ?= $(POCO_BASE)/build/script/shlibln -DEP ?= $(POCO_BASE)/build/script/makedepend.gcc -SHELL ?= sh -RM ?= rm -rf -CP ?= cp -MKDIR ?= mkdir -p - -# -# Extension for Shared Libraries -# -SHAREDLIBEXT = .so.$(target_version) -SHAREDLIBLINKEXT = .so - -# -# Compiler and Linker Flags -# -CFLAGS = -Isrc -CFLAGS32 = -CFLAGS64 = -CXXFLAGS = -CXXFLAGS32 = -CXXFLAGS64 = -LINKFLAGS = -LINKFLAGS32 = -LINKFLAGS64 = -STATICOPT_CC = -STATICOPT_CXX = -STATICOPT_LINK = -static -SHAREDOPT_CC = -fPIC -SHAREDOPT_CXX = -fPIC -SHAREDOPT_LINK = -Wl,-rpath,$(LIBPATH) -DEBUGOPT_CC = -g -D_DEBUG -DEBUGOPT_CXX = -g -D_DEBUG -DEBUGOPT_LINK = -g -RELEASEOPT_CC = -O3 -DNDEBUG -RELEASEOPT_CXX = -O2 -DNDEBUG -RELEASEOPT_LINK = -O2 - -# -# System Specific Flags -# -SYSFLAGS = -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_REENTRANT -D_THREAD_SAFE -DPOCO_NO_FPENVIRONMENT - -# -# System Specific Libraries -# -SYSLIBS = -lpthread -ldl -lrt diff --git a/recipes-extended/libpoco/libpoco/add_pcre_utf8_objects.patch b/recipes-extended/libpoco/libpoco/add_pcre_utf8_objects.patch deleted file mode 100644 index 2f0b94d..0000000 --- a/recipes-extended/libpoco/libpoco/add_pcre_utf8_objects.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur a/Foundation/Makefile b/Foundation/Makefile ---- a/Foundation/Makefile 2013-07-26 13:16:29.590566734 +0200 -+++ b/Foundation/Makefile 2013-07-26 13:19:34.138559575 +0200 -@@ -44,6 +44,7 @@ - - ifdef POCO_UNBUNDLED - SYSLIBS += -lpcre -lz -+ objects += $(pcre_utf8_objects) - else - objects += $(zlib_objects) $(pcre_objects) $(pcre_utf8_objects) - endif diff --git a/recipes-extended/libpoco/libpoco_1.4.6p1.bb b/recipes-extended/libpoco/libpoco_1.4.6p1.bb deleted file mode 100644 index bde0c35..0000000 --- a/recipes-extended/libpoco/libpoco_1.4.6p1.bb +++ /dev/null @@ -1,35 +0,0 @@ -DESCRIPTION = "POCO C++ Libraries" -HOMEPAGE = "http://pocoproject.org" -LICENSE = "BSL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e4224ccaecb14d942c71d31bef20d78c" - -PR = "r1" - -DEPENDS = "expat zlib libpcre openssl" - -SRC_URI = "${SOURCEFORGE_MIRROR}/poco/poco-${PV}-all.tar.bz2 \ - file://OE \ - file://add_pcre_utf8_objects.patch" -SRC_URI[md5sum] = "2598b53d481e2bd3fb92bd23172abe53" -SRC_URI[sha256sum] = "95af0382257614c70841629c928184cddc228831a8bfc4c57399931bed8a16f8" - -S = "${WORKDIR}/poco-${PV}-all" - -inherit autotools binconfig pkgconfig - -TARGET_CC_ARCH += "${LDFLAGS}" - -EXTRA_OECONF += "--config=OE --no-samples --no-wstring --no-tests --unbundled \ - --omit=Data/MySQL,Data/SQLite,Data/ODBC,PageCompiler \ - " - -EXTRA_OEMAKE += 'STRIP=""' - -do_configure_prepend() { - install ${WORKDIR}/OE ${S}/build/config/OE - export POCO_TARGET_OSARCH=${TARGET_ARCH} -} - -do_install_append () { - rmdir ${D}${bindir} -} diff --git a/recipes-extended/libpoco/libpoco_1.5.2.bb b/recipes-extended/libpoco/libpoco_1.5.2.bb new file mode 100644 index 0000000..d4e6897 --- /dev/null +++ b/recipes-extended/libpoco/libpoco_1.5.2.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "POCO C++ Libraries" +HOMEPAGE = "http://pocoproject.org" +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e4224ccaecb14d942c71d31bef20d78c" + +DEPENDS = "expat zlib libpcre openssl" + +SRC_URI = "https://github.com/pocoproject/poco/archive/poco-${PV}-release.tar.gz" +SRC_URI[md5sum] = "4ed751311fe4eb437a485139fcfdf558" +SRC_URI[sha256sum] = "315f0947b3494172cb2833d7c978fc24f16f6f10dd1a5299e83b81fee7b62f27" + +SRC_URI += "file://0001-correct-path-for-CONFIGURE_FILE-in-CMakeLists.txt.patch" + +S = "${WORKDIR}/poco-poco-${PV}-release" + +EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Release" + +inherit cmake