Blame SOURCES/remove-intree-libraries.sh

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