Ports: Fix bugs in the port system
Fix some bugs and add pkg-config for the port system. Also ncurses is now downloaded from the gnu mirror in the hope that it works better
This commit is contained in:
parent
fe94d6cf89
commit
5aca6c7c1f
|
@ -5,10 +5,19 @@ if (( $# != 1 )); then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z $BANAN_ROOT_DIR ]]; then
|
||||||
BANAN_ROOT_DIR="$(dirname $(realpath $0))/.."
|
BANAN_ROOT_DIR="$(dirname $(realpath $0))/.."
|
||||||
|
fi
|
||||||
|
|
||||||
source "$BANAN_ROOT_DIR/script/config.sh"
|
source "$BANAN_ROOT_DIR/script/config.sh"
|
||||||
|
|
||||||
export PATH="$BANAN_TOOLCHAIN_PREFIX/bin:$PATH"
|
export PATH="$BANAN_TOOLCHAIN_PREFIX/bin:$PATH"
|
||||||
|
|
||||||
|
export PKG_CONFIG='pkg-config --static'
|
||||||
|
export PKG_CONFIG_SYSROOT_DIR="$BANAN_SYSROOT"
|
||||||
|
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_SYSROOT_DIR/usr/lib/pkgconfig"
|
||||||
|
export PKG_CONFIG_PATH="$PKG_CONFIG_SYSROOT_DIR/usr/share/pkgconfig"
|
||||||
|
|
||||||
if [ ! -f "$BANAN_SYSROOT/usr/lib/libc.a" ]; then
|
if [ ! -f "$BANAN_SYSROOT/usr/lib/libc.a" ]; then
|
||||||
pushd "$BANAN_ROOT_DIR" >/dev/null
|
pushd "$BANAN_ROOT_DIR" >/dev/null
|
||||||
./bos libc || exit 1
|
./bos libc || exit 1
|
||||||
|
@ -21,7 +30,7 @@ clean() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
configure_options=("--host=$BANAN_ARCH-banan_os" "--prefix=/usr" )
|
configure_options=("--host=$BANAN_ARCH-banan_os" '--prefix=/usr')
|
||||||
configure_options+=(${CONFIGURE_OPTIONS[*]})
|
configure_options+=(${CONFIGURE_OPTIONS[*]})
|
||||||
|
|
||||||
./configure ${configure_options[*]} || exit 1
|
./configure ${configure_options[*]} || exit 1
|
||||||
|
@ -51,6 +60,10 @@ done
|
||||||
|
|
||||||
build_dir="$NAME-$VERSION-$BANAN_ARCH"
|
build_dir="$NAME-$VERSION-$BANAN_ARCH"
|
||||||
|
|
||||||
|
if [ ! -d "$build_dir" ]; then
|
||||||
|
rm -f ".compile_hash-$BANAN_ARCH"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$VERSION" = "git" ]; then
|
if [ "$VERSION" = "git" ]; then
|
||||||
regex="(.*/.*\.git)#(.*)"
|
regex="(.*/.*\.git)#(.*)"
|
||||||
|
|
||||||
|
@ -71,7 +84,7 @@ if [ "$VERSION" = "git" ]; then
|
||||||
|
|
||||||
pushd "$build_dir" >/dev/null
|
pushd "$build_dir" >/dev/null
|
||||||
git checkout "$COMMIT" || exit 1
|
git checkout "$COMMIT" || exit 1
|
||||||
if [ -d patches ]; then
|
if [ -d ../patches ]; then
|
||||||
for patch in ../patches/*; do
|
for patch in ../patches/*; do
|
||||||
git apply "$patch" || exit 1
|
git apply "$patch" || exit 1
|
||||||
done
|
done
|
||||||
|
@ -111,7 +124,7 @@ else
|
||||||
|
|
||||||
if [ -d patches ]; then
|
if [ -d patches ]; then
|
||||||
for patch in ./patches/*; do
|
for patch in ./patches/*; do
|
||||||
patch -ruN -d "$build_dir" < "$patch" || exit 1
|
patch -ruN -p1 -d "$build_dir" < "$patch" || exit 1
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -123,7 +136,7 @@ fi
|
||||||
|
|
||||||
needs_compile=1
|
needs_compile=1
|
||||||
if [ -f ".compile_hash-$BANAN_ARCH" ]; then
|
if [ -f ".compile_hash-$BANAN_ARCH" ]; then
|
||||||
cat ".compile_hash-$BANAN_ARCH" | sha256sum --check >/dev/null
|
sha256sum --check ".compile_hash-$BANAN_ARCH" &>/dev/null
|
||||||
needs_compile=$?
|
needs_compile=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
NAME='ncurses'
|
NAME='ncurses'
|
||||||
VERSION='6.5'
|
VERSION='6.5'
|
||||||
DOWNLOAD_URL="https://invisible-island.net/archives/ncurses/ncurses-$VERSION.tar.gz#136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6"
|
DOWNLOAD_URL="https://ftp.gnu.org/gnu/ncurses/ncurses-$VERSION.tar.gz#136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6"
|
||||||
CONFIGURE_OPTIONS=(
|
CONFIGURE_OPTIONS=(
|
||||||
'--disable-db-intall'
|
'--disable-db-intall'
|
||||||
'--disable-widec'
|
'--disable-widec'
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
cd $(dirname $(realpath $0))
|
cd $(dirname $(realpath $0))
|
||||||
|
|
||||||
for port in ./*/.compile_hash*; do
|
while IFS= read -r port; do
|
||||||
pushd $(dirname "$port") >/dev/null
|
pushd $(dirname "$port") >/dev/null
|
||||||
./build.sh
|
./build.sh
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
done
|
done < <(find . -name '.compile_hash*')
|
||||||
|
|
Loading…
Reference in New Issue