From 29c6659836a0fc43ba5fc8ffa672bedd89c06f4f Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Jun 07 2014 20:44:56 +0000 Subject: aqdd patch to fix FTBFS due to security cflags --- diff --git a/aiksaurus-security.patch b/aiksaurus-security.patch new file mode 100644 index 0000000..ba90a45 --- /dev/null +++ b/aiksaurus-security.patch @@ -0,0 +1,29 @@ +--- aiksaurus-1.2.1/base/caiksaurus.cpp.orig 2014-06-07 21:14:03.869649696 +0100 ++++ aiksaurus-1.2.1/base/caiksaurus.cpp 2014-06-07 21:33:06.241471066 +0100 +@@ -254,7 +254,7 @@ + /* see if we got --version. */ + if ( !strcmp(arg, "--version") || !strcmp(arg, "-v") ) + { +- printf(version); ++ printf("%s", version); + exit(0); + } + +@@ -262,7 +262,7 @@ + else if ( !strcmp(arg, "--help") || !strcmp(arg, "-h") ) + { + printf("Usage: %s [word]\n\n", argv[0]); +- printf(help); ++ printf("%s", help); + exit(0); + } + } +@@ -271,7 +271,7 @@ + if (argc != 2) + { + printf("Usage: %s [word]\n", argv[0]); +- printf(help); ++ printf("%s", help); + exit(1); + } + } diff --git a/aiksaurus.spec b/aiksaurus.spec index df4b043..e5578eb 100644 --- a/aiksaurus.spec +++ b/aiksaurus.spec @@ -11,6 +11,7 @@ Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.g Source1: %{name}.png Source2: %{name}.desktop Patch0: %{name}-1.2.1-gcc43.patch +Patch1: %{name}-security.patch BuildRequires: gtk2-devel BuildRequires: desktop-file-utils @@ -63,6 +64,7 @@ A standalone thesaurus program base on aiksaurus-gtk. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %configure @@ -73,10 +75,11 @@ make %{?_smp_mflags} %install %make_install -rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la +# Remove libtool archives and static libs +find %{buildroot} -type f -name "*.la" -delete # Add the desktop icon. -%{__install} -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png +install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png # Add desktop file. desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE2}