Compare commits

...

No commits in common. 'c8' and 'c9' have entirely different histories.
c8 ... c9

2
.gitignore vendored

@ -1 +1 @@
SOURCES/graphite2-1.3.10.tgz SOURCES/graphite2-1.3.14.tgz

@ -1 +1 @@
668f3bce96fc02d90ea875b401ed36b2e8957d2f SOURCES/graphite2-1.3.10.tgz bb0d0127f0afc10d7cc993a559bebcba8940d630 SOURCES/graphite2-1.3.14.tgz

@ -1,46 +0,0 @@
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

@ -1,268 +0,0 @@
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

@ -1,31 +0,0 @@
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

@ -1,25 +0,0 @@
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

@ -1,24 +0,0 @@
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

@ -1,25 +0,0 @@
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);

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

@ -1,47 +0,0 @@
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)

@ -1,32 +1,22 @@
Name: graphite2 Name: graphite2
Version: 1.3.10 Version: 1.3.14
Release: 10%{?dist} Release: 9%{?dist}
Summary: Font rendering capabilities for complex non-Roman writing systems Summary: Font rendering capabilities for complex non-Roman writing systems
Group: Development/Tools License: (LGPLv2+ or GPLv2+ or MPLv1.1) and (Netscape or GPLv2+ or LGPLv2+)
License: (LGPLv2+ or GPLv2+ or MPL) and (Netscape or GPLv2+ or LGPLv2+)
URL: https://sourceforge.net/projects/silgraphite/ URL: https://sourceforge.net/projects/silgraphite/
Source0: https://downloads.sourceforge.net/project/silgraphite/graphite2//%{name}-%{version}.tgz Source0: https://downloads.sourceforge.net/project/silgraphite/graphite2//%{name}-%{version}.tgz
Patch0: graphite-arm-nodefaultlibs.patch Patch0: graphite-arm-nodefaultlibs.patch
Patch1: graphite2-1.2.0-cmakepath.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: cmake
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: freetype-devel BuildRequires: freetype-devel
BuildRequires: doxygen asciidoc
BuildRequires: texlive-helvetic texlive-sectsty texlive-tocloft texlive-xtab texlive-multirow
Obsoletes: silgraphite < 2.3.1-5 # needed for running the test suite
BuildRequires: python3-fonttools
%description %description
Graphite2 is a project within SILs Non-Roman Script Initiative and Language Graphite2 is a project within SILs Non-Roman Script Initiative and Language
@ -36,72 +26,97 @@ of displaying writing systems with various complex behaviors. With respect to
the Text Encoding Model, Graphite handles the "Rendering" aspect of writing the Text Encoding Model, Graphite handles the "Rendering" aspect of writing
system implementation. 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 %package devel
Summary: Files for developing with graphite2
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel %description devel
Includes and definitions for developing with graphite2. Includes and definitions for developing with graphite2.
%prep %prep
%setup -q %autosetup -p1
%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 %build
%cmake -DGRAPHITE2_COMPARE_RENDERER=OFF . %cmake -DGRAPHITE2_COMPARE_RENDERER=OFF
make %{?_smp_mflags} %cmake_build
make docs
sed -i -e 's!<a id="id[a-z]*[0-9]*"></a>!!g' doc/manual.html
%install %install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" %cmake_install
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
find %{buildroot} -type f -name "*.la" -print -delete
# rhbz#1595710 can renable this in the next release of graphite2 where python3 is supported %check
#%check %ctest
#ctest
%ldconfig_scriptlets
%files %files
%license LICENSE COPYING %license LICENSE COPYING
%doc ChangeLog README.md %doc ChangeLog README.md
%{_bindir}/gr2fonttest %{_bindir}/gr2fonttest
%{_libdir}/libgraphite2.so.3
%{_libdir}/libgraphite2.so.3.0.1 %{_libdir}/libgraphite2.so.3*
%files devel %files devel
%doc doc/manual.html %{_includedir}/%{name}/
%dir %{_libdir}/%{name}/ %dir %{_libdir}/%{name}/
%{_libdir}/%{name}/graphite2-release.cmake %{_libdir}/%{name}/graphite2-release.cmake
%{_libdir}/%{name}/graphite2.cmake %{_libdir}/%{name}/graphite2.cmake
%{_includedir}/%{name}
%{_libdir}/libgraphite2.so %{_libdir}/libgraphite2.so
%{_libdir}/pkgconfig/graphite2.pc %{_libdir}/pkgconfig/graphite2.pc
%changelog %changelog
* Wed Sep 05 2018 Caolán McNamara <caolanm@redhat.com> - 1.3.10-10 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.3.14-9
- Resolves: rhbz#1624116 backport upstream stack-protect enabling - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.3.14-8
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Sep 30 2020 Fabio Valentini <decathorpe@gmail.com> - 1.3.14-6
- Stop building the HTML manual, texlive is breaking things too frequently.
* Mon Jul 23 2018 Caolán McNamara <caolanm@redhat.com> - 1.3.10-9 * Sat Aug 01 2020 Fabio Valentini <decathorpe@gmail.com> - 1.3.14-5
- rhbz#1602527 try harder on covscan warnings - Adapt to new cmake macros.
* Mon Jul 23 2018 Caolán McNamara <caolanm@redhat.com> - 1.3.10-8 * Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.14-4
- rhbz#1602527 covscan warnings - Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 17 2018 Caolán McNamara <caolanm@redhat.com> - 1.3.10-7 * Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.14-3
- Resolves: rhbz#1595710 drop python2-fonttools buildrequire - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Fabio Valentini <decathorpe@gmail.com> - 1.3.14-2
- Add missing build dependencies for building the manual with TeXLive 2020.
* Wed Apr 08 2020 Fabio Valentini <decathorpe@gmail.com> - 1.3.14-1
- Update to version 1.3.14.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Aug 22 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.3.13-1
- New upstream 1.3.13 release
- Move to python3 for tests
- Fix CVE-2018-7999 (rhbz 1554383)
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.10-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.10-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.10-6 * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.10-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
@ -180,30 +195,43 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
* Fri Nov 9 2012 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.2.0-1 * Fri Nov 9 2012 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.2.0-1
- New upstream release - New upstream release
* Wed Oct 3 2012 Caolán McNamara <caolanm@redhat.com> - 1.1.1-4 * Wed Oct 3 2012 Caolán McNamara <caolanm@redhat.com> - 1.1.1-4
- expand license field to cover tri-licenced GrUtfTextSrc test - 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 * 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 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Apr 3 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1.1.1-2 * Tue Apr 3 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1.1.1-2
- Fix FTBFS on ARM - Fix FTBFS on ARM
* Mon Feb 27 2012 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.1.1-1 * Mon Feb 27 2012 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.1.1-1
- New upstream release - New upstream release
* Wed Feb 8 2012 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.1.0-1 * Wed Feb 8 2012 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.1.0-1
- New upstream release - New upstream release
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-2 * 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 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri Sep 23 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.3-1 * Fri Sep 23 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.3-1
- New upstream release - New upstream release
* Fri Aug 26 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.2-3 * Fri Aug 26 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.2-3
- Obsolete silgraphite - Obsolete silgraphite
* Fri Aug 26 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.2-2 * Fri Aug 26 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.2-2
- Removed dependency on silgraphite-devel - Removed dependency on silgraphite-devel
- Stopped building comparerenderer - the only thing that depended on silgraphite - Stopped building comparerenderer - the only thing that depended on silgraphite
* Fri Aug 19 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.2-1 * Fri Aug 19 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.2-1
- Rebase to new release - Rebase to new release
- SPEC Cleanup - SPEC Cleanup
- Documentation is now properly installed - Documentation is now properly installed
* Wed Aug 17 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.1-2 * Wed Aug 17 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.1-2
- Added some necessary requires - Added some necessary requires
* Wed Aug 10 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.1-1 * Wed Aug 10 2011 Nicholas van Oudtshoorn <vanoudt@gmail.com> - 1.0.1-1
- Initial build of graphite2 - Initial build of graphite2

Loading…
Cancel
Save