import graphite2-1.3.10-10.el8

c8 imports/c8/graphite2-1.3.10-10.el8
CentOS Sources 6 years ago committed by MSVSphere Packaging Team
commit 0b99e1b235

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/graphite2-1.3.10.tgz

@ -0,0 +1 @@
668f3bce96fc02d90ea875b401ed36b2e8957d2f SOURCES/graphite2-1.3.10.tgz

@ -0,0 +1,46 @@
From 940d82895512737db2ad6b7698d8d7d140356a7e Mon Sep 17 00:00:00 2001
From: Tim Eves <tim_eves@sil.org>
Date: Thu, 16 Nov 2017 17:12:32 +0700
Subject: [PATCH] Fix memory leaks on realloc failure
Make sure the original buffer is cleaned up if realoc fails.
---
src/Code.cpp | 6 +++++-
src/Pass.cpp | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/Code.cpp b/src/Code.cpp
index 92ba923..a5ec04e 100644
--- a/src/Code.cpp
+++ b/src/Code.cpp
@@ -219,7 +219,11 @@ Machine::Code::Code(bool is_constraint, const byte * bytecode_begin, const byte
if (_out)
*_out += total_sz;
else
- _code = static_cast<instr *>(realloc(_code, total_sz));
+ {
+ instr * const old_code = _code;
+ _code = static_cast<instr *>(realloc(_code, total_sz));
+ if (!_code) free(old_code);
+ }
_data = reinterpret_cast<byte *>(_code + (_instr_count+1));
if (!_code)
diff --git a/src/Pass.cpp b/src/Pass.cpp
index ae0e9df..1d45bf8 100644
--- a/src/Pass.cpp
+++ b/src/Pass.cpp
@@ -273,7 +273,9 @@ bool Pass::readRules(const byte * rule_map, const size_t num_entries,
byte * moved_progs = static_cast<byte *>(realloc(m_progs, prog_pool_free - m_progs));
if (e.test(!moved_progs, E_OUTOFMEM))
{
- if (prog_pool_free - m_progs == 0) m_progs = 0;
+ free(m_progs);
+ m_progs = 0;
+ // coverity[leaked_storage : FALSE] - can only get to here if moved_progs is nullptr
return face.error(e);
}
--
2.17.0

@ -0,0 +1,268 @@
From cf872f3053dd5b0af7b3b4f583bcce9d5bb953c2 Mon Sep 17 00:00:00 2001
From: Tim Eves <tim_eves@sil.org>
Date: Wed, 5 Jul 2017 21:27:03 +0700
Subject: [PATCH] Fix stricter gcc warnings
Also get rid of auto_ptr from comparerenderer
---
src/gr_logging.cpp | 2 +-
tests/comparerenderer/RenderedLine.h | 14 ++++++--------
tests/comparerenderer/Gr2Renderer.h | 166 ++++++++++++++--------------
diff --git a/src/gr_logging.cpp b/src/gr_logging.cpp
index 3e453ba..b75a394 100644
--- a/src/gr_logging.cpp
+++ b/src/gr_logging.cpp
@@ -214,7 +214,7 @@ json & graphite2::operator << (json & j, const dslot & ds) throw()
j << "user" << json::flat << json::array;
for (int n = 0; n!= seg.numAttrs(); ++n)
j << s.userAttrs()[n];
- j << json::close;
+ j << json::close;
if (s.firstChild())
{
j << "children" << json::flat << json::array;
diff --git a/tests/comparerenderer/RenderedLine.h b/tests/comparerenderer/RenderedLine.h
index fb8398d..649fb63 100644
--- a/tests/comparerenderer/RenderedLine.h
+++ b/tests/comparerenderer/RenderedLine.h
@@ -99,9 +99,9 @@ class RenderedLine
{
public:
RenderedLine()
- : m_text(NULL), m_numGlyphs(0), m_advance(0), m_glyphs(NULL)
+ : m_numGlyphs(0), m_advance(0), m_glyphs(NULL)
{}
- RenderedLine(std::string *text, size_t numGlyphs, float adv = 0.0f)
+ RenderedLine(const std::string & text, size_t numGlyphs, float adv = 0.0f)
: m_text(text), m_numGlyphs(numGlyphs), m_advance(adv), m_glyphs(new GlyphInfo[numGlyphs])
{
}
@@ -109,12 +109,11 @@ class RenderedLine
{
delete [] m_glyphs;
m_glyphs = NULL;
- delete m_text;
}
void setAdvance(float newAdv) { m_advance = newAdv; }
void dump(FILE * f)
{
- fprintf(f, "{\"%s\" : [", m_text->c_str());
+ fprintf(f, "{\"%s\" : [", m_text.c_str());
for (size_t i = 0; i < m_numGlyphs; i++)
{
//fprintf(f, "%2u", (unsigned int)i);
@@ -157,9 +156,8 @@ class RenderedLine
return true;
}
private:
- size_t m_numGlyphs;
- float m_advance;
+ size_t m_numGlyphs;
+ float m_advance;
GlyphInfo * m_glyphs;
- std::string * m_text;
+ std::string m_text;
};
-
--
diff --git a/tests/comparerenderer/Gr2Renderer.h b/tests/comparerenderer/Gr2Renderer.h
index dfce31b..8aaeddc 100644
--- a/tests/comparerenderer/Gr2Renderer.h
+++ b/tests/comparerenderer/Gr2Renderer.h
@@ -22,6 +22,7 @@
#pragma once
#include <new>
+#include <iostream>
#include <memory>
#include <string>
#include "Renderer.h"
@@ -30,99 +31,102 @@
#include <graphite2/Segment.h>
#include <graphite2/Log.h>
-class Gr2Face : private std::auto_ptr<gr_face>
+
+using gr_face_ptr = std::unique_ptr<gr_face, decltype(&gr_face_destroy)>;
+using gr_font_ptr = std::unique_ptr<gr_font, decltype(&gr_font_destroy)>;
+using gr_feature_val_ptr = std::unique_ptr<gr_feature_val, decltype(&gr_featureval_destroy)>;
+using gr_segment_ptr = std::unique_ptr<gr_segment, decltype(&gr_seg_destroy)>;
+
+class Gr2Face : public gr_face_ptr
{
public:
Gr2Face(const char * fontFile, const std::string & logPath, const bool demand_load)
- : std::auto_ptr<gr_face>(gr_make_file_face(fontFile, !demand_load ? gr_face_preloadGlyphs : gr_face_default))
+ : gr_face_ptr(gr_make_file_face(fontFile,
+ !demand_load ? gr_face_preloadGlyphs : gr_face_default),
+ &gr_face_destroy)
{
- if (!get()) return;
-
- if (logPath.size()) gr_start_logging(get(), logPath.c_str());
+ if (*this && logPath.size()) gr_start_logging(get(), logPath.c_str());
}
+ Gr2Face(Gr2Face && f): gr_face_ptr(std::move(f)) {}
+
~Gr2Face() throw()
{
- gr_stop_logging(get());
- gr_face_destroy(get());
- release();
+ gr_stop_logging(get());
}
-
- operator bool () const { return get() != 0; }
- operator gr_face* () const { return get(); }
};
class Gr2Renderer : public Renderer
{
public:
- Gr2Renderer(Gr2Face & face, int fontSize, int textDir, FeatureParser * features)
- : m_rtl(textDir),
- m_grFace(face),
- m_grFont(0),
- m_grFeatures(0)
- {
- if (m_grFace)
- {
- m_grFont = gr_make_font(static_cast<float>(fontSize), m_grFace);
- if (features)
- {
- m_grFeatures = gr_face_featureval_for_lang(m_grFace, features->langId());
- for (size_t i = 0; i < features->featureCount(); i++)
- {
- const gr_feature_ref * ref = gr_face_find_fref(m_grFace, features->featureId(i));
- if (ref)
- gr_fref_set_feature_value(ref, features->featureSValue(i), m_grFeatures);
- }
- }
- else
- {
- m_grFeatures = gr_face_featureval_for_lang(m_grFace, 0);
- }
- }
- m_name = "graphite2";
- }
- virtual ~Gr2Renderer()
- {
- gr_featureval_destroy(m_grFeatures);
- gr_font_destroy(m_grFont);
- }
-
- virtual void renderText(const char * utf8, size_t length, RenderedLine * result, FILE *log)
- {
- const void * pError = NULL;
- if (!m_grFace)
- {
- new(result) RenderedLine();
- return;
- }
- size_t numCodePoints = gr_count_unicode_characters(gr_utf8,
- reinterpret_cast<const void*>(utf8), reinterpret_cast<const void*>(utf8 + length), &pError);
- if (pError)
- fprintf(stderr, "Invalid Unicode pos %d\n", static_cast<int>(reinterpret_cast<const char*>(pError) - utf8));
- gr_segment* pSeg = gr_make_seg(m_grFont, m_grFace, 0u, m_grFeatures, gr_utf8, utf8, numCodePoints, m_rtl ? 1 : 0);
- if (!pSeg)
- {
- fprintf(stderr, "Failed to create segment\n");
- new(result) RenderedLine(0, .0f);
- return;
- }
- std::string *s = new std::string(utf8, length);
- RenderedLine * renderedLine = new(result) RenderedLine(s, gr_seg_n_slots(pSeg),
- gr_seg_advance_X(pSeg));
- int i = 0;
- for (const gr_slot* s = gr_seg_first_slot(pSeg); s;
- s = gr_slot_next_in_segment(s), ++i)
- (*renderedLine)[i].set(gr_slot_gid(s), gr_slot_origin_X(s),
- gr_slot_origin_Y(s), gr_slot_before(s),
- gr_slot_after(s));
- gr_seg_destroy(pSeg);
- }
- virtual const char * name() const { return m_name; }
-private:
- int m_rtl;
- Gr2Face m_grFace;
- gr_font * m_grFont;
- gr_feature_val * m_grFeatures;
- const char * m_name;
-};
+ Gr2Renderer(Gr2Face & face, int fontSize, bool rtl, FeatureParser * features)
+ : m_rtl(rtl),
+ m_grFace(std::move(face)),
+ m_grFont(nullptr, &gr_font_destroy),
+ m_grFeatures(nullptr, gr_featureval_destroy),
+ m_name("graphite2")
+ {
+ if (!m_grFace)
+ return;
+
+ m_grFont.reset(gr_make_font(static_cast<float>(fontSize), m_grFace.get()));
+ if (features)
+ {
+ m_grFeatures.reset(gr_face_featureval_for_lang(m_grFace.get(), features->langId()));
+ for (size_t i = 0; i < features->featureCount(); i++)
+ {
+ const gr_feature_ref * ref = gr_face_find_fref(m_grFace.get(), features->featureId(i));
+ if (ref)
+ gr_fref_set_feature_value(ref, features->featureSValue(i), m_grFeatures.get());
+ }
+ }
+ else
+ {
+ m_grFeatures.reset(gr_face_featureval_for_lang(m_grFace.get(), 0));
+ }
+ }
+
+ virtual void renderText(const char * utf8, size_t length, RenderedLine * result, FILE *log)
+ {
+ const void * pError = NULL;
+ if (!m_grFace)
+ {
+ new (result) RenderedLine();
+ return;
+ }
+ size_t numCodePoints = gr_count_unicode_characters(gr_utf8, utf8, utf8 + length, &pError);
+ if (pError)
+ std::cerr << "Invalid Unicode pos" << int(static_cast<const char*>(pError) - utf8) << std::endl;
+
+ gr_segment_ptr pSeg = gr_segment_ptr(
+ gr_make_seg(m_grFont.get(), m_grFace.get(), 0u, m_grFeatures.get(),
+ gr_utf8, utf8, numCodePoints, m_rtl),
+ &gr_seg_destroy);
+
+ if (!pSeg)
+ {
+ std::cerr << "Failed to create segment" << std::endl;
+ new (result) RenderedLine(0, .0f);
+ return;
+ }
+
+ RenderedLine * renderedLine = new (result) RenderedLine(std::string(utf8, length), gr_seg_n_slots(pSeg.get()),
+ gr_seg_advance_X(pSeg.get()));
+ const gr_slot * s = gr_seg_first_slot(pSeg.get());
+ for (int i = 0; s; ++i)
+ {
+ (*renderedLine)[i].set(gr_slot_gid(s), gr_slot_origin_X(s),
+ gr_slot_origin_Y(s), gr_slot_before(s),
+ gr_slot_after(s));
+ s = gr_slot_next_in_segment(s);
+ }
+ }
+ virtual const char * name() const { return m_name; }
+ private:
+ Gr2Face m_grFace;
+ const char * const m_name;
+ bool m_rtl;
+ gr_font_ptr m_grFont;
+ gr_feature_val_ptr m_grFeatures;
+ };
--
2.17.0

@ -0,0 +1,31 @@
From cf661dac92704ed738252f29b0925f15aee85609 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 19 Jul 2018 17:01:38 +0100
Subject: [PATCH] Related: rhbz#1602527 CTOR_DTOR_LEAK coverity warning
tests/featuremap/featuremaptest.cpp:180: alloc_new: Allocating memory by calling "new char[font_size]".
tests/featuremap/featuremaptest.cpp:180: var_assign: Assigning: "this->_header" = "new char[font_size]".
tests/featuremap/featuremaptest.cpp:180: ctor_dtor_leak: The constructor allocates field "_header" of "face_handle" but there is no destructor.
---
tests/featuremap/featuremaptest.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/featuremap/featuremaptest.cpp b/tests/featuremap/featuremaptest.cpp
index afbf339..901ea39 100644
--- a/tests/featuremap/featuremaptest.cpp
+++ b/tests/featuremap/featuremaptest.cpp
@@ -187,6 +187,11 @@ public:
_dir = _header + dir_off;
}
+ ~face_handle()
+ {
+ delete [] _header;
+ }
+
void replace_table(const TtfUtil::Tag name, const void * const data, size_t len) throw() {
_tables[name] = std::make_pair(data, len);
}
--
2.17.0

@ -0,0 +1,25 @@
From b94a1ab2983293cb666b5dca8012b993eb4947b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 23 Jul 2018 14:54:58 +0100
Subject: [PATCH] Related: rhbz#1602527 add comment to silence leaked_storage
for 'glyphs'
---
src/GlyphCache.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/GlyphCache.cpp b/src/GlyphCache.cpp
index 6d050ce..282bdc1 100644
--- a/src/GlyphCache.cpp
+++ b/src/GlyphCache.cpp
@@ -164,6 +164,7 @@ GlyphCache::GlyphCache(const Face & face, const uint32 face_options)
}
delete _glyph_loader;
_glyph_loader = 0;
+ // coverity[leaked_storage : FALSE] - calling read_glyph on index 0 saved glyphs
}
if (_glyphs && glyph(0) == 0)
--
2.17.0

