Commit Graph

97 Commits

Author SHA1 Message Date
Christian Marangi 7cdf7b9c1a
libs: glib2: fix provided pkg-config and always use host tools
For the InstallDev target, the pkg-config should point to the glib2 host
tools for glib_compile_resources, gdbus_codegen, glib_genmarshal and
glib_mkenums instead of pointing to the targets ones as they are
unusable by the host machine (due to crosscompiling)

Fix the pkg-config to reference the host tools by replaying the entry
and use the prefix_hostpkg variable provided by our pkg-config.

Link: https://github.com/openwrt/packages/pull/23881
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-05 17:25:12 +02:00
Tan Zien 9c7a973a50 glib2: link libiconv when building host pkg
some compile error happens when building.
Linking to libiconv-full fixes this.
refer to: 63dd14b906

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
2024-04-07 15:59:27 -07:00
Rosen Penev 0e7554cbf4 glib2: use internal pcre2 for host
There's some weird issue where -lpcre2 is not being passed. Fixes
vala/host which links to static libraries.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-02-22 10:49:16 -08:00
Florian Eckert 56188542b6 glib2: update to version 2.74.7
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-02-16 12:02:11 +01:00
Florian Eckert 71b7b44789 glib2: do not set default meson options
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-02-16 12:02:11 +01:00
Florian Eckert 7b33b15032 Revert "glib2: update to 2.78.4"
So that we have a working ModemManager again and can look at the problem
revert the update to version 2.78.4 for now.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>

This reverts commit 08c7b0dfca.
2024-02-16 12:02:05 +01:00
Florian Eckert 445f75e3f1 Revert "glib2: use internal pcre2"
This is must also get revert to get back to working glib2 version 2.74.0

Signed-off-by: Florian Eckert <fe@dev.tdt.de>

This reverts commit 9f57ef2d6e.
2024-02-16 12:01:46 +01:00
Rosen Penev 9f57ef2d6e glib2: use internal pcre2
For some strange reason, glib2 does not link properly with a static
pcre2. Work around by bundling own copy.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-02-14 17:04:49 -08:00
krant 08c7b0dfca glib2: update to 2.78.4
- Use HTTPS for package URL
- Don't set default Meson options
- Remove upstreamed patch
- Refresh remaining patches

Signed-off-by: krant <aleksey.vasilenko@gmail.com>
2024-02-09 00:32:03 -08:00
Jitao Lu 68f23a9c33 glib2: disable gnulib printf
A compiler bug (suspiciously) blocks gnulib compilation for
mipsel_24kc_24kf. While we had this patch to disable gnulib, it was
accidentally removed by 5d27631d9f. Add it
back to fix the long broken build for mipsel_24kc_24kf.

Fixes: #19511
Signed-off-by: Jitao Lu <dianlujitao@gmail.com>
2023-06-11 20:55:58 +03:00
Florian Eckert c664b83535 glib2: fix host build offline download
If buildsystem does not have a internet connection, then the build
fails. This is because of the fact, that glib2 is downloading and building
the missing dependencies during host compilation.

This cannot be allowed to happen. The package must also be built without
an internet connection.

Adding the missing host build dependency and removing the 'forcefallback'
fixes this issue.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-05-12 11:11:46 +03:00
Paul Fertser 0c10c224be treewide: remove AUTORELEASE
Automatically compute and substitute current values for all
$(AUTORELEASE) instances as this feature is deprecated and shouldn't be
used.

The following temporary change was made to the core:

diff --git a/rules.mk b/rules.mk
index 57d7995d4fa8..f16367de87a8 100644
--- a/rules.mk
+++ b/rules.mk
@@ -429,7 +429,7 @@ endef
 abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1))))

 COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
-AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))
+AUTORELEASE = $(if $(DUMP),0,$(shell sed -i "s/\$$(AUTORELEASE)/$(call commitcount,1)/" $(CURDIR)/Makefile))

 all:
 FORCE: ;

And this command used to fix affected packages:

for i in $(cd feeds/packages; git grep -l PKG_RELEASE:=.*AUTORELEASE | \
                              sed 's^.*/\([^/]*\)/Makefile^\1^';);
do
  make package/$i/download
done

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2023-04-21 22:46:58 +02:00
Andre Heider 35f4ef76e0 treewide: refactor to use PKG_BUILD_FLAGS:=gc-sections
See commit da370098 "treewide: add support for "gc-sections" in
PKG_BUILD_FLAGS" on the main repository.

