Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-09 Thread Michael Stahl
On 08.09.2011 02:40, Norbert Thiebaud wrote:
 On Wed, Sep 7, 2011 at 7:23 PM, Norbert Thiebaud nthieb...@gmail.com wrote:

 I suppose that to be perfect that should bu tuck under
 gb_LinkTarget_use_Mesa in RepositoryExternal.mk to properly deal with
 the case when using system-mesa vs internal-mesa...

 and then just add Mesa to the list of 'use_externals' of OGLTrans ...

 
 BTW. bjorn, michael,
 
 How should we deal with optional 'external' Module like that ?
 just wrap the whole 'Module_Mesa.mk' into a ifeq ($(SYSTEM_MESA_HEADERS),NO) ?

sounds reasonable.

this could cause warning that no target is registered or something like
that, but a module with only $(eval $(call gb_Module_Module,foo)) is
valid IIRC.

 Norbert


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-08 Thread Norbert Thiebaud
I've had some success with the attached modifed version of you patch

Norbert


mesa.modified.patch
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-08 Thread Norbert Thiebaud
On Thu, Sep 8, 2011 at 1:03 AM, Norbert Thiebaud nthieb...@gmail.com wrote:
 I've had some success with the attached modifed version of you patch

btw Peter,

I ran a quick test on a Linux box that has SYSTEM_MESA_HEADERS=NO  ..
it would be nice to test that the case SYSTEM_MESA_HEADER=YES is not
borked...
If that work for you, feel free to re-submit a proper consolidated patch...
I am not in a position to (safely) push anything right now (tinderbox
issues), but I'm sure Bjoern or someone else will push it...

Norbert
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Michael Stahl
On 07.09.2011 21:15, Peter Foley wrote:
 
 This is my first attempt at converting a module to gbuild so I'd 
 appreciate it if someone knowlegeable about gbuild could take a look.
 
 Thanks,
 
 Peter

hi Peter,

looks good, didn't know we have such a simple module :)

only thing missing is that you should add the module to the top-level
Module_ooo.mk.

actually it seems somebody renamed it to RepositoryModule_ooo.mk.
ok, fits in better with the other RepositoryFoo.mk stuff.
but why not just RepositoryModule.mk?

uhm, sorry for the digression :)

regards,
 michael


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Norbert Thiebaud
On Wed, Sep 7, 2011 at 2:45 PM, Michael Stahl m...@openoffice.org wrote:
 On 07.09.2011 21:15, Peter Foley wrote:

 This is my first attempt at converting a module to gbuild so I'd
 appreciate it if someone knowlegeable about gbuild could take a look.

 Thanks,

 Peter

 hi Peter,

 looks good, didn't know we have such a simple module :)

I wonder would that work dep wise to just have a packaging step ?

 only thing missing is that you should add the module to the top-level
 Module_ooo.mk.

and also tell the slideshow module to depend on it (right now it is
done via build.lst... but Mesa can be integrated to tail_build, as it
fulfill the requirement to do so)
which might be a problem since I don't know that we have an api to
declare pure include-packaging mode dep... the closest thing we have
is gb_LinkTarget_add_api, but it is an overkill here as it try to add
stuff in $INCLUDE...



 actually it seems somebody renamed it to RepositoryModule_ooo.mk.

yep, because there was a clash with Module_tail_build.mk (which needed
to be at the root) and the fact the gmake search for anything Module_*
, so it was accidentally picking up Module_ooo.mk. Hence the rename.

 ok, fits in better with the other RepositoryFoo.mk stuff.
 but why not just RepositoryModule.mk?

Some hope/anticipation that there may be more than one product sharing
the same spaces ?  not sure...

Norbert
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Tor Lillqvist
 ok, fits in better with the other RepositoryFoo.mk stuff.
 but why not just RepositoryModule.mk?

 Some hope/anticipation that there may be more than one product sharing
 the same spaces ?  not sure...

