From 9878a154789dd5b2774508ea553bbf51253f6206 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 28 May 2003 00:02:55 +0000 Subject: [PATCH] * Xft support in gtk+ (for anti-aliased fonts :-) ). The problem of transitive imports needs to be adressed, though, as evidenced by, e.g., the descriptor for pan. That is, if C depends on library B, and B depends on library A, then C also depends on library A. However, this breaks modularity: C should not have to declare a dependency on A explicitly. The solution is to have B re-export A, e.g., by creating symlinks from B to the files in A. svn path=/nixpkgs/trunk/; revision=68 --- build/Xft-build.sh | 12 ++++++++++++ build/fontconfig-build.sh | 12 ++++++++++++ build/freetype-build.sh | 12 ++++++++++++ build/gtk+-build.sh | 8 ++++---- build/gtkspell-build.sh | 2 +- build/pan-build-2.sh | 4 ++-- build/pango-build.sh | 8 ++++---- descriptors/Xft-20021121.fix | 11 +++++++++++ descriptors/fontconfig-20021121.fix | 10 ++++++++++ descriptors/freetype-2.1.4.fix | 8 ++++++++ descriptors/gtk+-2.2.1.fix | 5 ++++- descriptors/gtkspell-2.0.2.fix | 3 +++ descriptors/pan-0.14.0.fix | 4 ++++ descriptors/pango-1.2.1.fix | 5 ++++- descriptors/system.fix | 6 +++++- 15 files changed, 96 insertions(+), 14 deletions(-) create mode 100755 build/Xft-build.sh create mode 100755 build/fontconfig-build.sh create mode 100755 build/freetype-build.sh create mode 100644 descriptors/Xft-20021121.fix create mode 100644 descriptors/fontconfig-20021121.fix create mode 100644 descriptors/freetype-2.1.4.fix diff --git a/build/Xft-build.sh b/build/Xft-build.sh new file mode 100755 index 00000000000..b273b352a9a --- /dev/null +++ b/build/Xft-build.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +export PATH=$freetype/bin:$fontconfig/bin:/bin:/usr/bin + +top=`pwd` +tar xvfz $src || exit 1 +cd fcpackage*/Xft || exit 1 +./configure --prefix=$top --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib || exit 1 +make || exit 1 +make install || exit 1 +cd $top || exit 1 +rm -rf fcpackage* || exit 1 diff --git a/build/fontconfig-build.sh b/build/fontconfig-build.sh new file mode 100755 index 00000000000..28b05fb1423 --- /dev/null +++ b/build/fontconfig-build.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +export PATH=$freetype/bin:/bin:/usr/bin + +top=`pwd` +tar xvfz $src || exit 1 +cd fcpackage*/fontconfig || exit 1 +./configure --prefix=$top --with-confdir=$top/etc/fonts --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib || exit 1 +make || exit 1 +make install || exit 1 +cd $top || exit 1 +rm -rf fcpackage* || exit 1 diff --git a/build/freetype-build.sh b/build/freetype-build.sh new file mode 100755 index 00000000000..7df6083c4dc --- /dev/null +++ b/build/freetype-build.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +export PATH=/bin:/usr/bin + +top=`pwd` +tar xvfj $src || exit 1 +cd freetype-* || exit 1 +./configure --prefix=$top || exit 1 +make || exit 1 +make install || exit 1 +cd $top || exit 1 +rm -rf freetype-* || exit 1 diff --git a/build/gtk+-build.sh b/build/gtk+-build.sh index 3b663fec5f0..9a668e284ca 100755 --- a/build/gtk+-build.sh +++ b/build/gtk+-build.sh @@ -1,13 +1,13 @@ #! /bin/sh -export PATH=$pkgconfig/bin:/bin:/usr/bin -export PKG_CONFIG_PATH=$glib/lib/pkgconfig:$atk/lib/pkgconfig:$pango/lib/pkgconfig -export LD_LIBRARY_PATH=$glib/lib:$atk/lib:$pango/lib +export PATH=$pkgconfig/bin:$freetype/bin:/bin:/usr/bin +export PKG_CONFIG_PATH=$glib/lib/pkgconfig:$atk/lib/pkgconfig:$pango/lib/pkgconfig:$fontconfig/lib/pkgconfig:$Xft/lib/pkgconfig +export LD_LIBRARY_PATH=$glib/lib:$atk/lib:$pango/lib:$fontconfig/lib:$Xft/lib top=`pwd` tar xvfj $src || exit 1 cd gtk+-* || exit 1 -./configure --prefix=$top || exit 1 +./configure --prefix=$top --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib || exit 1 make || exit 1 make install || exit 1 cd $top || exit 1 diff --git a/build/gtkspell-build.sh b/build/gtkspell-build.sh index d4267b30282..094db3c5bcd 100755 --- a/build/gtkspell-build.sh +++ b/build/gtkspell-build.sh @@ -2,7 +2,7 @@ export PATH=$pkgconfig/bin:/bin:/usr/bin export PKG_CONFIG_PATH=$glib/lib/pkgconfig:$atk/lib/pkgconfig:$pango/lib/pkgconfig:$gtk/lib/pkgconfig -export LD_LIBRARY_PATH=$glib/lib:$atk/lib:$pango/lib:$gtk/lib:$pspell/lib +export LD_LIBRARY_PATH=$glib/lib:$atk/lib:$pango/lib:$gtk/lib:$pspell/lib:$fontconfig/lib:$Xft/lib:$freetype/lib: export C_INCLUDE_PATH=$pspell/include top=`pwd` diff --git a/build/pan-build-2.sh b/build/pan-build-2.sh index 8320cb0102f..fd74c9f9523 100755 --- a/build/pan-build-2.sh +++ b/build/pan-build-2.sh @@ -1,8 +1,8 @@ #! /bin/sh export PATH=$pkgconfig/bin:$gnet/bin:/bin:/usr/bin -export PKG_CONFIG_PATH=$glib/lib/pkgconfig:$atk/lib/pkgconfig:$pango/lib/pkgconfig:$gtk/lib/pkgconfig:$gtkspell/lib/pkgconfig -export LD_LIBRARY_PATH=$glib/lib:$atk/lib:$pango/lib:$gtk/lib:$gnet/lib:$pspell/lib:$gtkspell/lib +export PKG_CONFIG_PATH=$glib/lib/pkgconfig:$atk/lib/pkgconfig:$pango/lib/pkgconfig:$gtk/lib/pkgconfig:$gtkspell/lib/pkgconfig:$libxml/lib/pkgconfig +export LD_LIBRARY_PATH=$glib/lib:$atk/lib:$pango/lib:$gtk/lib:$gnet/lib:$pspell/lib:$gtkspell/lib:$fontconfig/lib:$Xft/lib:$freetype/lib # A bug in gtkspell: the pspell library path is not exported # through pkgconfig. diff --git a/build/pango-build.sh b/build/pango-build.sh index 42a2758025c..4baf053d1c4 100755 --- a/build/pango-build.sh +++ b/build/pango-build.sh @@ -1,13 +1,13 @@ #! /bin/sh -export PATH=$pkgconfig/bin:/bin:/usr/bin -export PKG_CONFIG_PATH=$glib/lib/pkgconfig -export LD_LIBRARY_PATH=$glib/lib +export PATH=$pkgconfig/bin:$freetype/bin:/bin:/usr/bin +export PKG_CONFIG_PATH=$glib/lib/pkgconfig:$fontconfig/lib/pkgconfig:$Xft/lib/pkgconfig +export LD_LIBRARY_PATH=$glib/lib:$fontconfig/lib:$Xft/lib top=`pwd` || exit 1 tar xvfj $src || exit 1 cd pango-* || exit 1 -./configure --prefix=$top || exit 1 +./configure --prefix=$top --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib || exit 1 make || exit 1 make install || exit 1 cd $top || exit 1 diff --git a/descriptors/Xft-20021121.fix b/descriptors/Xft-20021121.fix new file mode 100644 index 00000000000..017cb6bec4c --- /dev/null +++ b/descriptors/Xft-20021121.fix @@ -0,0 +1,11 @@ +Descr( + [ Bind("pkgId", "Xft-20021121") + , Bind("releaseId", "1") + + , Bind("freetype", Fix("./freetype-2.1.4.fix")) + , Bind("fontconfig", Fix("./fontconfig-20021121.fix")) + + , Bind("src", Url("2f2852c80924a9b5356c3037a471c1a1", "http://fontconfig.org/release/fcpackage.2_1.tar.gz")) + , Bind("build", Local("../build/Xft-build.sh")) + ] +) diff --git a/descriptors/fontconfig-20021121.fix b/descriptors/fontconfig-20021121.fix new file mode 100644 index 00000000000..c718ba7fff0 --- /dev/null +++ b/descriptors/fontconfig-20021121.fix @@ -0,0 +1,10 @@ +Descr( + [ Bind("pkgId", "fontconfig-20021121") + , Bind("releaseId", "1") + + , Bind("freetype", Fix("./freetype-2.1.4.fix")) + + , Bind("src", Url("2f2852c80924a9b5356c3037a471c1a1", "http://fontconfig.org/release/fcpackage.2_1.tar.gz")) + , Bind("build", Local("../build/fontconfig-build.sh")) + ] +) diff --git a/descriptors/freetype-2.1.4.fix b/descriptors/freetype-2.1.4.fix new file mode 100644 index 00000000000..7fc6048003b --- /dev/null +++ b/descriptors/freetype-2.1.4.fix @@ -0,0 +1,8 @@ +Descr( + [ Bind("pkgId", "freetype-2.1.4") + , Bind("releaseId", "1") + + , Bind("src", Url("1fc0b188f1fe1216776e5855d2da141f", "http://easynews.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.4.tar.bz2")) + , Bind("build", Local("../build/freetype-build.sh")) + ] +) diff --git a/descriptors/gtk+-2.2.1.fix b/descriptors/gtk+-2.2.1.fix index 9563df0a928..b66b6cff66c 100644 --- a/descriptors/gtk+-2.2.1.fix +++ b/descriptors/gtk+-2.2.1.fix @@ -1,10 +1,13 @@ Descr( [ Bind("pkgId", "gtk+-2.2.1") - , Bind("releaseId", "1") + , Bind("releaseId", "2") , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) , Bind("glib", Fix("./glib-2.2.1.fix")) , Bind("atk", Fix("./atk-1.2.0.fix")) + , Bind("freetype", Fix("./freetype-2.1.4.fix")) + , Bind("fontconfig", Fix("./fontconfig-20021121.fix")) + , Bind("Xft", Fix("./Xft-20021121.fix")) , Bind("pango", Fix("./pango-1.2.1.fix")) , Bind("src", Url("dfd5755fddb26a46c96bfaa813280ac4", "ftp://ftp.gtk.org/pub/gtk/v2.2/gtk+-2.2.1.tar.bz2")) diff --git a/descriptors/gtkspell-2.0.2.fix b/descriptors/gtkspell-2.0.2.fix index ef7e185c92e..dc080f41ceb 100644 --- a/descriptors/gtkspell-2.0.2.fix +++ b/descriptors/gtkspell-2.0.2.fix @@ -5,6 +5,9 @@ Descr( , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) , Bind("glib", Fix("./glib-2.2.1.fix")) , Bind("atk", Fix("./atk-1.2.0.fix")) + , Bind("freetype", Fix("./freetype-2.1.4.fix")) + , Bind("fontconfig", Fix("./fontconfig-20021121.fix")) + , Bind("Xft", Fix("./Xft-20021121.fix")) , Bind("pango", Fix("./pango-1.2.1.fix")) , Bind("gtk", Fix("./gtk+-2.2.1.fix")) , Bind("pspell", Fix("./pspell-.12.2.fix")) diff --git a/descriptors/pan-0.14.0.fix b/descriptors/pan-0.14.0.fix index 1fbee11795a..dcdb6186248 100644 --- a/descriptors/pan-0.14.0.fix +++ b/descriptors/pan-0.14.0.fix @@ -3,8 +3,12 @@ Descr( , Bind("releaseId", "1") , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) + , Bind("libxml", Fix("./libxml2-2.5.7.fix")) , Bind("glib", Fix("./glib-2.2.1.fix")) , Bind("atk", Fix("./atk-1.2.0.fix")) + , Bind("freetype", Fix("./freetype-2.1.4.fix")) + , Bind("fontconfig", Fix("./fontconfig-20021121.fix")) + , Bind("Xft", Fix("./Xft-20021121.fix")) , Bind("pango", Fix("./pango-1.2.1.fix")) , Bind("gtk", Fix("./gtk+-2.2.1.fix")) , Bind("gnet", Fix("./gnet-1.1.8.fix")) diff --git a/descriptors/pango-1.2.1.fix b/descriptors/pango-1.2.1.fix index 886616d0d0e..6bd4ad973a3 100644 --- a/descriptors/pango-1.2.1.fix +++ b/descriptors/pango-1.2.1.fix @@ -1,9 +1,12 @@ Descr( [ Bind("pkgId", "pango-1.2.1") - , Bind("releaseId", "1") + , Bind("releaseId", "2") , Bind("pkgconfig", Fix("./pkgconfig-0.15.0.fix")) , Bind("glib", Fix("./glib-2.2.1.fix")) + , Bind("freetype", Fix("./freetype-2.1.4.fix")) + , Bind("fontconfig", Fix("./fontconfig-20021121.fix")) + , Bind("Xft", Fix("./Xft-20021121.fix")) , Bind("src", Url("6b354ef14e75739a92b5b78f4ca3165a", "ftp://ftp.gtk.org/pub/gtk/v2.2/pango-1.2.1.tar.bz2")) , Bind("build", Local("../build/pango-build.sh")) diff --git a/descriptors/system.fix b/descriptors/system.fix index ba5713cc332..22d12ea3dd0 100644 --- a/descriptors/system.fix +++ b/descriptors/system.fix @@ -1,11 +1,15 @@ Descr( [ Bind("pkgId", Str("system")) - , Bind("releaseId", Str("4")) + , Bind("releaseId", Str("5")) , Bind("actATerm", Fix("./aterm-2.0.fix")) , Bind("actPkgConfig", Fix("./pkgconfig-0.15.0.fix")) + , Bind("actLibxml", Fix("./libxml2-2.5.7.fix")) , Bind("actGlib", Fix("./glib-2.2.1.fix")) , Bind("actAtk", Fix("./atk-1.2.0.fix")) + , Bind("actFreetype", Fix("./freetype-2.1.4.fix")) + , Bind("actFontconfig", Fix("./fontconfig-20021121.fix")) + , Bind("actXft", Fix("./Xft-20021121.fix")) , Bind("actPango", Fix("./pango-1.2.1.fix")) , Bind("actGtk", Fix("./gtk+-2.2.1.fix")) , Bind("actGnet", Fix("./gnet-1.1.8.fix"))