Bug 120803 - [new port] games/lordsawar: A Warlords II clone
Summary: [new port] games/lordsawar: A Warlords II clone
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-18 16:30 UTC by Alex Kozlov
Modified: 2008-02-21 09:00 UTC (History)
0 users

See Also:


Attachments
file.shar (18.39 KB, text/plain)
2008-02-18 16:30 UTC, Alex Kozlov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Kozlov 2008-02-18 16:30:04 UTC
A Warlords II clone. Still under heavy development.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-02-18 16:30:40 UTC
Class Changed
From-To: sw-bug->change-request

Fix category (new ports should be change-requests) (via the GNATS Auto 
Assign Tool)
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2008-02-18 16:46:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

I'll take it.
Comment 3 Dmitry Marakasov 2008-02-18 17:15:50 UTC
* Alex Kozlov (spam@rm-rf.kiev.ua) wrote:

> A Warlords II clone. Still under heavy development.
Hi! Actually, I was working on a port of this too, and maybe you
could use some parts from my ports. From the first glance, my port
advantageously has OPTIONS for sound and editor, optional NLS
support, correct depends and correct plist (mtree dirs under locale/
should not be removed).

But the main thing is that getline() function that FreeBSD libc lacks.
You've patched lordsawar sources, but my idea was to provide
implementation of required functions through providing a header file
with the port or making separate port.

Please see http://www.amdmi3.ru/law.tar.gz for my sketces. Those are not
complete/usable/working ports, but I can update those in hours if you
find my ideas useful.

-- 
Dmitry A. Marakasov    | jabber: amdmi3@jabber.ru
amdmi3@amdmi3.ru       | http://www.amdmi3.ru
Comment 4 Alex Kozlov 2008-02-19 01:02:25 UTC
On Mon, Feb 18, 2008 at 08:15:50PM +0300, Dmitry Marakasov wrote:
> * Alex Kozlov (spam@rm-rf.kiev.ua) wrote:
> 
> > A Warlords II clone. Still under heavy development.
> Hi! Actually, I was working on a port of this too, and maybe you
> could use some parts from my ports. From the first glance, my port
> advantageously has OPTIONS for sound and editor, optional NLS
> support, correct depends and correct plist (mtree dirs under locale/
> should not be removed).
I checked dependency in tinderbox. 
NLS dir only will be removed if empty. That why I use @dirrmtry. 
After investigating I decided completely disable nls, because it no-op and  
appears badly broken. Without patch-src_ucompose.hpp in most locales
other that 'C' I get core. Can You please confirm this?
$locale
LANG=uk_UA.UTF-8
LC_CTYPE="uk_UA.UTF-8"
LC_COLLATE="uk_UA.UTF-8"
LC_TIME="uk_UA.UTF-8"
LC_NUMERIC="uk_UA.UTF-8"
LC_MONETARY="uk_UA.UTF-8"
LC_MESSAGES="uk_UA.UTF-8"
LC_ALL=
$lordsawar
Found configuration file: /home/stalker/.lordsawarrc
/home/stalker/.lordsawarrc: The file is not obfuscated, attempting to
read it....
sound.cpp: 80: Sound constructor
/usr/local/share/lordsawar/music/music.xml: The file is not obfuscated,
attempting to read it....
sound.cpp: 105: Music list contains 7 entries.
sound.cpp: 106: background list has 1 entries.
sound.cpp: 158: playing Music

glibmm-ERROR **: 
unhandled exception (type std::exception) in signal handler:
what: locale::facet::_S_create_c_locale name not valid

aborting...
Abort trap: 6 (core dumped)


> But the main thing is that getline() function that FreeBSD libc lacks.
> You've patched lordsawar sources, but my idea was to provide
> implementation of required functions through providing a header file
> with the port or making separate port.
Yes, I do the same on the first try(1). But IMHO this is ugly.
Now I communicate with the author about accepting patch upstream.
As for OPTIONS, I don't see why disable sound. But if You wish...

> Please see http://www.amdmi3.ru/law.tar.gz for my sketces. Those are not
> complete/usable/working ports, but I can update those in hours if you
> find my ideas useful.
In new shar:
 - disable nls
 - add SOUND knob
 - drop USE_AUTOTOOLS, patch configure instead of configure.ac
 - fallback to 0.0.8 version as 0.0.9 too unstable.
 - use Your pkg-descr

(1): http://src4.narod.ru/lordsawar-old.shar



# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	lordsawar
#	lordsawar/files
#	lordsawar/files/patch-src_game.cpp
#	lordsawar/files/patch-configure
#	lordsawar/files/patch-src_ucompose.hpp
#	lordsawar/Makefile
#	lordsawar/pkg-plist
#	lordsawar/pkg-descr
#	lordsawar/distinfo
#
echo c - lordsawar
mkdir -p lordsawar > /dev/null 2>&1
echo c - lordsawar/files
mkdir -p lordsawar/files > /dev/null 2>&1
echo x - lordsawar/files/patch-src_game.cpp
sed 's/^X//' >lordsawar/files/patch-src_game.cpp << 'END-of-lordsawar/files/patch-src_game.cpp'
XIndex: src/game.cpp
X@@ -1115,15 +1115,6 @@
X int
X Game::loadHeroTemplates()
X {
X-  FILE *fileptr = fopen (File::getMiscFile("heronames").c_str(), "r");
X-  char *line = NULL;
X-  size_t len = 0;
X-  ssize_t read;
X-  int retval;
X-  int gender;
X-  int side;
X-  size_t bytesread = 0;
X-  char *tmp;
X   const Armysetlist* al = Armysetlist::getInstance();
X   const Army* herotype;
X 
X@@ -1131,51 +1122,41 @@
X   std::vector<const Army*> heroes;
X   Player *p = Playerlist::getInstance()->getNeutral();
X   for (unsigned int j = 0; j < al->getSize(p->getArmyset()); j++)
X-    {
X+	{
X       const Army *a = al->getArmy (p->getArmyset(), j);
X       if (a->isHero())
X-	heroes.push_back(a);
X+		heroes.push_back(a);
X     }
X+ 
X+  std::ifstream file(File::getMiscFile("heronames").c_str());
X 
X-  if (fileptr == NULL)
X-    return -1;
X-  while ((read = getline (&line, &len, fileptr)) != -1)
X-    {
X-      bytesread = 0;
X-      retval = sscanf (line, "%d%d%n", &side, &gender, &bytesread);
X-      if (retval != 2)
X-	{
X-	  free (line);
X-	  return -2;
X-	}
X-      while (isspace(line[bytesread]) && line[bytesread] != '\0')
X-	bytesread++;
X-      tmp = strchr (&line[bytesread], '\n');
X-      if (tmp)
X-	tmp[0] = '\0';
X-      if (strlen (&line[bytesread]) == 0)
X-	{
X-	  free (line);
X-	  return -3;
X-	}
X-      if (side < 0 || side > (int) MAX_PLAYERS)
X-	{
X-	  free (line);
X-	  return -4;
X+  if (file.good()) {
X+	std::string buffer, name;
X+	int side, gender;
X+
X+	while (std::getline(file, buffer)) {
X+	std::istringstream line(buffer);
X+	if (!(line >> side >> gender >> name))
X+		return -2;
X+
X+	if (side < 0 || side > (int) MAX_PLAYERS)
X+		return -4;
X+
X+	herotype = heroes[rand() % heroes.size()];
X+	Hero *newhero = new Hero (*herotype, "", NULL);
X+
X+	if (gender)
X+		newhero->setGender(Hero::MALE);
X+	else
X+		newhero->setGender(Hero::FEMALE);
X+
X+	newhero->setName (name);
X+    d_herotemplates[side].push_back (newhero);
X 	}
X+  } else
X+		return -1;
X 
X-      herotype = heroes[rand() % heroes.size()];
X-      Hero *newhero = new Hero (*herotype, "", NULL);
X-      if (gender)
X-	newhero->setGender(Hero::MALE);
X-      else
X-	newhero->setGender(Hero::FEMALE);
X-      newhero->setName (&line[bytesread]);
X-      d_herotemplates[side].push_back (newhero);
X-    }
X-  if (line)
X-    free (line);
X-  fclose (fileptr);
X+  file.close();
X   return 0;
X }
X 
END-of-lordsawar/files/patch-src_game.cpp
echo x - lordsawar/files/patch-configure
sed 's/^X//' >lordsawar/files/patch-configure << 'END-of-lordsawar/files/patch-configure'
XIndex: configure
X@@ -4622,7 +4622,7 @@
X     LDFLAGS="$LDFLAGS -lSDL_mixer"
X     LIBS="-lSDL_mixer $LIBS"
X 
X-            if test $CC = "gcc" || test $CXX = "g++"; then
X+            if test $CC = "gcc" || test $CXX = "g++" || test $CXX = "c++"; then
X 
X        if test "$cross_compiling" = yes; then
X   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
X@@ -13798,8 +13798,7 @@
X 
X rm -f src/main.o
X 
X-LORDSAWAR_DATADIR="$datadir/lordsawar"
X-LORDSAWAR_DATADIR=${LORDSAWAR_DATADIR/'${prefix}'/$prefix}
X+eval LORDSAWAR_DATADIR="$datadir/lordsawar"
X 
X 
X ac_config_files="$ac_config_files dat/Makefile dat/army/Makefile dat/army/default/Makefile dat/army/bigdefault/Makefile dat/tilesets/Makefile dat/tilesets/default/Makefile dat/tilesets/default/misc/Makefile dat/tilesets/bigdefault/Makefile dat/tilesets/bigdefault/misc/Makefile dat/shield/Makefile dat/shield/default/Makefile dat/shield/plain/Makefile dat/citysets/Makefile dat/citysets/default/Makefile dat/citysets/bigdefault/Makefile dat/various/Makefile dat/various/items/Makefile dat/various/editor/Makef ile dat/map/Makefile dat/ggz/Makefile dat/ggz/lordsawar.dsc dat/ggz/lordsawar-server.dsc dat/music/Makefile dat/glade/Makefile dat/glade/editor/Makefile intl/Makefile po/Makefile.in po/Makefile Makefile src/Makefile doc/Makefile src/server/Makefile src/editor/Makefile src/gui/Makefile"
END-of-lordsawar/files/patch-configure
echo x - lordsawar/files/patch-src_ucompose.hpp
sed 's/^X//' >lordsawar/files/patch-src_ucompose.hpp << 'END-of-lordsawar/files/patch-src_ucompose.hpp'
XIndex: src/ucompose.hpp
X@@ -178,9 +178,9 @@
X   inline Composition::Composition(std::string fmt)
X     : arg_no(1)
X   {
X-#if __GNUC__ >= 3
X-    os.imbue(std::locale("")); // use the user's locale for the stream
X-#endif
X+//#if __GNUC__ >= 3
X+//   os.imbue(std::locale("")); // use the user's locale for the stream
X+//#endif
X     std::string::size_type b = 0, i = 0;
X   
X     // fill in output with the strings between the %1 %2 %3 etc. and
END-of-lordsawar/files/patch-src_ucompose.hpp
echo x - lordsawar/Makefile
sed 's/^X//' >lordsawar/Makefile << 'END-of-lordsawar/Makefile'
X# New ports collection makefile for:   lordsawar
X# Date created:                 12 February 2008
X# Whom:                         spam@rm-rf.kiev.ua
X#
X# $FreeBSD$
X#
X
XPORTNAME=	lordsawar
XPORTVERSION=	0.0.8
XCATEGORIES=	games
XMASTER_SITES=	http://lordsawar.com/
X
XMAINTAINER=	spam@rm-rf.kiev.ua
XCOMMENT=	A Warlords II clone
X
XLIB_DEPENDS=	glademm-2.4:${PORTSDIR}/devel/libglademm24
X
XUSE_GZIP=	yes
XUSE_GETTEXT=	yes
XUSE_SDL=	sdl image
X
XOPTIONS=	SOUND	"Enable sound"	on
X
X.include <bsd.port.pre.mk>
X
X.if !defined(WITHOUT_SOUND)
XUSE_SDL+=	mixer
X.else
XCONFIGURE_ARGS+=--disable-sound
X.endif
X
XPLIST_SUB+=	NLS="@comment "
X
XGNU_CONFIGURE=	yes
XCONFIGURE_ENV+=	LDFLAGS="-L${LOCALBASE}/lib" \
X		CPPFLAGS="-I${LOCALBASE}/include" \
X		LIBS="${PTHREAD_LIBS}"
XCONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
X
X.include <bsd.port.post.mk>
END-of-lordsawar/Makefile
echo x - lordsawar/pkg-plist
sed 's/^X//' >lordsawar/pkg-plist << 'END-of-lordsawar/pkg-plist'
Xbin/lordsawar
Xbin/lordsawar-army-editor
Xbin/lordsawar-editor
Xbin/lordsawar_server
Xshare/applications/lordsawar.desktop
X%%NLS%%share/locale/de/LC_MESSAGES/lordsawar.mo
X%%NLS%%share/locale/fr/LC_MESSAGES/lordsawar.mo
X%%NLS%%share/locale/it/LC_MESSAGES/lordsawar.mo
X%%NLS%%share/locale/pl/LC_MESSAGES/lordsawar.mo
X%%NLS%%share/locale/hi/LC_MESSAGES/lordsawar.mo
X%%DATADIR%%/citynames
X%%DATADIR%%/heronames
X%%DATADIR%%/ruinnames
X%%DATADIR%%/signposts
X%%DATADIR%%/templenames
X%%DATADIR%%/army/default/default.xml
X%%DATADIR%%/army/default/archers.png
X%%DATADIR%%/army/default/archons.png
X%%DATADIR%%/army/default/catapults.png
X%%DATADIR%%/army/default/daemons.png
X%%DATADIR%%/army/default/devils.png
X%%DATADIR%%/army/default/dragons.png
X%%DATADIR%%/army/default/dwarves.png
X%%DATADIR%%/army/default/elementals.png
X%%DATADIR%%/army/default/elephants.png
X%%DATADIR%%/army/default/ghosts.png
X%%DATADIR%%/army/default/giantbats.png
X%%DATADIR%%/army/default/giants.png
X%%DATADIR%%/army/default/giantworms.png
X%%DATADIR%%/army/default/griffins.png
X%%DATADIR%%/army/default/heavycav.png
X%%DATADIR%%/army/default/heavyinf.png
X%%DATADIR%%/army/default/hero.png
X%%DATADIR%%/army/default/lightcav.png
X%%DATADIR%%/army/default/lightinf.png
X%%DATADIR%%/army/default/minotaurs.png
X%%DATADIR%%/army/default/orcishmob.png
X%%DATADIR%%/army/default/pegasi.png
X%%DATADIR%%/army/default/pikeman.png
X%%DATADIR%%/army/default/scouts.png
X%%DATADIR%%/army/default/spiders.png
X%%DATADIR%%/army/default/unicorns.png
X%%DATADIR%%/army/default/wizards.png
X%%DATADIR%%/army/default/wolfriders.png
X%%DATADIR%%/army/default/stackship.png
X%%DATADIR%%/army/default/plantedstandard.png
X%%DATADIR%%/army/bigdefault/bigdefault.xml
X%%DATADIR%%/army/bigdefault/archers.png
X%%DATADIR%%/army/bigdefault/archons.png
X%%DATADIR%%/army/bigdefault/catapults.png
X%%DATADIR%%/army/bigdefault/daemons.png
X%%DATADIR%%/army/bigdefault/devils.png
X%%DATADIR%%/army/bigdefault/dragons.png
X%%DATADIR%%/army/bigdefault/dwarves.png
X%%DATADIR%%/army/bigdefault/elementals.png
X%%DATADIR%%/army/bigdefault/elephants.png
X%%DATADIR%%/army/bigdefault/ghosts.png
X%%DATADIR%%/army/bigdefault/giantbats.png
X%%DATADIR%%/army/bigdefault/giants.png
X%%DATADIR%%/army/bigdefault/giantworms.png
X%%DATADIR%%/army/bigdefault/griffins.png
X%%DATADIR%%/army/bigdefault/heavycav.png
X%%DATADIR%%/army/bigdefault/heavyinf.png
X%%DATADIR%%/army/bigdefault/hero.png
X%%DATADIR%%/army/bigdefault/lightcav.png
X%%DATADIR%%/army/bigdefault/lightinf.png
X%%DATADIR%%/army/bigdefault/minotaurs.png
X%%DATADIR%%/army/bigdefault/pegasi.png
X%%DATADIR%%/army/bigdefault/orcishmob.png
X%%DATADIR%%/army/bigdefault/pikeman.png
X%%DATADIR%%/army/bigdefault/scouts.png
X%%DATADIR%%/army/bigdefault/spiders.png
X%%DATADIR%%/army/bigdefault/unicorns.png
X%%DATADIR%%/army/bigdefault/wizards.png
X%%DATADIR%%/army/bigdefault/wolfriders.png
X%%DATADIR%%/army/bigdefault/stackship.png
X%%DATADIR%%/army/bigdefault/plantedstandard.png
X%%DATADIR%%/tilesets/default/misc/flags.png
X%%DATADIR%%/tilesets/default/misc/roads.png
X%%DATADIR%%/tilesets/default/misc/bridges.png
X%%DATADIR%%/tilesets/default/misc/fog.png
X%%DATADIR%%/tilesets/default/misc/selector.png
X%%DATADIR%%/tilesets/default/misc/small_selector.png
X%%DATADIR%%/tilesets/default/misc/explosion.png
X%%DATADIR%%/tilesets/default/default.xml
X%%DATADIR%%/tilesets/default/grass.png
X%%DATADIR%%/tilesets/default/water.png
X%%DATADIR%%/tilesets/default/forest.png
X%%DATADIR%%/tilesets/default/hills.png
X%%DATADIR%%/tilesets/default/mountains.png
X%%DATADIR%%/tilesets/default/swamp.png
X%%DATADIR%%/tilesets/bigdefault/misc/flags.png
X%%DATADIR%%/tilesets/bigdefault/misc/roads.png
X%%DATADIR%%/tilesets/bigdefault/misc/bridges.png
X%%DATADIR%%/tilesets/bigdefault/misc/fog.png
X%%DATADIR%%/tilesets/bigdefault/misc/selector.png
X%%DATADIR%%/tilesets/bigdefault/misc/small_selector.png
X%%DATADIR%%/tilesets/bigdefault/misc/explosion.png
X%%DATADIR%%/tilesets/bigdefault/bigdefault.xml
X%%DATADIR%%/tilesets/bigdefault/grass.png
X%%DATADIR%%/tilesets/bigdefault/water.png
X%%DATADIR%%/tilesets/bigdefault/forest.png
X%%DATADIR%%/tilesets/bigdefault/hills.png
X%%DATADIR%%/tilesets/bigdefault/mountains.png
X%%DATADIR%%/tilesets/bigdefault/swamp.png
X%%DATADIR%%/various/items/items.xml
X%%DATADIR%%/various/editor/button_selector.png
X%%DATADIR%%/various/editor/button_1x1.png
X%%DATADIR%%/various/editor/button_2x2.png
X%%DATADIR%%/various/editor/button_3x3.png
X%%DATADIR%%/various/editor/button_castle.png
X%%DATADIR%%/various/editor/button_erase.png
X%%DATADIR%%/various/editor/button_blank.png
X%%DATADIR%%/various/editor/button_signpost.png
X%%DATADIR%%/various/editor/button_ruin.png
X%%DATADIR%%/various/editor/button_road.png
X%%DATADIR%%/various/editor/button_temple.png
X%%DATADIR%%/various/editor/button_stack.png
X%%DATADIR%%/various/editor/button_bridge.png
X%%DATADIR%%/various/editor/button_port.png
X%%DATADIR%%/various/arrows.png
X%%DATADIR%%/various/waypoints.png
X%%DATADIR%%/various/buttons.png
X%%DATADIR%%/various/city_occupied.png
X%%DATADIR%%/various/items.png
X%%DATADIR%%/various/medals_mask.gif
X%%DATADIR%%/various/ship.png
X%%DATADIR%%/various/recruit_female.png
X%%DATADIR%%/various/recruit_male.png
X%%DATADIR%%/various/ruin_1.png
X%%DATADIR%%/various/ruin_2.png
X%%DATADIR%%/various/splash_screen.jpg
X%%DATADIR%%/various/about_screen.jpg
X%%DATADIR%%/various/network_screen.jpg
X%%DATADIR%%/various/stats.png
X%%DATADIR%%/various/win.jpg
X%%DATADIR%%/various/win_mask.png
X%%DATADIR%%/various/freelords.png
X%%DATADIR%%/various/lordsawar_logo.png
X%%DATADIR%%/various/freelords_editor.png
X%%DATADIR%%/various/editor.png
X%%DATADIR%%/various/hero.png
X%%DATADIR%%/various/prodshieldset.png
X%%DATADIR%%/various/smallruinedcity.png
X%%DATADIR%%/various/movebonus.png
X%%DATADIR%%/various/smallunexploredruin.png
X%%DATADIR%%/various/smallunexploredstronghold.png
X%%DATADIR%%/various/smallexploredruin.png
X%%DATADIR%%/various/smalltemple.png
X%%DATADIR%%/various/cursors.png
X%%DATADIR%%/various/smallupkeep.png
X%%DATADIR%%/various/smallincome.png
X%%DATADIR%%/various/smalltreasury.png
X%%DATADIR%%/various/smallcity.png
X%%DATADIR%%/various/diplomacy-small.png
X%%DATADIR%%/various/diplomacy-large.png
X%%DATADIR%%/map/2ndPunic37.map
X%%DATADIR%%/music/back1.ogg
X%%DATADIR%%/music/defeat.ogg
X%%DATADIR%%/music/defeat1.ogg
X%%DATADIR%%/music/victory.ogg
X%%DATADIR%%/music/victory1.ogg
X%%DATADIR%%/music/hero.ogg
X%%DATADIR%%/music/intro.ogg
X%%DATADIR%%/music/music.xml
X%%DATADIR%%/glade/army-gains-level-dialog.glade
X%%DATADIR%%/glade/army-info-window.glade
X%%DATADIR%%/glade/stack-info-window.glade
X%%DATADIR%%/glade/buy-production-dialog.glade
X%%DATADIR%%/glade/city-defeated-dialog.glade
X%%DATADIR%%/glade/city-looted-dialog.glade
X%%DATADIR%%/glade/city-pillaged-dialog.glade
X%%DATADIR%%/glade/city-sacked-dialog.glade
X%%DATADIR%%/glade/city-window.glade
X%%DATADIR%%/glade/destination-dialog.glade
X%%DATADIR%%/glade/fight-window.glade
X%%DATADIR%%/glade/game-loaded-dialog.glade
X%%DATADIR%%/glade/player-died-dialog.glade
X%%DATADIR%%/glade/game-over-dialog.glade
X%%DATADIR%%/glade/game-preferences-dialog.glade
X%%DATADIR%%/glade/game-window.glade
X%%DATADIR%%/glade/hero-dialog.glade
X%%DATADIR%%/glade/hero-offer-dialog.glade
X%%DATADIR%%/glade/surrender-dialog.glade
X%%DATADIR%%/glade/sage-dialog.glade
X%%DATADIR%%/glade/ruin-rewarded-dialog.glade
X%%DATADIR%%/glade/ruin-report-dialog.glade
X%%DATADIR%%/glade/history-report-dialog.glade
X%%DATADIR%%/glade/report-dialog.glade
X%%DATADIR%%/glade/load-scenario-dialog.glade
X%%DATADIR%%/glade/medal-awarded-dialog.glade
X%%DATADIR%%/glade/quest-assigned-dialog.glade
X%%DATADIR%%/glade/quest-expired-dialog.glade
X%%DATADIR%%/glade/preferences-dialog.glade
X%%DATADIR%%/glade/ruinfight-finished-dialog.glade
X%%DATADIR%%/glade/ruinfight-started-dialog.glade
X%%DATADIR%%/glade/ruin-searched-dialog.glade
X%%DATADIR%%/glade/splash-window.glade
X%%DATADIR%%/glade/temple-visit-dialog.glade
X%%DATADIR%%/glade/disband-stack-dialog.glade
X%%DATADIR%%/glade/hero-brings-allies-dialog.glade
X%%DATADIR%%/glade/military-advisor-dialog.glade
X%%DATADIR%%/glade/next-player-turn-dialog.glade
X%%DATADIR%%/glade/city-rename-dialog.glade
X%%DATADIR%%/glade/city-raze-dialog.glade
X%%DATADIR%%/glade/city-razed-dialog.glade
X%%DATADIR%%/glade/signpost-change-dialog.glade
X%%DATADIR%%/glade/fight-order-dialog.glade
X%%DATADIR%%/glade/hero-levels-dialog.glade
X%%DATADIR%%/glade/player-resign-dialog.glade
X%%DATADIR%%/glade/army-bonus-dialog.glade
X%%DATADIR%%/glade/item-bonus-dialog.glade
X%%DATADIR%%/glade/game-options-dialog.glade
X%%DATADIR%%/glade/triumphs-dialog.glade
X%%DATADIR%%/glade/diplomacy-report-dialog.glade
X%%DATADIR%%/glade/diplomacy-dialog.glade
X%%DATADIR%%/glade/treachery-dialog.glade
X%%DATADIR%%/glade/editor/main-window.glade
X%%DATADIR%%/glade/editor/signpost-dialog.glade
X%%DATADIR%%/glade/editor/temple-dialog.glade
X%%DATADIR%%/glade/editor/ruin-dialog.glade
X%%DATADIR%%/glade/editor/stack-dialog.glade
X%%DATADIR%%/glade/editor/select-army-dialog.glade
X%%DATADIR%%/glade/editor/players-dialog.glade
X%%DATADIR%%/glade/editor/city-dialog.glade
X%%DATADIR%%/glade/editor/map-info-dialog.glade
X%%DATADIR%%/glade/editor/new-map-dialog.glade
X%%DATADIR%%/glade/editor/armyset-window.glade
X%%DATADIR%%/glade/editor/armyset-info-dialog.glade
X%%DATADIR%%/shield/default/default.xml
X%%DATADIR%%/shield/default/small-white-shield.png
X%%DATADIR%%/shield/default/small-green-shield.png
X%%DATADIR%%/shield/default/small-yellow-shield.png
X%%DATADIR%%/shield/default/small-lightblue-shield.png
X%%DATADIR%%/shield/default/small-red-shield.png
X%%DATADIR%%/shield/default/small-darkblue-shield.png
X%%DATADIR%%/shield/default/small-orange-shield.png
X%%DATADIR%%/shield/default/small-black-shield.png
X%%DATADIR%%/shield/default/small-neutral-shield.png
X%%DATADIR%%/shield/default/medium-white-shield.png
X%%DATADIR%%/shield/default/medium-green-shield.png
X%%DATADIR%%/shield/default/medium-yellow-shield.png
X%%DATADIR%%/shield/default/medium-lightblue-shield.png
X%%DATADIR%%/shield/default/medium-red-shield.png
X%%DATADIR%%/shield/default/medium-darkblue-shield.png
X%%DATADIR%%/shield/default/medium-orange-shield.png
X%%DATADIR%%/shield/default/medium-black-shield.png
X%%DATADIR%%/shield/default/medium-neutral-shield.png
X%%DATADIR%%/shield/default/large-white-shield.png
X%%DATADIR%%/shield/default/large-green-shield.png
X%%DATADIR%%/shield/default/large-yellow-shield.png
X%%DATADIR%%/shield/default/large-lightblue-shield.png
X%%DATADIR%%/shield/default/large-red-shield.png
X%%DATADIR%%/shield/default/large-darkblue-shield.png
X%%DATADIR%%/shield/default/large-orange-shield.png
X%%DATADIR%%/shield/default/large-black-shield.png
X%%DATADIR%%/shield/default/large-neutral-shield.png
X%%DATADIR%%/shield/plain/plain.xml
X%%DATADIR%%/shield/plain/small-shield.png
X%%DATADIR%%/shield/plain/small-neutral-shield.png
X%%DATADIR%%/shield/plain/medium-shield.png
X%%DATADIR%%/shield/plain/medium-neutral-shield.png
X%%DATADIR%%/shield/plain/large-shield.png
X%%DATADIR%%/shield/plain/large-neutral-shield.png
X%%DATADIR%%/citysets/default/default.xml
X%%DATADIR%%/citysets/default/castle_razed.png
X%%DATADIR%%/citysets/default/castles.png
X%%DATADIR%%/citysets/default/port.png
X%%DATADIR%%/citysets/default/ruin.png
X%%DATADIR%%/citysets/default/signpost.png
X%%DATADIR%%/citysets/default/temples.png
X%%DATADIR%%/citysets/default/towers.png
X%%DATADIR%%/citysets/bigdefault/bigdefault.xml
X%%DATADIR%%/citysets/bigdefault/castle_razed.png
X%%DATADIR%%/citysets/bigdefault/castles.png
X%%DATADIR%%/citysets/bigdefault/port.png
X%%DATADIR%%/citysets/bigdefault/ruin.png
X%%DATADIR%%/citysets/bigdefault/signpost.png
X%%DATADIR%%/citysets/bigdefault/temples.png
X%%DATADIR%%/citysets/bigdefault/towers.png
X@dirrmtry share/locale/de/LC_MESSAGES
X@dirrmtry share/locale/de
X@dirrmtry share/locale/fr/LC_MESSAGES
X@dirrmtry share/locale/fr
X@dirrmtry share/locale/it/LC_MESSAGES
X@dirrmtry share/locale/it
X@dirrmtry share/locale/pl/LC_MESSAGES
X@dirrmtry share/locale/pl
X@dirrmtry share/locale/hi/LC_MESSAGES
X@dirrmtry share/locale/hi
X@dirrm %%DATADIR%%/army/default
X@dirrm %%DATADIR%%/army/bigdefault
X@dirrm %%DATADIR%%/army
X@dirrm %%DATADIR%%/citysets/default
X@dirrm %%DATADIR%%/citysets/bigdefault
X@dirrm %%DATADIR%%/citysets
X@dirrm %%DATADIR%%/glade/editor
X@dirrm %%DATADIR%%/glade
X@dirrm %%DATADIR%%/map
X@dirrm %%DATADIR%%/music
X@dirrm %%DATADIR%%/shield/default
X@dirrm %%DATADIR%%/shield/plain
X@dirrm %%DATADIR%%/shield
X@dirrm %%DATADIR%%/tilesets/default/misc
X@dirrm %%DATADIR%%/tilesets/default
X@dirrm %%DATADIR%%/tilesets/bigdefault/misc
X@dirrm %%DATADIR%%/tilesets/bigdefault
X@dirrm %%DATADIR%%/tilesets
X@dirrm %%DATADIR%%/various/items
X@dirrm %%DATADIR%%/various/editor
X@dirrm %%DATADIR%%/various
X@dirrm %%DATADIR%%
END-of-lordsawar/pkg-plist
echo x - lordsawar/pkg-descr
sed 's/^X//' >lordsawar/pkg-descr << 'END-of-lordsawar/pkg-descr'
XA turn-based strategy game where up to 8 players strive for control
Xof as many cities as possible. Produce new armies in cities to
Xconquer nearby cities. Using the income from those cities, make
Xmore armies to take more cities. Send a hero to a temple to get a
Xquest, or maybe search a nearby ruin instead. Play with others or
Xagainst the computer.
X
XWWW: http://lordsawar.com/
END-of-lordsawar/pkg-descr
echo x - lordsawar/distinfo
sed 's/^X//' >lordsawar/distinfo << 'END-of-lordsawar/distinfo'
XMD5 (lordsawar-0.0.8.tar.gz) = dfe83aea8517d9760d9cd8e268efef8d
XSHA256 (lordsawar-0.0.8.tar.gz) = 9786394b856beeee45fcfe0ca74befed573b5b5f201086f8bc73d3d54a3d28e1
XSIZE (lordsawar-0.0.8.tar.gz) = 13340263
END-of-lordsawar/distinfo
exit
Comment 5 Dmitry Marakasov 2008-02-19 13:56:32 UTC
* Alex Kozlov (spam@rm-rf.kiev.ua) wrote:
> > > A Warlords II clone. Still under heavy development.
> > Hi! Actually, I was working on a port of this too, and maybe you
> > could use some parts from my ports. From the first glance, my port
> > advantageously has OPTIONS for sound and editor, optional NLS
> > support, correct depends and correct plist (mtree dirs under locale/
> > should not be removed).
> I checked dependency in tinderbox. 
Ok then. I didn't so maybe some of depends I've used were actually
removed or those were not direct depends.

> NLS dir only will be removed if empty. That why I use @dirrmtry. 
Tinderbox and build cluster will complain if directories belonging
to mtree are removed by the port. share/locale/{de,fr,it,pl,hi} do
belong to mtree. Btw, share/applications do not, so there should be
@dirrmtry share/applications. Please correct me if I'm wrong here.

> After investigating I decided completely disable nls, because it no-op and  
> appears badly broken. Without patch-src_ucompose.hpp in most locales
> other that 'C' I get core. Can You please confirm this?
That was the issue with previous versions of lordsaware, but now I can't
reproduce it with 0.0.8. With exactly yours locale settings as well.

But if you want to remove NLS support completely, you should:
* use CONFIGURE_ARGS+=	--disable-nls
* remove USE_GETTEXT
* remove all lines containing share/locale from plist

Btw, now plist is broken (output of `port test`):
===> Extra files and directories check
share/locale/de/LC_MESSAGES/lordsawar.mo
share/locale/fr/LC_MESSAGES/lordsawar.mo
share/locale/hi/LC_MESSAGES/lordsawar.mo
share/locale/it/LC_MESSAGES/lordsawar.mo
share/locale/pl/LC_MESSAGES/lordsawar.mo

> > But the main thing is that getline() function that FreeBSD libc lacks.
> > You've patched lordsawar sources, but my idea was to provide
> > implementation of required functions through providing a header file
> > with the port or making separate port.
> Yes, I do the same on the first try(1). But IMHO this is ugly.
> Now I communicate with the author about accepting patch upstream.
I've mailed him too, but he said he's oriented to GNU/Linux rather than
cross-platform, so he's not gonna drop usage of GNU libc extensions and
bashisms. But if you manage to make him accept the patch, it's certainly
better than any local hacking.

> As for OPTIONS, I don't see why disable sound. But if You wish...
Not that important actually, but I think that supporting as many knobs
supported by the software as possible is generally good.

> > Please see http://www.amdmi3.ru/law.tar.gz for my sketces. Those are not
> > complete/usable/working ports, but I can update those in hours if you
> > find my ideas useful.
> In new shar:
>  - disable nls
>  - add SOUND knob
>  - drop USE_AUTOTOOLS, patch configure instead of configure.ac
>  - fallback to 0.0.8 version as 0.0.9 too unstable.
>  - use Your pkg-descr
Looks good for me, except for NLS issues, but I didn't test it
thoroughfully. You can also add http://www.amdmi3.ru/distfiles/
to MASTER_SITES.

-- 
Dmitry A. Marakasov    | jabber: amdmi3@jabber.ru
amdmi3@amdmi3.ru       | http://www.amdmi3.ru
Comment 6 Alex Kozlov 2008-02-19 16:30:39 UTC
On Tue, Feb 19, 2008 at 04:56:32PM +0300, Dmitry Marakasov wrote:
> * Alex Kozlov (spam@rm-rf.kiev.ua) wrote:
> > > > A Warlords II clone. Still under heavy development.
> > > Hi! Actually, I was working on a port of this too, and maybe you
> > > could use some parts from my ports. From the first glance, my port
> > > advantageously has OPTIONS for sound and editor, optional NLS
> > > support, correct depends and correct plist (mtree dirs under locale/
> > > should not be removed).
> > I checked dependency in tinderbox. 
> Ok then. I didn't so maybe some of depends I've used were actually
> removed or those were not direct depends.
> 
> > NLS dir only will be removed if empty. That why I use @dirrmtry. 
> Tinderbox and build cluster will complain if directories belonging
> to mtree are removed by the port. share/locale/{de,fr,it,pl,hi} do
> belong to mtree. Btw, share/applications do not, so there should be
> @dirrmtry share/applications. Please correct me if I'm wrong here.
My tinderbox not complained about share/locale/ lines.
Build claster use special version? Where I can read about that?
I would add share/applications line. 
 
> > After investigating I decided completely disable nls, because it no-op and  
> > appears badly broken. Without patch-src_ucompose.hpp in most locales
> > other that 'C' I get core. Can You please confirm this?
> That was the issue with previous versions of lordsaware, but now I can't
> reproduce it with 0.0.8. With exactly yours locale settings as well.
Strange, are You sure that not applying the patch-src_ucompose.hpp?

> But if you want to remove NLS support completely, you should:
> * use CONFIGURE_ARGS+=	--disable-nls
> * remove USE_GETTEXT
> * remove all lines containing share/locale from plist
I forgot to add --disable-nls, thanks.
But we can't remove USE_GETTEXT. gettext function used unconditionally in
the code. Situation with i18n are quite complicated. I can make it work with
lordsawar.pot from svn, but I don't want repetition multimedia/flv2mpeg4
case. So I delete these lines.

> Btw, now plist is broken (output of `port test`):
> ===> Extra files and directories check
> share/locale/de/LC_MESSAGES/lordsawar.mo
> share/locale/fr/LC_MESSAGES/lordsawar.mo
> share/locale/hi/LC_MESSAGES/lordsawar.mo
> share/locale/it/LC_MESSAGES/lordsawar.mo
> share/locale/pl/LC_MESSAGES/lordsawar.mo

> 
> > > But the main thing is that getline() function that FreeBSD libc lacks.
> > > You've patched lordsawar sources, but my idea was to provide
> > > implementation of required functions through providing a header file
> > > with the port or making separate port.
> > Yes, I do the same on the first try(1). But IMHO this is ugly.
> > Now I communicate with the author about accepting patch upstream.
> I've mailed him too, but he said he's oriented to GNU/Linux rather than
> cross-platform, so he's not gonna drop usage of GNU libc extensions and
> bashisms. But if you manage to make him accept the patch, it's certainly
> better than any local hacking.
Yes, author has typical gnu mindset, but I have certain hope. 

> 
> > As for OPTIONS, I don't see why disable sound. But if You wish...
> Not that important actually, but I think that supporting as many knobs
> supported by the software as possible is generally goood.
If option can make some dependence optional, sdl_mixer in this case,
it useful I agree, but if it only prevent installation of one small binary,
not sure.

> > > Please see http://www.amdmi3.ru/law.tar.gz for my sketces. Those are not
> > > complete/usable/working ports, but I can update those in hours if you
> > > find my ideas useful.
> > In new shar:
> >  - disable nls
> >  - add SOUND knob
> >  - drop USE_AUTOTOOLS, patch configure instead of configure.ac
> >  - fallback to 0.0.8 version as 0.0.9 too unstable.
> >  - use Your pkg-descr
> Looks good for me, except for NLS issues, but I didn't test it
> thoroughfully. You can also add http://www.amdmi3.ru/distfiles/
> to MASTER_SITES.


--
Adios
Comment 7 Dmitry Marakasov 2008-02-19 22:53:45 UTC
* Alex Kozlov (spam@rm-rf.kiev.ua) wrote:

> > Tinderbox and build cluster will complain if directories belonging
> > to mtree are removed by the port. share/locale/{de,fr,it,pl,hi} do
> > belong to mtree. Btw, share/applications do not, so there should be
> > @dirrmtry share/applications. Please correct me if I'm wrong here.
> My tinderbox not complained about share/locale/ lines.
> Build claster use special version? Where I can read about that?
Dunno, maybe miwi@ knows. It also may be that I'm wrong (but judging from
plist for most ports, only non-mtree locale directories are removed
with dirrmtry, i.e. share/locale/it_IT is removed, but share/locale/it
is not).

> > > After investigating I decided completely disable nls, because it no-op and  
> > > appears badly broken. Without patch-src_ucompose.hpp in most locales
> > > other that 'C' I get core. Can You please confirm this?
> > That was the issue with previous versions of lordsaware, but now I can't
> > reproduce it with 0.0.8. With exactly yours locale settings as well.
> Strange, are You sure that not applying the patch-src_ucompose.hpp?
Oops, sorry, I was. Yep, it crashes without the patch.

> > But if you want to remove NLS support completely, you should:
> > * use CONFIGURE_ARGS+=	--disable-nls
> > * remove USE_GETTEXT
> > * remove all lines containing share/locale from plist
> I forgot to add --disable-nls, thanks.
> But we can't remove USE_GETTEXT. gettext function used unconditionally in
> the code. Situation with i18n are quite complicated. I can make it work with
> lordsawar.pot from svn, but I don't want repetition multimedia/flv2mpeg4
> case. So I delete these lines.
Ok

> > > As for OPTIONS, I don't see why disable sound. But if You wish...
> > Not that important actually, but I think that supporting as many knobs
> > supported by the software as possible is generally goood.
> If option can make some dependence optional, sdl_mixer in this case,
> it useful I agree, but if it only prevent installation of one small binary,
> not sure.
Exactly. That is the long answer :)

-- 
Dmitry A. Marakasov    | jabber: amdmi3@jabber.ru
amdmi3@amdmi3.ru       | http://www.amdmi3.ru
Comment 8 Alex Kozlov 2008-02-20 12:14:35 UTC
On Wed, Feb 20, 2008 at 01:53:45AM +0300, Dmitry Marakasov wrote:

Ok. I hope this is last try. I think port now may be commited.


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	lordsawar
#	lordsawar/files
#	lordsawar/files/patch-src_game.cpp
#	lordsawar/files/patch-configure
#	lordsawar/files/patch-src_ucompose.hpp
#	lordsawar/Makefile
#	lordsawar/pkg-plist
#	lordsawar/pkg-descr
#	lordsawar/distinfo
#
echo c - lordsawar
mkdir -p lordsawar > /dev/null 2>&1
echo c - lordsawar/files
mkdir -p lordsawar/files > /dev/null 2>&1
echo x - lordsawar/files/patch-src_game.cpp
sed 's/^X//' >lordsawar/files/patch-src_game.cpp << 'END-of-lordsawar/files/patch-src_game.cpp'
XIndex: src/game.cpp
X@@ -1115,15 +1115,6 @@
X int
X Game::loadHeroTemplates()
X {
X-  FILE *fileptr = fopen (File::getMiscFile("heronames").c_str(), "r");
X-  char *line = NULL;
X-  size_t len = 0;
X-  ssize_t read;
X-  int retval;
X-  int gender;
X-  int side;
X-  size_t bytesread = 0;
X-  char *tmp;
X   const Armysetlist* al = Armysetlist::getInstance();
X   const Army* herotype;
X 
X@@ -1131,51 +1122,41 @@
X   std::vector<const Army*> heroes;
X   Player *p = Playerlist::getInstance()->getNeutral();
X   for (unsigned int j = 0; j < al->getSize(p->getArmyset()); j++)
X-    {
X+	{
X       const Army *a = al->getArmy (p->getArmyset(), j);
X       if (a->isHero())
X-	heroes.push_back(a);
X+		heroes.push_back(a);
X     }
X+ 
X+  std::ifstream file(File::getMiscFile("heronames").c_str());
X 
X-  if (fileptr == NULL)
X-    return -1;
X-  while ((read = getline (&line, &len, fileptr)) != -1)
X-    {
X-      bytesread = 0;
X-      retval = sscanf (line, "%d%d%n", &side, &gender, &bytesread);
X-      if (retval != 2)
X-	{
X-	  free (line);
X-	  return -2;
X-	}
X-      while (isspace(line[bytesread]) && line[bytesread] != '\0')
X-	bytesread++;
X-      tmp = strchr (&line[bytesread], '\n');
X-      if (tmp)
X-	tmp[0] = '\0';
X-      if (strlen (&line[bytesread]) == 0)
X-	{
X-	  free (line);
X-	  return -3;
X-	}
X-      if (side < 0 || side > (int) MAX_PLAYERS)
X-	{
X-	  free (line);
X-	  return -4;
X+  if (file.good()) {
X+	std::string buffer, name;
X+	int side, gender;
X+
X+	while (std::getline(file, buffer)) {
X+	std::istringstream line(buffer);
X+	if (!(line >> side >> gender >> name))
X+		return -2;
X+
X+	if (side < 0 || side > (int) MAX_PLAYERS)
X+		return -4;
X+
X+	herotype = heroes[rand() % heroes.size()];
X+	Hero *newhero = new Hero (*herotype, "", NULL);
X+
X+	if (gender)
X+		newhero->setGender(Hero::MALE);
X+	else
X+		newhero->setGender(Hero::FEMALE);
X+
X+	newhero->setName (name);
X+    d_herotemplates[side].push_back (newhero);
X 	}
X+  } else
X+		return -1;
X 
X-      herotype = heroes[rand() % heroes.size()];
X-      Hero *newhero = new Hero (*herotype, "", NULL);
X-      if (gender)
X-	newhero->setGender(Hero::MALE);
X-      else
X-	newhero->setGender(Hero::FEMALE);
X-      newhero->setName (&line[bytesread]);
X-      d_herotemplates[side].push_back (newhero);
X-    }
X-  if (line)
X-    free (line);
X-  fclose (fileptr);
X+  file.close();
X   return 0;
X }
X 
END-of-lordsawar/files/patch-src_game.cpp
echo x - lordsawar/files/patch-configure
sed 's/^X//' >lordsawar/files/patch-configure << 'END-of-lordsawar/files/patch-configure'
XIndex: configure
X@@ -4622,7 +4622,7 @@
X     LDFLAGS="$LDFLAGS -lSDL_mixer"
X     LIBS="-lSDL_mixer $LIBS"
X 
X-            if test $CC = "gcc" || test $CXX = "g++"; then
X+            if test $CC = "gcc" || test $CXX = "g++" || test $CXX = "c++"; then
X 
X        if test "$cross_compiling" = yes; then
X   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
X@@ -13798,8 +13798,7 @@
X 
X rm -f src/main.o
X 
X-LORDSAWAR_DATADIR="$datadir/lordsawar"
X-LORDSAWAR_DATADIR=${LORDSAWAR_DATADIR/'${prefix}'/$prefix}
X+eval LORDSAWAR_DATADIR="$datadir/lordsawar"
X 
X 
X ac_config_files="$ac_config_files dat/Makefile dat/army/Makefile dat/army/default/Makefile dat/army/bigdefault/Makefile dat/tilesets/Makefile dat/tilesets/default/Makefile dat/tilesets/default/misc/Makefile dat/tilesets/bigdefault/Makefile dat/tilesets/bigdefault/misc/Makefile dat/shield/Makefile dat/shield/default/Makefile dat/shield/plain/Makefile dat/citysets/Makefile dat/citysets/default/Makefile dat/citysets/bigdefault/Makefile dat/various/Makefile dat/various/items/Makefile dat/various/editor/Makef ile dat/map/Makefile dat/ggz/Makefile dat/ggz/lordsawar.dsc dat/ggz/lordsawar-server.dsc dat/music/Makefile dat/glade/Makefile dat/glade/editor/Makefile intl/Makefile po/Makefile.in po/Makefile Makefile src/Makefile doc/Makefile src/server/Makefile src/editor/Makefile src/gui/Makefile"
END-of-lordsawar/files/patch-configure
echo x - lordsawar/files/patch-src_ucompose.hpp
sed 's/^X//' >lordsawar/files/patch-src_ucompose.hpp << 'END-of-lordsawar/files/patch-src_ucompose.hpp'
XIndex: src/ucompose.hpp
X@@ -178,9 +178,9 @@
X   inline Composition::Composition(std::string fmt)
X     : arg_no(1)
X   {
X-#if __GNUC__ >= 3
X-    os.imbue(std::locale("")); // use the user's locale for the stream
X-#endif
X+//#if __GNUC__ >= 3
X+//   os.imbue(std::locale("")); // use the user's locale for the stream
X+//#endif
X     std::string::size_type b = 0, i = 0;
X   
X     // fill in output with the strings between the %1 %2 %3 etc. and
END-of-lordsawar/files/patch-src_ucompose.hpp
echo x - lordsawar/Makefile
sed 's/^X//' >lordsawar/Makefile << 'END-of-lordsawar/Makefile'
X# New ports collection makefile for:   lordsawar
X# Date created:                 12 February 2008
X# Whom:                         spam@rm-rf.kiev.ua
X#
X# $FreeBSD$
X#
X
XPORTNAME=	lordsawar
XPORTVERSION=	0.0.8
XCATEGORIES=	games
XMASTER_SITES=	http://lordsawar.com/
X
XMAINTAINER=	spam@rm-rf.kiev.ua
XCOMMENT=	A Warlords II clone
X
XLIB_DEPENDS=	glademm-2.4:${PORTSDIR}/devel/libglademm24
X
XUSE_GZIP=	yes
XUSE_GETTEXT=	yes
XUSE_SDL=	sdl image
X
XOPTIONS=	SOUND	"Enable sound"	on
X
X.include <bsd.port.pre.mk>
X
XCONFIGURE_ARGS+=--disable-nls
X
X.if !defined(WITHOUT_SOUND)
XUSE_SDL+=	mixer
X.else
XCONFIGURE_ARGS+=--disable-sound
X.endif
X
XGNU_CONFIGURE=	yes
XCONFIGURE_ENV+=	LDFLAGS="-L${LOCALBASE}/lib" \
X		CPPFLAGS="-I${LOCALBASE}/include" \
X		LIBS="${PTHREAD_LIBS}"
XCONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
X
X.include <bsd.port.post.mk>
END-of-lordsawar/Makefile
echo x - lordsawar/pkg-plist
sed 's/^X//' >lordsawar/pkg-plist << 'END-of-lordsawar/pkg-plist'
Xbin/lordsawar
Xbin/lordsawar-army-editor
Xbin/lordsawar-editor
Xbin/lordsawar_server
Xshare/applications/lordsawar.desktop
X%%DATADIR%%/citynames
X%%DATADIR%%/heronames
X%%DATADIR%%/ruinnames
X%%DATADIR%%/signposts
X%%DATADIR%%/templenames
X%%DATADIR%%/army/default/default.xml
X%%DATADIR%%/army/default/archers.png
X%%DATADIR%%/army/default/archons.png
X%%DATADIR%%/army/default/catapults.png
X%%DATADIR%%/army/default/daemons.png
X%%DATADIR%%/army/default/devils.png
X%%DATADIR%%/army/default/dragons.png
X%%DATADIR%%/army/default/dwarves.png
X%%DATADIR%%/army/default/elementals.png
X%%DATADIR%%/army/default/elephants.png
X%%DATADIR%%/army/default/ghosts.png
X%%DATADIR%%/army/default/giantbats.png
X%%DATADIR%%/army/default/giants.png
X%%DATADIR%%/army/default/giantworms.png
X%%DATADIR%%/army/default/griffins.png
X%%DATADIR%%/army/default/heavycav.png
X%%DATADIR%%/army/default/heavyinf.png
X%%DATADIR%%/army/default/hero.png
X%%DATADIR%%/army/default/lightcav.png
X%%DATADIR%%/army/default/lightinf.png
X%%DATADIR%%/army/default/minotaurs.png
X%%DATADIR%%/army/default/orcishmob.png
X%%DATADIR%%/army/default/pegasi.png
X%%DATADIR%%/army/default/pikeman.png
X%%DATADIR%%/army/default/scouts.png
X%%DATADIR%%/army/default/spiders.png
X%%DATADIR%%/army/default/unicorns.png
X%%DATADIR%%/army/default/wizards.png
X%%DATADIR%%/army/default/wolfriders.png
X%%DATADIR%%/army/default/stackship.png
X%%DATADIR%%/army/default/plantedstandard.png
X%%DATADIR%%/army/bigdefault/bigdefault.xml
X%%DATADIR%%/army/bigdefault/archers.png
X%%DATADIR%%/army/bigdefault/archons.png
X%%DATADIR%%/army/bigdefault/catapults.png
X%%DATADIR%%/army/bigdefault/daemons.png
X%%DATADIR%%/army/bigdefault/devils.png
X%%DATADIR%%/army/bigdefault/dragons.png
X%%DATADIR%%/army/bigdefault/dwarves.png
X%%DATADIR%%/army/bigdefault/elementals.png
X%%DATADIR%%/army/bigdefault/elephants.png
X%%DATADIR%%/army/bigdefault/ghosts.png
X%%DATADIR%%/army/bigdefault/giantbats.png
X%%DATADIR%%/army/bigdefault/giants.png
X%%DATADIR%%/army/bigdefault/giantworms.png
X%%DATADIR%%/army/bigdefault/griffins.png
X%%DATADIR%%/army/bigdefault/heavycav.png
X%%DATADIR%%/army/bigdefault/heavyinf.png
X%%DATADIR%%/army/bigdefault/hero.png
X%%DATADIR%%/army/bigdefault/lightcav.png
X%%DATADIR%%/army/bigdefault/lightinf.png
X%%DATADIR%%/army/bigdefault/minotaurs.png
X%%DATADIR%%/army/bigdefault/pegasi.png
X%%DATADIR%%/army/bigdefault/orcishmob.png
X%%DATADIR%%/army/bigdefault/pikeman.png
X%%DATADIR%%/army/bigdefault/scouts.png
X%%DATADIR%%/army/bigdefault/spiders.png
X%%DATADIR%%/army/bigdefault/unicorns.png
X%%DATADIR%%/army/bigdefault/wizards.png
X%%DATADIR%%/army/bigdefault/wolfriders.png
X%%DATADIR%%/army/bigdefault/stackship.png
X%%DATADIR%%/army/bigdefault/plantedstandard.png
X%%DATADIR%%/tilesets/default/misc/flags.png
X%%DATADIR%%/tilesets/default/misc/roads.png
X%%DATADIR%%/tilesets/default/misc/bridges.png
X%%DATADIR%%/tilesets/default/misc/fog.png
X%%DATADIR%%/tilesets/default/misc/selector.png
X%%DATADIR%%/tilesets/default/misc/small_selector.png
X%%DATADIR%%/tilesets/default/misc/explosion.png
X%%DATADIR%%/tilesets/default/default.xml
X%%DATADIR%%/tilesets/default/grass.png
X%%DATADIR%%/tilesets/default/water.png
X%%DATADIR%%/tilesets/default/forest.png
X%%DATADIR%%/tilesets/default/hills.png
X%%DATADIR%%/tilesets/default/mountains.png
X%%DATADIR%%/tilesets/default/swamp.png
X%%DATADIR%%/tilesets/bigdefault/misc/flags.png
X%%DATADIR%%/tilesets/bigdefault/misc/roads.png
X%%DATADIR%%/tilesets/bigdefault/misc/bridges.png
X%%DATADIR%%/tilesets/bigdefault/misc/fog.png
X%%DATADIR%%/tilesets/bigdefault/misc/selector.png
X%%DATADIR%%/tilesets/bigdefault/misc/small_selector.png
X%%DATADIR%%/tilesets/bigdefault/misc/explosion.png
X%%DATADIR%%/tilesets/bigdefault/bigdefault.xml
X%%DATADIR%%/tilesets/bigdefault/grass.png
X%%DATADIR%%/tilesets/bigdefault/water.png
X%%DATADIR%%/tilesets/bigdefault/forest.png
X%%DATADIR%%/tilesets/bigdefault/hills.png
X%%DATADIR%%/tilesets/bigdefault/mountains.png
X%%DATADIR%%/tilesets/bigdefault/swamp.png
X%%DATADIR%%/various/items/items.xml
X%%DATADIR%%/various/editor/button_selector.png
X%%DATADIR%%/various/editor/button_1x1.png
X%%DATADIR%%/various/editor/button_2x2.png
X%%DATADIR%%/various/editor/button_3x3.png
X%%DATADIR%%/various/editor/button_castle.png
X%%DATADIR%%/various/editor/button_erase.png
X%%DATADIR%%/various/editor/button_blank.png
X%%DATADIR%%/various/editor/button_signpost.png
X%%DATADIR%%/various/editor/button_ruin.png
X%%DATADIR%%/various/editor/button_road.png
X%%DATADIR%%/various/editor/button_temple.png
X%%DATADIR%%/various/editor/button_stack.png
X%%DATADIR%%/various/editor/button_bridge.png
X%%DATADIR%%/various/editor/button_port.png
X%%DATADIR%%/various/arrows.png
X%%DATADIR%%/various/waypoints.png
X%%DATADIR%%/various/buttons.png
X%%DATADIR%%/various/city_occupied.png
X%%DATADIR%%/various/items.png
X%%DATADIR%%/various/medals_mask.gif
X%%DATADIR%%/various/ship.png
X%%DATADIR%%/various/recruit_female.png
X%%DATADIR%%/various/recruit_male.png
X%%DATADIR%%/various/ruin_1.png
X%%DATADIR%%/various/ruin_2.png
X%%DATADIR%%/various/splash_screen.jpg
X%%DATADIR%%/various/about_screen.jpg
X%%DATADIR%%/various/network_screen.jpg
X%%DATADIR%%/various/stats.png
X%%DATADIR%%/various/win.jpg
X%%DATADIR%%/various/win_mask.png
X%%DATADIR%%/various/freelords.png
X%%DATADIR%%/various/lordsawar_logo.png
X%%DATADIR%%/various/freelords_editor.png
X%%DATADIR%%/various/editor.png
X%%DATADIR%%/various/hero.png
X%%DATADIR%%/various/prodshieldset.png
X%%DATADIR%%/various/smallruinedcity.png
X%%DATADIR%%/various/movebonus.png
X%%DATADIR%%/various/smallunexploredruin.png
X%%DATADIR%%/various/smallunexploredstronghold.png
X%%DATADIR%%/various/smallexploredruin.png
X%%DATADIR%%/various/smalltemple.png
X%%DATADIR%%/various/cursors.png
X%%DATADIR%%/various/smallupkeep.png
X%%DATADIR%%/various/smallincome.png
X%%DATADIR%%/various/smalltreasury.png
X%%DATADIR%%/various/smallcity.png
X%%DATADIR%%/various/diplomacy-small.png
X%%DATADIR%%/various/diplomacy-large.png
X%%DATADIR%%/map/2ndPunic37.map
X%%DATADIR%%/music/back1.ogg
X%%DATADIR%%/music/defeat.ogg
X%%DATADIR%%/music/defeat1.ogg
X%%DATADIR%%/music/victory.ogg
X%%DATADIR%%/music/victory1.ogg
X%%DATADIR%%/music/hero.ogg
X%%DATADIR%%/music/intro.ogg
X%%DATADIR%%/music/music.xml
X%%DATADIR%%/glade/army-gains-level-dialog.glade
X%%DATADIR%%/glade/army-info-window.glade
X%%DATADIR%%/glade/stack-info-window.glade
X%%DATADIR%%/glade/buy-production-dialog.glade
X%%DATADIR%%/glade/city-defeated-dialog.glade
X%%DATADIR%%/glade/city-looted-dialog.glade
X%%DATADIR%%/glade/city-pillaged-dialog.glade
X%%DATADIR%%/glade/city-sacked-dialog.glade
X%%DATADIR%%/glade/city-window.glade
X%%DATADIR%%/glade/destination-dialog.glade
X%%DATADIR%%/glade/fight-window.glade
X%%DATADIR%%/glade/game-loaded-dialog.glade
X%%DATADIR%%/glade/player-died-dialog.glade
X%%DATADIR%%/glade/game-over-dialog.glade
X%%DATADIR%%/glade/game-preferences-dialog.glade
X%%DATADIR%%/glade/game-window.glade
X%%DATADIR%%/glade/hero-dialog.glade
X%%DATADIR%%/glade/hero-offer-dialog.glade
X%%DATADIR%%/glade/surrender-dialog.glade
X%%DATADIR%%/glade/sage-dialog.glade
X%%DATADIR%%/glade/ruin-rewarded-dialog.glade
X%%DATADIR%%/glade/ruin-report-dialog.glade
X%%DATADIR%%/glade/history-report-dialog.glade
X%%DATADIR%%/glade/report-dialog.glade
X%%DATADIR%%/glade/load-scenario-dialog.glade
X%%DATADIR%%/glade/medal-awarded-dialog.glade
X%%DATADIR%%/glade/quest-assigned-dialog.glade
X%%DATADIR%%/glade/quest-expired-dialog.glade
X%%DATADIR%%/glade/preferences-dialog.glade
X%%DATADIR%%/glade/ruinfight-finished-dialog.glade
X%%DATADIR%%/glade/ruinfight-started-dialog.glade
X%%DATADIR%%/glade/ruin-searched-dialog.glade
X%%DATADIR%%/glade/splash-window.glade
X%%DATADIR%%/glade/temple-visit-dialog.glade
X%%DATADIR%%/glade/disband-stack-dialog.glade
X%%DATADIR%%/glade/hero-brings-allies-dialog.glade
X%%DATADIR%%/glade/military-advisor-dialog.glade
X%%DATADIR%%/glade/next-player-turn-dialog.glade
X%%DATADIR%%/glade/city-rename-dialog.glade
X%%DATADIR%%/glade/city-raze-dialog.glade
X%%DATADIR%%/glade/city-razed-dialog.glade
X%%DATADIR%%/glade/signpost-change-dialog.glade
X%%DATADIR%%/glade/fight-order-dialog.glade
X%%DATADIR%%/glade/hero-levels-dialog.glade
X%%DATADIR%%/glade/player-resign-dialog.glade
X%%DATADIR%%/glade/army-bonus-dialog.glade
X%%DATADIR%%/glade/item-bonus-dialog.glade
X%%DATADIR%%/glade/game-options-dialog.glade
X%%DATADIR%%/glade/triumphs-dialog.glade
X%%DATADIR%%/glade/diplomacy-report-dialog.glade
X%%DATADIR%%/glade/diplomacy-dialog.glade
X%%DATADIR%%/glade/treachery-dialog.glade
X%%DATADIR%%/glade/editor/main-window.glade
X%%DATADIR%%/glade/editor/signpost-dialog.glade
X%%DATADIR%%/glade/editor/temple-dialog.glade
X%%DATADIR%%/glade/editor/ruin-dialog.glade
X%%DATADIR%%/glade/editor/stack-dialog.glade
X%%DATADIR%%/glade/editor/select-army-dialog.glade
X%%DATADIR%%/glade/editor/players-dialog.glade
X%%DATADIR%%/glade/editor/city-dialog.glade
X%%DATADIR%%/glade/editor/map-info-dialog.glade
X%%DATADIR%%/glade/editor/new-map-dialog.glade
X%%DATADIR%%/glade/editor/armyset-window.glade
X%%DATADIR%%/glade/editor/armyset-info-dialog.glade
X%%DATADIR%%/shield/default/default.xml
X%%DATADIR%%/shield/default/small-white-shield.png
X%%DATADIR%%/shield/default/small-green-shield.png
X%%DATADIR%%/shield/default/small-yellow-shield.png
X%%DATADIR%%/shield/default/small-lightblue-shield.png
X%%DATADIR%%/shield/default/small-red-shield.png
X%%DATADIR%%/shield/default/small-darkblue-shield.png
X%%DATADIR%%/shield/default/small-orange-shield.png
X%%DATADIR%%/shield/default/small-black-shield.png
X%%DATADIR%%/shield/default/small-neutral-shield.png
X%%DATADIR%%/shield/default/medium-white-shield.png
X%%DATADIR%%/shield/default/medium-green-shield.png
X%%DATADIR%%/shield/default/medium-yellow-shield.png
X%%DATADIR%%/shield/default/medium-lightblue-shield.png
X%%DATADIR%%/shield/default/medium-red-shield.png
X%%DATADIR%%/shield/default/medium-darkblue-shield.png
X%%DATADIR%%/shield/default/medium-orange-shield.png
X%%DATADIR%%/shield/default/medium-black-shield.png
X%%DATADIR%%/shield/default/medium-neutral-shield.png
X%%DATADIR%%/shield/default/large-white-shield.png
X%%DATADIR%%/shield/default/large-green-shield.png
X%%DATADIR%%/shield/default/large-yellow-shield.png
X%%DATADIR%%/shield/default/large-lightblue-shield.png
X%%DATADIR%%/shield/default/large-red-shield.png
X%%DATADIR%%/shield/default/large-darkblue-shield.png
X%%DATADIR%%/shield/default/large-orange-shield.png
X%%DATADIR%%/shield/default/large-black-shield.png
X%%DATADIR%%/shield/default/large-neutral-shield.png
X%%DATADIR%%/shield/plain/plain.xml
X%%DATADIR%%/shield/plain/small-shield.png
X%%DATADIR%%/shield/plain/small-neutral-shield.png
X%%DATADIR%%/shield/plain/medium-shield.png
X%%DATADIR%%/shield/plain/medium-neutral-shield.png
X%%DATADIR%%/shield/plain/large-shield.png
X%%DATADIR%%/shield/plain/large-neutral-shield.png
X%%DATADIR%%/citysets/default/default.xml
X%%DATADIR%%/citysets/default/castle_razed.png
X%%DATADIR%%/citysets/default/castles.png
X%%DATADIR%%/citysets/default/port.png
X%%DATADIR%%/citysets/default/ruin.png
X%%DATADIR%%/citysets/default/signpost.png
X%%DATADIR%%/citysets/default/temples.png
X%%DATADIR%%/citysets/default/towers.png
X%%DATADIR%%/citysets/bigdefault/bigdefault.xml
X%%DATADIR%%/citysets/bigdefault/castle_razed.png
X%%DATADIR%%/citysets/bigdefault/castles.png
X%%DATADIR%%/citysets/bigdefault/port.png
X%%DATADIR%%/citysets/bigdefault/ruin.png
X%%DATADIR%%/citysets/bigdefault/signpost.png
X%%DATADIR%%/citysets/bigdefault/temples.png
X%%DATADIR%%/citysets/bigdefault/towers.png
X@dirrmtry share/applications
X@dirrm %%DATADIR%%/army/default
X@dirrm %%DATADIR%%/army/bigdefault
X@dirrm %%DATADIR%%/army
X@dirrm %%DATADIR%%/citysets/default
X@dirrm %%DATADIR%%/citysets/bigdefault
X@dirrm %%DATADIR%%/citysets
X@dirrm %%DATADIR%%/glade/editor
X@dirrm %%DATADIR%%/glade
X@dirrm %%DATADIR%%/map
X@dirrm %%DATADIR%%/music
X@dirrm %%DATADIR%%/shield/default
X@dirrm %%DATADIR%%/shield/plain
X@dirrm %%DATADIR%%/shield
X@dirrm %%DATADIR%%/tilesets/default/misc
X@dirrm %%DATADIR%%/tilesets/default
X@dirrm %%DATADIR%%/tilesets/bigdefault/misc
X@dirrm %%DATADIR%%/tilesets/bigdefault
X@dirrm %%DATADIR%%/tilesets
X@dirrm %%DATADIR%%/various/items
X@dirrm %%DATADIR%%/various/editor
X@dirrm %%DATADIR%%/various
X@dirrm %%DATADIR%%
END-of-lordsawar/pkg-plist
echo x - lordsawar/pkg-descr
sed 's/^X//' >lordsawar/pkg-descr << 'END-of-lordsawar/pkg-descr'
XA turn-based strategy game where up to 8 players strive for control
Xof as many cities as possible. Produce new armies in cities to
Xconquer nearby cities. Using the income from those cities, make
Xmore armies to take more cities. Send a hero to a temple to get a
Xquest, or maybe search a nearby ruin instead. Play with others or
Xagainst the computer.
X
XWWW: http://lordsawar.com/
END-of-lordsawar/pkg-descr
echo x - lordsawar/distinfo
sed 's/^X//' >lordsawar/distinfo << 'END-of-lordsawar/distinfo'
XMD5 (lordsawar-0.0.8.tar.gz) = dfe83aea8517d9760d9cd8e268efef8d
XSHA256 (lordsawar-0.0.8.tar.gz) = 9786394b856beeee45fcfe0ca74befed573b5b5f201086f8bc73d3d54a3d28e1
XSIZE (lordsawar-0.0.8.tar.gz) = 13340263
END-of-lordsawar/distinfo
exit
Comment 9 Dmitry Marakasov 2008-02-20 17:14:05 UTC
* Alex Kozlov (spam@rm-rf.kiev.ua) wrote:

> Ok. I hope this is last try. I think port now may be commited.
No objections. Thanks for your work!

-- 
Dmitry A. Marakasov    | jabber: amdmi3@jabber.ru
amdmi3@amdmi3.ru       | http://www.amdmi3.ru
Comment 10 dfilter service freebsd_committer freebsd_triage 2008-02-21 08:53:05 UTC
miwi        2008-02-21 08:53:00 UTC

  FreeBSD ports repository

  Modified files:
    games                Makefile 
  Added files:
    games/lordsawar      Makefile distinfo pkg-descr pkg-plist 
    games/lordsawar/files patch-configure patch-src_game.cpp 
                          patch-src_ucompose.hpp 
  Log:
  A turn-based strategy game where up to 8 players strive for control
  of as many cities as possible. Produce new armies in cities to
  conquer nearby cities. Using the income from those cities, make
  more armies to take more cities. Send a hero to a temple to get a
  quest, or maybe search a nearby ruin instead. Play with others or
  against the computer.
  
  WWW: http://lordsawar.com/
  
  PR:             ports/120803
  Submitted by:   spam at rm-rf.kiev.ua
  
  Revision  Changes    Path
  1.1187    +1 -0      ports/games/Makefile
  1.1       +40 -0     ports/games/lordsawar/Makefile (new)
  1.1       +3 -0      ports/games/lordsawar/distinfo (new)
  1.1       +20 -0     ports/games/lordsawar/files/patch-configure (new)
  1.1       +98 -0     ports/games/lordsawar/files/patch-src_game.cpp (new)
  1.1       +14 -0     ports/games/lordsawar/files/patch-src_ucompose.hpp (new)
  1.1       +8 -0      ports/games/lordsawar/pkg-descr (new)
  1.1       +298 -0    ports/games/lordsawar/pkg-plist (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 11 Martin Wilke freebsd_committer freebsd_triage 2008-02-21 08:53:21 UTC
State Changed
From-To: open->closed

Committed. Thanks!