@ -0,0 +1,24 @@
From 0f04e6cbbb5ecda6356a5a1756f108154945cbed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 23 Jul 2018 12:02:13 +0100
Subject: [PATCH] Related: rhbz#1602527 resourceLeak cppcheck warning
---
tests/comparerenderer/CompareRenderer.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/comparerenderer/CompareRenderer.cpp b/tests/comparerenderer/CompareRenderer.cpp
index 31b185a..a848e65 100644
--- a/tests/comparerenderer/CompareRenderer.cpp
+++ b/tests/comparerenderer/CompareRenderer.cpp
@@ -371,6 +371,7 @@ int main(int argc, char ** argv)
{
fprintf(stderr, "Please specify at least 1 renderer\n");
showOptions();
+ if (rendererOptions[OptLogFile].exists()) fclose(log);
return -3;
}
--
2.17.0

@ -0,0 +1,25 @@
From 168cc02731ddfc7c429fbe4af616000011e55789 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 23 Jul 2018 16:30:40 +0100
Subject: [PATCH] WaE: misleading-indentation
---
tests/endian/endiantest.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/endian/endiantest.cpp b/tests/endian/endiantest.cpp
index b4fa196..ddc55ad 100644
--- a/tests/endian/endiantest.cpp
+++ b/tests/endian/endiantest.cpp
@@ -138,9 +138,8 @@
const size_t rounds = 1UL << atoi(argv[1]);
int r = 0;
- if (!test_swaps<uint64, uint32, uint16, uint8>()
- || !test_swaps<int64, int32, int16, int8>())
- return 5;
+ if (!test_swaps<uint64, uint32, uint16, uint8>() || !test_swaps<int64, int32, int16, int8>())
+ return 5;
if (r == 0) r = test_reads<uint64, uint32, uint16, uint8>(rounds);
if (r == 0) r = test_reads<int64, int32, int16, int8>(rounds);

