Check-in [dec2be8d9f]
Overview
Comment:Added dbus/dbif to simplified build system, which required supporting building multiple packages in a package directory
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: dec2be8d9f8bb343cd682685ad8701cc2cbcf440
User & Date: rkeene on 2016-09-06 04:32:06
Other Links: manifest | tags
Context
2016-09-06
04:39
Moved tcc4tcl to simplified build system check-in: 531fec5815 user: rkeene tags: trunk
04:32
Added dbus/dbif to simplified build system, which required supporting building multiple packages in a package directory check-in: dec2be8d9f user: rkeene tags: trunk
03:55
Migrated TclX to the new build system check-in: db64a530a0 user: rkeene tags: trunk
Changes

Modified common/common.sh from [910bb9be64] to [7543705ff9].

211
212
213
214
215
216
217

218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235

236
237
238
239
240
241
242


243
244

245
246
247
248
249
250

251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
}

function preinstall() {
	:
}

function install() {

	local installpkgdir
	local pkglibfile

	mkdir -p "${installdir}/lib" || return 1
	${MAKE:-make} tcllibdir="${installdir}/lib" "${make_extra[@]}" install || return 1

	# Create pkgIndex if needed
	if [ -z "${tclpkg}" ]; then
		tclpkg="${pkg}"
	fi

	if [ -z "${tclpkgversion}" ]; then
		tclpkgversion="${version}"
	fi

	installpkgdir="$(echo "${installdir}/lib"/*)"

	if [ -d "${installpkgdir}" ]; then

		if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then
			case "${pkg_configure_shared_build}" in
				0)
					cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
package ifneeded ${tclpkg} ${tclpkgversion} [list load {} ${tclpkg}]
_EOF_
					;;


				1)
					pkglibfile="$(find "${installpkgdir}" -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.shlib' | head -n 1 | sed 's@^.*/@@')"

					cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
package ifneeded ${tclpkg} ${tclpkgversion} [list load [file join \$dir ${pkglibfile}]]
_EOF_
					;;
			esac
		fi

	fi
}

function postinstall() {
	:
}

function createruntime() {
	local file

	# Install files needed by installation
	cp -r "${installdir}/lib" "${runtimedir}" || return 1

	find "${runtimedir}" -name '*.a' -type f | while IFS='' read -r file; do
		rm -f "${file}"
	done

	# Ensure that some files were installed
	if ! find "${runtimedir}" -type f 2>/dev/null | grep '^' >/dev/null; then
		return 1
	fi







>















|

|
>
|
<
<
|


<
>
>
|
|
>
|


<
<
|
>













|







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238


239
240
241

242
243
244
245
246
247
248
249


250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
}

function preinstall() {
	:
}

function install() {
	local installlibdir
	local installpkgdir
	local pkglibfile

	mkdir -p "${installdir}/lib" || return 1
	${MAKE:-make} tcllibdir="${installdir}/lib" "${make_extra[@]}" install || return 1

	# Create pkgIndex if needed
	if [ -z "${tclpkg}" ]; then
		tclpkg="${pkg}"
	fi

	if [ -z "${tclpkgversion}" ]; then
		tclpkgversion="${version}"
	fi

	installlibdir="${installdir}/lib"

	if [ "${pkg_configure_shared_build}" = '0' ]; then
		find "${installlibdir}" -name '*.a' | sed 's@/[^/]*\.a$@@' | head -n 1 | while IFS='' read -r installpkgdir; do
			if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then


				cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
package ifneeded ${tclpkg} ${tclpkgversion} [list load {} ${tclpkg}]
_EOF_

			fi
		done
	elif [ "${pkg_configure_shared_build}" = '1' ]; then
		find "${installlibdir}" -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.shlib' | sed 's@/[^/]*$@@' | head -n 1 | while IFS='' read -r installpkgdir; do
			if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then
				cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
package ifneeded ${tclpkg} ${tclpkgversion} [list load [file join \$dir ${pkglibfile}]]
_EOF_


			fi
		done
	fi
}

function postinstall() {
	:
}

