summaryrefslogtreecommitdiff
path: root/Docs/env.sh
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-12-21 00:11:02 +0000
committerVincent Sanders <vince@kyllikki.org>2014-12-21 00:11:02 +0000
commit0e7a8aba9ce54dd9371a32ada888f6ff8472e746 (patch)
treeac39693daefd536093176c7a0a21a9639c7bfcde /Docs/env.sh
parentd8c3efc3e8eebeb40c10291e92d1bc09eebafc14 (diff)
downloadnetsurf-0e7a8aba9ce54dd9371a32ada888f6ff8472e746.tar.gz
netsurf-0e7a8aba9ce54dd9371a32ada888f6ff8472e746.tar.bz2
Improve env script packe install for freebsd
Diffstat (limited to 'Docs/env.sh')
-rw-r--r--Docs/env.sh33
1 files changed, 22 insertions, 11 deletions
diff --git a/Docs/env.sh b/Docs/env.sh
index 2b8e578f2..c537560b2 100644
--- a/Docs/env.sh
+++ b/Docs/env.sh
@@ -168,6 +168,22 @@ ns-pkgman-install()
pkgman install $(echo ${NS_DEV_HPKG})
}
+# MAC OS X
+NS_DEV_MACPORT="git expat openssl curl libjpeg-turbo libpng"
+
+ns-macport-install()
+{
+ PATH=/opt/local/bin:/opt/local/sbin:$PATH sudo /opt/local/bin/port install $(echo ${NS_DEV_MACPORT})
+}
+
+NS_DEV_FREEBSDPKG="gmake curl"
+
+# FreeBSD package install
+ns-freebsdpkg-install()
+{
+ pkg install $(echo ${NS_DEV_FREEBSDPKG})
+}
+
# generic for help text
NS_DEV_GEN="git, gcc, pkgconfig, expat library, openssl library, spidermonkey-1.8.5 library, libcurl, perl, perl MD5 digest, libjpeg library, libpng library"
NS_TOOL_GEN="flex tool, bison tool"
@@ -177,13 +193,6 @@ else
NS_GTK_GEN="gtk+ 2 toolkit library, librsvg2 library"
fi
-NS_DEV_MACPORT="git expat openssl curl libjpeg-turbo libpng"
-
-ns-macport-install()
-{
- PATH=/opt/local/bin:/opt/local/sbin:$PATH sudo /opt/local/bin/port install $(echo ${NS_DEV_MACPORT})
-}
-
# Genertic OS package install
# looks for package managers and tries to use them if present
ns-package-install()
@@ -196,6 +205,8 @@ ns-package-install()
ns-pkgman-install
elif [ -x "/opt/local/bin/port" ]; then
ns-macport-install
+ elif [ -x "/usr/sbin/pkg" ]; then
+ ns-freebsdpkg-install
else
echo "Unable to determine OS packaging system in use."
echo "Please ensure development packages are installed for:"
@@ -210,7 +221,7 @@ ns-pull()
{
for REPO in ${NS_INTERNAL_LIBS} ${NS_FRONTEND_LIBS} ${NS_TOOLS} ${NS_BROWSER} ; do
echo -n " GIT: Pulling ${REPO}: "
- if [ -f ${TARGET_WORKSPACE}/${REPO}/.git/config ]; then
+ if [ -f "${TARGET_WORKSPACE}/${REPO}/.git/config" ]; then
(cd ${TARGET_WORKSPACE}/${REPO} && git pull $*; )
else
echo "Repository not present"
@@ -232,7 +243,7 @@ ns-clone()
done
# put current env.sh in place in workspace
- if [ ! -f "${TARGET_WORKSPACE}/env.sh" -a -f ${TARGET_WORKSPACE}/${NS_BROWSER}/Docs/env.sh ];then
+ if [ ! -f "${TARGET_WORKSPACE}/env.sh" -a -f ${TARGET_WORKSPACE}/${NS_BROWSER}/Docs/env.sh ]; then
cp ${TARGET_WORKSPACE}/${NS_BROWSER}/Docs/env.sh ${TARGET_WORKSPACE}/env.sh
fi
}
@@ -243,7 +254,7 @@ ns-make-libs()
for REPO in $(echo ${NS_TOOLS}); do
echo " MAKE: make -C ${REPO} $USE_CPUS $*"
${MAKE} -C ${TARGET_WORKSPACE}/${REPO} $USE_CPUS $*
- if [ $? -ne 0]; then
+ if [ $? -ne 0 ]; then
exit $?
fi
done
@@ -251,7 +262,7 @@ ns-make-libs()
for REPO in $(echo ${NS_INTERNAL_LIBS} ${NS_FRONTEND_LIBS}); do
echo " MAKE: make -C ${REPO} $USE_CPUS $*"
${MAKE} -C ${TARGET_WORKSPACE}/${REPO} HOST=${HOST} $USE_CPUS $*
- if [ $? -ne 0]; then
+ if [ $? -ne 0 ]; then
exit $?
fi
done