app-text/aiksaurus: Fix format-security, drop .la files
authorPacho Ramos <pacho@gentoo.org>
Sat, 23 Feb 2019 11:38:37 +0000 (12:38 +0100)
committerPacho Ramos <pacho@gentoo.org>
Sat, 23 Feb 2019 11:54:45 +0000 (12:54 +0100)
Closes: https://bugs.gentoo.org/521124
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
app-text/aiksaurus/aiksaurus-1.2.1-r1.ebuild [new file with mode: 0644]
app-text/aiksaurus/files/aiksaurus-1.2.1-format-security.patch [new file with mode: 0644]

diff --git a/app-text/aiksaurus/aiksaurus-1.2.1-r1.ebuild b/app-text/aiksaurus/aiksaurus-1.2.1-r1.ebuild
new file mode 100644 (file)
index 0000000..b78d34e
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit flag-o-matic libtool
+
+DESCRIPTION="A thesaurus lib, tool and database"
+HOMEPAGE="https://sourceforge.net/projects/aiksaurus"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="gtk"
+
+RDEPEND="gtk? ( x11-libs/gtk+:2 )"
+DEPEND="${RDEPEND}
+       gtk? ( virtual/pkgconfig )
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-gcc43.patch"
+       "${FILESDIR}/${P}-format-security.patch"
+)
+
+src_prepare() {
+       default
+       # Needed to make relink work on FreeBSD, without it won't install.
+       # Also needed for a sane .so versionning there.
+       elibtoolize
+}
+
+src_configure() {
+       filter-flags -fno-exceptions
+       econf $(use_with gtk)
+}
+
+src_install() {
+       default
+       find "${D}" -name '*.la' -delete || die
+}
diff --git a/app-text/aiksaurus/files/aiksaurus-1.2.1-format-security.patch b/app-text/aiksaurus/files/aiksaurus-1.2.1-format-security.patch
new file mode 100644 (file)
index 0000000..ba90a45
--- /dev/null
@@ -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);
+     }
+ }