wok-6.x annotate freetype-infinality/receipt @ rev 24757
pkg-config: cheat configure
author | Hans-G?nter Theisgen |
---|---|
date | Fri Mar 18 06:53:58 2022 +0100 (2022-03-18) |
parents | a78610b2eb47 |
children | edba74bff784 |
rev | line source |
---|---|
al@14225 | 1 # SliTaz package receipt. |
al@14225 | 2 |
al@14225 | 3 PACKAGE="freetype-infinality" |
al@14225 | 4 PROVIDE="freetype" |
al@14225 | 5 VERSION="2.4.11" |
al@14225 | 6 CATEGORY="x-window" |
al@14225 | 7 SHORT_DESC="Freetype font engine with infinality patches" |
al@14225 | 8 MAINTAINER="al.bobylev@gmail.com" |
pascal@15215 | 9 LICENSE="BSD GPL2" |
al@14225 | 10 SOURCE="freetype" |
al@14225 | 11 TARBALL="$SOURCE-$VERSION.tar.bz2" |
pascal@20669 | 12 WEB_SITE="https://www.freetype.org/" |
al@14226 | 13 WGET_URL="http://download.savannah.gnu.org/releases/$SOURCE/$TARBALL" |
al@14225 | 14 |
al@14225 | 15 DEPENDS="slitaz-base-files zlib" |
al@14225 | 16 BUILD_DEPENDS="bzip2-dev" |
al@14225 | 17 |
pascal@24415 | 18 # What is the latest version available today? |
pascal@24415 | 19 current_version() |
pascal@24415 | 20 { |
pascal@24415 | 21 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24415 | 22 sed "/$SOURCE-/!d;/tar/!d;/doc/d;s|.*$SOURCE-||;s|.tar.*||" | sort -Vr | sed q |
pascal@24415 | 23 } |
pascal@24415 | 24 |
al@14225 | 25 # Rules to configure and make the package. |
al@14225 | 26 compile_rules() |
al@14225 | 27 { |
al@14225 | 28 # http://www.infinality.net/blog/infinality-freetype-patches/ |
al@14225 | 29 # http://www.infinality.net/forum/viewtopic.php?f=2&t=77#p794 |
al@14225 | 30 mkdir -p $src/patch |
al@14225 | 31 tar -xjf $stuff/* -C $src/patch |
al@14225 | 32 patch -p1 < $src/patch/freetype-enable-subpixel-hinting-infinality-20120615-01.patch |
al@14225 | 33 patch -p1 < $src/patch/freetype-entire-infinality-patchset-20130104-01.patch |
al@14225 | 34 |
al@14225 | 35 ./configure \ |
al@14225 | 36 --sysconfdir=/etc \ |
al@14225 | 37 --disable-static \ |
al@14225 | 38 $CONFIGURE_ARGS && |
al@14225 | 39 make && |
pascal@14232 | 40 make install 2>&1 | grep -v rmdir |
al@14225 | 41 } |
al@14225 | 42 |
al@14225 | 43 # Rules to gen a SliTaz package suitable for Tazpkg. |
al@14225 | 44 genpkg_rules() |
al@14225 | 45 { |
al@14225 | 46 mkdir -p \ |
al@14225 | 47 $fs/etc/profile.d \ |
al@14225 | 48 $fs/usr/lib/freetype-infinality |
al@14225 | 49 # profile settings |
al@14225 | 50 install -m644 $src/patch/infinality-settings.sh $fs/etc/profile.d |
al@14225 | 51 # binary & libs |
al@14225 | 52 cp -a $install/usr/bin $fs/usr |
al@14225 | 53 cp -a $install/usr/lib/*.so* $fs/usr/lib/freetype-infinality |
al@14225 | 54 } |
al@14225 | 55 |
al@14225 | 56 |
al@14225 | 57 post_install() |
al@14225 | 58 { |
al@14225 | 59 # SliTaz not support /etc/profile.d/ by default, but use /etc/profile file |
pascal@18730 | 60 cat >> "$1/etc/profile" << EOT |
al@14225 | 61 |
al@14225 | 62 # freetype-infinality profile settings |
al@14225 | 63 . /etc/profile.d/infinality-settings.sh |
al@14225 | 64 EOT |
al@14225 | 65 |
al@14225 | 66 # add patched libs to loader config |
pascal@18730 | 67 echo '/usr/lib/freetype-infinality' >> "$1/etc/ld.so.conf" |
pascal@17552 | 68 chroot "$1/" ldconfig |
al@14225 | 69 echo 'Now you can log out/in to take effect on all your apps' |
al@14225 | 70 } |
al@14225 | 71 |
al@14225 | 72 post_remove() |
al@14225 | 73 { |
pascal@18730 | 74 sed -i '/infinality/d' "$1/etc/profile" |
pascal@18730 | 75 sed -i '/freetype-infinality/d' "$1/etc/ld.so.conf" |
pascal@17552 | 76 chroot "$1/" ldconfig |
al@14225 | 77 } |