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

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