I have never fully understood why we have these Repository*.mk files
in the top directory at all. Why can't this stuff, for us in
LibreOffice, be in solenv/gbuild?

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Michael Stahl
On 07.09.2011 22:40, Tor Lillqvist wrote:
 ok, fits in better with the other RepositoryFoo.mk stuff.
 but why not just RepositoryModule.mk?
 
 Some hope/anticipation that there may be more than one product sharing
 the same spaces ?  not sure...
 
 I have never fully understood why we have these Repository*.mk files
 in the top directory at all. Why can't this stuff, for us in
 LibreOffice, be in solenv/gbuild?

there's a reason why they are called Repository*.mk: the idea was that
every HG repository would have these at the root, and you could then
combine all of them (via the gb_REPOS variable) into a single make process.

in Hamburg we had the ooo, sun (non-free) and (since DEV300m101)
l10n HG repositories.

but apparently LO has never made use of this mechanism; instead ugly
symlinks are created to link the modules that are not in core into the
top-level directory.
ok, guess this has the advantage that you probably don't need to use the
horrible source_config contraption... as i suggested a different mailing
list today, build.pl should just respect ${gb_REPOS}, then source_config
is unnecessary.

regards,
 michael

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Bjoern Michaelsen
On Wed, 7 Sep 2011 15:32:21 -0500
Norbert Thiebaud nthieb...@gmail.com
wrote:

 I wonder would that work dep wise to just have a packaging step ?

$(call gb_Library_get_headers_target,libthatneedsmesa) : \
$(call gb_Package_get_target,Mesa_inc)

Of course, we could create a new name for that, but IMHO that is simple
enough as is.

  ok, fits in better with the other RepositoryFoo.mk stuff.
  but why not just RepositoryModule.mk?
 
 Some hope/anticipation that there may be more than one product sharing
 the same spaces ?  not sure...

Not only hope, but actually a hard requirement. There has been this
other product which was closely related to OOo, you know ...

Also: solenv/gbuild was originally created to be project-agnostic, and
in theory the contents of that dir should be independent of the first
project which happens to use it. And gbuild needed to be able to build
multiple sources from independent repositories (without resorting to
dirty symlink tricks -- exactly the stuff that did bite us on cygwin
then).

Best,

Bjoern

-- 
https://launchpad.net/~bjoern-michaelsen


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Michael Stahl
On 07.09.2011 22:32, Norbert Thiebaud wrote:
 On Wed, Sep 7, 2011 at 2:45 PM, Michael Stahl m...@openoffice.org wrote:
 On 07.09.2011 21:15, Peter Foley wrote:

 This is my first attempt at converting a module to gbuild so I'd
 appreciate it if someone knowlegeable about gbuild could take a look.

 Thanks,

 Peter

 hi Peter,

 looks good, didn't know we have such a simple module :)
 
 I wonder would that work dep wise to just have a packaging step ?

 only thing missing is that you should add the module to the top-level
 Module_ooo.mk.
 
 and also tell the slideshow module to depend on it (right now it is
 done via build.lst... but Mesa can be integrated to tail_build, as it
 fulfill the requirement to do so)
 which might be a problem since I don't know that we have an api to
 declare pure include-packaging mode dep... the closest thing we have
 is gb_LinkTarget_add_api, but it is an overkill here as it try to add
 stuff in $INCLUDE...

good catch, that indeed seems to be missing.

guess gb_LinkTarget__add_internal_headers can't be used if the headers
come from a different module, because it would break module-only build?

how about something like this:

define gb_LinkTarget_add_external_headers
$(call gb_LinkTarget_get_external_headers_target,$(1)) :| \
$(call gb_Package_get_target,$(2))
endef


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Norbert Thiebaud
argh... bjorn use of gmane screw-up my reply-all thing...

