From 230c75d4ed6f5b813e2fb60370412f22d8ef0706 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Thu, 27 Dec 2018 11:43:33 +0100 Subject: [PATCH] libical: fix cross --- srcpkgs/libical/patches/fix-cross.patch | 24 ++++++++++++++++++++++++ srcpkgs/libical/template | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/libical/patches/fix-cross.patch diff --git a/srcpkgs/libical/patches/fix-cross.patch b/srcpkgs/libical/patches/fix-cross.patch new file mode 100644 index 00000000000..507c17ec353 --- /dev/null +++ b/srcpkgs/libical/patches/fix-cross.patch @@ -0,0 +1,24 @@ +diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt +index f0eaf01..5fc7cc2 100644 +--- a/src/libical-glib/CMakeLists.txt ++++ b/src/libical-glib/CMakeLists.txt +@@ -1,16 +1,10 @@ + add_definitions(-Dlibical_ical_EXPORTS) + +-# build the src-generator +-add_executable(src-generator +- tools/generator.c +- tools/generator.h +- tools/xml-parser.c +- tools/xml-parser.h ++add_custom_command( ++ OUTPUT ${EXECUTABLE_OUTPUT_PATH}/src-generator ++ COMMAND /usr/bin/cc ${CMAKE_CURRENT_SOURCE_DIR}/tools/generator.c ${CMAKE_CURRENT_SOURCE_DIR}/tools/xml-parser.c -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I${CMAKE_CURRENT_SOURCE_DIR}/tools/ -lxml2 -lglib-2.0 -o ${EXECUTABLE_OUTPUT_PATH}/src-generator + ) + +-target_compile_options(src-generator PUBLIC ${GLIB_CFLAGS} ${LIBXML_CFLAGS} -DG_LOG_DOMAIN=\"src-generator\") +-target_link_libraries(src-generator ${GLIB_LIBRARIES} ${LIBXML_LIBRARIES}) +- + list(APPEND API_FILES + api/i-cal-array.xml + api/i-cal-attach.xml diff --git a/srcpkgs/libical/template b/srcpkgs/libical/template index 7a4d7e9ac13..f6773868b5a 100644 --- a/srcpkgs/libical/template +++ b/srcpkgs/libical/template @@ -3,7 +3,7 @@ pkgname=libical version=3.0.4 revision=1 build_style=cmake -hostmakedepends="perl pkg-config" +hostmakedepends="libglib-devel libxml2-devel perl pkg-config" makedepends="libglib-devel libxml2-devel" checkdepends="tzdata" short_desc="Reference implementation of the iCalendar data type and format" @@ -12,7 +12,7 @@ license="LGPL-2.1, MPL-1" homepage="http://libical.github.io/libical/" distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz" checksum=20f39343701ccd3ad896a9f9e982fdf85c1d3a35572e9d962216b69a64aef2ae -nocross="tries to run generated files" +patch_args="-Np1" libical-devel_package() { depends="icu-devel ${sourcepkg}>=${version}_${revision}"