Fini la mise à jour pour répertoire pkg. Stage4 compile OK et driver xorg nouveau OK
[hvlinux.git] / stage4 / pkg / tk
diff --git a/stage4/pkg/tk b/stage4/pkg/tk
new file mode 100644 (file)
index 0000000..e91c15c
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+hvconfig()
+{
+    cd ${LFS_TMP}/${PACKAGE}/unix
+    ./configure \
+        --prefix=/usr \
+        --enable-threads \
+        --mandir=/usr/share/man
+}
+
+hvbuild()
+{
+    make
+
+    # Removes references to the build directory and replaces them with saner
+    # system-wide locations:
+    sed -i \
+        -e "s@^\(TK_SRC_DIR='\).*@\1/usr/include'@" \
+        -e "/TK_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \
+        -e "/SEARCH/s/=.*/=''/" \
+        tkConfig.sh
+    make install
+}
+
+hvbuild_post()
+{
+    make install-private-headers
+
+    # Special case for TK
+    PKG_VER_BASE=$(echo ${PACKAGE} | sed "s!^tk\([0-9]*\.[0-9]*\).*!\1!g")
+
+    ln -v -sf wish${PKG_VER_BASE} /usr/bin/wish
+}