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