Note: This only touches packages which use all three parts
(-ffunction-sections, -fdata-sections and -Wl,--gc-sections) enabled by
this build flag. Some packages only use a subset, and these are left
unchanged for now.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-04-08 08:38:54 +02:00
Rosen Penev 04043be54a glib2: backport locale fix
Fixes compilation with non English locale.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-09-22 20:49:27 -07:00
Rosen Penev 5d27631d9f glib2: update to 2.74.0
Remove upstreamed patch and delete pointless one.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-09-22 01:20:17 -07:00
Stijn Tintel 723c4360c4 glib2: disable fortify source
The glib2 package fails to build when CONFIG_PKG_FORTIFY_SOURCE_1 or
CONFIG_PKG_FORTIFY_SOURCE_2 is enabled in the OpenWrt config:

In file included from ../glib/libcharset/localcharset.c:28:
/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-powerpc64_e5500_gcc-11.2.0_musl/include/fortify/stdio.h: In function 'snprintf':
/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-powerpc64_e5500_gcc-11.2.0_musl/include/fortify/stdio.h:101:9: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
  101 |         return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack());
      |         ^~~~~~
/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-powerpc64_e5500_gcc-11.2.0_musl/include/fortify/stdio.h: In function 'sprintf':
/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-powerpc64_e5500_gcc-11.2.0_musl/include/fortify/stdio.h:110:17: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
  110 |                 __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack());
      |                 ^~~
/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-powerpc64_e5500_gcc-11.2.0_musl/include/fortify/stdio.h:114:17: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
  114 |                 __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack());
      |                 ^~~

Disable fortify source for the package as a workaround.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-07-19 22:33:26 -07:00
Rosen Penev 568669dc46 glib2: remove libiconv/host build dependency
No longer present. The original reason for having it was an unfortunate
side effect of the way meson uses HOST_LDFLAGS. Since the transistion to
use dependency('iconv'), this is no longer relevant.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-15 14:19:50 -07:00
Rosen Penev df5d7245b9 treewide: remove PKG_INSTALL for meson projects
It doesn't seem to be used by meson.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-06-15 18:07:46 -07:00
Rosen Penev 1e2f4f1bf7 glib2: replace intl patch with upstream solution
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-06-09 11:02:25 -07:00
Sebastian Kemper 721838ddd4 glib2: update libintl handling
glib2's meson.build runs check cc.has_function('ngettext', args :
osx_ldflags) and, if successful, it never looks for non-libc libintl.
For musl and glibc this test is always successful.

glib2 unconditionally sets ENABLE_NLS, so during compile <libintl.h>
gets included always. But then we have a disconnect when the OpenWrt pkg
is being built with BUILD_NLS=y, because the <libintl.h> will be from
libintl-full but glib2 will not link to libintl-full.

With BUILD_NLS=n there's no problem, because the <libintl.h> will be
from libc.

In lieu of proper libintl detection in glib2's meson build, removing the
SED call from the Makefile together with the added patch sorts this out.
The SED call can be removed because when we force libintl-full use, the
meson build will put the necessary linker flag into the pkg-config file
itself.

Alpine Linux does something similar (see [1]), but they always force
the use of the external libintl. I assume they always go for full NLS
support.

[1] https://git.alpinelinux.org/aports/tree/main/glib/musl-libintl.patch

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2022-06-06 06:02:14 -07:00
Rosen Penev d0cd7eb5bf glib2: update to 2.70.5
Enabled glib_checks to fix podman.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-22 13:38:39 -07:00
Rosen Penev 2784618ab5 glibs: revert "fix compilation with Alpine Linux"
This reverts commit 0ce744202a.

Broken everywhere else. A better solution will need to be found.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-01 12:15:23 -07:00
Florian Eckert 3ace16ed77 glib2: update version to 2.70.4
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-21 08:38:46 +01:00
Rosen Penev 0ce744202a glib2: fix compilation with Alpine Linux
Patch taken from Alpine Linux git. The problem is missing -lintl linker
flag. Placed in a separate directory as the patch interferes with the
way libintl is implemented in OpenWrt.

Also removed rpath hack, which is not needed as all libraries are
static.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-17 23:14:27 -07:00
Rosen Penev d2062486e8 glib2: update to 2.70
Remove various outdated patches. No more uClibc and distutils is a
requirement.

Compile host libraries statically. Size is not a concern there. Also
avoids rpath hacks. Disable NLS as well. Avoids gettext dependencies.

Add libpcre dependency. Seems to be a requirement now.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-22 18:33:03 -07:00
Rosen Penev 5ccd4d1c25 treewide: compile with tools/meson
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-17 22:06:52 -07:00
Rosen Penev 3d47fd637c glib2: update to 2.68.4
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-27 16:38:30 -07:00
Rosen Penev e1d8f4fc96 glib2: update to 2.68.1
Removed two now pointless patches as they were added as options.

Switch to AUTORELEASE for simplicity.

