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

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