summaryrefslogtreecommitdiffstats
path: root/libraries/gtk-sharp3
diff options
context:
space:
mode:
author Jeremy Hansen <jebrhansen+github@gmail.com>2023-10-20 15:30:51 -0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-10-21 17:20:13 +0700
commite0091fdf5064c66e54c253051ba52cfba914f235 (patch)
tree285317d260b6fb9c340a8bf6219e6a34b6cddec0 /libraries/gtk-sharp3
parent821c07bab924bece9dc11adb3f3466626b977d0c (diff)
downloadslackbuilds-e0091fdf5064c66e54c253051ba52cfba914f235.tar.gz
slackbuilds-e0091fdf5064c66e54c253051ba52cfba914f235.tar.xz
libraries/gtk-sharp3: Updated for version 3.22.2.
New upstream. Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/gtk-sharp3')
-rw-r--r--libraries/gtk-sharp3/README3
-rw-r--r--libraries/gtk-sharp3/gtk-sharp3-nolibdir.patch21
-rw-r--r--libraries/gtk-sharp3/gtk-sharp3.SlackBuild58
-rw-r--r--libraries/gtk-sharp3/gtk-sharp3.info6
4 files changed, 61 insertions, 27 deletions
diff --git a/libraries/gtk-sharp3/README b/libraries/gtk-sharp3/README
index a15904bce9..4d7a3cbb9e 100644
--- a/libraries/gtk-sharp3/README
+++ b/libraries/gtk-sharp3/README
@@ -3,4 +3,7 @@ project binds the gtk+ toolkit and assorted GNOME libraries, enabling
fully native graphical Gnome application development using Mono and
.Net development frameworks.
+Upstream has not had updates since 2014, so this is using a well-
+maintained fork by the GLibSharp team.
+
This is able to be installed alongside gtk-sharp without conflicts.
diff --git a/libraries/gtk-sharp3/gtk-sharp3-nolibdir.patch b/libraries/gtk-sharp3/gtk-sharp3-nolibdir.patch
new file mode 100644
index 0000000000..43b9594cfb
--- /dev/null
+++ b/libraries/gtk-sharp3/gtk-sharp3-nolibdir.patch
@@ -0,0 +1,21 @@
+diff -up GtkSharp-3.22.2/Source/meson.build.nolibdir GtkSharp-3.22.2/Source/meson.build
+--- GtkSharp-3.22.2/Source/meson.build.nolibdir 2021-07-30 05:34:33.000000000 +0200
++++ GtkSharp-3.22.2/Source/meson.build 2022-08-07 14:27:13.414754013 +0200
+@@ -74,7 +74,7 @@ version_data.set('PACKAGE_VERSION', pkg_
+
+ install_infos = []
+ nuget_infos = []
+-lib_install_dir = join_paths(get_option('libdir'), 'mono', pkg_version)
++lib_install_dir = join_paths(get_option('prefix'), 'lib', 'mono', pkg_version)
+ pkg_install_dir = join_paths(get_option('libdir'), 'pkgconfig')
+ gapi_xml_installdir = join_paths(get_option('datadir'), 'gapi-3.0')
+
+diff -up GtkSharp-3.22.2/Source/parser/meson.build.nolibdir GtkSharp-3.22.2/Source/parser/meson.build
+--- GtkSharp-3.22.2/Source/parser/meson.build.nolibdir 2021-07-30 05:34:33.000000000 +0200
++++ GtkSharp-3.22.2/Source/parser/meson.build 2022-08-07 14:24:57.849163225 +0200
+@@ -1,4 +1,4 @@
+-gapi_installdir = join_paths(get_option('libdir'), 'gapi-3.0')
++gapi_installdir = join_paths(get_option('prefix'), 'lib', 'gapi-3.0')
+ pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
+
+ gapi_parser = executable('gapi-parser', 'gapi-parser.cs',
diff --git a/libraries/gtk-sharp3/gtk-sharp3.SlackBuild b/libraries/gtk-sharp3/gtk-sharp3.SlackBuild
index f09ea6cfc6..9682e956ef 100644
--- a/libraries/gtk-sharp3/gtk-sharp3.SlackBuild
+++ b/libraries/gtk-sharp3/gtk-sharp3.SlackBuild
@@ -28,8 +28,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gtk-sharp3
-SRCNAM=gtk-sharp
-VERSION=${VERSION:-2.99.3}
+SRCNAM=GtkSharp
+VERSION=${VERSION:-3.22.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -71,7 +71,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.xz
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
@@ -80,26 +80,36 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
-# Switch away from deprecated gmcs mono compiler
-sed -i 's|gmcs|mcs|' configure configure.ac
-
-# Fix compile issues
-sed -i 's|MONO_PROFILE_ENTER_LEAVE|1 << 12|' gtk/gui-thread-check/profiler/gui-thread-check.c
-sed -i '12i \\nusing Range=Gtk.Range;' sample/test/TestRange.cs
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --disable-static \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
+# Correct outdated references
+sed -i 's|gdk_api_includes|gio_api_includes|' \
+ Source/{gdk,gio,gtk}/generated/meson.build \
+ Source/sample/valtest/generated/meson.build
+
+# Mono packages use /usr/lib regardless of arch
+patch -p 1 < $CWD/gtk-sharp3-nolibdir.patch
+
+mkdir build
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ -Dinstall=true \
+ -Dstrip=true
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
+
+# Some packages expect a libcairo-2 library to be here
+# I'm not sure how frequently these folders change, so we will automate it
+APIVER=$(grep ^apiversion Source/meson.build | cut -d\' -f2)
+PUBTOKEN=$(grep assemblyIdentity Source/policy.config.in | cut -d\" -f4)
+ln -s /usr/lib${LIBDIRSUFFIX}/libcairo.so $PKG/usr/lib/mono/gac/cairo-sharp/${APIVER}__${PUBTOKEN}/libcairo-2.dll.so
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
@@ -108,7 +118,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
install -m0644 \
- AUTHORS COPYING HACKING NEWS README \
+ AUTHORS LICENSE README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/libraries/gtk-sharp3/gtk-sharp3.info b/libraries/gtk-sharp3/gtk-sharp3.info
index 4a67799485..83e0d3c220 100644
--- a/libraries/gtk-sharp3/gtk-sharp3.info
+++ b/libraries/gtk-sharp3/gtk-sharp3.info
@@ -1,8 +1,8 @@
PRGNAM="gtk-sharp3"
-VERSION="2.99.3"
+VERSION="3.22.2"
HOMEPAGE="https://www.mono-project.com/docs/gui/gtksharp/"
-DOWNLOAD="https://download.gnome.org/sources/gtk-sharp/2.99/gtk-sharp-2.99.3.tar.xz"
-MD5SUM="2120ff15abe655e4de8aa5aadf0d5d12"
+DOWNLOAD="https://github.com/GLibSharp/GtkSharp/archive/refs/tags/3.22.2/GtkSharp-3.22.2.tar.gz"
+MD5SUM="e328931e820216e3280bc5c9bdb1f426"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="mono"