Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 8dec821

Browse files
committed
Ports: Allow custom prebuild steps, properly set PKG_CONFIG_* environment vars
1 parent 4cbbd0a commit 8dec821

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ports/ports.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ export CXXFILT="i686-pc-duckos-c++filt"
2121
export READELF="i686-pc-duckos-readelf"
2222
export STRIP="$i686-pc-duckos-strip"
2323
export OBJCOPY="i686-pc-duckos-objcopy"
24+
export PKG_CONFIG_DIR=""
25+
export PKG_CONFIG_SYSROOT_DIR="$ROOT_DIR"
26+
export PKG_CONFIG_LIBDIR="$ROOT_DIR/usr/local/lib/pkgconfig"
2427

2528
download_extract_patch() {
2629
if [ ! -d "$DOWNLOAD_FILE" ]; then
2730
msg "Downloading $DOWNLOAD_URL"
28-
curl "$DOWNLOAD_URL" > "$DOWNLOAD_FILE.tar.gz" || return 1
31+
curl -L "$DOWNLOAD_URL" > "$DOWNLOAD_FILE.tar.gz" || return 1
2932
msg "Extracting $DOWNLOAD_FILE.tar.gz..."
3033
tar -xf "$DOWNLOAD_FILE.tar.gz" || return 1
3134
rm "$DOWNLOAD_FILE.tar.gz"
@@ -97,6 +100,10 @@ build_port() {
97100
elif [ -n "$GIT_URL" ]; then
98101
git_clone_patch
99102
fi
103+
if [[ $(type -t prebuild) == function ]]; then
104+
msg "Executing prebuild steps for $DUCKOS_PORT_NAME..."
105+
prebuild
106+
fi
100107
if [ "$USE_CONFIGURE" = "true" ]; then
101108
msg "Configuring port $DUCKOS_PORT_NAME..."
102109
if [ -z "$CONFIGURE_PATH" ]; then

0 commit comments

Comments
 (0)