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

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