[oe] [meta-oe][PATCH v2] libharu: New recipe

Zheng, Ruoqin zhengrq.fnst at cn.fujitsu.com
Wed Feb 26 03:06:53 UTC 2020


Ping

--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
       Nanjing, 210012, China
MAIL : zhengrq.fnst at cn.fujistu.com



> -----Original Message-----
> From: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst at cn.fujitsu.com>
> Sent: Wednesday, February 19, 2020 5:22 PM
> To: openembedded-devel at lists.openembedded.org
> Cc: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst at cn.fujitsu.com>
> Subject: [oe][meta-oe][PATCH v2] libharu: New recipe
> 
> libHaru is a library for generating PDF files.
> 
> Signed-off-by: Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com>
> ---
>  .../libharu/libharu-RELEASE_2_3_0_cmake.patch      | 52
> ++++++++++++++++++++++
>  meta-oe/recipes-support/libharu/libharu_2.3.0.bb   | 24 ++++++++++
>  2 files changed, 76 insertions(+)
>  create mode 100644 meta-oe/recipes-support/libharu/libharu/libharu-
> RELEASE_2_3_0_cmake.patch
>  create mode 100644 meta-oe/recipes-support/libharu/libharu_2.3.0.bb
> 
> diff --git a/meta-oe/recipes-support/libharu/libharu/libharu-
> RELEASE_2_3_0_cmake.patch b/meta-oe/recipes-
> support/libharu/libharu/libharu-RELEASE_2_3_0_cmake.patch
> new file mode 100644
> index 0000000..332be1b
> --- /dev/null
> +++ b/meta-oe/recipes-support/libharu/libharu/libharu-RELEASE_2_3_0_cmak
> +++ e.patch
> @@ -0,0 +1,52 @@
> +Backport from Fedora Project.
> +https://src.fedoraproject.org/rpms/libharu
> +
> +Fix the install destination of some files.
> +
> +Upstream-Status: inappropriate
> +
> +Signed-off-by: Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com>
> +
> +diff -urp libharu-RELEASE_2_3_0/CMakeLists.txt libharu-
> RELEASE_2_3_0_cmake/CMakeLists.txt
> +--- libharu-RELEASE_2_3_0/CMakeLists.txt	2013-10-30
> 20:11:59.000000000 +0700
> ++++ libharu-RELEASE_2_3_0_cmake/CMakeLists.txt	2017-06-01
> 15:56:06.533552795 +0700
> +@@ -25,7 +25,7 @@ endif(MSVC)
> +
> + # information about libharu
> + set(LIBHPDF_MAJOR 2)
> +-set(LIBHPDF_MINOR 2)
> ++set(LIBHPDF_MINOR 3)
> + set(LIBHPDF_PATCH 0)
> + set(LIBHPDF_VERSION
> +${LIBHPDF_MAJOR}.${LIBHPDF_MINOR}.${LIBHPDF_PATCH})
> + set(LIBHPDF_DESCRIPTION "libHaru is a free, cross platform, open
> +source library for generating PDF files.") @@ -210,9 +210,9 @@ set(
> +install(FILES ${haru_HDRS} DESTINATION include)
> +
> + # install various files
> +-install(FILES README CHANGES INSTALL DESTINATION .)
> ++install(FILES README CHANGES INSTALL DESTINATION
> ++${SHARE_INSTALL_PREFIX}/libharu)
> + if(NOT DEVPAK)
> +-  install(DIRECTORY if DESTINATION .)
> ++  install(DIRECTORY if DESTINATION ${SHARE_INSTALL_PREFIX}/libharu)
> + endif(NOT DEVPAK)
> + if(DEVPAK)
> +   install(FILES ${CMAKE_BINARY_DIR}/libharu.DevPackage DESTINATION .)
> +diff -urp libharu-RELEASE_2_3_0/src/CMakeLists.txt libharu-
> RELEASE_2_3_0_cmake/src/CMakeLists.txt
> +--- libharu-RELEASE_2_3_0/src/CMakeLists.txt	2013-10-30
> 20:11:59.000000000 +0700
> ++++ libharu-RELEASE_2_3_0_cmake/src/CMakeLists.txt	2017-06-01
> 16:08:45.425105746 +0700
> +@@ -90,11 +90,13 @@ if(LIBHPDF_SHARED)
> +   target_link_libraries(${LIBHPDF_NAME} ${ADDITIONAL_LIBRARIES})
> +   if(WIN32 AND NOT CYGWIN)
> +   	set_target_properties(${LIBHPDF_NAME} PROPERTIES DEFINE_SYMBOL
> +HPDF_DLL_MAKE)
> ++  else(WIN32 AND NOT CYGWIN)
> ++  	set_target_properties(${LIBHPDF_NAME} PROPERTIES SOVERSION
> ++ ${LIBHPDF_VERSION})
> +   endif(WIN32 AND NOT CYGWIN)
> +   install(
> +     TARGETS ${LIBHPDF_NAME}
> +-    ARCHIVE DESTINATION lib
> +-    LIBRARY DESTINATION lib
> ++    ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
> ++    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
> +     RUNTIME DESTINATION bin
> +   )
> + endif(LIBHPDF_SHARED)
> diff --git a/meta-oe/recipes-support/libharu/libharu_2.3.0.bb b/meta-
> oe/recipes-support/libharu/libharu_2.3.0.bb
> new file mode 100644
> index 0000000..359f615
> --- /dev/null
> +++ b/meta-oe/recipes-support/libharu/libharu_2.3.0.bb
> @@ -0,0 +1,24 @@
> +SUMMARY = "free PDF library"
> +HOMEPAGE = "http://libharu.org"
> +DESCRIPTION = "libHaru is a library for generating PDF files. \
> +               It is free, open source, written in ANSI C and cross platform. "
> +
> +LICENSE = "Zlib"
> +LIC_FILES_CHKSUM =
> "file://README;md5=3ee6bc1f64d9cc7907f44840c8e50cb1"
> +
> +SRC_URI =
> "https://github.com/libharu/${BPN}/archive/RELEASE_${@d.getVar('PV').replac
> e('.','_')}.tar.gz \
> +           file://libharu-RELEASE_2_3_0_cmake.patch \
> +	   "
> +
> +SRC_URI[md5sum] = "4f916aa49c3069b3a10850013c507460"
> +SRC_URI[sha256sum] =
> "8f9e68cc5d5f7d53d1bc61a1ed876add1faf4f91070dbc360d8b259f46d9a4d2"
> +
> +S = "${WORKDIR}/${BPN}-RELEASE_${@d.getVar('PV').replace('.','_')}"
> +
> +inherit cmake
> +DEPENDS += "libpng zlib"
> +
> +do_install_append() {
> +     mkdir -p ${D}/${datadir}/libharu
> +     mv ${D}/libharu ${D}/${datadir}
> +}
> --
> 2.7.4





More information about the Openembedded-devel mailing list