diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2009-09-21 04:43:00 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2009-09-21 04:43:00 +0000 |
commit | c21f599e7b76b20691ab633d01a01726c7ef8fb0 (patch) | |
tree | 9b0fff8823c51cd605e8fce1778439f163b04305 /games-strategy | |
parent | Fix typo in src_configure (#283672). (diff) | |
download | gentoo-2-c21f599e7b76b20691ab633d01a01726c7ef8fb0.tar.gz gentoo-2-c21f599e7b76b20691ab633d01a01726c7ef8fb0.tar.bz2 gentoo-2-c21f599e7b76b20691ab633d01a01726c7ef8fb0.zip |
version bump; ebuild submitted by Mr. Anderson via bug #248241
(Portage version: 2.1.6.13/cvs/Linux i686)
Diffstat (limited to 'games-strategy')
6 files changed, 219 insertions, 1 deletions
diff --git a/games-strategy/lgeneral/ChangeLog b/games-strategy/lgeneral/ChangeLog index 51c9fbe6c9ad..80f2cb81f341 100644 --- a/games-strategy/lgeneral/ChangeLog +++ b/games-strategy/lgeneral/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for games-strategy/lgeneral # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/lgeneral/ChangeLog,v 1.26 2009/02/12 09:13:08 tupone Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-strategy/lgeneral/ChangeLog,v 1.27 2009/09/21 04:43:00 mr_bones_ Exp $ + +*lgeneral-1.2_beta13 (21 Sep 2009) + + 21 Sep 2009; Michael Sterrett <mr_bones_@gentoo.org> + +lgeneral-1.2_beta13.ebuild, +files/lgeneral-1.2_beta13-64bit.patch, + +files/lgeneral-1.2_beta13-as-needed.patch, + +files/lgeneral-1.2_beta13-build.patch, + +files/lgeneral-1.2_beta13-gentoo-path.patch: + version bump; ebuild submitted by Mr. Anderson via bug #248241 12 Feb 2009; Alfredo Tupone <tupone@gentoo.org> +files/lgeneral-1.2_beta12-as-needed.patch, lgeneral-1.2_beta12-r1.ebuild: diff --git a/games-strategy/lgeneral/files/lgeneral-1.2_beta13-64bit.patch b/games-strategy/lgeneral/files/lgeneral-1.2_beta13-64bit.patch new file mode 100644 index 000000000000..d152657f3aca --- /dev/null +++ b/games-strategy/lgeneral/files/lgeneral-1.2_beta13-64bit.patch @@ -0,0 +1,11 @@ +--- src/unit_lib.h.old 2006-10-20 22:11:43.000000000 +0200 ++++ src/unit_lib.h 2006-10-20 22:11:58.000000000 +0200 +@@ -145,7 +145,7 @@ + #endif + int eval_score; /* between 0 - 1000 indicating the worth of the unit relative the + best one */ +-} Unit_Lib_Entry; ++} __attribute__((__packed__)) Unit_Lib_Entry; + + + /* diff --git a/games-strategy/lgeneral/files/lgeneral-1.2_beta13-as-needed.patch b/games-strategy/lgeneral/files/lgeneral-1.2_beta13-as-needed.patch new file mode 100644 index 000000000000..2361aa54d569 --- /dev/null +++ b/games-strategy/lgeneral/files/lgeneral-1.2_beta13-as-needed.patch @@ -0,0 +1,13 @@ +--- tools/ltrextract/Makefile.am.old 2009-02-12 09:48:37.000000000 +0100 ++++ tools/ltrextract/Makefile.am 2009-02-12 09:50:36.000000000 +0100 +@@ -3,9 +3,8 @@ + + bin_PROGRAMS = ltrextract + +-LIBS = $(top_builddir)/util/libutil.a $(INTLLIBS) + AM_CFLAGS = -DLTREXTRACT @dis_flag@ -I$(LGENERAL_PATH) -I$(top_srcdir) -I$(top_srcdir)/util $(INTLINCLUDES) +-ltrextract_LDFLAGS = -lm ++ltrextract_LDADD = $(top_builddir)/util/libutil.a $(INTLLIBS) + ltrextract_SOURCES = ltrextract.c util.c util.h \ + terrain.c terrain.h map.c map.h nation.c nation.h \ + unit_lib.c unit_lib.h scenario.c scenario.h campaign.c campaign.h \ diff --git a/games-strategy/lgeneral/files/lgeneral-1.2_beta13-build.patch b/games-strategy/lgeneral/files/lgeneral-1.2_beta13-build.patch new file mode 100644 index 000000000000..1bbea1e06c56 --- /dev/null +++ b/games-strategy/lgeneral/files/lgeneral-1.2_beta13-build.patch @@ -0,0 +1,22 @@ +--- configure.in.old 2007-09-27 22:22:52.000000000 +0200 ++++ configure.in 2009-02-02 07:01:03.000000000 +0100 +@@ -10,9 +10,10 @@ + dnl Checks for programs. + AC_PROG_CC + AC_PROG_RANLIB ++AM_PROG_CC_C_O + + dnl various CFLAGS +-CFLAGS="$CFLAGS -g -Wall" ++CFLAGS="$CFLAGS -Wall" + + dnl Checks for libraries. + AC_CHECK_LIB(m, main,, AC_MSG_ERROR(maths library is needed)) +@@ -34,6 +35,7 @@ + dnl L10n support + ALL_LINGUAS="en de" + ++AC_GNU_SOURCE + AM_GNU_GETTEXT + + XGETTEXTFLAGS= diff --git a/games-strategy/lgeneral/files/lgeneral-1.2_beta13-gentoo-path.patch b/games-strategy/lgeneral/files/lgeneral-1.2_beta13-gentoo-path.patch new file mode 100644 index 000000000000..c921a857a982 --- /dev/null +++ b/games-strategy/lgeneral/files/lgeneral-1.2_beta13-gentoo-path.patch @@ -0,0 +1,71 @@ +--- configure.in.old 2006-08-25 23:23:54.000000000 +0200 ++++ configure.in 2006-08-25 23:24:04.000000000 +0200 +@@ -146,7 +146,7 @@ + AC_SUBST(dl_lib_flag) + + dnl installation path +-inst_dir=$datadir/games/lgeneral ++inst_dir=$datadir/lgeneral + + dis_flag="" + AC_ARG_ENABLE( install, +--- configure.in.old 2006-08-25 23:48:27.000000000 +0200 ++++ configure.in 2006-08-25 23:49:09.000000000 +0200 +@@ -105,13 +105,8 @@ + + dnl find out whether we can determine the path of the running executable + ac_paths_determ=generic +-AC_MSG_CHECKING(if executable's path can be determined at runtime) +-readlink /proc/$$/exe >/dev/null 2>&1 && ac_paths_determ=linux +-ac_can_determ_paths=yes +-if test x$ac_paths_determ = xgeneric ; then + ac_can_determ_paths=no + AC_DEFINE_UNQUOTED(PATHS_GENERIC, 1, [Defined if detecting executable's path name is not supported at runtime.]) +-fi + AC_MSG_RESULT($ac_can_determ_paths) + AC_MSG_RESULT(executable's path determination strategy... $ac_paths_determ) + AM_CONDITIONAL(compile_paths_linux, test x$ac_paths_determ = xlinux) +--- src/misc.c.old 2006-08-25 23:58:11.000000000 +0200 ++++ src/misc.c 2006-08-26 00:01:35.000000000 +0200 +@@ -418,16 +418,11 @@ + #ifdef DISABLE_INSTALL + return "."; + #else +- const char *prefix; + static char *gamedir; +- static const char suffix[] = "/share/games/lgeneral"; ++ static const char suffix[] = "@GENTOO_DATADIR@/lgeneral"; +- unsigned len; + if (gamedir) return gamedir; +- prefix = paths_prefix(); +- len = strlen(prefix); +- gamedir = malloc(len + sizeof suffix); ++ gamedir = malloc(sizeof suffix); +- strcpy(gamedir, prefix); +- strcpy(gamedir + len, suffix); ++ strcpy(gamedir, suffix); + return gamedir; + #endif + } +--- lgc-pg/misc.c.old 2006-08-26 01:53:53.000000000 +0200 ++++ lgc-pg/misc.c 2006-08-26 01:55:10.000000000 +0200 +@@ -420,16 +420,11 @@ + #ifdef DISABLE_INSTALL + return "."; + #else +- const char *prefix; + static char *gamedir; +- static const char suffix[] = "/share/games/lgeneral"; +- unsigned len; ++ static const char suffix[] = "@D@@GENTOO_DATADIR@/lgeneral"; + if (gamedir) return gamedir; +- prefix = paths_prefix(); +- len = strlen(prefix); +- gamedir = malloc(len + sizeof suffix); +- strcpy(gamedir, prefix); +- strcpy(gamedir + len, suffix); ++ gamedir = malloc(sizeof suffix); ++ strcpy(gamedir, suffix); + return gamedir; + #endif + } diff --git a/games-strategy/lgeneral/lgeneral-1.2_beta13.ebuild b/games-strategy/lgeneral/lgeneral-1.2_beta13.ebuild new file mode 100644 index 000000000000..eb91f4d4e5a2 --- /dev/null +++ b/games-strategy/lgeneral/lgeneral-1.2_beta13.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/lgeneral/lgeneral-1.2_beta13.ebuild,v 1.1 2009/09/21 04:43:00 mr_bones_ Exp $ + +EAPI=2 +inherit eutils autotools games + +MY_P="${P/_/}" +MY_P="${MY_P/beta/beta-}" +DESCRIPTION="A Panzer General clone written in SDL" +HOMEPAGE="http://lgames.sourceforge.net/index.php?project=LGeneral" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz + mirror://sourceforge/${PN}/pg-data.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="nls" + +RDEPEND="media-libs/libsdl + media-libs/sdl-mixer + nls? ( virtual/libintl )" +DEPEND="${RDEPEND} + sys-devel/gettext" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-gentoo-path.patch \ + "${FILESDIR}"/${P}-64bit.patch \ + "${FILESDIR}"/${P}-build.patch \ + "${FILESDIR}"/${P}-as-needed.patch + + cp /usr/share/gettext/config.rpath . + rm -f missing + eautoreconf + + # Build a temporary lgc-pg that knows about ${WORKDIR}: + cp -pPR "${S}" "${WORKDIR}"/tmp-build || die "cp failed" + sed -i \ + -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}:" \ + -e "s:@D@::" \ + {lgc-pg,src}/misc.c \ + || die "sed failed" + + cd "${WORKDIR}"/tmp-build + sed -i \ + -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}:" \ + -e "s:@D@:${D}:" \ + {lgc-pg,src}/misc.c \ + || die "sed failed (tmp)" +} + +src_configure() { + egamesconf \ + --disable-dependency-tracking \ + $(use_enable nls) \ + || die + + # Build the temporary lgc-pg: + cd "${WORKDIR}"/tmp-build + egamesconf \ + --disable-dependency-tracking \ + --disable-nls \ + --datadir="${D}/${GAMES_DATADIR}" \ + || die +} + +src_compile() { + emake || die "emake failed" + + # Build the temporary lgc-pg: + cd "${WORKDIR}"/tmp-build + emake || die "emake failed (tmp)" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + keepdir "${GAMES_DATADIR}"/${PN}/{ai_modules,music,terrain} + + # Generate scenario data: + SDL_VIDEODRIVER=dummy "${WORKDIR}"/tmp-build/lgc-pg/lgc-pg \ + -s "${WORKDIR}"/pg-data \ + -d "${D}/${GAMES_DATADIR}"/${PN} \ + || die "Failed to generate scenario data" + + dodoc AUTHORS ChangeLog README.lgeneral README.lgc-pg TODO + newicon lgeneral48.png ${PN}.png + make_desktop_entry ${PN} LGeneral + prepgamesdirs +} |