On Wed, Sep 7, 2011 at 5:04 PM, Norbert Thiebaud nthieb...@gmail.com wrote:
 On Wed, Sep 7, 2011 at 4:24 PM, Bjoern Michaelsen
 bjoern.michael...@gmail.com wrote:


 On Wed, 7 Sep 2011 15:32:21 -0500
 Norbert Thiebaud nthiebaud-re5jqeeqqe8avxtiumw...@public.gmane.org
 wrote:

 I wonder would that work dep wise to just have a packaging step ?

 $(call gb_Library_get_headers_target,libthatneedsmesa) : \
 $(call gb_Package_get_target,Mesa_inc)

 will, try that...  that should be enough for now... Altough IIRc I did
 incorrectly use _add_api somewhere else when I needed just that
 above... so maybe a formal api could be good (well, with also some doc
 :-) -- btw my idea to use doxygen directly on the .mk file did not fly
 at all :-( )


 Of course, we could create a new name for that, but IMHO that is simple
 enough as is.

  ok, fits in better with the other RepositoryFoo.mk stuff.
  but why not just RepositoryModule.mk?

 Some hope/anticipation that there may be more than one product sharing
 the same spaces ?  not sure...

 Not only hope, but actually a hard requirement. There has been this
 other product which was closely related to OOo, you know ...

 Also: solenv/gbuild was originally created to be project-agnostic, and
 in theory the contents of that dir should be independent of the first
 project which happens to use it. And gbuild needed to be able to build
 multiple sources from independent repositories (without resorting to
 dirty symlink tricks -- exactly the stuff that did bite us on cygwin
 then).

 I'm afraid I probably already mis-implemented the gb_Repos thing
 (pretty sure that in the yacc support, I did not handle that right)

 Norbert

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Peter Foley
On Wed, 7 Sep 2011, Bjoern Michaelsen wrote:

 On Wed, 7 Sep 2011 15:32:21 -0500
 Norbert Thiebaud nthieb...@gmail.com
 wrote:
 
  I wonder would that work dep wise to just have a packaging step ?
 
 $(call gb_Library_get_headers_target,libthatneedsmesa) : \
 $(call gb_Package_get_target,Mesa_inc)
 
 Of course, we could create a new name for that, but IMHO that is simple
 enough as is.

I tried adding that but still got a build error. I've attached the build 
log and my current patch.

Thanks,

Peter[ build CXX ] slideshow/source/engine/OGLTrans/unx/OGLTrans_Shaders
In file included from 
/root/libreoffice/slideshow/source/engine/OGLTrans/unx/OGLTrans_Shaders.cxx:31:0:
/root/libreoffice/slideshow/source/engine/OGLTrans/unx/OGLTrans_Shaders.hxx:33:19:
 fatal error: GL/gl.h: No such file or directory
