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    211   }
   212    212   
   213    213   function preinstall() {
   214    214   	:
   215    215   }
   216    216   
   217    217   function install() {
          218  +	local installlibdir
   218    219   	local installpkgdir
   219    220   	local pkglibfile
   220    221   
   221    222   	mkdir -p "${installdir}/lib" || return 1
   222    223   	${MAKE:-make} tcllibdir="${installdir}/lib" "${make_extra[@]}" install || return 1
   223    224   
   224    225   	# Create pkgIndex if needed
................................................................................
   226    227   		tclpkg="${pkg}"
   227    228   	fi
   228    229   
   229    230   	if [ -z "${tclpkgversion}" ]; then
   230    231   		tclpkgversion="${version}"
   231    232   	fi
   232    233   
   233         -	installpkgdir="$(echo "${installdir}/lib"/*)"
          234  +	installlibdir="${installdir}/lib"
   234    235   
   235         -	if [ -d "${installpkgdir}" ]; then
   236         -		if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then
   237         -			case "${pkg_configure_shared_build}" in
   238         -				0)
   239         -					cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
          236  +	if [ "${pkg_configure_shared_build}" = '0' ]; then
          237  +		find "${installlibdir}" -name '*.a' | sed 's@/[^/]*\.a$@@' | head -n 1 | while IFS='' read -r installpkgdir; do
          238  +			if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then
          239  +				cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
   240    240   package ifneeded ${tclpkg} ${tclpkgversion} [list load {} ${tclpkg}]
   241    241   _EOF_
   242         -					;;
   243         -				1)
   244         -					pkglibfile="$(find "${installpkgdir}" -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.shlib' | head -n 1 | sed 's@^.*/@@')"
   245         -					cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
          242  +			fi
          243  +		done
          244  +	elif [ "${pkg_configure_shared_build}" = '1' ]; then
          245  +		find "${installlibdir}" -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.shlib' | sed 's@/[^/]*$@@' | head -n 1 | while IFS='' read -r installpkgdir; do
          246  +			if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then
          247  +				cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
   246    248   package ifneeded ${tclpkg} ${tclpkgversion} [list load [file join \$dir ${pkglibfile}]]
   247    249   _EOF_
   248         -					;;
   249         -			esac
   250         -		fi
          250  +			fi
          251  +		done
   251    252   	fi
   252    253   }
   253    254   
   254    255   function postinstall() {
   255    256   	:
   256    257   }
   257    258   
   258    259   function createruntime() {
   259    260   	local file
   260    261   
   261    262   	# Install files needed by installation
   262    263   	cp -r "${installdir}/lib" "${runtimedir}" || return 1
   263    264   
   264         -	find "${runtimedir}" -name '*.a' -type f | while IFS='' read -r file; do
          265  +	find "${runtimedir}" '(' -name '*.a' -o -name '*.a.linkadd' ')' -type f | while IFS='' read -r file; do
   265    266   		rm -f "${file}"
   266    267   	done
   267    268   
   268    269   	# Ensure that some files were installed
   269    270   	if ! find "${runtimedir}" -type f 2>/dev/null | grep '^' >/dev/null; then
   270    271   		return 1
   271    272   	fi

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

            1  +#! /usr/bin/env bash
            2  +
            3  +# BuildCompatible: KitCreator
            4  +
            5  +pkg='dbif'
            6  +version="1.0"
            7  +url="http://sourceforge.net/projects/dbus-tcl/files/dbif/${version}/dbif-${version}.tar.gz"
            8  +sha256='50d1eed6284d1db168011d16d36ed4724109a0cff73bee16c436aa604893db24'
            9  +
           10  +function preconfigure() {
           11  +	make_extra=(moduledir="${installdir}/lib/tcl8/8.5")
           12  +}

Modified dbus/build-kitcreator-dbus.sh from [374386d172] to [6de0efa651].

     1      1   #! /usr/bin/env bash
     2      2   
     3         -if [ ! -f 'build.sh' ]; then
     4         -	echo 'ERROR: This script must be run from the directory it is in' >&2
            3  +# BuildCompatible: KitCreator
     5      4   
     6         -	exit 1
     7         -fi
     8         -if [ -z "${TCLVERS}" ]; then
     9         -	echo 'ERROR: The TCLVERS environment variable is not set' >&2
            5  +pkg='dbus'
            6  +version="2.0"
            7  +url="http://sourceforge.net/projects/dbus-tcl/files/dbus/${version}/dbus-${version}.tar.gz"
            8  +sha256='428b4045d395b0d26255730ce7c0d14850e45abb3c7cc6d9d48c1d2b723bb16a'
    10      9   
    11         -	exit 1
    12         -fi
           10  +function postinstall() {
           11  +	local archive
    13     12   
    14         -# Preparation
    15         -
    16         -rm -rf 'build' 'out' 'inst'
    17         -mkdir 'build' 'out' 'inst' || exit 1
    18         -
    19         -# The dbus package
    20         -
    21         -DBUSVERS="2.0"
    22         -SRC="src/dbus-${DBUSVERS}.tar.gz"
    23         -SRCURL="http://sourceforge.net/projects/dbus-tcl/files/dbus/${DBUSVERS}/dbus-${DBUSVERS}.tar.gz/download"
    24         -SRCHASH='-'
    25         -BUILDDIR="$(pwd)/build/dbus-${DBUSVERS}"
    26         -OUTDIR="$(pwd)/out"
    27         -INSTDIR="$(pwd)/inst"
    28         -export DBUSVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
    29         -
    30         -# Set configure options for this sub-project
    31         -LDFLAGS="${LDFLAGS} ${KC_DBUS_LDFLAGS}"
    32         -CFLAGS="${CFLAGS} ${KC_DBUS_CFLAGS}"
    33         -CPPFLAGS="${CPPFLAGS} ${KC_DBUS_CPPFLAGS}"
    34         -LIBS="${LIBS} ${KC_DBUS_LIBS}"
    35         -export LDFLAGS CFLAGS CPPFLAGS LIBS
    36         -
    37         -if [ ! -f "${SRC}" ]; then
    38         -	mkdir 'src' >/dev/null 2>/dev/null
    39         -
    40         -	if [ ! -d 'buildsrc' ]; then
    41         -		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
           13  +	archive="$(find "${installdir}" -name '*.a' | head -n 1)"
           14  +	if [ -n "${archive}" ]; then
           15  +		echo '-ldbus-1' > "${archive}.linkadd"
    42     16   	fi
    43         -fi
    44         -
    45         -(
    46         -	cd 'build' || exit 1
    47         -
    48         -	if [ ! -d '../buildsrc' ]; then
    49         -		gzip -dc "../${SRC}" | tar -xf -
    50         -	else    
    51         -		cp -rp ../buildsrc/* './'
    52         -	fi
    53         -
    54         -	cd "${BUILDDIR}" || exit 1
    55         -	echo "Running: ./configure --prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
    56         -	./configure --prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
    57         -
    58         -	echo "Running: ${MAKE:-make}"
    59         -	${MAKE:-make} || exit 1
    60         -
    61         -	echo "Running: ${MAKE:-make} install"
    62         -	${MAKE:-make} install
    63         -
    64         -	mkdir "${OUTDIR}/lib" || exit 1
    65         -	cp -r "${INSTDIR}/lib"/dbus* "${OUTDIR}/lib/"
    66         -
    67         -        "${STRIP:-strip}" -g "${OUTDIR}"/lib/dbus-*/*.so >/dev/null 2>/dev/null
    68         -	exit 0
    69         -) || exit 1
    70         -
    71         -# The dbif module
    72         -
    73         -DBIFVERS="1.0"
    74         -SRC="src/dbif-${DBIFVERS}.tar.gz"
    75         -SRCURL="http://sourceforge.net/projects/dbus-tcl/files/dbif/${DBIFVERS}/dbif-${DBIFVERS}.tar.gz/download"
    76         -BUILDDIR="$(pwd)/build/dbif-${DBIFVERS}"
    77         -OUTDIR="$(pwd)/out"
    78         -INSTDIR="$(pwd)/inst"
    79         -export DBIFVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
    80         -
    81         -# Set configure options for this sub-project
    82         -LDFLAGS="${KC_DBIF_LDFLAGS}"
    83         -CFLAGS="${KC_DBIF_CFLAGS}"
    84         -CPPFLAGS="${KC_DBIF_CPPFLAGS}"
    85         -LIBS="${KC_DBIF_LIBS}"
    86         -export LDFLAGS CFLAGS CPPFLAGS LIBS
    87         -
    88         -if [ ! -f "${SRC}" ]; then
    89         -	mkdir 'src' >/dev/null 2>/dev/null
    90         -
    91         -	if [ ! -d 'buildsrc' ]; then
    92         -		rm -f "${SRC}.tmp"
    93         -		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    94         -		mv "${SRC}.tmp" "${SRC}"
    95         -	fi
    96         -fi
    97         -
    98         -(
    99         -	cd 'build' || exit 1
   100         -
   101         -	if [ ! -d '../buildsrc' ]; then
   102         -		gzip -dc "../${SRC}" | tar -xf -
   103         -	else    
   104         -		cp -rp ../buildsrc/* './'
   105         -	fi
   106         -
   107         -	cd "${BUILDDIR}" || exit 1
   108         -	echo "Running: ./configure --prefix=\"${INSTDIR}\" moduledir=\"${INSTDIR}/lib/tcl8/8.5\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
   109         -	./configure --prefix="${INSTDIR}" moduledir="${INSTDIR}/lib/tcl8/8.5" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
   110         -
   111         -	echo "Running: ${MAKE:-make}"
   112         -	${MAKE:-make} || exit 1
   113         -
   114         -	echo "Running: ${MAKE:-make} install"
   115         -	${MAKE:-make} install
   116         -
   117         -	mkdir -p "${OUTDIR}/lib/tcl8/8.5" || exit 1
   118         -	cp -r "${INSTDIR}/lib/tcl8/8.5/"dbif*.tm "${OUTDIR}/lib/tcl8/8.5/"
   119         -	exit 0
   120         -) || exit 1
   121         -
   122         -exit 0
           17  +}

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

   222    222   			cd "${pkg}" >/dev/null 2>/dev/null || exit 1
   223    223   
   224    224   			build_script='./build.sh'
   225    225   			if [ -x 'kitcreator-build.sh' ]; then
   226    226   				build_script='./kitcreator-build.sh'
   227    227   			fi
   228    228   
   229         -			if useCommonBuildSystem "${build_script}"; then
   230         -				(
   231         -					. ../common/common.sh
   232         -					. "${build_script}"
   233         -
   234         -					set -x
   235         -
   236         -					init || die 'init failed'
   237         -
   238         -					predownload || die 'predownload failed'
   239         -					download || die 'download failed'
   240         -					postdownload || die 'postdownload failed'
          229  +			if [ -f "${build_script}" ]; then
          230  +				build_scripts=("${build_script}")
          231  +			else
          232  +				build_scripts=($(echo build-kitcreator-*.sh))
          233  +			fi
          234  +
          235  +			call_pkg_init='1'
          236  +			for build_script in "${build_scripts[@]}"; do
          237  +				if useCommonBuildSystem "${build_script}"; then
          238  +					(
          239  +						. ../common/common.sh
          240  +						. "${build_script}"
          241  +
          242  +						set -x
          243  +
          244  +						if [ "${call_pkg_init}" = '1' ]; then
          245  +							init || die 'init failed'
          246  +						fi
          247  +
          248  +						predownload || die 'predownload failed'
          249  +						download || die 'download failed'
          250  +						postdownload || die 'postdownload failed'
          251  +
          252  +						extract || die 'extract failed'
          253  +
          254  +						apply_patches || die 'apply patches failed'
          255  +
          256  +						cd "${workdir}" || exit 1
          257  +
          258  +						preconfigure || die 'preconfigure failed'
          259  +						configure || die 'configure failed'
          260  +						postconfigure || die 'postconfigure failed'
          261  +
          262  +						prebuild || die 'prebuild failed'
          263  +						build || die 'build failed'
          264  +						postbuild || die 'postbuild failed'
          265  +
          266  +						preinstall || die 'preinstall failed'
          267  +						install || die 'install failed'
          268  +						postinstall || die 'postinstall failed'
          269  +
          270  +						createruntime || die 'createruntime failed'
          271  +
          272  +						set +x
   241    273   
   242         -					extract || die 'extract failed'
   243         -
   244         -					apply_patches || die 'apply patches failed'
   245         -
   246         -					cd "${workdir}" || exit 1
   247         -
   248         -					preconfigure || die 'preconfigure failed'
   249         -					configure || die 'configure failed'
   250         -					postconfigure || die 'postconfigure failed'
          274  +						rm -rf "${workdir}"
          275  +					) 3>&1 4>&2 >> build.log 2>&1 || exit 1
          276  +				else
          277  +					"${build_script}" 3>&1 4>&2 >> build.log 2>&1 || exit 1
          278  +				fi
   251    279   
   252         -					prebuild || die 'prebuild failed'
   253         -					build || die 'build failed'
   254         -					postbuild || die 'postbuild failed'
   255         -
   256         -					preinstall || die 'preinstall failed'
   257         -					install || die 'install failed'
   258         -					postinstall || die 'postinstall failed'
   259         -
   260         -					createruntime || die 'createruntime failed'
   261         -
   262         -					set +x
   263         -
   264         -					rm -rf "${workdir}"
   265         -				) 3>&1 4>&2 > build.log 2>&1 || exit 1
   266         -			else
   267         -				"${build_script}" 3>&1 4>&2 >> build.log 2>&1 || exit 1
   268         -			fi
          280  +				call_pkg_init='0'
          281  +			done
   269    282   		) || failed="1"
   270    283   	fi
   271    284   
   272    285   	if [ "${failed}" = "1" ]; then
   273    286   		echo " failed."
   274    287   		failedpkgs="${failedpkgs} ${pkg}"
   275    288   	else