[cuneiform/f16] Workaround buffer overfloy issue.

Dmitrij S. Kryzhevich krege at fedoraproject.org
Thu Oct 13 06:20:23 UTC 2011


commit dcd8a7dcc49123c2fe83e85a052b75b5e45b434a
Author: Dmitrij S. Kryzhevich <krege at land.ru>
Date:   Thu Oct 13 13:20:19 2011 +0700

    Workaround buffer overfloy issue.

 cuneiform.spec |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/cuneiform.spec b/cuneiform.spec
index 8157e9b..ac97489 100644
--- a/cuneiform.spec
+++ b/cuneiform.spec
@@ -2,7 +2,7 @@ Name:           cuneiform
 License:        BSD
 Group:          Applications/Productivity
 Version:        1.1.0
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Command-line OCR system
 
 Source:         http://launchpad.net/cuneiform-linux/1.1/1.1/+download/%{name}-linux-%{version}.tar.bz2
@@ -30,14 +30,27 @@ Requires:       %{name}%{?_isa} = %{version}-%{release}
 %setup -qn %{name}-linux-%{version}
 
 %build
-mkdir builddir
-cd builddir
-%{cmake} -DCMAKE_BUILD_TYPE=relwithdebinfo ..
+
+export CFLAGS=`echo %{optflags} | sed -e s,-O2,,`
+export CXXFLAGS=`echo %{optflags} | sed -e s,-O2,,`
+export FFLAGS=`echo %{optflags} | sed -e s,-O2,,`
+
+mkdir %{_target_platform}
+pushd %{_target_platform}
+# old build string
+#%%{cmake} -DCMAKE_BUILD_TYPE=relwithdebinfo ..
+/usr/bin/cmake \
+    -DCMAKE_VERBOSE_MAKEFILE=ON \
+    -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+    ..
+# "relwithdebinfo" will add -O2 to flags
+#    -DCMAKE_BUILD_TYPE=relwithdebinfo \
 make
+popd
 
 %install
 rm -rf %{buildroot}
-make -C builddir install DESTDIR=%{buildroot}
+make -C %{_target_platform} install DESTDIR=%{buildroot}
 
 %clean
 rm -rf %{buildroot}
@@ -60,6 +73,8 @@ rm -rf %{buildroot}
 %{_libdir}/lib*.so
 
 %changelog
+* Wed Oct 12 2011 Dmitrij S. Kryzhevich <krege at land.ru> - 1.1.0-4
+- Workaround buffer overflow problem.
 * Mon Jun 06 2011 Dmitrij S. Kryzhevich <krege at land.ru> - 1.1.0-3
 - Fix -devel Requires.
 * Thu Apr 21 2011 Dmitrij S. Kryzhevich <krege at land.ru> - 1.1.0-2


More information about the scm-commits mailing list