compilation terminated.
make: *** No rule to make target 
`/root/libreoffice/workdir/unxlngx6.pro/CxxObject/slideshow/source/engine/OGLTrans/unx/OGLTrans_Shaders.o',
 needed by 
`/root/libreoffice/workdir/unxlngx6.pro/LinkTarget/Library/OGLTrans.uno.so'.  
Stop.
diff --git a/Mesa/Makefile b/Mesa/Makefile
new file mode 100644
index 000..90947b2
--- /dev/null
+++ b/Mesa/Makefile
@@ -0,0 +1,38 @@
+#*
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# http://www.openoffice.org/license.html
+# for a copy of the LGPLv3 License.
+#
+#*
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath 
$(firstword $(MAKEFILE_LIST/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/Mesa/Module_Mesa.mk b/Mesa/Module_Mesa.mk
new file mode 100644
index 000..1e8f160
--- /dev/null
+++ b/Mesa/Module_Mesa.mk
@@ -0,0 +1,31 @@
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the License); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an AS IS basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2011 Peter Foley pefol...@verizon.net (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the GPLv3+), or
+# the GNU Lesser General Public License Version 3 or later (the LGPLv3+),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+
+$(eval $(call gb_Module_Module,Mesa))
+
+$(eval $(call gb_Module_add_targets,Mesa,Package_inc))
+
+# vim: set noet sw=4:
diff --git a/Mesa/Package_inc.mk b/Mesa/Package_inc.mk
new file mode 100644
index 000..0dd38a1
--- /dev/null
+++ b/Mesa/Package_inc.mk
@@ -0,0 +1,39 @@
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the License); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an AS IS basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2011 Peter Foley pefol...@verizon.net (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of

Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Norbert Thiebaud
On Wed, Sep 7, 2011 at 6:47 PM, Peter Foley pefol...@verizon.net wrote:
 On Wed, 7 Sep 2011, Bjoern Michaelsen wrote:

 On Wed, 7 Sep 2011 15:32:21 -0500
 Norbert Thiebaud nthieb...@gmail.com
 wrote:

  I wonder would that work dep wise to just have a packaging step ?

 $(call gb_Library_get_headers_target,libthatneedsmesa) : \
 $(call gb_Package_get_target,Mesa_inc)

 Of course, we could create a new name for that, but IMHO that is simple
 enough as is.

 I tried adding that but still got a build error. I've attached the build
 log and my current patch.
try (unteseted)

$(eval $(call gb_LinkTarget_get_headers_target,OGLTrans) : $(call
gb_Package_get_target,Mesa_inc))

note LinkTarget not Library and the $eval

or actually, try Michael's version

define gb_LinkTarget_add_external_headers
$(call gb_LinkTarget_get_external_headers_target,$(1)) :| \
   $(call gb_Package_get_target,$(2))
endef

(to be added somewhere in LinkTarget.mk

and used as

$(eval $(call gb_LinkTarget_add_external_headers(OGLTrans,Mesa_inc))

I suppose that to be perfect that should bu tuck under
gb_LinkTarget_use_Mesa in RepositoryExternal.mk to properly deal with
the case when using system-mesa vs internal-mesa...

and then just add Mesa to the list of 'use_externals' of OGLTrans ...

Norbert


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Norbert Thiebaud
On Wed, Sep 7, 2011 at 7:23 PM, Norbert Thiebaud nthieb...@gmail.com wrote:

 I suppose that to be perfect that should bu tuck under
 gb_LinkTarget_use_Mesa in RepositoryExternal.mk to properly deal with
 the case when using system-mesa vs internal-mesa...

 and then just add Mesa to the list of 'use_externals' of OGLTrans ...


BTW. bjorn, michael,

How should we deal with optional 'external' Module like that ?
just wrap the whole 'Module_Mesa.mk' into a ifeq ($(SYSTEM_MESA_HEADERS),NO) ?

Norbert
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] convert Mesa to gbuild

2011-09-07 Thread Peter Foley
On Wed, 7 Sep 2011, Norbert Thiebaud wrote:

 On Wed, Sep 7, 2011 at 6:47 PM, Peter Foley pefol...@verizon.net wrote:
  On Wed, 7 Sep 2011, Bjoern Michaelsen wrote:
 
  On Wed, 7 Sep 2011 15:32:21 -0500
  Norbert Thiebaud nthieb...@gmail.com
  wrote:
 
   I wonder would that work dep wise to just have a packaging step ?
 
  $(call gb_Library_get_headers_target,libthatneedsmesa) : \
  $(call gb_Package_get_target,Mesa_inc)
 
  Of course, we could create a new name for that, but IMHO that is simple
  enough as is.
 
  I tried adding that but still got a build error. I've attached the build
  log and my current patch.
 try (unteseted)
 
 $(eval $(call gb_LinkTarget_get_headers_target,OGLTrans) : $(call
 gb_Package_get_target,Mesa_inc))
 
 note LinkTarget not Library and the $eval
 
 or actually, try Michael's version
 
 define gb_LinkTarget_add_external_headers
 $(call gb_LinkTarget_get_external_headers_target,$(1)) :| \
$(call gb_Package_get_target,$(2))
 endef
 
 (to be added somewhere in LinkTarget.mk
 
 and used as
 
 $(eval $(call gb_LinkTarget_add_external_headers(OGLTrans,Mesa_inc))
 
 I suppose that to be perfect that should bu tuck under
 gb_LinkTarget_use_Mesa in RepositoryExternal.mk to properly deal with
 the case when using system-mesa vs internal-mesa...
 
 and then just add Mesa to the list of 'use_externals' of OGLTrans ...

I tried both suggestions but still got the same build error. 
I've attached a updated diff for the add_external_headers one.

Peter
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice