Skip to content

Commit

Permalink
Use GLib-2.75.0, not 2.75.1 (Issue #20)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Dec 24, 2023
1 parent 0471ceb commit 8307536
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 8 additions & 4 deletions glib2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
Expand All @@ -64,6 +65,7 @@ fun File.patch(patch: File) {
if (process.waitFor() != 0) {
throw RuntimeException("Patch failed!\n")
}
return this
}

tasks.extractSrc {
Expand All @@ -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")
}
}

Expand Down
Binary file added glib2/glib-2.75.0.tar.xz
Binary file not shown.
Binary file removed glib2/glib-2.75.1.tar.xz
Binary file not shown.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions glib2/patches/2.75.0/pointer-sign-error.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8307536

Please sign in to comment.