Blame SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh

53c576
#!/bin/sh
53c576
53c576
ZIP_SRC=openjdk/jdk/src/share/native/java/util/zip/zlib
53c576
JPEG_SRC=openjdk/jdk/src/share/native/sun/awt/image/jpeg
53c576
GIF_SRC=openjdk/jdk/src/share/native/sun/awt/giflib
53c576
PNG_SRC=openjdk/jdk/src/share/native/sun/awt/libpng
53c576
LCMS_SRC=openjdk/jdk/src/share/native/sun/java2d/cmm/lcms
53c576
53c576
echo "Removing built-in libs (they will be linked)"
53c576
53c576
echo "Removing zlib"
53c576
if [ ! -d ${ZIP_SRC} ]; then
53c576
	echo "${ZIP_SRC} does not exist. Refusing to proceed."
53c576
	exit 1
53c576
fi	
53c576
rm -rvf ${ZIP_SRC}
53c576
53c576
echo "Removing libjpeg"
53c576
if [ ! -f ${JPEG_SRC}/jdhuff.c ]; then # some file that sound definitely exist
53c576
	echo "${JPEG_SRC} does not contain jpeg sources. Refusing to proceed."
53c576
	exit 1
53c576
fi	
53c576
53c576
rm -vf ${JPEG_SRC}/jcomapi.c
53c576
rm -vf ${JPEG_SRC}/jdapimin.c
53c576
rm -vf ${JPEG_SRC}/jdapistd.c
53c576
rm -vf ${JPEG_SRC}/jdcoefct.c
53c576
rm -vf ${JPEG_SRC}/jdcolor.c
53c576
rm -vf ${JPEG_SRC}/jdct.h
53c576
rm -vf ${JPEG_SRC}/jddctmgr.c
53c576
rm -vf ${JPEG_SRC}/jdhuff.c
53c576
rm -vf ${JPEG_SRC}/jdhuff.h
53c576
rm -vf ${JPEG_SRC}/jdinput.c
53c576
rm -vf ${JPEG_SRC}/jdmainct.c
53c576
rm -vf ${JPEG_SRC}/jdmarker.c
53c576
rm -vf ${JPEG_SRC}/jdmaster.c
53c576
rm -vf ${JPEG_SRC}/jdmerge.c
53c576
rm -vf ${JPEG_SRC}/jdphuff.c
53c576
rm -vf ${JPEG_SRC}/jdpostct.c
53c576
rm -vf ${JPEG_SRC}/jdsample.c
53c576
rm -vf ${JPEG_SRC}/jerror.c
53c576
rm -vf ${JPEG_SRC}/jerror.h
53c576
rm -vf ${JPEG_SRC}/jidctflt.c
53c576
rm -vf ${JPEG_SRC}/jidctfst.c
53c576
rm -vf ${JPEG_SRC}/jidctint.c
53c576
rm -vf ${JPEG_SRC}/jidctred.c
53c576
rm -vf ${JPEG_SRC}/jinclude.h
53c576
rm -vf ${JPEG_SRC}/jmemmgr.c
53c576
rm -vf ${JPEG_SRC}/jmemsys.h
53c576
rm -vf ${JPEG_SRC}/jmemnobs.c
53c576
rm -vf ${JPEG_SRC}/jmorecfg.h
53c576
rm -vf ${JPEG_SRC}/jpegint.h
53c576
rm -vf ${JPEG_SRC}/jpeglib.h
53c576
rm -vf ${JPEG_SRC}/jquant1.c
53c576
rm -vf ${JPEG_SRC}/jquant2.c
53c576
rm -vf ${JPEG_SRC}/jutils.c
53c576
rm -vf ${JPEG_SRC}/jcapimin.c
53c576
rm -vf ${JPEG_SRC}/jcapistd.c
53c576
rm -vf ${JPEG_SRC}/jccoefct.c
53c576
rm -vf ${JPEG_SRC}/jccolor.c
53c576
rm -vf ${JPEG_SRC}/jcdctmgr.c
53c576
rm -vf ${JPEG_SRC}/jchuff.c
53c576
rm -vf ${JPEG_SRC}/jchuff.h
53c576
rm -vf ${JPEG_SRC}/jcinit.c
53c576
rm -vf ${JPEG_SRC}/jconfig.h
53c576
rm -vf ${JPEG_SRC}/jcmainct.c
53c576
rm -vf ${JPEG_SRC}/jcmarker.c
53c576
rm -vf ${JPEG_SRC}/jcmaster.c
53c576
rm -vf ${JPEG_SRC}/jcparam.c
53c576
rm -vf ${JPEG_SRC}/jcphuff.c
53c576
rm -vf ${JPEG_SRC}/jcprepct.c
53c576
rm -vf ${JPEG_SRC}/jcsample.c
53c576
rm -vf ${JPEG_SRC}/jctrans.c
53c576
rm -vf ${JPEG_SRC}/jdtrans.c
53c576
rm -vf ${JPEG_SRC}/jfdctflt.c
53c576
rm -vf ${JPEG_SRC}/jfdctfst.c
53c576
rm -vf ${JPEG_SRC}/jfdctint.c
53c576
rm -vf ${JPEG_SRC}/jversion.h
53c576
rm -vf ${JPEG_SRC}/README
53c576
53c576
echo "Removing giflib"
53c576
if [ ! -d ${GIF_SRC} ]; then
53c576
	echo "${GIF_SRC} does not exist. Refusing to proceed."
