graphite2: new package
PATCH 1/1 graphite2: new package
From: Gustavo Zacarias <[email protected]>
--- package/Config.in | 1 + .../graphite2/0001-disable-double-promotion.patch | 18 +++++++++++++++++ package/graphite2/Config.in | 13 ++++++++++++ package/graphite2/graphite2.hash | 3 +++ package/graphite2/graphite2.mk | 23 ++++++++++++++++++++++ 5 files changed, 58 insertions(+) create mode 100644 package/graphite2/0001-disable-double-promotion.patch create mode 100644 package/graphite2/Config.in create mode 100644 package/graphite2/graphite2.hash create mode 100644 package/graphite2/graphite2.mk
package/Config.in +1 -0
@@ -803,6 +803,7 @@ menu "Graphics" source "package/gdk-pixbuf/Config.in" source "package/giblib/Config.in" source "package/giflib/Config.in" + source "package/graphite2/Config.in" source "package/harfbuzz/Config.in" source "package/ijs/Config.in" source "package/imlib2/Config.in"
package/graphite2/0001-disable-double-promotion.patch new file +18 -0
@@ -0,0 +1,18 @@ +The warnig flag isn't recognized for older GCC versions (blackfin), +so just disable it. + +Signed-off-by: Gustavo Zacarias <[email protected]> + +diff -Nura graphite2-1.3.3.orig/src/CMakeLists.txt graphite2-1.3.3/src/CMakeLists.txt +--- graphite2-1.3.3.orig/src/CMakeLists.txt 2015-09-24 10:06:28.877851596 -0300 ++++ graphite2-1.3.3/src/CMakeLists.txt 2015-09-24 10:06:48.201519767 -0300 +@@ -111,9 +111,6 @@ + COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector" + LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}" + LINKER_LANGUAGE C) +- if (CMAKE_COMPILER_IS_GNUCXX) +- add_definitions(-Wdouble-promotion) +- endif (CMAKE_COMPILER_IS_GNUCXX) + if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") + target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32) + else (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*")
package/graphite2/Config.in new file +13 -0
@@ -0,0 +1,13 @@ +config BR2_PACKAGE_GRAPHITE2 + bool "graphite2" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + help + Graphite is a project within SIL's scripts and software dev + groups to provide cross-platform rendering for complex + writing systems. + + http://sourceforge.net/projects/silgraphite/ + +comment "graphite2 needs a toolchain w/ C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS
package/graphite2/graphite2.hash new file +3 -0
@@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/silgraphite/files/graphite2 +md5 7cda6fc6bc197b216777b15ce52c38a8 graphite2-1.3.3.tgz +sha1 54b04c283bab4695de63ae2dd6cff392dd49d7f0 graphite2-1.3.3.tgz
package/graphite2/graphite2.mk new file +23 -0
@@ -0,0 +1,23 @@ +################################################################################ +# +# graphite2 +# +################################################################################ + +GRAPHITE2_VERSION = 1.3.3 +GRAPHITE2_SOURCE = graphite2-$(GRAPHITE2_VERSION).tgz +GRAPHITE2_SITE = http://downloads.sourceforge.net/project/silgraphite/graphite2 +GRAPHITE2_INSTALL_STAGING = YES +GRAPHITE2_LICENSE = LGPLv2.1+ +GRAPHITE2_LICENSE_FILES = LICENSE + +# Avoid building docs and tests to save time +define GRAPHITE2_DISABLE_TESTS_DOC + $(SED) '/^add_subdirectory(doc)/d' \ + -e '/^add_subdirectory(tests)/d' \ + -e '/add_subdirectory(gr2fonttest)/d' \ + $(@D)/CMakeLists.txt +endef +GRAPHITE2_PRE_CONFIGURE_HOOKS += GRAPHITE2_DISABLE_TESTS_DOC + +$(eval $(cmake-package))
Signature · 1 line
2.4.9
PATCH 1/1 graphite2: new package
Dear Gustavo Zacarias,
Quoted 3 lines · gustavo.zacarias at free-electrons.com
From: Gustavo Zacarias <[email protected]>
Signed-off-by Gustavo Zacarias <[email protected]>
Build test for MIPS architecture:
$ file output/target/usr/lib/libgraphite2.so.3.0.1 output/target/usr/lib/libgraphite2.so.3.0.1: ELF 64-bit LSB shared object, MIPS, MIPS64 rel2 version 1 (SYSV), dynamically linked, with unknown capability 0x756e670000000f41 = 0x104000000070100, stripped
One nit-pick comment below; please scroll down.
[snip]
Quoted 6 lines
package/graphite2/Config.in new file +0
-0
package/graphite2/Config.in line 8
Quoted 8 lines
package/graphite2/Config.in new file +8
-0@@ -0,0 +1,13 @@ +config BR2_PACKAGE_GRAPHITE2 + bool "graphite2" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + help + Graphite is a project within SIL's scripts and software dev + groups to provide cross-platform rendering for complex + writing systems.
You could have the same in only two lines if you wrap them to 72 characters.
Regards,
Vincent.
[snip]
PATCH 1/1 graphite2: new package
In reply to gustavo.zacarias at free-electrons.comGustavo,
Quoted 3 lines · gustavo.zacarias at free-electrons.com
From: Gustavo Zacarias <[email protected]>
Signed-off-by Gustavo Zacarias <[email protected]>
I've applied your patch after some minor tweaks:
[Thomas:
- tweak description of the patch
- turn the doc/test removal hook as a post patch hook rather than a pre-configure hook.]
However, I have a few suggestions below.
package/graphite2/0001-disable-double-promotion.patch line 15
Quoted 10 lines
package/graphite2/0001-disable-double-promotion.patch new file +10
-0+diff -Nura graphite2-1.3.3.orig/src/CMakeLists.txt graphite2-1.3.3/src/CMakeLists.txt +--- graphite2-1.3.3.orig/src/CMakeLists.txt 2015-09-24 10:06:28.877851596 -0300 ++++ graphite2-1.3.3/src/CMakeLists.txt 2015-09-24 10:06:48.201519767 -0300 +@@ -111,9 +111,6 @@ + COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector" + LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}" + LINKER_LANGUAGE C) +- if (CMAKE_COMPILER_IS_GNUCXX) +- add_definitions(-Wdouble-promotion) +- endif (CMAKE_COMPILER_IS_GNUCXX)
Isn't it possible with CMake to test if the compiler supports a certain option, and if it does, use it? It would be nicer than this patch, and would be upstreamable.
package/graphite2/graphite2.mk line 21
Quoted 8 lines
package/graphite2/graphite2.mk new file +8
-0+# Avoid building docs and tests to save time +define GRAPHITE2_DISABLE_TESTS_DOC + $(SED) '/^add_subdirectory(doc)/d' \ + -e '/^add_subdirectory(tests)/d' \ + -e '/add_subdirectory(gr2fonttest)/d' \ + $(@D)/CMakeLists.txt +endef +GRAPHITE2_PRE_CONFIGURE_HOOKS += GRAPHITE2_DISABLE_TESTS_DOC
What about submitting an upstream patch (upstream seems active, 1.3.3 was released 5 days ago) that uses the BUILD_DOCS and BUILD_TESTS variables, which are somewhat standard in many CMake packages ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com