Skip to content

Commit

Permalink
games-board/sirius: Fix underlinking
Browse files Browse the repository at this point in the history
Gentoo-bug: 592414
* Turn sed's into PATCHES
* Fix configure.ac
* Include a check for sqrt() in libm
* Simplify ebuild

Package-Manager: portage-2.3.3
  • Loading branch information
SoapGentoo committed Dec 12, 2016
1 parent 97a0d0a commit efe212c
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 16 deletions.
65 changes: 65 additions & 0 deletions games-board/sirius/files/sirius-0.8.0-fix-build-system.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Fix configure.ac
* Remove setting CFLAGS
* Look for sqrt() in libm (bug 592414)

--- a/configure.in
+++ b/configure.in
@@ -1,26 +1,23 @@
AC_PREREQ(2.52)

-AC_INIT(sirius, 0.8.0)
-AC_CONFIG_SRCDIR(src/sirius.c)
-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+AC_INIT([sirius], [0.8.0])
+AC_CONFIG_SRCDIR([src/sirius.c])
+AM_INIT_AUTOMAKE

-AM_CONFIG_HEADER(config.h)
-
-AM_MAINTAINER_MODE
+AC_CONFIG_HEADERS([config.h])

AC_PROG_INTLTOOL

-AC_ISC_POSIX
AC_PROG_CC
-AC_STDC_HEADERS
-AM_PROG_LIBTOOL
-AC_PROG_LIBTOOL
+LT_INIT

pkg_modules="gtk+-2.0 >= 1.3.13 gconf-2.0 libgnomeui-2.0 libgnomecanvas-2.0 libgnomeui-2.0 gdk-pixbuf-2.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
-AC_SUBST(PACKAGE_CFLAGS)
-AC_SUBST(PACKAGE_LIBS)

+dnl Look for sqrt() in libm
+AC_SEARCH_LIBS([sqrt], [m], [], [
+ AC_MSG_ERROR([unable to find the sqrt() function])
+])

GETTEXT_PACKAGE=sirius
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
@@ -29,22 +26,6 @@
ALL_LINGUAS="sv fr de ru"
AM_GLIB_GNU_GETTEXT

-CFLAGS="-g -O3"
-
-AC_SUBST(CFLAGS)
-AC_SUBST(CPPFLAGS)
-AC_SUBST(LDFLAGS)
-
-dnl Use -Wall if we have gcc.
-changequote(,)dnl
-if test "x$GCC" = "xyes"; then
- case " $CFLAGS " in
- *[\ \ ]-Wall[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wall" ;;
- esac
-fi
-changequote([,])dnl
-
AC_OUTPUT([
Makefile
po/Makefile.in
14 changes: 14 additions & 0 deletions games-board/sirius/files/sirius-0.8.0-fix-desktop-file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Fix QA violations in desktop file

--- a/sirius.desktop.in
+++ b/sirius.desktop.in
@@ -3,7 +3,7 @@
_Name=Sirius
_Comment=Sirius, a othello playing program
Exec=sirius
-Icon=sirius.png
+Icon=sirius
Terminal=false
Type=Application
-Categories=GNOME;Application;Game;
+Categories=GNOME;Game;
4 changes: 2 additions & 2 deletions games-board/sirius/files/sirius-0.8.0-format.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/src/sirius.c 2016-01-14 21:22:53.946900371 +0100
+++ b/src/sirius.c 2016-01-14 21:24:08.240507669 +0100
--- a/src/sirius.c
+++ b/src/sirius.c
@@ -180,7 +180,7 @@

paus = 1;
Expand Down
20 changes: 6 additions & 14 deletions games-board/sirius/sirius-0.8.0-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# $Id$

EAPI=6
inherit autotools eutils

inherit autotools

DESCRIPTION="A program for playing the game of othello/reversi"
HOMEPAGE="http://sirius.bitvis.nu/"
Expand All @@ -25,25 +26,16 @@ DEPEND="${RDEPEND}

PATCHES=(
"${FILESDIR}"/${P}-format.patch
"${FILESDIR}"/${P}-fix-desktop-file.patch
"${FILESDIR}"/${P}-fix-build-system.patch
)

src_prepare() {
default
sed -i -e '/-g -O3/d' configure.in || die
sed -i \
-e '/Icon/s/\.png//' \
-e '/Categories/s/Application;//' \
sirius.desktop.in || die
mv configure.in configure.ac || die
mv configure.{in,ac} || die
eautoreconf
}

src_configure() {
econf \
--datadir=/usr/share \
$(use_enable nls)
}

src_install() {
default
econf $(use_enable nls)
}

0 comments on commit efe212c

Please sign in to comment.