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

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