{ "name": "libpq", "version": "18.6", "summary": "libpq: PostgreSQL's client library alone (for PHP's pgsql and pdo_pgsql)", "category": "library", "license": "PostgreSQL", "homepage": "https://www.postgresql.org/", "source": { "url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f" }, "watch": {"kind": "index", "url": "https://ftp.postgresql.org/pub/source/", "regex": "href=\"v([0-9]+\\.[0-9]+)/\"", "checksum": "{source}.sha256", "pin": "18"}, "deps": [ "openssl" ], "env_packages": [], "static": false, "nss": true, "check": "p=$(free_port) && CHECK_CPPFLAGS=\"-DPORT=$p\" check_lib libpq 'libpq-fe.h libpq/libpq-fs.h' 'if (INV_READ != 0x00040000 || INV_WRITE != 0x00020000) return 9; PQconninfoOption *o = PQconninfoParse(\"postgresql://bvs@db.example:5433/web?sslmode=require&application_name=bvs\", NULL); int seen = 0; if (!o) return 1; for (PQconninfoOption *x = o; x->keyword; x++) if (x->val && ((!strcmp(x->keyword, \"host\") && !strcmp(x->val, \"db.example\")) || (!strcmp(x->keyword, \"port\") && !strcmp(x->val, \"5433\")) || (!strcmp(x->keyword, \"dbname\") && !strcmp(x->val, \"web\")) || (!strcmp(x->keyword, \"sslmode\") && !strcmp(x->val, \"require\")))) seen++; PQconninfoFree(o); if (seen != 4) return 2; char ci[128]; snprintf(ci, sizeof ci, \"host=127.0.0.1 port=%d dbname=bvs connect_timeout=3\", PORT); PGconn *c = PQconnectdb(ci); if (!c || PQstatus(c) != CONNECTION_BAD || !strstr(PQerrorMessage(c), \"127.0.0.1\")) return 3; char *e = PQencryptPasswordConn(c, \"secret\", \"bvs\", \"scram-sha-256\"); if (!e || strncmp(e, \"SCRAM-SHA-256$4096:\", 19)) return 4; PQfreemem(e); PQfinish(c); if (PQlibVersion() != 180006 || !PQisthreadsafe()) return 5; printf(\"libpq %d.%d: a connection URI parsed, a connection to a closed port refused with its error message, a SCRAM-SHA-256 verifier made on the client, the INV_READ and INV_WRITE of libpq/libpq-fs.h\\n\", PQlibVersion() / 10000, PQlibVersion() % 100)' " }