@ -0,0 +1,16 @@
--- graphite2-1.2.0/src/CMakeLists.txt.orig 2012-11-09 17:48:04.908391335 +0800
+++ graphite2-1.2.0/src/CMakeLists.txt 2012-11-09 17:48:48.647102280 +0800
@@ -118,11 +118,7 @@
if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*")
target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32)
else (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*")
- if (GRAPHITE2_ASAN)
- target_link_libraries(graphite2 c gcc_s)
- else (GRAPHITE2_ASAN)
- target_link_libraries(graphite2 c gcc)
- endif (GRAPHITE2_ASAN)
+ target_link_libraries(graphite2 c gcc_s)
include(Graphite)
nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
endif (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*")

@ -0,0 +1,9 @@
diff -urN graphite2-1.2.0.orig/src/CMakeLists.txt graphite2-1.2.0/src/CMakeLists.txt
--- graphite2-1.2.0.orig/src/CMakeLists.txt 2013-01-29 15:47:32.465841769 +0530
+++ graphite2-1.2.0/src/CMakeLists.txt 2013-01-29 15:48:24.056843352 +0530
@@ -136,4 +136,4 @@
install(TARGETS graphite2 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_)
+install(EXPORT graphite2 DESTINATION lib${LIB_SUFFIX}/graphite2 NAMESPACE gr2_)

@ -0,0 +1,47 @@
diff -ru graphite2-1.3.10.orig/src/CMakeLists.txt graphite2-1.3.10/src/CMakeLists.txt
--- graphite2-1.3.10.orig/src/CMakeLists.txt 2018-08-31 09:18:49.348599342 +0100
+++ graphite2-1.3.10/src/CMakeLists.txt 2018-08-31 09:18:51.906618095 +0100
@@ -107,9 +107,9 @@
LT_VERSION_AGE ${GRAPHITE_API_AGE})
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"
- LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
+ 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"
+ LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
LINKER_LANGUAGE C)
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
add_definitions(-mfpmath=sse -msse2)
@@ -137,9 +137,9 @@
endif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
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 -mfpmath=sse -msse2"
- LINK_FLAGS "-nodefaultlibs"
+ 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"
LINKER_LANGUAGE C)
target_link_libraries(graphite2 c)
include(Graphite)
diff -ru graphite2-1.3.10.orig/tests/CMakeLists.txt graphite2-1.3.10/tests/CMakeLists.txt
--- graphite2-1.3.10.orig/tests/CMakeLists.txt 2018-08-31 09:18:49.351599365 +0100
+++ graphite2-1.3.10/tests/CMakeLists.txt 2018-08-31 09:19:10.318753067 +0100
@@ -47,12 +47,12 @@
else (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
# don't -D GRAPHITE2_STATIC so that tests can see the API symbols in the static library
set_target_properties(graphite2-base PROPERTIES
- COMPILE_FLAGS "-Wall -Wextra -fno-rtti -fno-exceptions -fno-stack-protector"
+ COMPILE_FLAGS "-Wall -Wextra -fno-rtti -fno-exceptions"
COMPILE_DEFINITIONS "GRAPHITE2_NTRACING"
LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
LINKER_LANGUAGE C)
set_target_properties(graphite2-segcache PROPERTIES
- COMPILE_FLAGS "-Wall -Wextra -fno-rtti -fno-exceptions -fno-stack-protector"
+ COMPILE_FLAGS "-Wall -Wextra -fno-rtti -fno-exceptions"
COMPILE_DEFINITIONS "GRAPHITE2_NTRACING${TELEMETRY}"
LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
LINKER_LANGUAGE C)

@ -0,0 +1,209 @@
Name: graphite2
Version: 1.3.10
Release: 10%{?dist}
Summary: Font rendering capabilities for complex non-Roman writing systems
Group: Development/Tools
License: (LGPLv2+ or GPLv2+ or MPL) and (Netscape or GPLv2+ or LGPLv2+)
URL: https://sourceforge.net/projects/silgraphite/
Source0: https://downloads.sourceforge.net/project/silgraphite/graphite2//%{name}-%{version}.tgz
Patch0: graphite-arm-nodefaultlibs.patch
Patch1: graphite2-1.2.0-cmakepath.patch
# backports for warnings
Patch2: 0001-Fix-stricter-gcc-warnings.patch
Patch3: 0001-Fix-memory-leaks-on-realloc-failure.patch
# https://github.com/caolanm/graphite/commits/covscan_warning_1 fix/silence covscan warnings
Patch4: 0001-Related-rhbz-1602527-CTOR_DTOR_LEAK-coverity-warning.patch
Patch5: 0001-Related-rhbz-1602527-resourceLeak-cppcheck-warning.patch
Patch6: 0001-Related-rhbz-1602527-add-comment-to-silence-leaked_s.patch
Patch7: 0001-WaE-misleading-indentation.patch
Patch8: graphite2.stack-protect.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: freetype-devel
BuildRequires: doxygen asciidoc
BuildRequires: texlive-helvetic texlive-sectsty texlive-tocloft texlive-xtab texlive-multirow
Obsoletes: silgraphite < 2.3.1-5
%description
Graphite2 is a project within SILs Non-Roman Script Initiative and Language
Software Development groups to provide rendering capabilities for complex
non-Roman writing systems. Graphite can be used to create “smart fonts” capable
of displaying writing systems with various complex behaviors. With respect to
the Text Encoding Model, Graphite handles the "Rendering" aspect of writing
system implementation.
%package devel
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: Files for developing with graphite2
Group: Development/Libraries
Obsoletes: silgraphite-devel < 2.3.1-5
%description devel
Includes and definitions for developing with graphite2.
%prep
%setup -q
%patch0 -p1 -b .arm
%patch1 -p1 -b .cmake
%patch2 -p1 -b .warnings
%patch3 -p1 -b .resourceLeak
%patch4 -p1 -b .CTOR_DTOR_LEAK
%patch5 -p1 -b .leaked_storage
%patch6 -p1 -b .silence_leak
%patch7 -p1 -b .misleading-indentation
%patch8 -p1 -b .stack-protect
%build
%cmake -DGRAPHITE2_COMPARE_RENDERER=OFF .
make %{?_smp_mflags}
make docs
sed -i -e 's!<a id="id[a-z]*[0-9]*"></a>!!g' doc/manual.html
%install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
# rhbz#1595710 can renable this in the next release of graphite2 where python3 is supported
#%check
#ctest
%ldconfig_scriptlets
%files
%license LICENSE COPYING
%doc ChangeLog README.md
%{_bindir}/gr2fonttest
%{_libdir}/libgraphite2.so.3
%{_libdir}/libgraphite2.so.3.0.1
%files devel
%doc doc/manual.html
%dir %{_libdir}/%{name}/
%{_libdir}/%{name}/graphite2-release.cmake
%{_libdir}/%{name}/graphite2.cmake
%{_includedir}/%{name}
%{_libdir}/libgraphite2.so
%{_libdir}/pkgconfig/graphite2.pc
%changelog
* Wed Sep 05 2018 Caolán McNamara <caolanm@redhat.com> - 1.3.10-10
- Resolves: rhbz#1624116 backport upstream stack-protect enabling
* Mon Jul 23 2018 Caolán McNamara <caolanm@redhat.com> - 1.3.10-9
- rhbz#1602527 try harder on covscan warnings
* Mon Jul 23 2018 Caolán McNamara <caolanm@redhat.com> - 1.3.10-8
- rhbz#1602527 covscan warnings
* Tue Jul 17 2018 Caolán McNamara <caolanm@redhat.com> - 1.3.10-7
- Resolves: rhbz#1595710 drop python2-fonttools buildrequire
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.10-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.10-4
- Switch to %%ldconfig_scriptlets
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Jun 23 2017 Michael Cronenworth <mike@cchtml.com> - 1.3.10-1
- New upstream release
- Resolves CVE-2017-7778
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Feb 29 2016 Caolán McNamara <caolanm@redhat.com> - 1.3.6-1
- update to latest release
* Wed Feb 17 2016 Caolán McNamara <caolanm@redhat.com> - 1.3.5-1
- Resolves: rhbz#1305806 CVE-2016-1521 CVE-2016-1522 CVE-2016-1523 CVE-2016-1526
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1.2.4-4
- Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Apr 03 2014 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.2.4-1
- New upstream release
* Sat Dec 21 2013 Ville Skyttä <ville.skytta@iki.fi> - 1.2.2-5
- Move *.so.major symlink to main package.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Jun 24 2013 Caolán McNamara <caolanm@redhat.com> - 1.2.2-3
- clarify licenses
* Wed Jun 19 2013 Karsten Hopp <karsten@redhat.com> 1.2.2-2
- use minimum texlive buildrequires, Than Ngo, rhbz#975843
* Thu May 30 2013 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.2.2-1
- New upstream release
* Tue Jan 29 2013 Parag Nemade <paragn AT fedoraproject DOT org> - 1.2.0-4
- Drop refman.pdf as its same as manual.html
- patch install path for cmake files as they are arch dependent
* Tue Jan 29 2013 Kalev Lember <kalevlember@gmail.com> - 1.2.0-3
- Move manual.html to -devel subpackage
* Tue Jan 29 2013 Parag Nemade <paragn AT fedoraproject DOT org> - 1.2.0-2
- revert the wrongly committed f18 spec to f19
- spec file cleanup
- thanks to jnovy for finding me minimum texlive BR
- partial multilib fix for manual.html
* Fri Nov 9 2012 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.2.0-1
- New upstream release
* Wed Oct 3 2012 Caolán McNamara <caolanm@redhat.com> - 1.1.1-4
- expand license field to cover tri-licenced GrUtfTextSrc test
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Apr 3 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1.1.1-2
- Fix FTBFS on ARM
* Mon Feb 27 2012 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.1.1-1
- New upstream release
* Wed Feb 8 2012 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.1.0-1
- New upstream release
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri Sep 23 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.3-1
- New upstream release
* Fri Aug 26 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.2-3
- Obsolete silgraphite
* Fri Aug 26 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.2-2
- Removed dependency on silgraphite-devel
- Stopped building comparerenderer - the only thing that depended on silgraphite
* Fri Aug 19 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.2-1
- Rebase to new release
- SPEC Cleanup
- Documentation is now properly installed
* Wed Aug 17 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.1-2
- Added some necessary requires
* Wed Aug 10 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.1-1
- Initial build of graphite2
Loading…
Cancel
Save