After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787416 - build: Improve subproject support for builds
build: Improve subproject support for builds
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-09-07 18:41 UTC by Nirbheek Chauhan
Modified: 2017-09-12 10:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Add girs and typelibs as sources to libgtk_dep (6.72 KB, patch)
2017-09-07 18:41 UTC, Nirbheek Chauhan
committed Details | Review
build: Add dependency fallbacks for libs with meson ports (5.71 KB, patch)
2017-09-07 18:41 UTC, Nirbheek Chauhan
needs-work Details | Review

Description Nirbheek Chauhan 2017-09-07 18:41:37 UTC
This will improve the newbie contributor experience because the build system will automatically download and build whatever dependency is outdated or not present on the system. Also gets us one step closer to building from scratch on Windows without having to do any setup except installing Visual Studio and Python 3.

Distros and other people can disable this by passing --wrap-mode=nofallback or --wrap-mode=nodownload.

As a side-advantage, the meson build files for glib, pango, gdk-pixbuf, etc will get a bit more testing.
Comment 1 Nirbheek Chauhan 2017-09-07 18:41:42 UTC
Created attachment 359372 [details] [review]
build: Add girs and typelibs as sources to libgtk_dep

This will be needed by any projects that want to use gtk+ as
a subproject.
Comment 2 Nirbheek Chauhan 2017-09-07 18:41:48 UTC
Created attachment 359373 [details] [review]
build: Add dependency fallbacks for libs with meson ports

With these changes gtk+ builds for me using fallbacks for all libraries
with fallbacks available. Needs the following changes:

https://github.com/ebassi/graphene/pull/109 (graphene)
https://bugzilla.gnome.org/show_bug.cgi?id=787414 (pango)
https://github.com/mesonbuild/meson/pull/2291 (will be in meson 0.42.1)
Comment 3 Emmanuele Bassi (:ebassi) 2017-09-11 17:27:48 UTC
Review of attachment 359372 [details] [review]:

Looks good
Comment 4 Emmanuele Bassi (:ebassi) 2017-09-11 17:32:17 UTC
Review of attachment 359373 [details] [review]:

Looks generally good to me, outside of a couple of issues.

::: subprojects/gdk-pixbuf.wrap
@@ +1,3 @@
+[wrap-git]
+directory=gdk-pixbuf
+url=git://git.gnome.org/gdk-pixbuf

Please, use https for anonymous checkouts

@@ +2,3 @@
+directory=gdk-pixbuf
+url=git://git.gnome.org/gdk-pixbuf
+push-url=ssh://git.gnome.org/git/gdk-pixbuf

This only works if your username is the same as your GNOME username

::: subprojects/glib.wrap
@@ +1,3 @@
+[wrap-git]
+directory=glib
+url=git://git.gnome.org/glib

Same as above, for both url and push-url

::: subprojects/pango.wrap
@@ +1,3 @@
+[wrap-git]
+directory=pango
+url=git://git.gnome.org/pango

Same as above for url and push-url
Comment 5 Nirbheek Chauhan 2017-09-11 17:43:12 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #4)
> Review of attachment 359373 [details] [review] [review]:
> 
> Looks generally good to me, outside of a couple of issues.
> 
> ::: subprojects/gdk-pixbuf.wrap
> @@ +1,3 @@
> +[wrap-git]
> +directory=gdk-pixbuf
> +url=git://git.gnome.org/gdk-pixbuf
> 
> Please, use https for anonymous checkouts
> 

Good point, will fix

> @@ +2,3 @@
> +directory=gdk-pixbuf
> +url=git://git.gnome.org/gdk-pixbuf
> +push-url=ssh://git.gnome.org/git/gdk-pixbuf
> 
> This only works if your username is the same as your GNOME username
> 

Mine isn't, and because of that I have the following in ~/.ssh/config:

Host *.gnome.org
  User nirbheekc

This information is given to GNOME developers when they ask for an account, so I think we can tell people to do that. The push-url is just a convenience so you can work out of and commit out of a subproject directory anyway.
Comment 6 Nirbheek Chauhan 2017-09-11 18:55:56 UTC
Comment on attachment 359372 [details] [review]
build: Add girs and typelibs as sources to libgtk_dep

Attachment 359372 [details] pushed as 1a11d00 - build: Add girs and typelibs as sources to libgtk_dep
Comment 7 Nirbheek Chauhan 2017-09-12 10:52:48 UTC
(In reply to Nirbheek Chauhan from comment #2)
> Created attachment 359373 [details] [review] [review]
> build: Add dependency fallbacks for libs with meson ports
> 
> With these changes gtk+ builds for me using fallbacks for all libraries
> with fallbacks available. Needs the following changes:
> 
> https://github.com/ebassi/graphene/pull/109 (graphene)
> https://bugzilla.gnome.org/show_bug.cgi?id=787414 (pango)
> https://github.com/mesonbuild/meson/pull/2291 (will be in meson 0.42.1)

I changed git -> https and accidentally pushed this as https://git.gnome.org/browse/gtk+/commit/?id=aa3e8ee097d477446cbe8d5a94c8e4dc8cef8cbb. I got an ACK on IRC from ebassi for this, so closing now.