Commit Graph

332 Commits

Author SHA1 Message Date
Colin Walters
d7233ef81e build-sys: Pass CFLAGS to $(DTRACE)
Fedora is using https://fedoraproject.org/wiki/Changes/Annobin
to try to ensure that all objects are built with hardening flags.
Pass down `CFLAGS` to ensure the SystemTap objects use them.
2018-10-15 21:50:31 +00:00
Bernhard Walle
0d97c4d20c gio: automake: Add libgmodule dependency
Otherwise I get following compile error:

 libtool: link: /home/builduser/toolchains/linux/tc/2017-12/x86-ncp-linux-gnu/bin/i686-ncp-linux-gnu-gcc -Wall -Wstrict-prototypes -Wmisleading-indentation -Wno-bad-function-cast -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -O2 -Wall -pipe -Wformat -g -fstack-protector-strong -fPIC -fno-strict-aliasing -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-rpath-link=/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/zlib/lib -Wl,-rpath-link=/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/libffi/lib -o .libs/gio gio-tool.o gio-tool-cat.o gio-tool-copy.o gio-tool-info.o gio-tool-list.o gio-tool-mime.o gio-tool-mkdir.o gio-tool-monitor.o gio-tool-mount.o gio-tool-move.o gio-tool-open.o gio-tool-rename.o gio-tool-remove.o gio-tool-save.o gio-tool-set.o gio-tool-trash.o gio-tool-tree.o  -L/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/zlib/lib -L/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/libffi/lib ./.libs/libgio-2.0.so ../gobject/.libs/libgobject-2.0.so ../glib/.libs/libglib-2.0.so -Wl,-rpath -Wl,/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/glib/lib
 /home/builduser/toolchains/linux/tc/2017-12/x86-ncp-linux-gnu/bin/../lib/gcc/i686-ncp-linux-gnu/6.3.0/../../../../i686-ncp-linux-gnu/bin/ld: warning: libgmodule-2.0.so.0, needed by ./.libs/libgio-2.0.so, not found (try using -rpath or -rpath-link)
 ./.libs/libgio-2.0.so: undefined reference to `g_module_error'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_close'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_open'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_supported'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_symbol'
 collect2: error: ld returned 1 exit status
 Makefile:2300: recipe for target 'gio' failed

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
2018-09-18 10:27:19 +02:00
Philip Withnall
d9b331f4d4 Revert "Add a gnet utility"
This reverts commit 3c1902fcf9.

This was accidentally re-added from an old version of the branch before
!265 was merged. It should not have been re-added.
2018-08-28 11:59:04 +01:00
Matthias Clasen
3c1902fcf9 Add a gnet utility
This is currently just a wrapper around GNetworkMonitor.
2018-08-23 02:59:28 +00:00
Emmanuele Bassi
26c3f2f1b1 Install gioenumtypes.h
We're re-defining nodist_gioinclude_HEADERS and Automake will use the
last definition of the target.
2018-07-31 09:40:22 +01:00
Philip Withnall
2a69cdb1cd build: Stop distributing generated files in autotools tarballs
It is a bug if we distribute files which are generated at build time —
they should be built on the machine which is compiling GLib, not be
shipped in the tarball.

This brings the autotools-generated tarball in line with the
ninja-generated one, with the exception of man pages and gtk-doc HTML
output.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-07-30 19:58:24 +01:00
Matthias Clasen
56092b8529 Revert "Add a gnet utility"
This reverts commit 1db3b6def6.

I had forgotten to remove this from the branch before merging.
2018-07-25 07:18:38 -04:00
Matthias Clasen
1db3b6def6 Add a gnet utility
This is currently just a wrapper around GNetworkMonitor.
2018-07-21 08:21:58 -04:00
Matthias Clasen
7217fe56e0 Stop generating code for NetworkMonitor
The portal implementation no longer uses generated
code for org.freedesktop.portal.NetworkMonitor.
2018-07-21 08:21:43 -04:00
Javier Jardón
5f6895d741 gio/Makefile.am: Use PYTHON to call python script 2018-07-17 12:26:34 +01:00
Philip Withnall
04c8691208 Revert "build: Look for copied Objective-C files in builddir again"
This reverts commit fe72b8772e.

It still fails on GNOME Continuous:
http://build.gnome.org/continuous/buildmaster/builds/2018/06/21/44/build/.

See https://gitlab.gnome.org/GNOME/glib/merge_requests/129 for
discussion.
2018-06-22 00:21:05 +01:00
Philip Chimento
fe72b8772e build: Look for copied Objective-C files in builddir again
This reverts commit 03c324c64a and fixes
the original problem with e004d5f397 that
caused the revert.

We use $(builddir) instead of $(abs_builddir) so that Automake's
dependency generation works correctly.

See !127.
2018-06-21 14:48:29 -07:00
Philip Withnall
ca98ce4280 Merge branch 'master' into 'master'
Use posix_spawn for optimized process launching

See merge request GNOME/glib!95
2018-06-21 17:10:43 +00:00
Daniel Drake
742efe6232 gdesktopappinfo: enable fast posix_spawn gspawn codepath
In order to use the new posix_spawn gspawn codepath, for more robust
app launching when available memory is low, we need to meet some
conditions.

child_setup needs to be NULL for this optimization to work, so drop
the internal child_setup that is used here. Replace it with a lightweight
wrapper binary (gio-launch-desktop) that sets GIO_LAUNCHED_DESKTOP_FILE_PID
before executing the app.

Adjust PATH for gio tests so that it can execute the new binary from the
build directory.
2018-06-21 11:44:28 -05:00
Philip Withnall
03c324c64a Revert "build: Look for copied Objective-C files in builddir"
This reverts commit e004d5f397.

It broke the GNOME Continuous build, which uses autotools. This wasn’t
caught by CI because we don’t do an autotools CI build.

http://build.gnome.org/continuous/buildmaster/builds/2018/06/21/19/build/

Discussion in https://gitlab.gnome.org/GNOME/glib/merge_requests/127.
2018-06-21 11:52:54 +01:00
Philip Chimento
e004d5f397 build: Look for copied Objective-C files in builddir
Without this, the build fails in the OS_COCOA case due to not finding
gnextstepsettingsbackend.c in $(srcdir).
2018-06-20 23:03:21 -07:00
Ondrej Holy
e0e0f259c3 gio: Add bash completion for gio tool
GVfs utils used to have bash completion, which was pretty useful. However,
it hasn't been ported to gio tool unfortunately. GLib provides completion
for various utils already, so it would be nice to provide completion also
for gio tool. I've updated old bash completion code and merged with some
my old unmerged fixes.

The gvfs completion used "gvfs-ls --show-completions" helper. This mentioned
option hasn't been obviously ported to "gio list" and the proposed completion
doesn't add this option in "gio list" to not pollute the codes, but maybe it
is a bit slower as consequence.

The proposed bash completion suggests subcommands, uris and paths including
the remote mounts. It contains some workarounds, especially because of proper
handling of paths with colons and other special chars (like spaces)...
2018-06-15 12:34:10 +02:00
Xavier Claessens
cb10eacedf Update list of meson files to distcheck 2018-06-08 15:29:20 -04:00
Xavier Claessens
077e9f04c1 Meson: Build fam module
gio-querymodules-wrapper.py is copied from glib-networking. This python
wrapper script is needed because meson.build cannot check for DESTDIR
env variable itself, unlike Makefile.am. It is used to update
giomodule.cache file when installing GIO modules like fam.
2018-06-07 10:38:20 -04:00
Chun-wei Fan
4bb173b297 build: Remove leftovers of Visual Studio project stuff
There are more leftover preconfigured stuff that we ought to remove...
2018-06-06 23:54:13 +08:00
Chun-wei Fan
f658e94e65 build: Drop Visual Studio projects
In master, it is already possible to build GLib using Visual Studio
using Meson[1] for some time, so we should focus on maintaining only the
Meson build files for building GLib with Visual Studio.

[1]: There are caveats when building with Visual Studio 2008, namely
     that one needs to use the mt command to embed the manifests that
     are generated with the .exe/DLLs, for all builds, and that in the
     case where the compilation hangs on Visual Studio 2008 x64, as a
     workaround, should stop the build by terminating all cl.exe tasks
     and change the compiler optimization flag from /O2 (full speed) to
     /O1 (optimize for size), due to compiler optimization issues.
2018-06-06 23:54:13 +08:00
Xavier Claessens
c627fb4926 Fix missing osx files when running "make dist"
Fixes #528, #1381.
2018-05-25 03:06:07 +00:00
Xavier Claessens
ead46cdc7e Revert "Revert "Rename objective-c files from .c to .m""
This reverts commit 2e9f3a9afe.
2018-05-25 03:06:07 +00:00
Matthias Clasen
2e9f3a9afe Revert "Rename objective-c files from .c to .m"
This reverts commit e400af99d4.
2018-05-22 17:21:16 -04:00
Xavier Claessens
e400af99d4 Rename objective-c files from .c to .m
Those files got renamed to .c to work around an automake issue, but
Meson needs them to have .m extension. Better rename them at build time
in Makefile.am since that's where the workaround is needed.

https://bugzilla.gnome.org/show_bug.cgi?id=672777
2018-05-22 11:49:24 -04:00
Ryan Schmidt
9d27ed1d78 gio: Fix build on OS X < 10.9
Commit 170466db accidentally partially reverted commit d1a03bc7.
Reinstate the missing check for OS X 10.9.

The Meson build does not have this problem.

https://bugzilla.gnome.org/show_bug.cgi?id=794380
2018-04-10 12:25:25 +01:00
Philip Withnall
b868cf5864 gio: Add dummy win32 notification backend
This adds a null notification backend implementation for win32, purely
to avoid crashes due to a missing backend when applications use
GNotification. This backend does nothing except print a warning when a
notification is supposed to be emitted.

In future, it can be expanded to use win32 API to present toaster
notifications appropriately.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=776583
2018-04-10 10:39:40 +01:00
Dr. Michael Lauer
170466db26 gio: fix compiling on macOS by moving all Objective-C file into libgio-objc-2.0
Previously, only gnextstepsettingsbackend.c was taken into account.

https://bugzilla.gnome.org/show_bug.cgi?id=793565
2018-02-27 11:04:24 +00:00
Emmanuele Bassi
80d328b3a8 build: Separate the Objective C files into their own helper lib
This avoid polluting the CFLAGS with -xobjective-c.

(Rebased by Philip Withnall <withnall@endlessm.com>.)

https://bugzilla.gnome.org/show_bug.cgi?id=672777
2018-02-15 14:31:36 +00:00
Philip Withnall
ba976f13b6 gio: Rename gnetworkmonitorwindows to gwin32networkmonitor
This makes it more consistent with the other win32 objects in GIO. This
commit just renames the files; a follow-up commit will rename the
GObject.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=685442
2018-01-17 12:59:51 +00:00
Jan-Michael Brummer
f9aacf3952 GNetworkMonitorWindows: Add IPv4/IPv6 network monitor backend for windows
Added a Windows backend to GNetworkMonitor, using NotifyRouteChange2()
(available on Vista and later). It marshals the route change callbacks
to the thread-specific default main context the GNetworkMonitor was
constructed in.

https://bugzilla.gnome.org/show_bug.cgi?id=685442
2018-01-17 12:31:26 +00:00
Xavier Claessens
7f69b828fc GIOModule: Use unique names for load/unload symbols
GIO modules should include their name into their exported symbols to
make them unique. This avoids symbol clash when building modules
statically.

extract_name() function is copied from GStreamer which recently
switched to the same symbol naming scheme.

https://bugzilla.gnome.org/show_bug.cgi?id=684282
2018-01-04 11:01:40 -05:00
Philip Withnall
1897e66dce build: Drop data-to-c.pl in favour of data-to-c.py
The Python version was added for the Meson build, but we might as well
use it from autotools too, since it does exactly the same thing as the
Perl version (modulo not including a trailing linebreak, but that
doesn’t matter).

Works fine with Python 2.7 or Python 3.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=790147
2017-11-10 11:47:57 +00:00
Friedrich Beckmann
e55efa35e3 OSX: Use xdgmime system to guess content type from data
Closes: Bug #788401

The problem is described here:

https://bugzilla.gnome.org/show_bug.cgi?id=788401

This patch introduces the use of the xdgmime system to guess
the content type from data. So you can guess for example the
type public.svg-image from the file content of a svg file.
This patch only applies to MacOS. A test for the regression
is also included.
2017-10-14 09:11:01 +01:00
Philip Withnall
181b58c46d build: Fix build with srcdir ≠ builddir
Broken by commit a71f51dece. My fault for
not reviewing thoroughly enough.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-10-11 10:52:44 +01:00
Cor-Paul Bezemer
a71f51dece build: Add gdbus-codegen files as dependencies in generated code rule
So gdbus-daemon-generated.[ch] get regenerated appropriately if any of
them change.

https://bugzilla.gnome.org/show_bug.cgi?id=752239
2017-10-11 10:33:45 +01:00
Philip Withnall
a131134918 build: Drop nmake/MSC build system for GLib
It hasn’t been seriously maintained for the best part of 10 years and is
very outdated. The recommended way to build GLib on Windows is now
Visual Studio:

https://wiki.gnome.org/Projects/GTK%2B/Win32/MSVCCompilationOfGTKStack#GLib

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=722047
2017-07-10 11:22:40 +01:00
Matthias Clasen
4c8ab22b95 Use OpenFile for local files
The OpenURI portal has a separate method to handle local
files now. Use it.

At the same time, split out the openuri helpers into separate
files, and generate code for the OpenURI portal.

https://bugzilla.gnome.org/show_bug.cgi?id=783193
2017-05-30 14:23:10 -04:00
Matthias Clasen
a76fc7fa76 Update flatpak document portal interface
This api has been changed upstream, recently.

A new AddFull method has been added in this commit:
6ce8521b64

https://bugzilla.gnome.org/show_bug.cgi?id=783130
2017-05-29 17:57:39 -04:00
Chun-wei Fan
e013164c5c Visual Studio builds: Fix gio project generation
We need to include gcontenttype-win32.c in our Visual Studio projects...
2017-03-14 14:48:23 +08:00
Matthias Clasen
37f5feb1d2 Fix distcheck
Typo in the win32 source list...
2017-03-13 12:30:56 -04:00
TingPing
90dfea2b61 Implement GAppInfo on OSX
This is an implementation of most of GAppInfo using the OS X
NSBundle APIs.

Missing at this point are things that don't have equivalents
in OS X, such as hidden desktop files, last-used, manual type
associations, and g_app_info_get_all().

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-13 10:33:23 -04:00
TingPing
3953d85a92 Implement GContentType on OSX
This is an implementation of most of GContentType using the OS X
UTType APIs.

Missing at this point is an implementation of
g_content_types_get_registered() and g_content_type_guess_for_tree().

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-13 10:32:02 -04:00
John Ralls
d1a03bc728 Enable building gcocoanotification only if OS X min version >= 10.9
This changes the configure checks to check for what is actually
required to build this code.

https://bugzilla.gnome.org/show_bug.cgi?id=747146
2017-03-08 22:26:00 -05:00
Chun-wei Fan
6dfc6fee7b Visual Studio builds: Move project files to win32/
It was suggested that the project files be moved here as we don't actually
need to go two directory layers from $(srcroot), and would help us to
standardize on things in the future across the board.
2017-01-09 14:00:46 +08:00
Ondrej Holy
da509fd67d gunixmounts: Add g_unix_mount_for() support
GLib has g_unix_mount_at (mount_path) already, let's add g_unix_mount_for
(file_path) for whatever path. GLib already contains some private code
for such task. Let's make this code public. This functionality is needed
by GVfs (see Bug 771431) in order to avoid copy-and-pasting.

https://bugzilla.gnome.org/show_bug.cgi?id=772160
2016-10-12 15:13:00 -04:00
Philip Withnall
a5044a8e78 build: Fix SystemTap build to disable semaphores as before
At some point, upstream SystemTap changed from using a
STAP_HAS_SEMAPHORES preprocessor variable for this, to using
_SDT_HAS_SEMAPHORES instead. We need to update our build system to
disable that as well.

The original discussion about use of semaphores is here:

https://bugzilla.gnome.org/show_bug.cgi?id=606044

This was breaking the build with -flto enabled, either because -flto
doesn’t work with semaphores.

https://bugzilla.gnome.org/show_bug.cgi?id=768198
2016-08-13 09:32:12 +02:00
Mario Sanchez Prada
4f9cddaeb8 Added autotools support for libmount
Check whether libmount is available at configuration time and provide
an option to explicitly enable or disable it, similar to libelf.

https://bugzilla.gnome.org/show_bug.cgi?id=522053
2016-07-26 08:09:27 -06:00
Chun-wei Fan
c6aee1bf15 Visual Studio builds: Build the gio tool
https://bugzilla.gnome.org/show_bug.cgi?id=768357
2016-07-18 10:39:20 +08:00
Chun-wei Fan
b5258d9d76 gio: Build the portal code only on *NIX
xdg-desktop-portal support is only usable on *NIX platforms, so don't build
them on non-*NIX platforms.  Also clean up gio/Makefile.am a bit to split out
the listings for the platform-specific sources from the platform-neutral
sources, and assemble them for the final list of sources required for libgio.

https://bugzilla.gnome.org/show_bug.cgi?id=768498
2016-07-13 10:43:05 +08:00