|
|
660215 |
#!/bin/sh
|
|
|
660215 |
|
|
|
be8a6c |
# Arguments: <JDK TREE> <MINIMAL|FULL>
|
|
|
be8a6c |
TREE=${1}
|
|
|
be8a6c |
TYPE=${2}
|
|
|
be8a6c |
|
|
|
660215 |
ZIP_SRC=src/java.base/share/native/libzip/zlib/
|
|
|
660215 |
JPEG_SRC=src/java.desktop/share/native/libjavajpeg/
|
|
|
660215 |
GIF_SRC=src/java.desktop/share/native/libsplashscreen/giflib/
|
|
|
660215 |
PNG_SRC=src/java.desktop/share/native/libsplashscreen/libpng/
|
|
|
660215 |
LCMS_SRC=src/java.desktop/share/native/liblcms/
|
|
|
660215 |
|
|
|
be8a6c |
if test "x${TREE}" = "x"; then
|
|
|
be8a6c |
echo "$0 <JDK_TREE> (MINIMAL|FULL)";
|
|
|
be8a6c |
exit 1;
|
|
|
be8a6c |
fi
|
|
|
be8a6c |
|
|
|
be8a6c |
if test "x${TYPE}" = "x"; then
|
|
|
be8a6c |
TYPE=minimal;
|
|
|
be8a6c |
fi
|
|
|
be8a6c |
|
|
|
be8a6c |
if test "x${TYPE}" != "xminimal" -a "x${TYPE}" != "xfull"; then
|
|
|
be8a6c |
echo "Type must be minimal or full";
|
|
|
be8a6c |
exit 2;
|
|
|
be8a6c |
fi
|
|
|
be8a6c |
|
|
|
be8a6c |
echo "Removing in-tree libraries from ${TREE}"
|
|
|
be8a6c |
echo "Cleansing operation: ${TYPE}";
|
|
|
be8a6c |
|
|
|
be8a6c |
cd ${TREE}
|
|
|
660215 |
|
|
|
660215 |
echo "Removing built-in libs (they will be linked)"
|
|
|
660215 |
|
|
|
be8a6c |
# On full runs, allow for zlib having already been deleted by minimal
|
|
|
660215 |
echo "Removing zlib"
|
|
|
be8a6c |
if [ "x${TYPE}" = "xminimal" -a ! -d ${ZIP_SRC} ]; then
|
|
|
660215 |
echo "${ZIP_SRC} does not exist. Refusing to proceed."
|
|
|
660215 |
exit 1
|
|
|
660215 |
fi
|
|
|
660215 |
rm -rvf ${ZIP_SRC}
|
|
|
660215 |
|
|
|
be8a6c |
# Minimal is limited to just zlib so finish here
|
|
|
be8a6c |
if test "x${TYPE}" = "xminimal"; then
|
|
|
be8a6c |
echo "Finished.";
|
|
|
be8a6c |
exit 0;
|
|
|
be8a6c |
fi
|
|
|
be8a6c |
|
|
|
660215 |
echo "Removing libjpeg"
|
|
|
be8a6c |
if [ ! -f ${JPEG_SRC}/jdhuff.c ]; then # some file that should definitely exist
|
|
|
660215 |
echo "${JPEG_SRC} does not contain jpeg sources. Refusing to proceed."
|
|
|
660215 |
exit 1
|
|
|
660215 |
fi
|
|
|
660215 |
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcomapi.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdapimin.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdapistd.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdcoefct.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdcolor.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdct.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jddctmgr.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdhuff.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdhuff.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdinput.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdmainct.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdmarker.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdmaster.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdmerge.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdphuff.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdpostct.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdsample.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jerror.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jerror.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jidctflt.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jidctfst.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jidctint.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jidctred.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jinclude.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jmemmgr.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jmemsys.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jmemnobs.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jmorecfg.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jpegint.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jpeglib.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jquant1.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jquant2.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jutils.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcapimin.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcapistd.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jccoefct.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jccolor.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcdctmgr.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jchuff.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jchuff.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcinit.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jconfig.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcmainct.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcmarker.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcmaster.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcparam.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcphuff.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcprepct.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jcsample.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jctrans.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jdtrans.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jfdctflt.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jfdctfst.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jfdctint.c
|
|
|
660215 |
rm -vf ${JPEG_SRC}/jversion.h
|
|
|
660215 |
rm -vf ${JPEG_SRC}/README
|
|
|
660215 |
|
|
|
660215 |
echo "Removing giflib"
|
|
|
660215 |
if [ ! -d ${GIF_SRC} ]; then
|
|
|
660215 |
echo "${GIF_SRC} does not exist. Refusing to proceed."
|
|
|
660215 |
exit 1
|
|
|
660215 |
fi
|
|
|
660215 |
rm -rvf ${GIF_SRC}
|
|
|
660215 |
|
|
|
660215 |
echo "Removing libpng"
|
|
|
660215 |
if [ ! -d ${PNG_SRC} ]; then
|
|
|
660215 |
echo "${PNG_SRC} does not exist. Refusing to proceed."
|
|
|
660215 |
exit 1
|
|
|
660215 |
fi
|
|
|
660215 |
rm -rvf ${PNG_SRC}
|
|
|
660215 |
|
|
|
660215 |
echo "Removing lcms"
|
|
|
660215 |
if [ ! -d ${LCMS_SRC} ]; then
|
|
|
660215 |
echo "${LCMS_SRC} does not exist. Refusing to proceed."
|
|
|
660215 |
exit 1
|
|
|
660215 |
fi
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmscam02.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmscgats.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmscnvrt.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmserr.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsgamma.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsgmt.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmshalf.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsintrp.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsio0.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsio1.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmslut.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsmd5.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsmtrx.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsnamed.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsopt.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmspack.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmspcs.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsplugin.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsps2.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmssamp.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmssm.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmstypes.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsvirt.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmswtpnt.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/cmsxform.c
|
|
|
660215 |
rm -vf ${LCMS_SRC}/lcms2.h
|
|
|
660215 |
rm -vf ${LCMS_SRC}/lcms2_internal.h
|
|
|
660215 |
rm -vf ${LCMS_SRC}/lcms2_plugin.h
|
|
|
660215 |
|
|
|
660215 |
|