Diff

Differences From Artifact [c666adbf49]:

To Artifact [f6d4d528ed]:


   138    138   			"${RC:-windres}" -o tkbase.res.o  --define STATIC_BUILD --include "./../generic" --include "${TCLCONFIGDIR}/../generic" --include "${TCLCONFIGDIR}" --include "./rc" "./rc/tk_base.rc"
   139    139   
   140    140   			if [ -f "tkbase.res.o" ]; then
   141    141   				cp "tkbase.res.o" "${INSTDIR}/lib/"
   142    142   			fi
   143    143   		fi
   144    144   
   145         -		# Update pkgIndex to load libtk from the local directory rather
   146         -		# than the parent directory
   147         -		for pkgIndex in "${INSTDIR}"/lib/tk*/pkgIndex.tcl; do
   148         -			sed 's@ \.\. @ @g' "${pkgIndex}" > "${pkgIndex}.new"
   149         -			mv "${pkgIndex}.new" "${pkgIndex}"
   150         -		done
          145  +		if [ "${STATICTK}" = "1" ]; then
          146  +			# If we are building statically, don't create a
          147  +			# pkgIndex.tcl
          148  +			rm -f "${INSTDIR}"/lib/tk*/pkgIndex.tcl
          149  +		else
          150  +			# Update pkgIndex to load libtk from the local directory rather
          151  +			# than the parent directory
          152  +			for pkgIndex in "${INSTDIR}"/lib/tk*/pkgIndex.tcl; do
          153  +				sed 's@ \.\. @ @g' "${pkgIndex}" > "${pkgIndex}.new"
          154  +				mv "${pkgIndex}.new" "${pkgIndex}"
          155  +			done
          156  +		fi
   151    157   
   152    158   		mkdir "${OUTDIR}/lib" || exit 1
   153    159   		cp -r "${INSTDIR}/lib"/tk* "${OUTDIR}/lib/"
   154    160   		cp -r "${INSTDIR}/lib"/libtk* "${OUTDIR}/lib"/tk*/
   155    161   		rm -rf "${OUTDIR}/lib"/tk*/demos
   156    162   
   157    163   		"${STRIP:-strip}" -g "${OUTDIR}"/lib/tk*/*.so >/dev/null 2>/dev/null