Merge pull request #9643 from jeremyd2019/libvirt-glib-4.0.0

libvirt-glib: update to 4.0.0
This commit is contained in:
Christoph Reiter
2021-09-22 22:28:32 +02:00
committed by GitHub
5 changed files with 59 additions and 39 deletions

View File

@@ -0,0 +1,10 @@
--- a/meson.build 2021-09-22 11:56:17.941233800 -0700
+++ b/meson.build 2021-09-22 11:58:57.734639500 -0700
@@ -51,7 +51,6 @@
libxml_dep = dependency('libxml-2.0', version: libxml_min_version)
add_global_arguments('-DGLIB_VERSION_MIN_REQUIRED=@0@'.format(glib_min_version_symbol), language: 'c')
-add_global_arguments('-DGLIB_VERSION_MAX_ALLOWED=@0@'.format(glib_min_version_symbol), language: 'c')
prefix = get_option('prefix')
localedir = join_paths(prefix, get_option('localedir'))

View File

@@ -1,12 +0,0 @@
--- ./libvirt-gobject/Makefile.am.orig 2016-07-18 10:03:46.534356500 +0200
+++ ./libvirt-gobject/Makefile.am 2016-07-18 10:06:01.550863500 +0200
@@ -94,7 +94,8 @@
$(COVERAGE_CFLAGS:-f%=-Wc,f%) \
$(CYGWIN_EXTRA_LDFLAGS) $(MINGW_EXTRA_LDFLAGS) \
-Wl,--version-script=$(srcdir)/libvirt-gobject.sym \
- -version-info $(LIBVIRT_GLIB_VERSION_INFO)
+ -version-info $(LIBVIRT_GLIB_VERSION_INFO) \
+ -no-undefined
libvirt-gobject-enums.c: $(libvirt_gobject_1_0_la_HEADERS)
$(AM_V_GEN)glib-mkenums \

View File

@@ -0,0 +1,11 @@
--- a/meson.build 2021-09-22 11:56:17.941233800 -0700
+++ b/meson.build 2021-09-22 12:20:40.171597100 -0700
@@ -381,7 +381,7 @@
# on aarch64 error: -fstack-protector not supported for this target
if host_machine.cpu_family() != 'aarch64'
- if host_machine.system() in [ 'linux', 'freebsd', 'windows' ]
+ if host_machine.system() in [ 'linux', 'freebsd' ]
# we prefer -fstack-protector-strong but fallback to -fstack-protector-all
fstack_cflags = cc.first_supported_argument([
'-fstack-protector-strong',

View File

@@ -3,59 +3,70 @@
_realname=libvirt-glib
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.0.0
pkgver=4.0.0
pkgrel=1
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
pkgdesc="libvirt GLib and GObject mapping library (mingw-w64)"
depends=("${MINGW_PACKAGE_PREFIX}-glib2"
#"${MINGW_PACKAGE_PREFIX}-libssp" # disabled due to gir issue
"${MINGW_PACKAGE_PREFIX}-libxml2"
"${MINGW_PACKAGE_PREFIX}-libvirt")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"gtk-doc"
makedepends=("${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-gtk-doc"
"${MINGW_PACKAGE_PREFIX}-vala"
"${MINGW_PACKAGE_PREFIX}-gobject-introspection"
"${MINGW_PACKAGE_PREFIX}-pkg-config")
options=('!strip' 'debug' 'staticlibs')
options=('strip' '!debug' 'staticlibs')
license=("LGPL 2.1")
url="https://www.gnome.org/"
#install=${_realname}-${CARCH}.install
source=(https://libvirt.org/sources/glib/${_realname}-${pkgver}.tar.gz
001-win.patch)
sha256sums=('7fff8ca9a2b723dbfd04223b1c7624251c8bf79eb57ec27362a7301b2dd9ebfe'
'8f787245ffc5d91f628c1965a45baf0af61eb3afcf4da8642b763e578275c6c9')
source=(https://libvirt.org/sources/glib/${_realname}-${pkgver}.tar.xz{,.asc}
001-disable-glib-max-version.patch
002-disable-stack-protector-windows.patch)
sha256sums=('8423f7069daa476307321d1c11e2ecc285340cd32ca9fc05207762843edeacbd'
'SKIP'
'e61628e47a80adc66e215a81c8d4eeac4b556b85c3bc96553a8ab6dc49e8f33b'
'5861775ea76ce66219d0494a726a59ecc8015e89be3f4ec4c3765fe561c76cda')
validpgpkeys=('DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF') # Daniel P. Berrange
prepare() {
cd ${_realname}-${pkgver}
patch -p1 -i ${srcdir}/001-win.patch
autoreconf -fi
patch -Nbp1 -i "${srcdir}/001-disable-glib-max-version.patch"
# https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/176,
# via https://github.com/mesonbuild/meson/issues/1910.
# Blowing up with -fstack-protector on mingw for the same reasons
patch -Nbp1 -i "${srcdir}/002-disable-stack-protector-windows.patch"
}
build() {
[[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST}
mkdir -p build-${MINGW_CHOST}
cd build-${MINGW_CHOST}
mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST}
mkdir -p docs/libvirt-gconfig/html
cp -rf ../${_realname}-${pkgver}/docs/libvirt-gconfig/html/* docs/libvirt-gconfig/html
mkdir -p docs/libvirt-glib/html
cp -rf ../${_realname}-${pkgver}/docs/libvirt-glib/html/* docs/libvirt-glib/html
mkdir -p docs/libvirt-gobject/html
cp -rf ../${_realname}-${pkgver}/docs/libvirt-gobject/html/* docs/libvirt-gobject/html
declare -a _extra_config
if check_option "debug" "n"; then
_extra_config+=("--buildtype=release")
else
_extra_config+=("--buildtype=debug")
fi
../${_realname}-${pkgver}/configure \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--build=${MINGW_CHOST} \
--prefix=${MINGW_PREFIX} \
--libexecdir=${MINGW_PREFIX}/lib
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/meson.exe \
--prefix="${MINGW_PREFIX}" \
"${_extra_config[@]}" \
--wrap-mode=nodownload \
--default-library=both \
--auto-features=enabled \
-Dgit_werror=disabled \
"../${_realname}-${pkgver}"
make
${MINGW_PREFIX}/bin/meson.exe compile
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR=$pkgdir install
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/meson.exe install
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
}

View File

@@ -4,7 +4,7 @@ _realname=virt-viewer
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=9.0
pkgrel=1
pkgrel=2
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
pkgdesc="Displaying the graphical console of a virtual machine (mingw-w64)"