Diff

Differences From Artifact [b4a36c92da]:

To Artifact [bb348ac8e4]:


   240    240   			# If we are building statically, don't create a
   241    241   			# pkgIndex.tcl
   242    242   			rm -f "${INSTDIR}"/lib/tk*/pkgIndex.tcl
   243    243   		else
   244    244   			# Update pkgIndex to load libtk from the local directory rather
   245    245   			# than the parent directory
   246    246   			for pkgIndex in "${INSTDIR}"/lib/tk*/pkgIndex.tcl; do
   247         -				sed 's@ \.\. @ @g' "${pkgIndex}" > "${pkgIndex}.new"
          247  +				sed 's@ \.\. bin @ @g;s@ \.\. @ @;s@ lib\(tk.*\.dll\)@ \1@' "${pkgIndex}" > "${pkgIndex}.new"
   248    248   				mv "${pkgIndex}.new" "${pkgIndex}"
   249    249   			done
   250    250   		fi
   251    251   
   252    252   		mkdir "${OUTDIR}/lib" || exit 1
   253    253   		cp -r "${INSTDIR}/lib"/tk* "${OUTDIR}/lib/"
          254  +		cp -r "${INSTDIR}/bin"/tk*.dll "${OUTDIR}/lib/"/tk*/
   254    255   		cp -r "${INSTDIR}/lib"/libtk* "${OUTDIR}/lib"/tk*/
   255    256   		rm -rf "${OUTDIR}/lib"/tk*/demos
   256    257   
   257         -		"${STRIP:-strip}" -g "${OUTDIR}"/lib/tk*/*.so >/dev/null 2>/dev/null
          258  +		"${STRIP:-strip}" -g "${OUTDIR}"/lib/tk*/*.{so,dll,dylib,shlib} >/dev/null 2>/dev/null
   258    259   		find "${OUTDIR}" -type f -name '*.a' | xargs rm -f >/dev/null 2>/dev/null
          260  +
          261  +		# If we have a shared object, delete static libraries
          262  +		if find "${INSTDIR}" -type f '(' -name '*.dll' -o -name '*.so' -o -name '*.dylib' -o -name '*.shlib' ')' 2>/dev/null | grep '^' >/dev/null; then
          263  +			find "${INSTDIR}" -type f -name '*.a' | grep -v 'stub' | xargs rm -f
          264  +		fi
   259    265   
   260    266   		break
   261    267   	done
   262    268   
   263    269   	exit 0
   264    270   ) || exit 1
   265    271   
   266    272   exit 0