SHARE
TWEET

PKGBUILD for jre7-openjdk-headless-infinality-7.u65_2.5.1-8

a guest Aug 23rd, 2014 261 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # $Id$
  2. # Maintainer: Andreas Radke <andyrtr@archlinux.org>
  3. # Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
  4. # Contributor: Jan de Groot <jgc@archlinux.org>
  5.  
  6. pkgname=('jre7-openjdk-headless-infinality')
  7. pkgbase=java7-openjdk
  8. _java_ver=7
  9. _icedtea_ver=2.5.1
  10.  
  11. # check "${srcdir}/icedtea-${_icedtea_ver}"/Makefile.am
  12. _JDK_UPDATE_VERSION=65
  13.  
  14. _bootstrap=0 # 0/1 for quick build or full bootstrap
  15.  
  16. pkgver=${_java_ver}.u${_JDK_UPDATE_VERSION}_${_icedtea_ver}
  17. pkgrel=8
  18. arch=('i686' 'x86_64')
  19. url='http://icedtea.classpath.org'
  20. license=('custom')
  21. options=('!emptydirs')
  22. makedepends=('jdk7-openjdk' 'libxp' 'libxslt'
  23.              'alsa-lib' 'apache-ant>=1.8.1' 'giflib' 'libpng>=1.5.7' 'gtk2'
  24.              'java-rhino' 'libpulse>=0.9.11' 'zip' 'unzip' 'cpio' 'fastjar' 'wget'
  25.              'eclipse-ecj')
  26.  
  27. _icedtea_url=http://icedtea.classpath.org/download
  28. _drops_url=${_icedtea_url}/drops/icedtea7/${_icedtea_ver}
  29. source=(${_icedtea_url}/source/icedtea-${_icedtea_ver}.tar.gz
  30.         icedtea_${_icedtea_ver}_openjdk.tar.bz2::${_drops_url}/openjdk.tar.bz2
  31.         icedtea_${_icedtea_ver}_corba.tar.bz2::${_drops_url}/corba.tar.bz2
  32.         icedtea_${_icedtea_ver}_jaxp.tar.bz2::${_drops_url}/jaxp.tar.bz2
  33.         icedtea_${_icedtea_ver}_jaxws.tar.bz2::${_drops_url}/jaxws.tar.bz2
  34.         icedtea_${_icedtea_ver}_jdk.tar.bz2::${_drops_url}/jdk.tar.bz2
  35.         icedtea_${_icedtea_ver}_langtools.tar.bz2::${_drops_url}/langtools.tar.bz2
  36.         icedtea_${_icedtea_ver}_hotspot.tar.bz2::${_drops_url}/hotspot.tar.bz2
  37.         fontconfig-paths.diff
  38.         openjdk7_nonreparenting-wm.diff
  39.         giflib_5.1.diff)
  40.  
  41. sha256sums=('06483c252099d41e33eade8ceee9231a15ba1e9594f90e2d32943d17c8802acd'
  42.             '0496072760c521aa184f3c26c1f515a89ef6f9a88df14fa888c6ee6cdd9379b7'
  43.             'd476f22db32e028cc30dda47fec81e5ba0e113f029c3ed7a30edf8fc1404819b'
  44.             'd13778e5bbf6cda22a40b9d5186d2a7d1a3f34d998b1ac4d65fe3abd12fffa25'
  45.             '29c39856af1153620023c3fa0313be2f23dc02208db1a8429ca80d1eebfce06f'
  46.             '76194344fca5db4c79e4a2af28efd9fbb2e38e879b5afc59042874519bb5f7fc'
  47.             '374174ea3b7eb2bb81d9dfae4749d7b3c9037d07004aa59aaa5e8ed5fba922d3'
  48.             '78d57f7c207d8f56bba2ee6aec232a836fd51830d352cfa4804d8077d9a7b32b'
  49.             '9ad943ceb3dbcdf45d72974fc3667886a7ed65c69ab9abc17be5412827551a7f'
  50.             '56b919ababb13bd6afdcdaceb112b529b6e82539255f2dae9a7e5eb91645164b'
  51.             '77fba3032edf6cce549cd4e174d9296684b20f4589dc59179fcc8cba7426a4e9')
  52.  
  53. noextract=(icedtea_${_icedtea_ver}_openjdk.tar.bz2
  54.            icedtea_${_icedtea_ver}_corba.tar.bz2
  55.            icedtea_${_icedtea_ver}_jaxp.tar.bz2
  56.            icedtea_${_icedtea_ver}_jaxws.tar.bz2
  57.            icedtea_${_icedtea_ver}_jdk.tar.bz2
  58.            icedtea_${_icedtea_ver}_langtools.tar.bz2
  59.            icedtea_${_icedtea_ver}_hotspot.tar.bz2)
  60.  
  61. [ "$CARCH" = "x86_64" ] && _JARCH=amd64
  62. [ "$CARCH" = "i686" ]   && _JARCH=i386
  63.  
  64. _jvmdir=/usr/lib/jvm/java-7-openjdk
  65. _imgdir="icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image"
  66. _nonheadless=(bin/policytool
  67.               lib/${_JARCH}/libjsoundalsa.so
  68.               lib/${_JARCH}/libsplashscreen.so
  69.               lib/${_JARCH}/xawt/libmawt.so)
  70.  
  71. build() {
  72.   cd "${srcdir}/icedtea-${_icedtea_ver}"
  73.  
  74.   export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
  75.   export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
  76.  
  77.   . /etc/profile.d/apache-ant.sh
  78.  
  79.   cp "${srcdir}"/*.diff "${srcdir}"/icedtea-${_icedtea_ver}/patches
  80.   export DISTRIBUTION_PATCHES="patches/fontconfig-paths.diff \
  81.                                patches/openjdk7_nonreparenting-wm.diff \
  82.                                patches/giflib_5.1.diff"
  83.  
  84.   if [ "$_bootstrap" = "1" ]; then
  85.      BOOTSTRAPOPT="--enable-bootstrap --with-ecj-jar=/usr/share/java/ecj.jar"
  86.    else
  87.      BOOTSTRAPOPT="--disable-bootstrap"
  88.   fi
  89.  
  90.   ./configure \
  91.         ${BOOTSTRAPOPT} \
  92.         --with-parallel-jobs="${MAKEFLAGS/-j}" \
  93.         --disable-tests \
  94.         --disable-downloading --disable-Werror \
  95.         --with-pkgversion="Arch Linux build ${pkgver}-${pkgrel}-${CARCH}" \
  96.         --with-jdk-home=${JAVA_HOME} \
  97.         --with-openjdk-src-zip="${srcdir}/icedtea_${_icedtea_ver}_openjdk.tar.bz2" \
  98.         --with-hotspot-src-zip="${srcdir}/icedtea_${_icedtea_ver}_hotspot.tar.bz2" \
  99.         --with-corba-src-zip="${srcdir}/icedtea_${_icedtea_ver}_corba.tar.bz2" \
  100.         --with-jaxp-src-zip="${srcdir}/icedtea_${_icedtea_ver}_jaxp.tar.bz2" \
  101.         --with-jaxws-src-zip="${srcdir}/icedtea_${_icedtea_ver}_jaxws.tar.bz2" \
  102.         --with-jdk-src-zip="${srcdir}/icedtea_${_icedtea_ver}_jdk.tar.bz2" \
  103.         --with-langtools-src-zip="${srcdir}/icedtea_${_icedtea_ver}_langtools.tar.bz2" \
  104.         --enable-nss \
  105.         --with-rhino \
  106.         --with-abs-install-dir=${_jvmdir} \
  107.         --enable-infinality=yes
  108.         # TODO latest version of openjdk will disable infinality by default
  109.     make
  110. }
  111.  
  112. check() {
  113.   cd "${srcdir}/icedtea-${_icedtea_ver}"
  114.   make -k check
  115. }
  116.  
  117. package_jre7-openjdk-headless-infinality() {
  118.   pkgdesc='OpenJDK Java 7 headless runtime environment'
  119.   depends=('java-common' 'libjpeg-turbo' 'lcms2' 'nss' 'ca-certificates-java')
  120.   optdepends=('libcups: needed for Java Mauve support - libmawt.so'
  121.               'fontconfig: needed for Java Mauve support - libmawt.so'
  122.               'java-rhino: for some JavaScript support')
  123.   provides=('java-runtime-headless=7' 'java-runtime-headless-openjdk=7' "jre7-openjdk-headless=${pkgver}-${pkgrel}")
  124.   conflicts=('openjdk6' 'jre7-openjdk-headless' 'jre7-openjdk-headless-fontfix')
  125.   # TODO remove after some time
  126.   replaces=('jre7-openjdk-headless-wm')
  127.   # Upstream config files that should go to etc and get backup
  128.   _backup_etc=(etc/java-7-openjdk/${_JARCH}/jvm.cfg
  129.                etc/java-7-openjdk/calendars.properties
  130.                etc/java-7-openjdk/content-types.properties
  131.                etc/java-7-openjdk/flavormap.properties
  132.                etc/java-7-openjdk/fontconfig.bfc
  133.                etc/java-7-openjdk/fontconfig.properties
  134.                etc/java-7-openjdk/images/cursors/cursors.properties
  135.                etc/java-7-openjdk/logging.properties
  136.                etc/java-7-openjdk/management/jmxremote.access
  137.                etc/java-7-openjdk/management/jmxremote.password
  138.                etc/java-7-openjdk/management/management.properties
  139.                etc/java-7-openjdk/management/snmp.acl
  140.                etc/java-7-openjdk/net.properties
  141.                etc/java-7-openjdk/psfont.properties.ja
  142.                etc/java-7-openjdk/psfontj2d.properties
  143.                etc/java-7-openjdk/security/java.policy
  144.                etc/java-7-openjdk/security/java.security
  145.                etc/java-7-openjdk/security/nss.cfg
  146.                etc/java-7-openjdk/sound.properties
  147.                etc/java-7-openjdk/tz.properties)
  148.   backup=(${_backup_etc[@]})
  149.   install=jre7-openjdk-headless.install
  150.  
  151.   cd "${srcdir}/${_imgdir}/jre"
  152.  
  153.   install -d -m755 "${pkgdir}${_jvmdir}/jre"
  154.   cp -a bin lib "${pkgdir}${_jvmdir}/jre"
  155.  
  156.   # Set config files
  157.   mv "${pkgdir}${_jvmdir}"/jre/lib/fontconfig.{Ubuntu.properties.src,properties}
  158.   mv "${pkgdir}${_jvmdir}"/jre/lib/fontconfig.{Ubuntu.bfc,bfc}
  159.   mv "${pkgdir}${_jvmdir}"/jre/lib/management/jmxremote.password{.template,}
  160.   mv "${pkgdir}${_jvmdir}"/jre/lib/management/snmp.acl{.template,}
  161.   rm -f "${pkgdir}${_jvmdir}"/jre/lib/fontconfig.*.bfc
  162.   rm -f "${pkgdir}${_jvmdir}"/jre/lib/fontconfig.*.properties.src
  163.   rm -f "${pkgdir}${_jvmdir}"/jre/lib/fontconfig.properties.src
  164.  
  165.   # Remove 'non-headless' files
  166.   for f in ${_nonheadless[@]}; do
  167.     rm "${pkgdir}${_jvmdir}/jre/${f}"
  168.   done
  169.  
  170.   # Man pages
  171.   pushd "${pkgdir}${_jvmdir}/jre/bin"
  172.   install -d -m 755 "${pkgdir}"/usr/share/man/{,ja/}man1/
  173.   for file in *; do
  174.     install -m 644 "${srcdir}/${_imgdir}/man/man1/${file}.1" \
  175.       "${pkgdir}/usr/share/man/man1/${file}.1"
  176.     install -m 644 "${srcdir}/${_imgdir}/man/ja/man1/${file}.1" \
  177.       "${pkgdir}/usr/share/man/ja/man1/${file}.1"
  178.   done
  179.   popd
  180.  
  181.   # Link JKS keystore from ca-certificates-java
  182.   rm -f "${pkgdir}${_jvmdir}/jre/lib/security/cacerts"
  183.   ln -sf /etc/ssl/certs/java/cacerts "${pkgdir}${_jvmdir}/jre/lib/security/cacerts"
  184.  
  185.   # Install license
  186.   install -d -m755 "${pkgdir}/usr/share/licenses/${pkgbase}/"
  187.   install -m644 ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README \
  188.                  "${pkgdir}/usr/share/licenses/${pkgbase}"
  189.   ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
  190.  
  191.   # Move config files that were set in _backup_etc from ./lib to /etc
  192.   for file in ${_backup_etc[@]}; do
  193.     _filepkgpath=${_jvmdir}/jre/lib/${file#etc/java-7-openjdk/}
  194.     install -D -m 644 "${pkgdir}${_filepkgpath}" "${pkgdir}/${file}"
  195.     ln -sf /${file} "${pkgdir}${_filepkgpath}"
  196.   done
  197. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top