wok-next annotate gmtk/receipt @ rev 21017

Some maintenance
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Oct 16 16:46:05 2018 +0300 (2018-10-16)
parents d2950281f122
children d5aab818505e
rev   line source
al@20822 1 # SliTaz package receipt v2.
al@20822 2
al@20822 3 PACKAGE="gmtk"
al@20822 4 VERSION="1.0.9"
al@20822 5 CATEGORY="libs"
al@20822 6 SHORT_DESC="GNOME MPlayer Toolkit"
al@20822 7 MAINTAINER="al.bobylev@gmail.com"
al@20822 8 LICENSE="GPL2"
al@20822 9 WEB_SITE="https://sites.google.com/site/kdekorte2/gmtk"
al@20822 10
al@20822 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@20822 12 WGET_URL="https://github.com/kdekorte/gmtk/archive/v$VERSION.tar.gz"
al@20822 13
al@21017 14 BUILD_DEPENDS="gettext intltool xorg-libX11-dev gtk3-dev gtk2-dev glib-dev \
al@20956 15 gconf-dev alsa-lib-dev pulseaudio-dev"
al@20829 16 SPLIT="gmlib gmtk gmtk3 gmtk-dev"
al@20822 17
al@20822 18 compile_rules() {
al@20829 19 # The goal of this tricky receipt is to provide different GTK2 and GTK3
al@20829 20 # libraries that can be installed at the same time not overwriting each
al@20829 21 # other.
al@20829 22 # Note, it is not enough to rename just *.so library file and symlinks,
al@20829 23 # take care about SONAME field inside the library.
al@20829 24
al@20829 25 # GTK+2 #
al@20829 26
al@20829 27 ./configure \
al@20829 28 --disable-static \
al@20829 29 --disable-gtk3 \
al@20829 30 $CONFIGURE_ARGS &&
al@20822 31 fix libtool &&
al@20822 32 make &&
al@20829 33 make install || return 1
al@20829 34
al@20829 35 # stash gmtk.pc
al@20829 36 mv $install/usr/lib/pkgconfig/gmtk.pc $install/usr/lib/pkgconfig/gmtk.pc.save
al@20829 37
al@20829 38 # GTK+3 #
al@20829 39
al@20829 40 # libgmtk.so* -> libgmtk3.so*
al@20829 41 sed -i "/^libname_spec='/s|name'$|{name}3'|" configure
al@20829 42 make clean
al@20829 43 ./configure \
al@20829 44 --disable-static \
al@20829 45 --enable-gtk3 \
al@20829 46 $CONFIGURE_ARGS &&
al@20829 47 fix libtool &&
al@20829 48 make &&
al@20829 49 make install || return 1
al@20829 50
al@20829 51 rm $install/usr/lib/libgmlib3.so* # the same as libgmlib.so*
al@20829 52
al@20829 53 # make gmtk3.pc
al@20829 54 mv $install/usr/lib/pkgconfig/gmtk.pc $install/usr/lib/pkgconfig/gmtk3.pc
al@20829 55 sed -i 's|lgmtk|lgmtk3|' $install/usr/lib/pkgconfig/gmtk3.pc
al@20829 56 # revert gmtk.pc
al@20829 57 mv $install/usr/lib/pkgconfig/gmtk.pc.save $install/usr/lib/pkgconfig/gmtk.pc
al@20829 58
al@20829 59 # CHECK #
al@20829 60
al@20829 61 for i in libgmtk libgmtk3; do
al@20829 62 echo $i:
al@20829 63 readelf -a $install/usr/lib/$i.so.$VERSION | fgrep '(SONAME)'
al@20829 64 done
al@20822 65 }
al@20822 66
al@20822 67 genpkg_rules() {
al@20822 68 case $PACKAGE in
al@20829 69 gmlib)
al@20829 70 copy libgmlib.so*
al@20829 71 DEPENDS="alsa-lib glib pulseaudio pulseaudio-glib"
al@20829 72 CAT="libs|common library"
al@20829 73 ;;
al@20822 74 gmtk)
al@20829 75 copy libgmtk.so*
al@21017 76 DEPENDS="alsa-lib cairo glib gmlib gtk2 pulseaudio pulseaudio-glib"
al@20829 77 CAT="libs|GTK2 libs"
al@20822 78 ;;
al@20829 79 gmtk3)
al@20829 80 copy libgmtk3.so*
al@21017 81 DEPENDS="alsa-lib cairo glib gmlib gtk3 pulseaudio pulseaudio-glib"
al@20829 82 CAT="libs|GTK3 libs"
al@20829 83 ;;
al@20829 84 gmtk-dev)
al@20822 85 copy @dev
al@20822 86 ;;
al@20822 87 esac
al@20822 88 }