From c1bade24bf05b8c53f08b3328a8f586b2adb47c5 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Sun, 16 Aug 2020 21:00:43 +0200 Subject: [PATCH] gtk-vnc: update to 1.0.0, mesonize, drop gtk2 support --- common/shlibs | 1 - .../gtk-vnc/patches/fix-acinclude_m4.patch | 52 --------- srcpkgs/gtk-vnc/patches/gir-disable.patch | 53 +++++++++ srcpkgs/gtk-vnc/template | 105 +++--------------- srcpkgs/gtk2-vnc | 1 - srcpkgs/gtk2-vnc-devel | 1 - 6 files changed, 69 insertions(+), 144 deletions(-) delete mode 100644 srcpkgs/gtk-vnc/patches/fix-acinclude_m4.patch create mode 100644 srcpkgs/gtk-vnc/patches/gir-disable.patch delete mode 120000 srcpkgs/gtk2-vnc delete mode 120000 srcpkgs/gtk2-vnc-devel diff --git a/common/shlibs b/common/shlibs index fb563ea24fc..728d5c4f0be 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1241,7 +1241,6 @@ libconfig.so.11 libconfig-1.7.1_1 libopusfile.so.0 opusfile-0.2_1 libopusurl.so.0 opusfile-0.6_1 libopusenc.so.0 libopusenc-0.2_1 -libgtk-vnc-1.0.so.0 gtk2-vnc-0.4.4_2 libgranite.so.5 granite-0.5.0_1 libprotobuf-vala.so.0 libprotobuf-vala-0.1.0_1 librlog.so.5 librlog-1.4_1 diff --git a/srcpkgs/gtk-vnc/patches/fix-acinclude_m4.patch b/srcpkgs/gtk-vnc/patches/fix-acinclude_m4.patch deleted file mode 100644 index 62f10eee847..00000000000 --- a/srcpkgs/gtk-vnc/patches/fix-acinclude_m4.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- gtk2-build/acinclude.m4 2015-02-10 11:48:32.000000000 +0100 -+++ gtk2-build/acinclude.m4 2015-10-20 00:18:15.784111110 +0200 -@@ -6,20 +6,8 @@ - [AC_REQUIRE([AM_PATH_PYTHON]) - AC_MSG_CHECKING(for headers required to compile python extensions) - dnl deduce PYTHON_INCLUDES -- py_prefix=`$PYTHON -c "import sys; print sys.prefix"` -- py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` -- PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" -- if test "$py_prefix" != "$py_exec_prefix"; then -- PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" -- fi -+ PYTHON_INCLUDES="-I${XBPS_CROSS_BASE}/include/python${PYTHON_VERSION}" - AC_SUBST(PYTHON_INCLUDES) -+ have_python_headers=yes -- dnl check if the headers exist: -- save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -- AC_TRY_CPP([#include ],dnl -- [AC_MSG_RESULT(found) -- $1],dnl -- [AC_MSG_RESULT(not found) -- $2]) -- CPPFLAGS="$save_CPPFLAGS" -+ AC_MSG_RESULT(ok) - ]) ---- gtk3-build/acinclude.m4 2015-02-10 11:48:32.000000000 +0100 -+++ gtk3-build/acinclude.m4 2015-10-20 00:18:15.784111110 +0200 -@@ -6,20 +6,8 @@ - [AC_REQUIRE([AM_PATH_PYTHON]) - AC_MSG_CHECKING(for headers required to compile python extensions) - dnl deduce PYTHON_INCLUDES -- py_prefix=`$PYTHON -c "import sys; print sys.prefix"` -- py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` -- PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" -- if test "$py_prefix" != "$py_exec_prefix"; then -- PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" -- fi -+ PYTHON_INCLUDES="-I${XBPS_CROSS_BASE}/include/python${PYTHON_VERSION}" - AC_SUBST(PYTHON_INCLUDES) -+ have_python_headers=yes -- dnl check if the headers exist: -- save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -- AC_TRY_CPP([#include ],dnl -- [AC_MSG_RESULT(found) -- $1],dnl -- [AC_MSG_RESULT(not found) -- $2]) -- CPPFLAGS="$save_CPPFLAGS" -+ AC_MSG_RESULT(ok) - ]) diff --git a/srcpkgs/gtk-vnc/patches/gir-disable.patch b/srcpkgs/gtk-vnc/patches/gir-disable.patch new file mode 100644 index 00000000000..ceb8191f402 --- /dev/null +++ b/srcpkgs/gtk-vnc/patches/gir-disable.patch @@ -0,0 +1,53 @@ +From 4ec3034ed57d9baf03bf0d8cf46a0510b6c5fbbb Mon Sep 17 00:00:00 2001 +From: Daniel Kolesa +Date: Sun, 16 Aug 2020 20:53:21 +0200 +Subject: [PATCH] allow gir to be disabled + +--- + meson_options.txt | 1 + + src/meson.build | 6 +++--- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git meson_options.txt meson_options.txt +index 995d8c1..4da4406 100644 +--- meson_options.txt ++++ meson_options.txt +@@ -2,3 +2,4 @@ option('enable-werror', type: 'boolean', value: false, description: 'Enable -We + option('with-coroutine', type: 'string', value: 'auto', description: 'Build with coroutine backend: [auto, ucontext, gthread]') + option('with-tls-priority', type: 'string', value: 'NORMAL', description: 'Set default TLS priority string') + option('with-vala', type: 'boolean', value: true, description: 'Enable Vala bindings') ++option('with-gir', type: 'boolean', value: true, description: 'Enable gir') +diff --git src/meson.build src/meson.build +index 956f189..e9f4261 100644 +--- src/meson.build ++++ src/meson.build +@@ -134,7 +134,7 @@ gvnc_dep = declare_dependency( + include_directories: gvnc_inc, + ) + +-if host_machine.system() != 'windows' ++if get_option('with-gir') + gvnc_gir = gnome.generate_gir( + gvnc, + sources: gvnc_gir_sources, +@@ -216,7 +216,7 @@ if libpulse_dep.found() + include_directories: gvncpulse_inc, + ) + +- if host_machine.system() != 'windows' ++ if get_option('with-gir') + gvncpulse_gir = gnome.generate_gir( + gvncpulse, + sources: gvncpulse_sources, +@@ -379,7 +379,7 @@ gtk_vnc_dep = declare_dependency( + include_directories: gtk_vnc_inc, + ) + +-if host_machine.system() != 'windows' ++if get_option('with-gir') + gtk_vnc_gir = gnome.generate_gir( + gtk_vnc, + sources: gtk_vnc_gir_sources, +-- +2.28.0 + diff --git a/srcpkgs/gtk-vnc/template b/srcpkgs/gtk-vnc/template index 7c1b6f8cecc..6a5f5f2d1e6 100644 --- a/srcpkgs/gtk-vnc/template +++ b/srcpkgs/gtk-vnc/template @@ -1,106 +1,33 @@ # Template file for 'gtk-vnc' pkgname=gtk-vnc -version=0.9.0 -revision=3 +version=1.0.0 +revision=1 build_helper="gir" -build_style=gnu-configure -configure_args="$(vopt_enable gir introspection) $(vopt_enable vala)" -hostmakedepends="automake gettext-devel glib-devel intltool libgcrypt-devel - libtool pkg-config gobject-introspection $(vopt_if vala vala)" -makedepends="gnutls-devel gtk+-devel gtk+3-devel libsasl-devel - $(vopt_if vala 'vala')" +build_style=meson +configure_args="$(vopt_bool gir with-gir) $(vopt_bool gir with-vala)" +hostmakedepends="gettext gettext-devel glib-devel intltool libgcrypt-devel + pkg-config $(vopt_if gir vala)" +makedepends="gnutls-devel gtk+3-devel libsasl-devel $(vopt_if gir vala)" short_desc="VNC viewer widget for GTK" maintainer="Enno Boland " license="GPL-2.0-or-later" homepage="https://wiki.gnome.org/Projects/gtk-vnc" distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=3a9a88426809a5df2c14353cd9839b8c8163438cb708b31d8048c79d180fcab7 +checksum=a81a1f1a79ad4618027628ffac27d3391524c063d9411c7a36a5ec3380e6c080 -build_options="gir vala" -build_options_default="gir vala" - -post_extract() { - cp -a ${wrksrc} /tmp/gtk2-build - cp -a ${wrksrc} /tmp/gtk3-build - rm -r ${wrksrc}/* - mv /tmp/gtk[23]-build ${wrksrc} -} -pre_configure() { - local build - if [ "$CROSS_BUILD" ]; then - find . -name "Makefile.*" -exec sed -i "{}" \ - -e"s;\(\$(CODEGENDIR)\);${XBPS_CROSS_BASE}/\1;" \ - -e"s;\(\$(DEFSDIR)\);${XBPS_CROSS_BASE}/\1;" \ - \; - fi - for build in gtk2-build gtk3-build; do - cd ${wrksrc}/${build} - autoreconf -if - done -} - -do_configure() { - cd ${wrksrc}/gtk2-build - ./configure ${configure_args} --with-gtk=2.0 - - cd ${wrksrc}/gtk3-build - ./configure ${configure_args} --with-gtk=3.0 -} - -do_build() { - cd ${wrksrc}/gtk2-build - make ${makejobs} - - cd ${wrksrc}/gtk3-build - make ${makejobs} -} - -do_install() { - cd ${wrksrc}/gtk2-build - make DESTDIR=${DESTDIR} install - - cd ${wrksrc}/gtk3-build - make DESTDIR=${DESTDIR} install -} - -gtk2-vnc_package() { - short_desc+=" - GTK+2 port" - pkg_install() { - vmove "usr/lib/libgtk-vnc-1.0.so*" - if [ "$build_option_gir" ]; then - vmove usr/lib/girepository-1.0/GtkVnc-1.0.typelib - fi - } -} - -gtk2-vnc-devel_package() { - depends="gtk+-devel gtk-vnc-devel>=${version}_${revision}" - short_desc+=" - GTK+2 development files" - pkg_install() { - vmove usr/include/gtk-vnc-1.0 - if [ "$build_option_gir" ]; then - #vmove usr/share/vala/vapi/gtk-vnc-1.0.vapi - vmove usr/share/gir-1.0/GtkVnc-1.0.gir - fi - vmove usr/lib/pkgconfig/gtk-vnc-1.0.pc - } -} +build_options="gir" +build_options_default="gir" gtk-vnc-devel_package() { depends="glib-devel gtk+3-devel gtk-vnc>=${version}_${revision}" short_desc+=" - development files" pkg_install() { - vmove usr/include/gvnc-1.0 - vmove usr/include/gtk-vnc-2.0 - vmove usr/lib/pkgconfig/gtk-vnc-2.0.pc - vmove usr/lib/pkgconfig/gvnc-1.0.pc - if [ "$build_option_gir" ]; then - vmove usr/share/vala/vapi/gtk-vnc-2.0.deps - vmove usr/share/vala/vapi/gtk-vnc-2.0.vapi - vmove usr/share/vala/vapi/gvnc-1.0.vapi - vmove usr/share/gir-1.0/GVnc-1.0.gir - vmove usr/share/gir-1.0/GtkVnc-2.0.gir - fi + vmove usr/include + vmove usr/lib/pkgconfig vmove usr/lib/*.so + if [ "$build_option_gir" ]; then + vmove usr/share/vala + vmove usr/share/gir-1.0 + fi } } diff --git a/srcpkgs/gtk2-vnc b/srcpkgs/gtk2-vnc deleted file mode 120000 index 25a6952fbce..00000000000 --- a/srcpkgs/gtk2-vnc +++ /dev/null @@ -1 +0,0 @@ -gtk-vnc \ No newline at end of file diff --git a/srcpkgs/gtk2-vnc-devel b/srcpkgs/gtk2-vnc-devel deleted file mode 120000 index 25a6952fbce..00000000000 --- a/srcpkgs/gtk2-vnc-devel +++ /dev/null @@ -1 +0,0 @@ -gtk-vnc \ No newline at end of file