Diff

Differences From Artifact [f1041debf1]:

To Artifact [defad12737]:


80
81
82
83
84
85
86








87
88
89
90
91
92
93
function verifyRequiredPackages() {
	local pkg pkgdomain pkgversion
	local pkgdir pkgconfigdir pkgfound

	for pkg in "${require[@]}"; do
		pkgdomain=''
		pkgversion=''









		case "${pkg}" in
			*/*@*)
				pkgdomain="$(echo "${pkg}" | cut -f 2 -d '@')"
				pkgversion="$(echo "${pkg}" | cut -f 2 -d '/' | cut -f 1 -d '@')"
				pkg="$(echo "${pkg}" | cut -f 1 -d '/')"
				;;







>
>
>
>
>
>
>
>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
function verifyRequiredPackages() {
	local pkg pkgdomain pkgversion
	local pkgdir pkgconfigdir pkgfound

	for pkg in "${require[@]}"; do
		pkgdomain=''
		pkgversion=''
		pkgchanges=(CFLAGS LDFLAGS PATH PKG_CONFIG_PATH)

		case "${pkg}" in
			*:*)
				pkgchanges=($(echo "${pkg}" | cut -f 2 -d ':'))
				pkg="$(echo "${pkg}" | cut -f 1 -d ':')"
				;;
		esac

		case "${pkg}" in
			*/*@*)
				pkgdomain="$(echo "${pkg}" | cut -f 2 -d '@')"
				pkgversion="$(echo "${pkg}" | cut -f 2 -d '/' | cut -f 1 -d '@')"
				pkg="$(echo "${pkg}" | cut -f 1 -d '/')"
				;;
109
110
111
112
113
114
115



116
117



118



119
120
121

122
123
124
125
126


127
128
129
130
131
132
133
		for pkgdir in "/opt/appfs/${pkgdomain}/${pkg}/platform"/${pkgversion:-*}; do
			pkgconfigdir="${pkgdir}/lib/pkgconfig"

			if [ -d "${pkgdir}" ]; then
				pkgfound='1'
			fi




			CFLAGS="${CFLAGS} -I${pkgdir}/include"
			CPPFLAGS="${CPPFLAGS} -I${pkgdir}/include"



			LDFLAGS="${LDFLAGS} -L${pkgdir}/lib -Wl,-rpath,${pkgdir}/lib"



			PATH="${PATH}:${pkgdir}/bin"
			export CFLAGS CPPFLAGS LDFLAGS PATH


			if [ -d "${pkgconfigdir}" ]; then
				PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${pkgconfigdir}"
				export PKG_CONFIG_PATH
			fi



		done

		if [ "${pkgfound}" = '0' ]; then
			die "Package ${pkg}/${pkgversion:-*}@${pkgdomain} not found."
		fi
	done
}







>
>
>
|
|
>
>
>
|
>
>
>
|
|
|
>
|
|
|
|
|
>
>







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
		for pkgdir in "/opt/appfs/${pkgdomain}/${pkg}/platform"/${pkgversion:-*}; do
			pkgconfigdir="${pkgdir}/lib/pkgconfig"

			if [ -d "${pkgdir}" ]; then
				pkgfound='1'
			fi

			for pkgchange in "${pkgchanges[@]}"; do
				case "${pkgchange}" in
					CFLAGS)
						CFLAGS="${CFLAGS} -I${pkgdir}/include"
						CPPFLAGS="${CPPFLAGS} -I${pkgdir}/include"
						export CFLAGS CPPFLAGS
						;;
					LDFLAGS)
						LDFLAGS="${LDFLAGS} -L${pkgdir}/lib -Wl,-rpath,${pkgdir}/lib"
						export LDFLAGS
						;;
					PATH)
						PATH="${PATH}:${pkgdir}/bin"
						export PATH
						;;
					PKG_CONFIG_PATH)
						if [ -d "${pkgconfigdir}" ]; then
							PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${pkgconfigdir}"
							export PKG_CONFIG_PATH
						fi
						;;
				esac
			done
		done

		if [ "${pkgfound}" = '0' ]; then
			die "Package ${pkg}/${pkgversion:-*}@${pkgdomain} not found."
		fi
	done
}
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
}

function postconfigure() {
	:
}

function configure() {
	glibcvers=2.20
	glibcdir="/opt/appfs/core.appfs.rkeene.org/glibc/platform/${glibcvers}"
	dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)"

	if [ ! -d "${glibcdir}" ]; then
		die 'glibc directory is not available (appfs running/working?)'
	fi

	CFLAGS="${CFLAGS} -I${glibcdir}/include"
	CPPFLAGS="${CPPFLAGS} -I${glibcdir}/include"
	LDFLAGS="${LDFLAGS} -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}"
	PKG_CONFIG_LIBDIR="${glibcdir}/lib/pkgconfig"
	export CFLAGS CPPFLAGS LDFLAGS PKG_CONFIG_LIBDIR

	./configure --prefix="${prefix}" --sysconfdir=/etc --localstatedir=/var "${configure_extra[@]}"
}

function prebuild() {
	:
}

function postbuild() {







<
|


|



|
<


|

|







182
183
184
185
186
187
188

189
190
191
192
193
194
195
196

197
198
199
200
201
202
203
204
205
206
207
208
}

function postconfigure() {
	:
}

function configure() {

	glibcdir="/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest"
	dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)"

	if [ ! -f "${dynlinker}" ]; then
		die 'glibc directory is not available (appfs running/working?)'
	fi

	CC="${CC:-gcc} -nostdinc -I${glibcdir}/include"

	LDFLAGS="${LDFLAGS} -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}"
	PKG_CONFIG_LIBDIR="${glibcdir}/lib/pkgconfig"
	export LDFLAGS PKG_CONFIG_LIBDIR

	./configure --prefix="${prefix}" --sysconfdir="${prefix}/etc" --libdir="${prefix}/lib" --localstatedir=/var "${configure_extra[@]}"
}

function prebuild() {
	:
}

function postbuild() {