Skip to content

Commit

Permalink
liblol: add package info and dependency info
Browse files Browse the repository at this point in the history
  • Loading branch information
shankerwangmiao committed Feb 8, 2024
1 parent 5c7ea72 commit 082dfb2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 18 deletions.
27 changes: 25 additions & 2 deletions autobuild/build
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ glibc_build() {
mkdir -pv "$BLDDIR/build/glibc"

pushd "$BLDDIR/build/glibc"
local GLIBC_VER="2.38"
local cflags_common="-O2 -g -ffile-prefix-map=$BLDDIR=."
local ldflags_common="-Wl,-O1,--sort-common,--as-needed -Wl,-build-id=sha1"

local debver=$PKGVER
if [ "$PKGREL" != 0 ]; then
debver+="-$PKGREL"
fi

cat > configparms <<EOF
install_root = \$(DESTDIR)
exec_prefix = \${prefix}
Expand Down Expand Up @@ -74,6 +78,9 @@ EOF
--prefix="/usr" \
--enable-obsolete-rpc \
--enable-crypt \
--with-pkgversion="LibLoL $debver" \
--with-bugurl="https://github.com/AOSC-Dev/liblol/issues"


env -i "MAKEFLAGS=$MAKEFLAGS" "TERM=$TERM" "PATH=$PATH" \
make "$PWD/libc.so.6"
Expand Down Expand Up @@ -143,7 +150,9 @@ EOF
-t "$PKGDIR$LOLPREFIX/support/lib/$OWTARGET/"
done

chmod -v +x "$PKGDIR$LOLPREFIX/support/lib/$OWTARGET/ld.so.1"
chmod -v +x \
"$PKGDIR$LOLPREFIX/support/lib/$OWTARGET/ld.so.1" \
"$PKGDIR$LOLPREFIX/support/lib/$OWTARGET/libc.so.6"

mkdir -pv "$PKGDIR/usr/lib" #/lib64 is /usr/lib on AOSC
ln -sfvr "$PKGDIR$LOLPREFIX/support/lib/$OWTARGET/ld.so.1" \
Expand Down Expand Up @@ -197,3 +206,17 @@ done

abinfo "Installing package hooks ..."
install_hooks

abinfo "Adding glibc dependency ..."
cur_glibc_version=$(dpkg-query -W --showformat='${Version}' glibc)
if [ -z "$cur_glibc_version" ]; then
abdie "Cannot find glibc version"
fi
abinfo "Current glibc version: $cur_glibc_version"
cur_glibc_epoch=""
if [[ "$cur_glibc_version" == *":"* ]]; then
cur_glibc_epoch="$(echo "$cur_glibc_version" | cut -d: -f1)"
abinfo "Current glibc epoch: $cur_glibc_epoch"
cur_glibc_epoch+=":"
fi
PKGDEP+=" glibc>=${cur_glibc_epoch}2.36 glibc<<${cur_glibc_epoch}${__GLIBC_VER}.1~"
11 changes: 3 additions & 8 deletions spec
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# AUTOGENERATED FILE from spec.main using genspec
VER=0.1.4~pre2
VER=0.1.4~pre3
_mirror="http://pkg.loongnix.cn/loongnix"

### For pkgs from outside loongnix repo
# make-4.3:
# File generation loop in stdio-common dir when installing target glibc 2.28 using latest make
# ref: https://github.com/crosstool-ng/crosstool-ng/issues/1932#issuecomment-1528139734
#
__GLIBC_VER=2.38

SRCS="\
file::rename=glibc.tar.xz::https://ftp.gnu.org/gnu/glibc/glibc-2.38.tar.xz \
file::rename=glibc.tar.xz::https://ftp.gnu.org/gnu/glibc/glibc-${__GLIBC_VER}.tar.xz \
file::rename=patchelf.tar.gz::https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0.tar.gz \
"
CHKSUMS="\
Expand Down
11 changes: 3 additions & 8 deletions spec.main
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
VER=0.1.4~pre2
VER=0.1.4~pre3
_mirror="http://pkg.loongnix.cn/loongnix"

### For pkgs from outside loongnix repo
# make-4.3:
# File generation loop in stdio-common dir when installing target glibc 2.28 using latest make
# ref: https://github.com/crosstool-ng/crosstool-ng/issues/1932#issuecomment-1528139734
#
__GLIBC_VER=2.38

SRCS="\
file::rename=glibc.tar.xz::https://ftp.gnu.org/gnu/glibc/glibc-2.38.tar.xz \
file::rename=glibc.tar.xz::https://ftp.gnu.org/gnu/glibc/glibc-${__GLIBC_VER}.tar.xz \
file::rename=patchelf.tar.gz::https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0.tar.gz \
"
CHKSUMS="\
Expand Down

0 comments on commit 082dfb2

Please sign in to comment.