diff --git a/README.md b/README.md index 1acadb7..8273684 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Libraries built with different NDK versions should not be used in the same appli #### [GLib](https://gitlab.gnome.org/GNOME/glib/) Released versions 2.78.1 and 2.78.3 are problematic (issue #20). -Usable version is 2.75.1 +Usable version is 2.75.0 [![glib2](https://github.com/ViliusSutkus89/ndkports/actions/workflows/glib2.yml/badge.svg)](https://github.com/ViliusSutkus89/ndkports/actions/workflows/glib2.yml) [![Maven Central](https://img.shields.io/maven-central/v/com.viliussutkus89.ndk.thirdparty/glib2-ndk25-static.svg?label=Maven%20Central%20glib2-ndk25-static)](https://search.maven.org/search?q=g:com.viliussutkus89.ndk.thirdparty%20AND%20a:glib2-ndk25-static) diff --git a/glib2/build.gradle.kts b/glib2/build.gradle.kts index 7a82b4e..4f16e2b 100644 --- a/glib2/build.gradle.kts +++ b/glib2/build.gradle.kts @@ -3,7 +3,7 @@ import com.android.ndkports.CMakeCompatibleVersion import com.android.ndkports.PrefabSysrootPlugin import org.gradle.jvm.tasks.Jar -val portVersion = "2.75.1" +val portVersion = "2.75.0" group = rootProject.group version = "${portVersion}-beta-1" @@ -38,11 +38,12 @@ fun File.replace(oldValue: String, newValue: String, ignoreCase: Boolean = false return this } -fun File.patch(patch: String) { +fun File.patch(patch: String): File { patch(projectDir.resolve("patches/$portVersion").resolve(patch)) + return this } -fun File.patch(patch: File) { +fun File.patch(patch: File): File { val pb = ProcessBuilder( if (isFile) listOf("patch", "-p0", absolutePath) else listOf("patch", "-p0") @@ -64,6 +65,7 @@ fun File.patch(patch: File) { if (process.waitFor() != 0) { throw RuntimeException("Patch failed!\n") } + return this } tasks.extractSrc { @@ -73,7 +75,9 @@ tasks.extractSrc { srcDir.resolve("subprojects/proxy-libintl.wrap").delete() srcDir.resolve("glib/meson.build").patch("libffi-pkgconfig-pc.patch") srcDir.resolve("gio/giounix-private.c").patch("epoll_create1.patch") - srcDir.resolve("meson.build").patch("ngettext.patch") + srcDir.resolve("meson.build") + .patch("ngettext.patch") + .patch("pointer-sign-error.patch") } } diff --git a/glib2/glib-2.75.0.tar.xz b/glib2/glib-2.75.0.tar.xz new file mode 100644 index 0000000..31742fb Binary files /dev/null and b/glib2/glib-2.75.0.tar.xz differ diff --git a/glib2/glib-2.75.1.tar.xz b/glib2/glib-2.75.1.tar.xz deleted file mode 100644 index 48a9450..0000000 Binary files a/glib2/glib-2.75.1.tar.xz and /dev/null differ diff --git a/glib2/patches/2.75.1/epoll_create1.patch b/glib2/patches/2.75.0/epoll_create1.patch similarity index 100% rename from glib2/patches/2.75.1/epoll_create1.patch rename to glib2/patches/2.75.0/epoll_create1.patch diff --git a/glib2/patches/2.75.1/libffi-pkgconfig-pc.patch b/glib2/patches/2.75.0/libffi-pkgconfig-pc.patch similarity index 100% rename from glib2/patches/2.75.1/libffi-pkgconfig-pc.patch rename to glib2/patches/2.75.0/libffi-pkgconfig-pc.patch diff --git a/glib2/patches/2.75.1/ngettext.patch b/glib2/patches/2.75.0/ngettext.patch similarity index 100% rename from glib2/patches/2.75.1/ngettext.patch rename to glib2/patches/2.75.0/ngettext.patch diff --git a/glib2/patches/2.75.0/pointer-sign-error.patch b/glib2/patches/2.75.0/pointer-sign-error.patch new file mode 100644 index 0000000..58f2f3b --- /dev/null +++ b/glib2/patches/2.75.0/pointer-sign-error.patch @@ -0,0 +1,11 @@ +--- meson.build ++++ meson.build 2023-12-22 23:24:51.020000000 +0200.txt +@@ -504,7 +504,7 @@ + '-Wno-bad-function-cast', + '-Werror=implicit-function-declaration', + '-Werror=missing-prototypes', +- '-Werror=pointer-sign', ++ '-Wwarning=pointer-sign', + '-Wno-string-plus-int', + ] + warning_cxx_args = warning_common_args