### this file is sourced not run
PKGVER=0.8.1
PKGBUILD=1
PKGARCH=x86_64

# source: BLFS 11.3
TARBALL=libnotify-$PKGVER.tar.xz
MD5SUM=1495f279b255b4493ac3588559823158
SRC_URL=http://ftp.gnome.org/pub/gnome/sources/libnotify/0.8/$TARBALL
BUNDLE=

SLACKREQ='gtk3'
SLACKDESC="libnotify-gtk3: libnotify $PKGVER (Desktop notification library)  
libnotify-gtk3:  
libnotify-gtk3: The libnotify library is used to send desktop notifications to a 
libnotify-gtk3: notification daemon, as defined in the Desktop Notifications spec. 
libnotify-gtk3: These notifications can be used to inform the user about an event 
libnotify-gtk3: or display some form of information without getting in the user'\''s 
libnotify-gtk3: way.  
libnotify-gtk3: 
libnotify-gtk3: 
libnotify-gtk3: 
libnotify-gtk3:
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	MESONFLAGS="$MESONFLAGS -Dgtk_doc=false -Dman=false"
	pkg_build_meson && 
	pkg_build_slackdesc &&

	# try to workaround libnotify gtk2 incompatibilities:
	# 1. Rename the binary
	mv -v /usr/bin/notify-send{,-gtk3} &&
	
	# 2. The so version is already different, so that's good
	# 3. Keep the pkgconfig and include name, we instead fix the old one libnotify.
	#    Because changing this breaks build, and I would rather we break old apps than the new one.
	#    Note: we put old libnotify libs and includes in /usr/local, we only need to adjust
	#    PKG_CONFIG_PATH in recipes that uses them.
	
	# multilib
	mv -v /usr/share/gir-1.0/* /usr/share/gir-1.0-64 &&
	rm -r /usr/share/gir-1.0/
}
