Skip to content

Instantly share code, notes, and snippets.

@Prince781
Created October 9, 2020 15:38
Show Gist options
  • Save Prince781/f526b5e5a379f365776851214639c8c5 to your computer and use it in GitHub Desktop.
Save Prince781/f526b5e5a379f365776851214639c8c5 to your computer and use it in GitHub Desktop.
build glib2 on msys2 with g_spawn() fixes
diff --git a/mingw-w64-glib2/PKGBUILD b/mingw-w64-glib2/PKGBUILD
index 380874721..e20bc32df 100644
--- a/mingw-w64-glib2/PKGBUILD
+++ b/mingw-w64-glib2/PKGBUILD
@@ -23,7 +23,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-gtk-doc"
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
-source=("https://download.gnome.org/sources/glib/${pkgver%.*}/glib-${pkgver}.tar.xz"
+source=("git+https://gitlab.gnome.org/Prince781/glib"
0001-Update-g_fopen-g_open-and-g_creat-to-open-with-FILE_.patch
0001-win32-Make-the-static-build-work-with-MinGW-when-pos.patch
0001-disable-some-tests-when-static.patch
@@ -31,7 +31,7 @@ source=("https://download.gnome.org/sources/glib/${pkgver%.*}/glib-${pkgver}.tar
gio-querymodules.hook.in
0002-disable_glib_compile_schemas_warning.patch
pyscript2exe.py)
-sha256sums=('a269ffe69fbcc3a21ff1acb1b6146b2a5723499d6e2de33ae16ccb6d2438ef60'
+sha256sums=('SKIP'
'51d02360a1ee978fd45e77b84bca9cfbcf080d91986b5c0efe0732779c6a54ec'
'1e3ac7cfd4644f3849704e54fcfbb12d15440a33cd5c2d014d4a479c6aaab185'
'0f44135a139e3951c4b5fa7d4628d75226e0666d891faf524777e1d1ec3b440b'
@@ -41,8 +41,9 @@ sha256sums=('a269ffe69fbcc3a21ff1acb1b6146b2a5723499d6e2de33ae16ccb6d2438ef60'
'00e03a8b9d45e620c6fabbf96f5ccb41d1e49cc9b35ccb846d423f235ad5bec6')
prepare() {
- cd "${srcdir}/glib-${pkgver}"
+ cd "${srcdir}/glib"
+ git checkout wip/prince781/fix-gspawn-terminal-win32
patch -Np1 -i "${srcdir}"/0001-Update-g_fopen-g_open-and-g_creat-to-open-with-FILE_.patch
patch -Np1 -i "${srcdir}"/0001-win32-Make-the-static-build-work-with-MinGW-when-pos.patch
patch -Np1 -i "${srcdir}"/0001-disable-some-tests-when-static.patch
@@ -58,7 +59,7 @@ build() {
--buildtype=plain \
--default-library=static \
-Dforce_posix_threads=true \
- "../glib-${pkgver}"
+ "../glib"
ninja
msg "Build shared version"
@@ -71,7 +72,7 @@ build() {
-Dman=true \
-Dforce_posix_threads=true \
-Dgtk_doc=false \
- "../glib-${pkgver}"
+ "../glib"
ninja
}
@@ -91,7 +92,7 @@ package() {
install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 "${hook_path}"
done
- install -Dm644 "${srcdir}/glib-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
+ install -Dm644 "${srcdir}/glib/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
local _PRE_WIN="$(cygpath -m ${MINGW_PREFIX})"
for name in glib-mkenums glib-genmarshal gdbus-codegen gtester-report; do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment