Skip to content

17.5-wasm-pglite #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 28 commits into
base: REL_17_5_WASM
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .buildconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PG_VERSION=17.5
PG_BRANCH=REL_17_5_WASM
SDK_VERSION=3.1.74.12.0
SDKROOT=/tmp/sdk
GETZIC=false
ZIC=/usr/sbin/zic

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ lib*.pc
/Release/
/tmp_install/
/portlock/
/dist
3 changes: 3 additions & 0 deletions contrib/pgcrypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ endif
# shared library link. (The order in which you list them here doesn't
# matter.)
SHLIB_LINK += $(filter -lcrypto -lz, $(LIBS))
ifeq ($(PORTNAME), emscripten)
SHLIB_LINK += -lcrypto
endif
ifeq ($(PORTNAME), win32)
SHLIB_LINK += $(filter -leay32, $(LIBS))
# those must be at the end
Expand Down
43 changes: 43 additions & 0 deletions extra/pg_ivm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash


. wasm-build/extension.sh

if $WASI
then
echo "wasi not supported for pg_ivm"
exit 0
fi

pushd $PG_EXTRA
if [ -d pg_ivm ]
then
echo using local pgpg_ivm
else
wget https://github.com/sraoss/pg_ivm/archive/refs/tags/v1.11.tar.gz -O-|tar xfz -
mv pg_ivm-* pg_ivm

# git clone --recursive --no-tags --depth 1 --single-branch --branch main https://github.com/sraoss/pg_ivm

if $WASI
then
echo "no patching"
else
echo "PATCH?"

fi

fi
popd

pushd $PG_EXTRA/pg_ivm
# path for wasm-shared already set to (pwd:pg build dir)/bin
# OPTFLAGS="" turns off arch optim (sse/neon).
PG_CONFIG=${PGROOT}/bin/pg_config emmake make OPTFLAGS="" install || exit 19

#cp sql/pg_ivm--1.10.sql ${PGROOT}/share/postgresql/extension/
#rm -f ${PGROOT}/share/postgresql/extension/pg_ivm--?.?.?--?.?.?.sql ${PGROOT}/share/postgresql/extension/pg_ivm.sql

popd


25 changes: 25 additions & 0 deletions extra/pg_uuidv7.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

. wasm-build/extension.sh

pushd $PG_EXTRA
if [ -d pg_uuidv7 ]
then
echo using local pg_uuidv7
else
wget https://github.com/fboulnois/pg_uuidv7/archive/refs/tags/v1.6.0.tar.gz -O-|tar xfz -
mv pg_uuidv7-1.*.* pg_uuidv7
if $WASI
then
echo "no patching"
else
echo "PATCH?"

fi
fi
popd

pushd $PG_EXTRA/pg_uuidv7
PG_CONFIG=${PGROOT}/bin/pg_config emmake make OPTFLAGS="" install || exit 25
popd

27 changes: 27 additions & 0 deletions extra/vector.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

. wasm-build/extension.sh

pushd $PG_EXTRA
# [ -d pgvector ] || git clone --no-tags --depth 1 --single-branch --branch master https://github.com/pgvector/pgvector

if [ -d vector ]
then
echo using local pgvector
else
wget -c -q https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.0.tar.gz -Opgvector.tar.gz
tar xvfz pgvector.tar.gz
mv pgvector-?.?.? vector
fi
popd

pushd $PG_EXTRA/vector
# path for wasm-shared already set to (pwd:pg build dir)/bin
# OPTFLAGS="" turns off arch optim (sse/neon).
PG_CONFIG=${PGROOT}/bin/pg_config emmake make OPTFLAGS="" install || exit 21

cp sql/vector--0.8.0.sql ${PGROOT}/share/postgresql/extension/
rm ${PGROOT}/share/postgresql/extension/vector--?.?.?--?.?.?.sql
popd


4 changes: 4 additions & 0 deletions out/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
Loading