source: freewrt/scripts/scan-pkgs.sh@ 483c323

Last change on this file since 483c323 was a6b9377, checked in by Thorsten Glaser <tg@…>, 18 years ago

glib2 needs gettext host tools to build, even with libnointl
Closes: #354

git-svn-id: svn://www.freewrt.org/trunk/freewrt@2978 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 3.8 KB
Line 
1# $FreeWRT: src/share/misc/licence.template,v 1.20 2006/12/11 21:04:56 tg Rel $
2#-
3# Copyright (c) 2006, 2007
4# Thorsten Glaser <tg@mirbsd.de>
5#
6# Provided that these terms and disclaimer and all copyright notices
7# are retained or reproduced in an accompanying document, permission
8# is granted to deal in this work without restriction, including un-
9# limited rights to use, publicly perform, distribute, sell, modify,
10# merge, give away, or sublicence.
11#
12# Advertising materials mentioning features or use of this work must
13# display the following acknowledgement:
14# This product includes material provided by Thorsten Glaser.
15# This acknowledgement does not need to be reprinted if this work is
16# linked into a bigger work whose licence does not allow such clause
17# and the author of this work is given due credit in the bigger work
18# or its accompanying documents, where such information is generally
19# kept, provided that said credits are retained.
20#
21# This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
22# the utmost extent permitted by applicable law, neither express nor
23# implied; without malicious intent or gross negligence. In no event
24# may a licensor, author or contributor be held liable for indirect,
25# direct, other damage, loss, or other issues arising in any way out
26# of dealing in the work, even if advised of the possibility of such
27# damage or existence of a defect, except proven that it results out
28# of said person's immediate fault when using the work as intended.
29#-
30# Scan host-tool prerequisites of certain packages before building.
31
32if test -z "$BASH_VERSION"; then
33 foo=`$BASH -c 'echo "$BASH_VERSION"'`
34else
35 foo=$BASH_VERSION
36fi
37
38if test -z "$foo"; then
39 echo FreeWRT requires GNU bash to be installed, sorry.
40 exit 1
41fi
42
43test -z "$BASH_VERSION$KSH_VERSION" && exec $BASH $0 "$@"
44
45[[ -n $BASH_VERSION ]] && shopt -s extglob
46topdir=$(readlink -nf $(dirname $0)/..)
47export PATH=$topdir/lbin:$PATH
48OStype=$(env NOFAKE=yes uname)
49out=0
50
51. $topdir/.config
52
53#-- start adding dependencies here --
54
55if [[ -n $FWRT_COMPILE_SABLEVM_CLASSPATH ]]; then
56 NEED_JIKES="$NEED_JIKES sablevm-classpath"
57fi
58
59if [[ -n $FWRT_COMPILE_SABLEVM_CLASSPATH ]]; then
60 NEED_FASTJAR="$NEED_FASTJAR sablevm-classpath"
61fi
62
63if [[ -n $FWRT_COMPILE_AVAHI ]]; then
64 NEED_PKGCONFIG="$NEED_PKGCONFIG avahi"
65fi
66
67if [[ -n $FWRT_PACKAGE_RUBY ]]; then
68 NEED_RUBY="$NEED_RUBY ruby"
69fi
70
71if [[ -n $FWRT_PACKAGE_GLIB2 ]]; then
72 NEED_GLIBZWO="$NEED_GLIBZWO glib2"
73 NEED_GETTEXT="$NEED_GETTEXT glib2"
74 NEED_PKGCONFIG="$NEED_PKGCONFIG glib2"
75fi
76
77#-- start checking dependencies here --
78
79if [[ -n $NEED_JIKES ]]; then
80 if ! which jikes >/dev/null 2>&1; then
81 echo >&2 You need jikes to build $NEED_JIKES
82 out=1
83 fi
84fi
85
86if [[ -n $NEED_GETTEXT ]]; then
87 if ! which xgettext >/dev/null 2>&1; then
88 echo >&2 You need gettext to build $NEED_GETTEXT
89 out=1
90 elif ! which msgfmt >/dev/null 2>&1; then
91 echo >&2 You need gettext to build $NEED_GETTEXT
92 out=1
93 fi
94fi
95
96if [[ -n $NEED_FASTJAR ]]; then
97 if ! which fastjar >/dev/null 2>&1; then
98 echo >&2 You need fastjar to build $NEED_FASTJAR
99 out=1
100 fi
101fi
102
103if [[ -n $NEED_RUBY ]]; then
104 if ! which ruby >/dev/null 2>&1; then
105 echo >&2 You need ruby to build $NEED_RUBY
106 out=1
107 fi
108fi
109
110if [[ -n $NEED_PKGCONFIG ]]; then
111 if ! which pkg-config >/dev/null 2>&1; then
112 echo >&2 You need pkg-config to build $NEED_PKGCONFIG
113 out=1
114 fi
115fi
116
117if [[ -n $NEED_GLIBZWO ]]; then
118 if ! which glib-genmarshal; then
119 echo >&2 You need libglib2.0-dev to build $NEED_GLIBZWO
120 out=1
121 fi
122fi
123
124if [[ -n $FWRT_USE_CCACHE ]]; then
125 if ! which ccache >/dev/null 2>&1; then
126 echo >&2 You have selected to build with ccache, but ccache could not be found.
127 out=1
128 fi
129fi
130
131if [[ -n $FWRT_COMPILE_MYSQL && $OStype != Linux ]]; then
132 echo >&2 mySQL does not build on non-GNU/Linux.
133 out=1
134fi
135
136#-- end of dependency checks
137
138exit $out
Note: See TracBrowser for help on using the repository browser.