Skip to content

Commit

Permalink
Ports: Allow custom prebuild steps, properly set PKG_CONFIG_* environ…
Browse files Browse the repository at this point in the history
…ment vars
  • Loading branch information
byteduck committed Apr 4, 2024
1 parent 4cbbd0a commit 8dec821
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ports/ports.sh
Expand Up @@ -21,11 +21,14 @@ export CXXFILT="i686-pc-duckos-c++filt"
export READELF="i686-pc-duckos-readelf"
export STRIP="$i686-pc-duckos-strip"
export OBJCOPY="i686-pc-duckos-objcopy"
export PKG_CONFIG_DIR=""
export PKG_CONFIG_SYSROOT_DIR="$ROOT_DIR"
export PKG_CONFIG_LIBDIR="$ROOT_DIR/usr/local/lib/pkgconfig"

download_extract_patch() {
if [ ! -d "$DOWNLOAD_FILE" ]; then
msg "Downloading $DOWNLOAD_URL"
curl "$DOWNLOAD_URL" > "$DOWNLOAD_FILE.tar.gz" || return 1
curl -L "$DOWNLOAD_URL" > "$DOWNLOAD_FILE.tar.gz" || return 1
msg "Extracting $DOWNLOAD_FILE.tar.gz..."
tar -xf "$DOWNLOAD_FILE.tar.gz" || return 1
rm "$DOWNLOAD_FILE.tar.gz"
Expand Down Expand Up @@ -97,6 +100,10 @@ build_port() {
elif [ -n "$GIT_URL" ]; then
git_clone_patch
fi
if [[ $(type -t prebuild) == function ]]; then
msg "Executing prebuild steps for $DUCKOS_PORT_NAME..."
prebuild
fi
if [ "$USE_CONFIGURE" = "true" ]; then
msg "Configuring port $DUCKOS_PORT_NAME..."
if [ -z "$CONFIGURE_PATH" ]; then
Expand Down

0 comments on commit 8dec821

Please sign in to comment.