Skip to content

Commit

Permalink
games-action/heroes: Call AM_PROG_AR
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/724328
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed Jul 5, 2020
1 parent fd72f6a commit a7c174b
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 47 deletions.
11 changes: 0 additions & 11 deletions games-action/heroes/files/heroes-0.21-automake-1.12.patch

This file was deleted.

30 changes: 30 additions & 0 deletions games-action/heroes/files/heroes-0.21-autotools.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
--- a/configure.ac
+++ b/configure.ac
@@ -44,6 +44,7 @@
AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_AWK
+AM_PROG_AR
AC_PROG_RANLIB
AC_PROG_LN_S

@@ -112,7 +113,7 @@
# Checks for typedefs, structures, and compiler characteristics.
# ==============================================================

-AM_C_PROTOTYPES
+AC_C_PROTOTYPES
AC_C_CONST
AC_TYPE_UID_T dnl This checks for gid_t too.
AC_CHECK_TYPES([ssize_t])
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,7 +42,7 @@
heroeslvl_SOURCES = heroeslvl.c

heroes_LDADD = lvl/libhlvl.a media/libhmcommon.a ../lib/libheroes.a \
- $(INTLLIBS) $(LIBALT_LOCAL_XLDADD) $(LIBALT_XLDADD)
+ $(INTLLIBS) $(LIBALT_LOCAL_XLDADD) $(LIBALT_XLDADD) -lm
heroes_LDFLAGS = $(LIBALT_XLDFLAGS)

## Depend upon Makefile because the value of LIBALT_LOCAL_LDADD might
11 changes: 0 additions & 11 deletions games-action/heroes/files/heroes-0.21-underlink.patch

This file was deleted.

43 changes: 18 additions & 25 deletions games-action/heroes/heroes-0.21-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ggi nls sdl"
REQUIRED_USE="^^ ( ggi sdl )"
RESTRICT="test"

REQUIRED_USE="^^ ( ggi sdl )"
RDEPEND="ggi? (
RDEPEND="
ggi? (
media-libs/libggi
media-libs/libgii
media-libs/libmikmod
Expand All @@ -33,49 +34,41 @@ RDEPEND="ggi? (
media-libs/libsdl
media-libs/sdl-mixer
)"
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )"
DEPEND="${RDEPEND}"
BDEPEND="nls? ( sys-devel/gettext )"

#56118
PATCHES=(
"${FILESDIR}/${P}"-automake-1.12.patch
"${FILESDIR}/${P}"-gcc4.patch
"${FILESDIR}/${P}"-underlink.patch
"${FILESDIR}/${P}"-cvs-segfault-fix.patch
"${FILESDIR}/${P}"-compilation.patch
"${FILESDIR}/${P}"-gcc10.patch
"${FILESDIR}"/${P}-autotools.patch
"${FILESDIR}"/${P}-gcc4.patch
"${FILESDIR}"/${P}-cvs-segfault-fix.patch
"${FILESDIR}"/${P}-compilation.patch
"${FILESDIR}"/${P}-gcc10.patch
)

src_prepare() {
default
sed -i 's:$(localedir):/usr/share/locale:' \
$(find . -name 'Makefile.in*') || die
eautoreconf
}

src_configure() {
local myconf=(
$(use_with sdl)
$(use_with sdl sdl-mixer)
$(use_with ggi)
$(use_with ggi mikmod)
$(use_enable nls)
)

local pkg
for pkg in ${A//.tar.bz2} ; do
cd "${WORKDIR}"/${pkg}
for pkg in ${A//.tar.bz2}; do
cd "${WORKDIR}"/${pkg} || die
econf \
--disable-heroes-debug \
--disable-optimizations \
"${myconf[@]}"
$(use_with sdl) \
$(use_with sdl sdl-mixer) \
$(use_with ggi) \
$(use_with ggi mikmod) \
$(use_enable nls)
done
}

src_install() {
local pkg
for pkg in ${A//.tar.bz2} ; do
cd "${WORKDIR}"/${pkg}
cd "${WORKDIR}"/${pkg} || die
emake DESTDIR="${D}" install
done
}

0 comments on commit a7c174b

Please sign in to comment.