Blame SOURCES/remove-intree-libraries.sh

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