function createruntime() {
	local file

	# Install files needed by installation
	cp -r "${installdir}/lib" "${runtimedir}" || return 1

	find "${runtimedir}" '(' -name '*.a' -o -name '*.a.linkadd' ')' -type f | while IFS='' read -r file; do
		rm -f "${file}"
	done

	# Ensure that some files were installed
	if ! find "${runtimedir}" -type f 2>/dev/null | grep '^' >/dev/null; then
		return 1
	fi

Added dbus/build-kitcreator-dbif.sh version [b69ad79264].

























>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
#! /usr/bin/env bash

# BuildCompatible: KitCreator

pkg='dbif'
version="1.0"
url="http://sourceforge.net/projects/dbus-tcl/files/dbif/${version}/dbif-${version}.tar.gz"
sha256='50d1eed6284d1db168011d16d36ed4724109a0cff73bee16c436aa604893db24'

function preconfigure() {
	make_extra=(moduledir="${installdir}/lib/tcl8/8.5")
}

Renamed and modified dbus/build.sh [374386d172] to dbus/build-kitcreator-dbus.sh [6de0efa651].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#! /usr/bin/env bash

if [ ! -f 'build.sh' ]; then
	echo 'ERROR: This script must be run from the directory it is in' >&2

	exit 1
fi
if [ -z "${TCLVERS}" ]; then
	echo 'ERROR: The TCLVERS environment variable is not set' >&2

	exit 1
fi

# Preparation

rm -rf 'build' 'out' 'inst'
mkdir 'build' 'out' 'inst' || exit 1

# The dbus package

DBUSVERS="2.0"
SRC="src/dbus-${DBUSVERS}.tar.gz"
SRCURL="http://sourceforge.net/projects/dbus-tcl/files/dbus/${DBUSVERS}/dbus-${DBUSVERS}.tar.gz/download"
SRCHASH='-'
BUILDDIR="$(pwd)/build/dbus-${DBUSVERS}"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
export DBUSVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR

# Set configure options for this sub-project
LDFLAGS="${LDFLAGS} ${KC_DBUS_LDFLAGS}"
CFLAGS="${CFLAGS} ${KC_DBUS_CFLAGS}"
CPPFLAGS="${CPPFLAGS} ${KC_DBUS_CPPFLAGS}"
LIBS="${LIBS} ${KC_DBUS_LIBS}"
export LDFLAGS CFLAGS CPPFLAGS LIBS

if [ ! -f "${SRC}" ]; then
	mkdir 'src' >/dev/null 2>/dev/null

	if [ ! -d 'buildsrc' ]; then
		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
	fi
fi

(
	cd 'build' || exit 1

	if [ ! -d '../buildsrc' ]; then
		gzip -dc "../${SRC}" | tar -xf -
	else    
		cp -rp ../buildsrc/* './'
	fi

	cd "${BUILDDIR}" || exit 1
	echo "Running: ./configure --prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
	./configure --prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}

	echo "Running: ${MAKE:-make}"
	${MAKE:-make} || exit 1

	echo "Running: ${MAKE:-make} install"
	${MAKE:-make} install

	mkdir "${OUTDIR}/lib" || exit 1
	cp -r "${INSTDIR}/lib"/dbus* "${OUTDIR}/lib/"

        "${STRIP:-strip}" -g "${OUTDIR}"/lib/dbus-*/*.so >/dev/null 2>/dev/null
	exit 0
) || exit 1

# The dbif module

DBIFVERS="1.0"
SRC="src/dbif-${DBIFVERS}.tar.gz"
SRCURL="http://sourceforge.net/projects/dbus-tcl/files/dbif/${DBIFVERS}/dbif-${DBIFVERS}.tar.gz/download"
BUILDDIR="$(pwd)/build/dbif-${DBIFVERS}"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
export DBIFVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR

# Set configure options for this sub-project
LDFLAGS="${KC_DBIF_LDFLAGS}"
CFLAGS="${KC_DBIF_CFLAGS}"
CPPFLAGS="${KC_DBIF_CPPFLAGS}"
LIBS="${KC_DBIF_LIBS}"
export LDFLAGS CFLAGS CPPFLAGS LIBS

if [ ! -f "${SRC}" ]; then
	mkdir 'src' >/dev/null 2>/dev/null

	if [ ! -d 'buildsrc' ]; then
		rm -f "${SRC}.tmp"
		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
		mv "${SRC}.tmp" "${SRC}"
	fi
fi

(
	cd 'build' || exit 1

	if [ ! -d '../buildsrc' ]; then
		gzip -dc "../${SRC}" | tar -xf -
	else    
		cp -rp ../buildsrc/* './'
	fi

	cd "${BUILDDIR}" || exit 1
	echo "Running: ./configure --prefix=\"${INSTDIR}\" moduledir=\"${INSTDIR}/lib/tcl8/8.5\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
	./configure --prefix="${INSTDIR}" moduledir="${INSTDIR}/lib/tcl8/8.5" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}

	echo "Running: ${MAKE:-make}"
	${MAKE:-make} || exit 1

	echo "Running: ${MAKE:-make} install"
	${MAKE:-make} install

	mkdir -p "${OUTDIR}/lib/tcl8/8.5" || exit 1
	cp -r "${INSTDIR}/lib/tcl8/8.5/"dbif*.tm "${OUTDIR}/lib/tcl8/8.5/"
	exit 0
) || exit 1

exit 0


<
<
|
<
<
<
<

<
<
|
<
<
<
<
<
<
<
|
<
|
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
|
<
<
<
|
<

<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
|
<
|
<
<
<
<

<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2


3




4


5







6

7





8

































9


10



11

12







13







14

15




16

17

























#! /usr/bin/env bash



# BuildCompatible: KitCreator







pkg='dbus'







version="2.0"

url="http://sourceforge.net/projects/dbus-tcl/files/dbus/${version}/dbus-${version}.tar.gz"





sha256='428b4045d395b0d26255730ce7c0d14850e45abb3c7cc6d9d48c1d2b723bb16a'




































function postinstall() {



	local archive









	archive="$(find "${installdir}" -name '*.a' | head -n 1)"







	if [ -n "${archive}" ]; then

		echo '-ldbus-1' > "${archive}.linkadd"




	fi

}

























Modified kitcreator from [ee8824e5b2] to [6465223bf6].

222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
















































269
270
271
272
273
274
275
			cd "${pkg}" >/dev/null 2>/dev/null || exit 1

			build_script='./build.sh'
			if [ -x 'kitcreator-build.sh' ]; then
				build_script='./kitcreator-build.sh'
			fi

			if useCommonBuildSystem "${build_script}"; then
				(
					. ../common/common.sh
					. "${build_script}"

					set -x

					init || die 'init failed'

					predownload || die 'predownload failed'
					download || die 'download failed'
					postdownload || die 'postdownload failed'

					extract || die 'extract failed'

					apply_patches || die 'apply patches failed'

					cd "${workdir}" || exit 1

					preconfigure || die 'preconfigure failed'
					configure || die 'configure failed'
					postconfigure || die 'postconfigure failed'

					prebuild || die 'prebuild failed'
					build || die 'build failed'
					postbuild || die 'postbuild failed'

					preinstall || die 'preinstall failed'
					install || die 'install failed'
					postinstall || die 'postinstall failed'

					createruntime || die 'createruntime failed'

					set +x

					rm -rf "${workdir}"
				) 3>&1 4>&2 > build.log 2>&1 || exit 1
			else
				"${build_script}" 3>&1 4>&2 >> build.log 2>&1 || exit 1
			fi
















































		) || failed="1"
	fi

	if [ "${failed}" = "1" ]; then
		echo " failed."
		failedpkgs="${failedpkgs} ${pkg}"
	else







|
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







222
223
224
225
226
227
228
229


230

































231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
			cd "${pkg}" >/dev/null 2>/dev/null || exit 1

			build_script='./build.sh'
			if [ -x 'kitcreator-build.sh' ]; then
				build_script='./kitcreator-build.sh'
			fi

			if [ -f "${build_script}" ]; then


				build_scripts=("${build_script}")

































			else
				build_scripts=($(echo build-kitcreator-*.sh))
			fi

			call_pkg_init='1'
			for build_script in "${build_scripts[@]}"; do
				if useCommonBuildSystem "${build_script}"; then
					(
						. ../common/common.sh
						. "${build_script}"

						set -x

						if [ "${call_pkg_init}" = '1' ]; then
							init || die 'init failed'
						fi

						predownload || die 'predownload failed'
						download || die 'download failed'
						postdownload || die 'postdownload failed'

						extract || die 'extract failed'

						apply_patches || die 'apply patches failed'

						cd "${workdir}" || exit 1

						preconfigure || die 'preconfigure failed'
						configure || die 'configure failed'
						postconfigure || die 'postconfigure failed'

						prebuild || die 'prebuild failed'
						build || die 'build failed'
						postbuild || die 'postbuild failed'

						preinstall || die 'preinstall failed'
						install || die 'install failed'
						postinstall || die 'postinstall failed'

						createruntime || die 'createruntime failed'

						set +x

						rm -rf "${workdir}"
					) 3>&1 4>&2 >> build.log 2>&1 || exit 1
				else
					"${build_script}" 3>&1 4>&2 >> build.log 2>&1 || exit 1
				fi

				call_pkg_init='0'
			done
		) || failed="1"
	fi

	if [ "${failed}" = "1" ]; then
		echo " failed."
		failedpkgs="${failedpkgs} ${pkg}"
	else