Blame SOURCES/remove-intree-libraries.sh

60df80
#!/bin/sh
60df80
60df80
ZIP_SRC=openjdk/jdk/src/share/native/java/util/zip/zlib
60df80
JPEG_SRC=openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpeg-6b
60df80
GIF_SRC=openjdk/jdk/src/share/native/sun/awt/giflib
60df80
PNG_SRC=openjdk/jdk/src/share/native/sun/awt/libpng
60df80
LCMS_SRC=openjdk/jdk/src/share/native/sun/java2d/cmm/lcms
60df80
PCSC_SRC=openjdk/jdk/src/solaris/native/sun/security/smartcardio/MUSCLE
60df80
60df80
echo "Removing built-in libs (they will be linked)"
60df80
60df80
echo "Removing zlib"
60df80
if [ ! -d ${ZIP_SRC} ]; then
60df80
	echo "${ZIP_SRC} does not exist. Refusing to proceed."
60df80
	exit 1
60df80
fi	
60df80
rm -rvf ${ZIP_SRC}
60df80
60df80
echo "Removing libjpeg"
60df80
if [ ! -f ${JPEG_SRC}/jdhuff.c ]; then # some file that sound definitely exist
60df80
	echo "${JPEG_SRC} does not contain jpeg sources. Refusing to proceed."
60df80
	exit 1
60df80
fi	
60df80
60df80
rm -rvf ${JPEG_SRC}
60df80
60df80
echo "Removing giflib"
60df80
if [ ! -d ${GIF_SRC} ]; then
60df80
	echo "${GIF_SRC} does not exist. Refusing to proceed."
60df80
	exit 1
60df80
fi	
60df80
rm -rvf ${GIF_SRC}
60df80
60df80
echo "Removing libpng"
60df80
if [ ! -d ${PNG_SRC} ]; then
60df80
	echo "${PNG_SRC} does not exist. Refusing to proceed."
60df80
	exit 1
60df80
fi	
60df80
rm -rvf ${PNG_SRC}
60df80
60df80
# LCMS 2 is disabled until security issues are resolved
60df80
if [ ! true ]; then
60df80
echo "Removing lcms"
60df80
if [ ! -d ${LCMS_SRC} ]; then
60df80
	echo "${LCMS_SRC} does not exist. Refusing to proceed."
60df80
	exit 1
60df80
fi	
60df80
rm -vf ${LCMS_SRC}/cmscam02.c
60df80
rm -vf ${LCMS_SRC}/cmscgats.c
60df80
rm -vf ${LCMS_SRC}/cmscnvrt.c
60df80
rm -vf ${LCMS_SRC}/cmserr.c
60df80
rm -vf ${LCMS_SRC}/cmsgamma.c
60df80
rm -vf ${LCMS_SRC}/cmsgmt.c
60df80
rm -vf ${LCMS_SRC}/cmsintrp.c
60df80
rm -vf ${LCMS_SRC}/cmsio0.c
60df80
rm -vf ${LCMS_SRC}/cmsio1.c
60df80
rm -vf ${LCMS_SRC}/cmslut.c
60df80
rm -vf ${LCMS_SRC}/cmsmd5.c
60df80
rm -vf ${LCMS_SRC}/cmsmtrx.c
60df80
rm -vf ${LCMS_SRC}/cmsnamed.c
60df80
rm -vf ${LCMS_SRC}/cmsopt.c
60df80
rm -vf ${LCMS_SRC}/cmspack.c
60df80
rm -vf ${LCMS_SRC}/cmspcs.c
60df80
rm -vf ${LCMS_SRC}/cmsplugin.c
60df80
rm -vf ${LCMS_SRC}/cmsps2.c
60df80
rm -vf ${LCMS_SRC}/cmssamp.c
60df80
rm -vf ${LCMS_SRC}/cmssm.c
60df80
rm -vf ${LCMS_SRC}/cmstypes.c
60df80
rm -vf ${LCMS_SRC}/cmsvirt.c
60df80
rm -vf ${LCMS_SRC}/cmswtpnt.c
60df80
rm -vf ${LCMS_SRC}/cmsxform.c
60df80
rm -vf ${LCMS_SRC}/lcms2.h
60df80
rm -vf ${LCMS_SRC}/lcms2_internal.h
60df80
rm -vf ${LCMS_SRC}/lcms2_plugin.h
60df80
fi
60df80
60df80
echo "Removing libpcsc headers"
60df80
if [ ! -d ${PCSC_SRC} ]; then
60df80
	echo "${PCSC_SRC} does not exist. Refusing to proceed."
60df80
	exit 1
60df80
fi	
60df80
rm -rvf ${PCSC_SRC}