Update MESON_ARGS.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-04-13 15:30:10 -07:00
Rosen Penev b970fb95df
glib2: update to 2.66.4
Remove liconv hack for uClibc-ng as the latter is gone.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-01-07 16:58:45 -08:00
Rosen Penev 85d66757b0
glib2: use normal format functions
These meson checks rely on being able to run binaries. Just force them
on. Reduces compiled size.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-12 12:30:13 -08:00
Rosen Penev 456bd399e7
glib2: update to 2.66.3
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-24 22:28:57 -08:00
Rosen Penev 4e22fb2560 glib2: update to 2.66.1
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-14 19:43:48 -07:00
Rosen Penev f132daf59e
glib2: remove static library hack
There's a better and faster way to do this.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-09-30 18:33:32 -07:00
Rosen Penev afd013370d
glib2: update to 2.66.0
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-09-20 00:20:00 -07:00
Rosen Penev 535d9ffeee
glib2: update to 2.65.2
Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-27 17:31:06 -07:00
Rosen Penev 0f0a5187a6
glib2: update to 2.65.1
Add a small hack to glib2 to avoid using proxy-intl and break
compilation under uClibc-ng.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-17 15:10:42 -07:00
Rosen Penev b98d2fce1b
glib2: add full language support hack to fix compilation
Otherwise, dependent packages need to all add -lintl to LDFLAGS.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-11 13:02:41 -07:00
Rosen Penev 7c9a0919a7 glib2: fix full language build
Needs -lintl.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-02 18:03:50 -07:00
Rosen Penev 1f3a60acd6
glib2: add back libiconv/host build dependency
HOST_LDFLAGS are used in target builds with meson. Having -liconv is
necessary because of certain hosts that lack iconv in libc.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-01 09:34:17 -07:00
Rosen Penev f23da6d1b8
glib2: add gettext-full build dependency
I don't know why this is needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-31 20:24:20 -07:00
Rosen Penev 48870aac0c glib2: revert intl change
This was causing massive buildbot failure.

The intent was to fix uClibc-ng and CONFIG_BUILD_NLS, but that ended up
breaking everything.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-31 15:11:54 -07:00
Rosen Penev b1a530c67f
Merge pull request #12971 from neheb/glb2
glib2: add back gettext dependencies
2020-07-30 21:07:41 -07:00
Rosen Penev a109b89c9a glib2: add back gettext dependencies
The libintl check is broken in meson.build. Patched it and added back
the gettext build dependencies. Avoids the proxy-intl thing that glib2
likes to use.

Updated configure options.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-30 20:34:52 -07:00
Aleksander Morgado f593e263cd glib2: install codegen module in staging dir
Install not only the gdbus-codegen program in the target staging dir,
but also the actual codegen module, so that the program is fully
usable by other packages that require it during build.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
2020-07-30 09:32:05 +02:00
Rosen Penev ff1692b983
glib2: update to 2.65.0
Modified to use meson as upstream has abandoned autotools.

Added license information.

Cleaned up Makefile for consistency between packages.

Added hack to compile static libs.

Removed old patches and add new ones.

Removed BUILD_PARALLEL options. These are default with ninja/meson.

Removed gettext build dependencies. glib2 now includes its own solution.

Added patch to remove distutils host dependency.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-23 19:00:03 -07:00
Josef Schlehofer 111865439b
Revert "glib2: update to 2.64.2"
It is not ready and there are some issues described in
https://github.com/openwrt/packages/pull/11442

This reverts commit b465ac3002.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2020-04-20 12:05:33 +02:00
Josef Schlehofer ad798995ee
Revert "glib2: fix host build"
There isn't prime time for it. Currently, it can not be built.
It fails with the following error:  ERROR: Compiler gcc can not compile programs.
More details in https://github.com/openwrt/packages/pull/11887 and
https://github.com/openwrt/packages/issues/11900

This reverts commit b62ed68007.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2020-04-20 11:59:48 +02:00
Rosen Penev b62ed68007
glib2: fix host build
Seems to need -liconv.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-18 18:58:20 -07:00
Rosen Penev b465ac3002
glib2: update to 2.64.2
Modified to use meson as upstream has abandoned autotools.

Added license information.

Cleaned up Makefile for consistency between packages.

Added hack to compile static libs.

Removed old patches and add new ones.

Removed BUILD_PARALLEL options. These are default with ninja/meson.

Removed gettext build dependencies. glib2 now includes its own solution.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-16 19:17:52 -07:00
Andy Walsh a558b20944 glib2: fix mips16 build, add size reducing static link, fpic CFLAGS
* allows building as mips16 (fixes broken mips16/32 mixed static linking)
* add some static link related flags to reduce target binary size

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
2019-12-31 18:40:21 +01:00