From 63d1f6e6f75b3763e3b21e0239cd31d999ee2272 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Sat, 7 May 2016 20:00:34 -0400 Subject: [PATCH] mingw-w64-graphite2 - 1.3.8 - build and install static library mingw-w64-graphite2 - 1.3.8 - build and install static library through patch. --- .../003-graphite2-1.3.8-staticbuild.patch | 58 +++++++++++++++++++ mingw-w64-graphite2/PKGBUILD | 11 ++-- 2 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 mingw-w64-graphite2/003-graphite2-1.3.8-staticbuild.patch diff --git a/mingw-w64-graphite2/003-graphite2-1.3.8-staticbuild.patch b/mingw-w64-graphite2/003-graphite2-1.3.8-staticbuild.patch new file mode 100644 index 0000000000..6824ab6af7 --- /dev/null +++ b/mingw-w64-graphite2/003-graphite2-1.3.8-staticbuild.patch @@ -0,0 +1,58 @@ +--- graphite2-1.3.8/src/CMakeLists.txt.orig 2016-04-29 04:04:30 -0400 ++++ graphite2-1.3.8/src/CMakeLists.txt 2016-04-29 04:49:19 -0400 +@@ -106,6 +106,48 @@ + LT_VERSION_REVISION ${GRAPHITE_API_REVISION} + LT_VERSION_AGE ${GRAPHITE_API_AGE}) + ++add_library(graphite2_static STATIC ++ ${GRAPHITE2_VM_TYPE}_machine.cpp ++ gr_char_info.cpp ++ gr_features.cpp ++ gr_face.cpp ++ gr_font.cpp ++ gr_logging.cpp ++ gr_segment.cpp ++ gr_slot.cpp ++ CachedFace.cpp ++ CmapCache.cpp ++ Code.cpp ++ Collider.cpp ++ Decompressor.cpp ++ Face.cpp ++ FeatureMap.cpp ++ Font.cpp ++ GlyphFace.cpp ++ GlyphCache.cpp ++ Intervals.cpp ++ Justifier.cpp ++ NameTable.cpp ++ Pass.cpp ++ Position.cpp ++ Segment.cpp ++ Silf.cpp ++ Slot.cpp ++ Sparse.cpp ++ TtfUtil.cpp ++ UtfCodec.cpp ++ ${FILEFACE} ++ ${SEGCACHE} ++ ${TRACING}) ++ ++set_target_properties(graphite2_static PROPERTIES PUBLIC_HEADER "${GRAPHITE_HEADERS}" ++ SOVERSION ${GRAPHITE_SO_VERSION} ++ VERSION ${GRAPHITE_VERSION} ++ LT_VERSION_CURRENT ${GRAPHITE_API_CURRENT} ++ LT_VERSION_REVISION ${GRAPHITE_API_REVISION} ++ LT_VERSION_AGE ${GRAPHITE_API_AGE} ++ OUTPUT_NAME graphite2) ++ + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set_target_properties(graphite2 PROPERTIES + 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" +@@ -151,5 +193,5 @@ + endif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + + +-install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin) ++install(TARGETS graphite2 graphite2_static EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin) + install(EXPORT graphite2 DESTINATION share/graphite2 NAMESPACE gr2_) diff --git a/mingw-w64-graphite2/PKGBUILD b/mingw-w64-graphite2/PKGBUILD index fe69e98ef4..5adae33949 100644 --- a/mingw-w64-graphite2/PKGBUILD +++ b/mingw-w64-graphite2/PKGBUILD @@ -4,7 +4,7 @@ _realname=graphite2 pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.3.8 -pkgrel=2 +pkgrel=3 pkgdesc="Font rendering capabilities for complex non-Roman writing systems (mingw-w64)" arch=('any') url="https://github.com/silnrsi/graphite" @@ -13,15 +13,18 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake") options=('strip' 'staticlibs') source=("https://github.com/silnrsi/graphite/releases/download/${pkgver}/${_realname}-${pkgver}.tgz" "001-graphite2-1.3.8-win64.patch" - "002-graphite2-1.2.1-pkgconfig.patch") + "002-graphite2-1.2.1-pkgconfig.patch" +"003-graphite2-1.3.8-staticbuild.patch") sha256sums=('9f3f25b3a8495ce0782e77f69075c0dd9b7c054847b9bf9ff130bec38f4c8cc2' 'bd6e108929110fcbfd69434221974395a4839710432fe58a9aa432e95bdf4354' - '22bef0d90c0266b3b0eff01859c1e002f84c165d12242c2bfc153f8f98fb272a') + '22bef0d90c0266b3b0eff01859c1e002f84c165d12242c2bfc153f8f98fb272a' + 'a7d17b8de6bec8d383f62c2a61d6eac86390a7287f5ceebf550bc19155a5adf0') prepare() { cd "${srcdir}"/${_realname}-${pkgver} patch -p1 -i "${srcdir}"/001-graphite2-1.3.8-win64.patch patch -p1 -i "${srcdir}"/002-graphite2-1.2.1-pkgconfig.patch + patch -p1 -i "${srcdir}"/003-graphite2-1.3.8-staticbuild.patch # python2 fixes sed -i "s:\/usr\/bin\/python:\/usr\/bin\/python2:" tests/{corrupt.py,defuzz,fnttxtrender,fuzzbidi,fuzztest,hbspeeds,jsoncmp} } @@ -58,7 +61,7 @@ build() { -G'MSYS Makefiles' \ -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ "${extra_config[@]}" \ - -DBUILD_{SHARED,STATIC}_LIBS=ON \ + -DBUILD_SHARED_LIBS=ON \ -DGRAPHITE2_COMPARE_RENDERER=ON \ ../${_realname}-${pkgver}