[update] games/stone-soup

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[update] games/stone-soup

Henrique N. Lengler
Updated the game now that sdl2 is fixed. Looks like there is no more need to
keep some older patches. Lua is needed to build. Bison is not needed, only
optional, and some other changes.

I'm new on porting, so I'm doubt about how to properly set egcc to be used,
since even that new gcc is installed, the make wasn't using it. I did by setting
CC and CXX to egcc and eg++, if there is a better way of doing it please
correct.

stone-soup.patch (26K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [update] games/stone-soup

Stefan Sperling-5
On Thu, Jan 28, 2016 at 05:08:53PM -0200, Henrique N. Lengler wrote:
> Updated the game now that sdl2 is fixed. Looks like there is no more need to
> keep some older patches. Lua is needed to build. Bison is not needed, only
> optional, and some other changes.

Hi Henrique,

Thanks for taking care of this!

> I'm new on porting, so I'm doubt about how to properly set egcc to be used,
> since even that new gcc is installed, the make wasn't using it. I did by setting
> CC and CXX to egcc and eg++, if there is a better way of doing it please
> correct.

The port already uses the MODULES construct for this.

MODGCC4_ARCHS = *
MODGCC4_LANGS = c++
MODULES = gcc4 lang/lua

This should select ports GCC for both C++ and C (the latter is always
implicitly selected). I'm not sure why it would not do so. Hmm.

> @@ -70,7 +67,16 @@ post-install:
>   mv ${PREFIX}/bin/crawl ${PREFIX}/bin/crawl-ss
>   chmod 755 ${PREFIX}/bin/crawl-ss
>   ${INSTALL_MAN} ${WRKDIST}/docs/crawl.6 ${PREFIX}/man/man6/crawl-ss.6
> - ${INSTALL_DATA} ${WRKDIST}/README.txt ${PREFIX}/share/crawl/docs
> +# install docs manually

Above comment should be indented by a tab.

> + @mkdir -p ${PREFIX}/share/doc/crawl/
> + @mkdir -p ${PREFIX}/share/doc/crawl/develop/levels
> + @mkdir -p ${PREFIX}/share/doc/crawl/license
> + ${INSTALL_DATA} ${WRKDIST}/docs/quickstart.txt ${PREFIX}/share/doc/crawl/quickstart.txt
> + ${INSTALL_DATA} ${WRKDIST}/docs/*.txt ${PREFIX}/share/doc/crawl/
> + ${INSTALL_DATA} ${WRKDIST}/docs/develop/*.txt ${PREFIX}/share/doc/crawl/develop
> + ${INSTALL_DATA} ${WRKDIST}/docs/develop/levels/*.txt ${PREFIX}/share/doc/crawl/develop/levels
> + ${INSTALL_DATA} ${WRKDIST}/docs/license/*.txt ${PREFIX}/share/doc/crawl/license
> + ${INSTALL_DATA} ${WRKDIST}/CREDITS.txt ${PREFIX}/share/doc/crawl/

Is installing all these files really necessary? Some of it is irrelevant to
users of our stone-soup package. E.g. develop/ -- if someone were to
hack on stone-soup code they would not use our port, they would get the
latest version of the code and compile it themselves. They won't refer
to our package for docs about stone-soup development.

> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-source_command_cc,v 1.3 2015/04/07 10:10:28 stsp Exp $
> ---- source/command.cc.orig Thu Aug 28 04:29:10 2014
> -+++ source/command.cc Mon Apr  6 15:27:57 2015
> -@@ -698,7 +698,7 @@ struct help_file
> - static help_file help_files[] =
> - {
> -     { "crawl_manual.txt",  '*', true },
> --    { "../README.txt",     '!', false },
> -+    { "README.txt",        '!', false },
> -     { "aptitudes.txt",     '%', false },
> -     { "quickstart.txt",    '^', false },
> -     { "macros_guide.txt",  '~', false },

Are you sure removing the above patch is a good idea?
IIRC, without this patch, the README text only shows up inside the
game when the crawl binary is run from the compiled source tree.
It fails to show up when the installed crawl binary is run.

Reply | Threaded
Open this post in threaded view
|

Re: [update] games/stone-soup

Henrique N. Lengler
On Fri, Jan 29, 2016 at 11:26:05AM +0100, Stefan Sperling wrote:
> The port already uses the MODULES construct for this.
>
> MODGCC4_ARCHS = *
> MODGCC4_LANGS = c++
> MODULES = gcc4 lang/lua
>
> This should select ports GCC for both C++ and C (the latter is always
> implicitly selected). I'm not sure why it would not do so. Hmm.

I could be doing something wrong because this wasn't solving the problem, will
see it.

> > + @mkdir -p ${PREFIX}/share/doc/crawl/
> > + @mkdir -p ${PREFIX}/share/doc/crawl/develop/levels
> > + @mkdir -p ${PREFIX}/share/doc/crawl/license
> > + ${INSTALL_DATA} ${WRKDIST}/docs/quickstart.txt ${PREFIX}/share/doc/crawl/quickstart.txt
> > + ${INSTALL_DATA} ${WRKDIST}/docs/*.txt ${PREFIX}/share/doc/crawl/
> > + ${INSTALL_DATA} ${WRKDIST}/docs/develop/*.txt ${PREFIX}/share/doc/crawl/develop
> > + ${INSTALL_DATA} ${WRKDIST}/docs/develop/levels/*.txt ${PREFIX}/share/doc/crawl/develop/levels
> > + ${INSTALL_DATA} ${WRKDIST}/docs/license/*.txt ${PREFIX}/share/doc/crawl/license
> > + ${INSTALL_DATA} ${WRKDIST}/CREDITS.txt ${PREFIX}/share/doc/crawl/
>
> Is installing all these files really necessary? Some of it is irrelevant to
> users of our stone-soup package. E.g. develop/ -- if someone were to
> hack on stone-soup code they would not use our port, they would get the
> latest version of the code and compile it themselves. They won't refer
> to our package for docs about stone-soup development.

Agree with you, thought the same when writing this, but I put them because
it was everything the Makefile was installing in another folder. Good idead
to remove some lines.

> > @@ -1,12 +0,0 @@
> > -$OpenBSD: patch-source_command_cc,v 1.3 2015/04/07 10:10:28 stsp Exp $
> > ---- source/command.cc.orig Thu Aug 28 04:29:10 2014
> > -+++ source/command.cc Mon Apr  6 15:27:57 2015
> > -@@ -698,7 +698,7 @@ struct help_file
> > - static help_file help_files[] =
> > - {
> > -     { "crawl_manual.txt",  '*', true },
> > --    { "../README.txt",     '!', false },
> > -+    { "README.txt",        '!', false },
> > -     { "aptitudes.txt",     '%', false },
> > -     { "quickstart.txt",    '^', false },
> > -     { "macros_guide.txt",  '~', false },
>
> Are you sure removing the above patch is a good idea?
> IIRC, without this patch, the README text only shows up inside the
> game when the crawl binary is run from the compiled source tree.
> It fails to show up when the installed crawl binary is run.

Sure, so this patch is needed.

Ok, so I'll fix all these problem and create a new patch.
Thanks for the tips.

Reply | Threaded
Open this post in threaded view
|

Re: [update] games/stone-soup

Henrique N. Lengler
Updated the patch, so ended up that will be no need for the READE.txt file
patch, since this option isn't anymore in the code.

Removed the CC mess I did, disabled the installation of some docs, fixed
indentation of the Makefile.

stone-soup.diff (34K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [update] games/stone-soup

Stuart Henderson-6
This version is closer but there are a couple of things remaining.

On 2016/01/29 18:47, Henrique N. Lengler wrote:
> @@ -38,8 +36,8 @@ MODGCC4_LANGS = c++
>  MODULES = gcc4 lang/lua
>  WANTLIB = c m ${MODLUA_WANTLIB} sqlite3
>  
> -BUILD_DEPENDS = devel/bison \
> - graphics/pngcrush
> +BUILD_DEPENDS = graphics/pngcrush \
> + lang/lua/5.1

That BUILD_DEPENDS isn't needed, it is added automatically
by lang/lua on the MODULES line. Check for yourself with
'make show=BUILD_DEPENDS'.

>  -    ifneq ($(shell $(PKGCONFIG) lua5.1 --exists || echo no),)
>  -      ifneq ($(shell $(PKGCONFIG) lua-5.1 --exists || echo no),)
> -+    ifneq ($(shell $(PKGCONFIG) lua${MODLUA_DEP_VERSION} --exists || echo no),)
> -+      ifneq ($(shell $(PKGCONFIG) lua-${MODLUA_DEP_VERSION} --exists || echo no),)
> ++    ifneq ($(shell $(PKGCONFIG) lua51 --exists || echo no),)
> ++      ifneq ($(shell $(PKGCONFIG) lua51 --exists || echo no),)

This should keep using ${MODLUA_DEP_VERSION} instead of the
hardcoded '51', and same for the other instances setting
LUA_PACKAGE.

> +share/applications/stone-soup.desktop

This port has a no_x11 flavour, and there's a "PFRAG.no-no_x11"
file which contains all of the files which are *not* used in the
no_x11 packages.

That is to say, PLIST should contain the common files, and
PFRAG.no-no_x11 should contain the files only used for the x11
version.

PFRAG.no-no_x11 already contains the stone-soup.desktop file and
a number of other files (tiles etc) and it is pulled in by the
!%%no_x11%% line that you removed from PLIST.

Basically you need to build the no_x11 version, fix up the PLIST
for that (the PFRAG is ignored there). Then build the normal
version; all of the *other* files (.desktop, tiles, etc) should
go in the PFRAG file. "make plist" will get you part of the way
there but you'll need to move entries between files (or more to
the point, put them back when 'make plist' has moved them to the
wrong place).

One other thing (and it's not new to your diff but I noticed it
while looking over it, this isn't going to be one of those
ports which supports multiple lua versions, so it should have
MODLUA_VERSION=5.1 added to the Makefile to force it (or more
specifically, remove the extra lua52/lua53 flavours that are
added if you don't force it)..

Reply | Threaded
Open this post in threaded view
|

Re: [update] games/stone-soup

Henrique N. Lengler
On Fri, Jan 29, 2016 at 09:48:03PM +0000, Stuart Henderson wrote:
> This port has a no_x11 flavour, and there's a "PFRAG.no-no_x11"
> file which contains all of the files which are *not* used in the
> no_x11 packages.

Did all the changes you said. New patch :)

stone-soup.diff (23K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [update] games/stone-soup

Henrique N. Lengler
ping