summarylogtreecommitdiffstats
path: root/unbundle-vendor-deps.patch
diff options
context:
space:
mode:
authorGeorge Rawlinson2021-08-10 21:53:06 +0000
committerGeorge Rawlinson2021-08-10 21:53:06 +0000
commitb28cd767c0a119acd2c5b51b92c496096f68b058 (patch)
treec16f6d058f16335c20859e4fef0aa89beaf3befc /unbundle-vendor-deps.patch
downloadaur-b28cd767c0a119acd2c5b51b92c496096f68b058.tar.gz
addpkg: libpg_query 13.2.0.7-1
Diffstat (limited to 'unbundle-vendor-deps.patch')
-rw-r--r--unbundle-vendor-deps.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/unbundle-vendor-deps.patch b/unbundle-vendor-deps.patch
new file mode 100644
index 000000000000..f9999b967776
--- /dev/null
+++ b/unbundle-vendor-deps.patch
@@ -0,0 +1,36 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,16 +19,18 @@
+ SONAME = lib$(TARGET).so.$(SOVERSION)
+ SOLIB = $(SONAME).$(LIB_VERSION_MINOR).$(LIB_VERSION_PATCH)
+
+-SRC_FILES := $(wildcard src/*.c src/postgres/*.c) vendor/protobuf-c/protobuf-c.c vendor/xxhash/xxhash.c protobuf/pg_query.pb-c.c
++SRC_FILES := $(wildcard src/*.c src/postgres/*.c) protobuf/pg_query.pb-c.c
+ NOT_OBJ_FILES := src/pg_query_enum_defs.o src/pg_query_fingerprint_defs.o src/pg_query_fingerprint_conds.o src/pg_query_outfuncs_defs.o src/pg_query_outfuncs_conds.o src/pg_query_readfuncs_defs.o src/pg_query_readfuncs_conds.o src/postgres/guc-file.o src/postgres/scan.o src/pg_query_json_helper.o
+ OBJ_FILES := $(filter-out $(NOT_OBJ_FILES), $(SRC_FILES:.c=.o))
+
+-override CFLAGS += -g -I. -I./vendor -I./src/postgres/include -Wall -Wno-unused-function -Wno-unused-value -Wno-unused-variable -fno-strict-aliasing -fwrapv -fPIC
++LIBS = -lxxhash -lprotobuf-c
++
++override CFLAGS += -g -I. -I./src/postgres/include -Wall -Wno-unused-function -Wno-unused-value -Wno-unused-variable -fno-strict-aliasing -fwrapv -fPIC
+
+ override PG_CONFIGURE_FLAGS += -q --without-readline --without-zlib
+
+-override TEST_CFLAGS += -I. -I./vendor -g
+-override TEST_LDFLAGS += -pthread
++override TEST_CFLAGS += -I. -g
++override TEST_LDFLAGS += -pthread $(LIBS)
+
+ CFLAGS_OPT_LEVEL = -O3
+ ifeq ($(DEBUG),1)
+--- a/src/pg_query_fingerprint.c
++++ b/src/pg_query_fingerprint.c
+@@ -7,7 +7,7 @@
+ #include "pg_query_fingerprint.h"
+
+ #include "postgres.h"
+-#include "xxhash/xxhash.h"
++#include <xxhash.h>
+ #include "lib/ilist.h"
+
+ #include "parser/parser.h"