-Now using a single file for all custom definitions and functions for each package.
[hvlinux.git] / stage1 / pkg / gettext
diff --git a/stage1/pkg/gettext b/stage1/pkg/gettext
new file mode 100644 (file)
index 0000000..670907b
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# When cross-compiling the Gettext configure script assumes we don't have a
+# working wcwidth when we do. The following will fix possible compilation
+# errors because of this assumption:
+config_cache()
+{
+cat > ${LFS_TMP}/${PACKAGE}-build/config.cache << EOF
+gl_cv_func_wcwidth_works=yes
+EOF
+}
+
+hvconfigure()
+{
+    cd ${LFS_TMP}/${PACKAGE}/gettext-tools
+
+    FINAL_CFG_OPTS="\
+      --prefix=/tools \
+      --build=${CLFS_HOST} \
+      --host=${CLFS_TARGET} \
+      ${CONFIGURE_OPTS}"
+
+    echo "Running configure with options:"
+    echo "  <${FINAL_CFG_OPTS}>"
+
+    CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \
+        ./configure ${FINAL_CFG_OPTS}
+}
+
+hvbuild()
+{
+    cd ${LFS_TMP}/${PACKAGE}/gettext-tools
+
+    ${HVMAKE} -C gnulib-lib
+    ${HVMAKE} -C src msgfmt
+    cp -v src/msgfmt /tools/bin
+}