Initial commit

This commit is contained in:
2026-06-22 16:24:56 +03:00
commit e07154400e
3 changed files with 122 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
# Ignore BPM archives and signatures
*.bpm
*.bpm.sig
+40
View File
@@ -0,0 +1,40 @@
name: openjdk-8
description: OpenJDK Java 8
version: 8.492.08
revision: 1
url: https://openjdk.org/
license: GPL2-only WITH Classpath-exception-2.0
maintainers:
- [email protected]
architecture: any
type: source
depends:
- gcc-libs
- glibc
- tide-java-utils
make_depends:
- alsa-lib
- bash
- cpio
- fontconfig
- cups
- giflib
- jdk8
- libx11
- libxext
- libxrandr
- libxrender
- libxt
- libxtst
- zip
- unzip
provides:
- jre
- jre8
- jdk
- jdk8
downloads:
- url: https://github.com/openjdk/jdk${BPM_PKG_VERSION%%.*}u/archive/jdk${BPM_PKG_VERSION%%.*}u${BPM_PKG_VERSION:2:3}-b${BPM_PKG_VERSION##*.}.tar.gz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: 6d8ba65f54f13073590418cee2742ad94aa3f5ac85c3a5a6c7caf7201ea391a4
+79
View File
@@ -0,0 +1,79 @@
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The prepare function is executed in the root of the temp directory
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
cd "$BPM_SOURCE"
# Do not treats warnings as errors
sed -E -i 's/(^WARNINGS_ARE_ERRORS = -W)(error)/\1no-\2/' hotspot/make/linux/makefiles/gcc.make
# bool is a keyword in C23.
cat > gcc <<-EOF
#!/bin/sh
exec /usr/bin/gcc -std=gnu17 "\$@"
EOF
chmod +x gcc
# The use of the "register" keyword as storage class specifier has been removed in C++17.
cat > g++ <<-EOF
#!/bin/sh
exec /usr/bin/g++ -std=gnu++14 "\$@"
EOF
chmod +x g++
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
unset MAKEFLAGS
unset JAVA_HOME
# Use the gcc and g++ wrappers
export PATH="$PWD":$PATH
# Set CFLAGS and CXXFLAGS
export CFLAGS="${CFLAGS//-O2/-O3} -fno-lifetime-dse -fno-delete-null-pointer-checks -fno-exceptions -Wno-error=int-conversion -Wno-error=incompatible-pointer-types"
export CXXFLAGS="${CXXFLAGS} -fno-exceptions"
[ -z "$BOOT_JDK" ] && export BOOT_JDK=/usr/lib/java/openjdk-${BPM_PKG_VERSION%%.*}/
bash configure --enable-unlimited-crypto \
--with-extra-cflags="$CFLAGS" \
--with-extra-cxxflags="$CXXFLAGS" \
--with-extra-ldflags="$LDFLAGS" \
--with-stdc++lib=dynamic \
--with-giflib=system \
--with-zlib=system \
--with-update-version=${BPM_PKG_VERSION:2:3} \
--with-build-number=${BPM_PKG_VERSION##*.} \
--with-cacerts-file=/etc/pki/tls/java/cacerts \
--with-boot-jdk="$BOOT_JDK"
make
make docs
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
make -j1 images
install -d "$BPM_OUTPUT"/usr/lib/java
cp -a "$BPM_SOURCE"/build/*/images/j2sdk-image "$BPM_OUTPUT"/usr/lib/java/openjdk-${BPM_PKG_VERSION%%.*}
chown -R root:root "$BPM_OUTPUT"/usr/lib/java/openjdk-${BPM_PKG_VERSION%%.*}
# Remove unwanted files
find "$BPM_OUTPUT" -name '*.diz'
rm "$BPM_OUTPUT"/usr/lib/java/openjdk-${BPM_PKG_VERSION%%.*}/{LICENSE,ASSEMBLY_EXCEPTION,THIRD_PARTY_README,src.zip} # Licenses are placed in usr/share/licenses
rm "$BPM_OUTPUT"/usr/lib/java/openjdk-${BPM_PKG_VERSION%%.*}/jre/{LICENSE,ASSEMBLY_EXCEPTION,THIRD_PARTY_README} # Licenses are placed in usr/share/licenses
# Symlink cacerts
ln -sf /etc/ssl/certs/java/cacerts "$BPM_OUTPUT"/usr/lib/java/openjdk-${BPM_PKG_VERSION%%.*}/jre/lib/security/cacerts
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/openjdk-${BPM_PKG_VERSION%%.*}/LICENSE
install -Dm644 "$BPM_SOURCE"/ASSEMBLY_EXCEPTION "$BPM_OUTPUT"/usr/share/licenses/openjdk-${BPM_PKG_VERSION%%.*}/ASSEMBLY_EXCEPTION
install -Dm644 "$BPM_SOURCE"/THIRD_PARTY_README "$BPM_OUTPUT"/usr/share/licenses/openjdk-${BPM_PKG_VERSION%%.*}/THIRD_PARTY_README
}