Merge pull request #1396 from JPeterMugaas/graphite2

mingw-w64-graphite2 - 1.3.8 - build and install static library
This commit is contained in:
Alexpux
2016-05-10 09:30:42 +04:00
2 changed files with 65 additions and 4 deletions

View File

@@ -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_)

View File

@@ -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}