Skip to content
Permalink
Browse files

graphite2: Update to 1.3.12

* Use github 1.0 portgroup
* Use cxx11 1.1 portgroup; 1.3.12 and later require C++11
* Update to cmake 1.1 portgroup
* Remove patch-src-Face.cpp.diff as it builds without this
* Re-enable the featuremap test as it works now
* Add fonttools and python36 test dependencies
* Remove test.env as tests pass without it
* Remove cppflags-replace no longer needed after cmake portgroup fix
* Remove removal of -fno-stack-protector on Darwin 8 as upstream no
  longer uses this flag
* Remove disabling segment caching code on PowerPC as upstream has
  removed the segment caching code as of 1.3.12
* Remove muniversal 1.0 portgroup no longer needed due to above

See: https://trac.macports.org/ticket/42872

Closes: https://trac.macports.org/ticket/54141
  • Loading branch information
dgilman authored and ryandesign committed Sep 18, 2018
1 parent 628484f commit 88eb4637a61a79a8bfc27d2d019179aa67d50293
@@ -1,14 +1,19 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup cmake 1.0
PortGroup muniversal 1.0
PortGroup cmake 1.1
PortGroup cxx11 1.1
PortGroup github 1.0

github.setup silnrsi graphite 1.3.12
checksums rmd160 a8f2ad6f5921f893ccda73fe988fe69fc431db90 \
sha256 cd9530c16955c181149f9af1f13743643771cb920c75a04c95c77c871a2029d0 \
size 6667293

name graphite2
version 1.3.9
categories graphics
platforms darwin
maintainers ryandesign openmaintainer
maintainers {ryandesign @ryandesign} openmaintainer
license LGPL-2.1+

description a “smart font” system for lesser-known languages
@@ -18,54 +23,15 @@ long_description Graphite is a “smart font” system developed specifically
the world.

homepage http://graphite.sil.org/
master_sites sourceforge:project/silgraphite/graphite2
github.tarball_from releases
distname ${name}-${version}
extract.suffix .tgz

checksums rmd160 cc69347fcc1a7cb2b332377e51d652ccac5d712c \
sha256 ec0185b663059553fd46e8c4a4f0dede60a02f13a7a1fefc2ce70332ea814567

patchfiles patch-src-CMakeLists.txt.diff \
patch-src-Face.cpp.diff

# gcc version 4.0.1 (Apple Computer, Inc. build 5370) (from Xcode 2.5 on Tiger) is affected.
# apple-gcc42 @5666.3_10 doesn't contain a c++ compiler so it falls back to the affected Xcode compiler.
# gcc version 4.0.1 (Apple Inc. build 5493) (from Xcode 3.1.4 on Leopard) is not affected.
# Other versions of gcc 4.0 not tested. Later versions of gcc are not affected.
platform darwin 8 {
post-patch {
# https://sourceforge.net/p/silgraphite/bugs/50/
reinplace -W ${worksrcpath} "s|-fno-stack-protector||g" src/CMakeLists.txt tests/CMakeLists.txt
}
}

post-patch {
# https://trac.macports.org/ticket/37947
# https://sourceforge.net/p/silgraphite/bugs/54/
reinplace "/add_subdirectory(featuremap)/d" ${worksrcpath}/tests/CMakeLists.txt
}

# fix upgrade failure
configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include
patchfiles-append patch-src-CMakeLists.txt.diff

test.run yes
test.env DYLD_LIBRARY_PATH=${worksrcpath}/src

pre-test {
# https://sourceforge.net/p/silgraphite/bugs/48/
set python_installed_version [strsed [exec python --version 2>@1] {g/Python //}]
set python_minimum_version 2.6
if {[vercmp ${python_installed_version} ${python_minimum_version}] < 0} {
ui_error "Testing ${name} requires Python ${python_minimum_version} or later but your “python” is version ${python_installed_version}."
return -code error "incompatible python version"
}
}

# Disable segment caching code on PowerPC where it fails to build.
# https://sourceforge.net/p/silgraphite/bugs/49/
set merger_configure_args(ppc) -DGRAPHITE2_NSEGCACHE:BOOL=ON
set merger_configure_args(ppc64) -DGRAPHITE2_NSEGCACHE:BOOL=ON
if {![variant_isset universal] && [info exists merger_configure_args(${configure.build_arch})]} {
configure.args-append $merger_configure_args(${configure.build_arch})
}

livecheck.regex /${name}-(\[0-9.\]+)${extract.suffix}
#test.env ARGS=-V
# Use the same python as fonttools.
configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python3.6
depends_test port:fonttools \
port:python36
@@ -3,19 +3,24 @@ https://sourceforge.net/p/silgraphite/bugs/56/

Use -Wimplicit-fallthrough only with clang, to prevent compile failure with gcc.
https://sourceforge.net/p/silgraphite/bugs/60/
--- src/CMakeLists.txt.orig 2016-01-14 22:17:18.000000000 -0600
+++ src/CMakeLists.txt 2016-02-17 00:35:03.000000000 -0600
@@ -135,9 +135,11 @@

Use -mfpmath=sse -msse2 only on Intel.
--- src/CMakeLists.txt.orig 2018-08-15 00:38:09.000000000 -0500
+++ src/CMakeLists.txt 2018-10-01 12:46:50.000000000 -0500
@@ -136,9 +136,14 @@

if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set_target_properties(graphite2 PROPERTIES
- COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wimplicit-fallthrough -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector"
- LINK_FLAGS "-nodefaultlibs"
+ COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector"
set_target_properties(graphite2 PROPERTIES
- COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wimplicit-fallthrough -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -mfpmath=sse -msse2"
- LINK_FLAGS "-nodefaultlibs"
+ COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden"
LINKER_LANGUAGE C)
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+ if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
+ add_definitions(-mfpmath=sse -msse2)
+ endif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
+ if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+ add_definitions(-Wimplicit-fallthrough)
+ endif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+ endif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
target_link_libraries(graphite2 c)
include(Graphite)
nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)

This file was deleted.

0 comments on commit 88eb463

Please sign in to comment.
You can’t perform that action at this time.