53c576
	exit 1
53c576
fi	
53c576
rm -rvf ${GIF_SRC}
53c576
53c576
echo "Removing libpng"
53c576
if [ ! -d ${PNG_SRC} ]; then
53c576
	echo "${PNG_SRC} does not exist. Refusing to proceed."
53c576
	exit 1
53c576
fi	
53c576
rm -rvf ${PNG_SRC}
53c576
53c576
echo "Removing lcms"
53c576
if [ ! -d ${LCMS_SRC} ]; then
53c576
	echo "${LCMS_SRC} does not exist. Refusing to proceed."
53c576
	exit 1
53c576
fi
53c576
# temporary change to move bundled LCMS
53c576
if [ ! true ]; then
53c576
rm -vf ${LCMS_SRC}/cmsalpha.c
53c576
rm -vf ${LCMS_SRC}/cmscam02.c
53c576
rm -vf ${LCMS_SRC}/cmscgats.c
53c576
rm -vf ${LCMS_SRC}/cmscnvrt.c
53c576
rm -vf ${LCMS_SRC}/cmserr.c
53c576
rm -vf ${LCMS_SRC}/cmsgamma.c
53c576
rm -vf ${LCMS_SRC}/cmsgmt.c
53c576
rm -vf ${LCMS_SRC}/cmshalf.c
53c576
rm -vf ${LCMS_SRC}/cmsintrp.c
53c576
rm -vf ${LCMS_SRC}/cmsio0.c
53c576
rm -vf ${LCMS_SRC}/cmsio1.c
53c576
rm -vf ${LCMS_SRC}/cmslut.c
53c576
rm -vf ${LCMS_SRC}/cmsmd5.c
53c576
rm -vf ${LCMS_SRC}/cmsmtrx.c
53c576
rm -vf ${LCMS_SRC}/cmsnamed.c
53c576
rm -vf ${LCMS_SRC}/cmsopt.c
53c576
rm -vf ${LCMS_SRC}/cmspack.c
53c576
rm -vf ${LCMS_SRC}/cmspcs.c
53c576
rm -vf ${LCMS_SRC}/cmsplugin.c
53c576
rm -vf ${LCMS_SRC}/cmsps2.c
53c576
rm -vf ${LCMS_SRC}/cmssamp.c
53c576
rm -vf ${LCMS_SRC}/cmssm.c
53c576
rm -vf ${LCMS_SRC}/cmstypes.c
53c576
rm -vf ${LCMS_SRC}/cmsvirt.c
53c576
rm -vf ${LCMS_SRC}/cmswtpnt.c
53c576
rm -vf ${LCMS_SRC}/cmsxform.c
53c576
rm -vf ${LCMS_SRC}/lcms2.h
53c576
rm -vf ${LCMS_SRC}/lcms2_internal.h
53c576
rm -vf ${LCMS_SRC}/lcms2_plugin.h
53c576
fi