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

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