/[packages]/backports/8/java-latest-openjdk/current/SOURCES/remove-intree-libraries.sh
ViewVC logotype

Diff of /backports/8/java-latest-openjdk/current/SOURCES/remove-intree-libraries.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1760751 by neoclust, Wed Mar 3 20:46:04 2021 UTC revision 1760752 by neoclust, Sat Dec 4 23:35:46 2021 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3    # Arguments: <JDK TREE> <MINIMAL|FULL>
4    TREE=${1}
5    TYPE=${2}
6    
7  ZIP_SRC=src/java.base/share/native/libzip/zlib/  ZIP_SRC=src/java.base/share/native/libzip/zlib/
8  JPEG_SRC=src/java.desktop/share/native/libjavajpeg/  JPEG_SRC=src/java.desktop/share/native/libjavajpeg/
9  GIF_SRC=src/java.desktop/share/native/libsplashscreen/giflib/  GIF_SRC=src/java.desktop/share/native/libsplashscreen/giflib/
10  PNG_SRC=src/java.desktop/share/native/libsplashscreen/libpng/  PNG_SRC=src/java.desktop/share/native/libsplashscreen/libpng/
11  LCMS_SRC=src/java.desktop/share/native/liblcms/  LCMS_SRC=src/java.desktop/share/native/liblcms/
12    
13  cd openjdk  if test "x${TREE}" = "x"; then
14        echo "$0 <JDK_TREE> (MINIMAL|FULL)";
15        exit 1;
16    fi
17    
18    if test "x${TYPE}" = "x"; then
19        TYPE=minimal;
20    fi
21    
22    if test "x${TYPE}" != "xminimal" -a "x${TYPE}" != "xfull"; then
23        echo "Type must be minimal or full";
24        exit 2;
25    fi
26    
27    echo "Removing in-tree libraries from ${TREE}"
28    echo "Cleansing operation: ${TYPE}";
29    
30    cd ${TREE}
31    
32  echo "Removing built-in libs (they will be linked)"  echo "Removing built-in libs (they will be linked)"
33    
34    # On full runs, allow for zlib having already been deleted by minimal
35  echo "Removing zlib"  echo "Removing zlib"
36  if [ ! -d ${ZIP_SRC} ]; then  if [ "x${TYPE}" = "xminimal" -a ! -d ${ZIP_SRC} ]; then
37          echo "${ZIP_SRC} does not exist. Refusing to proceed."          echo "${ZIP_SRC} does not exist. Refusing to proceed."
38          exit 1          exit 1
39  fi        fi      
40  rm -rvf ${ZIP_SRC}  rm -rvf ${ZIP_SRC}
41    
42    # Minimal is limited to just zlib so finish here
43    if test "x${TYPE}" = "xminimal"; then
44        echo "Finished.";
45        exit 0;
46    fi
47    
48  echo "Removing libjpeg"  echo "Removing libjpeg"
49  if [ ! -f ${JPEG_SRC}/jdhuff.c ]; then # some file that sound definitely exist  if [ ! -f ${JPEG_SRC}/jdhuff.c ]; then # some file that should definitely exist
50          echo "${JPEG_SRC} does not contain jpeg sources. Refusing to proceed."          echo "${JPEG_SRC} does not contain jpeg sources. Refusing to proceed."
51          exit 1          exit 1
52  fi        fi      

Legend:
Removed from v.1760751  
changed lines
  Added in v.1760752

  ViewVC Help
Powered by ViewVC 1.1.30