Skip to content
Snippets Groups Projects
Commit b8de0fc9 authored by rubicon's avatar rubicon Committed by alice
Browse files

main/pgtcl: upgrade to 3.0.0 and assume maintainership

parent 8d262c17
2 merge requests!39304[3.16] main/expat: security upgrade to 2.4.9,!36546main/pgtcl: upgrade to 3.0.0 and assume maintainership
Pipeline #130348 passed
# Contributor: G.J.R. Timmer <gjr.timmer@gmail.com> # Contributor: G.J.R. Timmer <gjr.timmer@gmail.com>
# Maintainer: G.J.R. Timmer <gjr.timmer@gmail.com> # Maintainer: rubicon <rubicon@mailo.com>
pkgname=pgtcl pkgname=pgtcl
_pkgname=Pgtcl _pkgname=Pgtcl
pkgver=2.1.0 pkgver=3.0.0
pkgrel=1 pkgrel=0
pkgdesc="Tcl client side interface to PostgreSQL (libpgtcl)" pkgdesc="Tcl client side interface to PostgreSQL (libpgtcl)"
url="https://flightaware.github.io/Pgtcl/" url="https://flightaware.github.io/Pgtcl/"
arch="all" arch="all"
license="BSD-3-Clause" license="BSD-3-Clause"
makedepends="libpq-dev tcl-dev docbook2x" depends="tcl"
subpackages="$pkgname-doc" makedepends="autoconf libpq-dev tcl-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/flightaware/$_pkgname/archive/v$pkgver.tar.gz" checkdepends="postgresql14"
subpackages="$pkgname-doc $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/flightaware/$_pkgname/archive/v$pkgver.tar.gz
pgtcl-tests.patch
"
builddir="$srcdir/$_pkgname-$pkgver" builddir="$srcdir/$_pkgname-$pkgver"
prepare() { ERROR_CLEANUP="$ERROR_CLEANUP srcdir"
default_prepare || return 1
cd "$builddir" cleanup_srcdir() {
sed -i -e 's/docbook2man/docbook2x-man/g' \ if [ -f "$_data_dir"/postmaster.pid ]; then
-e 's|sh \./fix-fi\.sh man/\*||g' \ local pg_pid="$(head -1 "$_data_dir"/postmaster.pid)"
doc/Makefile msg "Killing PostgreSQL test server with PID: $pg_pid"
kill "$pg_pid"
fi
default_cleanup_srcdir
} }
build() { prepare() {
cd "$builddir" default_prepare
sed -i "s/@USER@/${USER:-$(id -un)}/" tests/conninfo.tcl
autoupdate
autoreconf -fiv
}
build() {
local x64_flags local x64_flags
case "$CARCH" in case "$CARCH" in
aarch64 | x86_64) x64_flags="--enable-64bit";; aarch64 | x86_64) x64_flags="--enable-64bit";;
...@@ -37,19 +48,40 @@ build() { ...@@ -37,19 +48,40 @@ build() {
--mandir=/usr/share/man \ --mandir=/usr/share/man \
--disable-rpath \ --disable-rpath \
--enable-threads \ --enable-threads \
$x64_flags \ $x64_flags
|| return 1 make
make || return 1
} }
package() { check() {
cd "$builddir" export PATH="/usr/libexec/postgresql14:$PATH"
_data_dir="$srcdir"/pgtcltest
local socket_dir="$srcdir"
make DESTDIR="$pkgdir" install || return 1 rm -vrf "$_data_dir"
make -C doc DESTDIR="$pkgdir" all || return 1 mkdir -vp "$_data_dir"
pg_ctl initdb -D "$_data_dir"
pg_ctl start -D "$_data_dir" -o -k"$socket_dir"
createdb -h "$socket_dir" pgtcl
make test TESTFLAGS="-verbose pbtels -notfile 'sqlite3.test'"
cd tests
psql -h "$socket_dir" -d pgtcl -c '\i create.sql'
local test; for test in import*.tcl; do
msg "Testing $test"
time tclsh $test
done
pg_ctl stop -D "$_data_dir" -m immediate
}
package() {
make DESTDIR="$pkgdir" install
# Remove empty directories. # Remove empty directories.
rmdir "$pkgdir"/usr/bin "$pkgdir"/usr/include rmdir -v "$pkgdir"/usr/bin
} }
sha512sums="895f81548d5fde128b258cfb9cad732f539089a7c89bad08b7bc8a229d7f2ecdb9b31a374ddb3fb392ed3e20ba45cca47c2dccfa6ab86e617177f7021d08b3b3 pgtcl-2.1.0.tar.gz" sha512sums="
f6ad4b392f93d70851ab01e4e5d4b3404940ad05e40e8c326a66969247c5cb244e0ab092b256b569131d55cf76ff50902f686d864bade0ec10d02f42a7aafa7e pgtcl-3.0.0.tar.gz
8c9f5bf024919dd59f29ecc99d1be305169c1a6a8dcad1ff0bcaefda4e1d206731b867340167adf44f7e607745152a7745a4d1dc4a67f835de469990ed9e1cd8 pgtcl-tests.patch
"
--- a/tests/conninfo.tcl
+++ b/tests/conninfo.tcl
@@ -4,8 +4,8 @@
array set conninfo {
host localhost
port 5432
- dbname ####
- user ####
+ dbname pgtcl
+ user @USER@
}
# Or copy and fill out the above datastructure into ~/.conninfo
--- a/tests/pgtcl.test
+++ b/tests/pgtcl.test
@@ -1045,7 +1045,7 @@
lappend res [string equal $val $val2]
::pg::disconnect $conn
- lappend res [regexp {(7|8|9|10|11|12)0([0-9])[012]([0-9])} $val]
+ lappend res [regexp {(7|8|9|10|11|12|13|14)0([0-9])[012]([0-9])} $val]
} -result [list 1 1]
@@ -1079,9 +1079,9 @@
lappend res [string equal $val $val2]
::pg::disconnect $conn
- set match [regexp {(7|8|9|10|11|12)\.([0-9])\.([0-9])} $val]
+ set match [regexp {(7|8|9|10|11|12|13|14)\.([0-9])\.([0-9])} $val]
if {!$match} {
- set match [regexp {^(10|11|12)\.[1-9][0-9]* \(.*} $val]
+ set match [regexp {^(10|11|12|13|14)\.[1-9][0-9]*} $val]
}
lappend res $match
--- a/tests/import_sampledata.tcl
+++ b/tests/import_sampledata.tcl
@@ -4,6 +4,8 @@
# $Id$
#
+lappend auto_path ..
+
package require Pgtcl
if {[file exists conninfo.tcl]} {
--- a/tests/import_sampledata_connobj.tcl
+++ b/tests/import_sampledata_connobj.tcl
@@ -5,6 +5,8 @@
# $Id$
#
+lappend auto_path ..
+
package require Pgtcl
if {[file exists conninfo.tcl]} {
--- a/tests/import_sampledata_onetransaction.tcl
+++ b/tests/import_sampledata_onetransaction.tcl
@@ -5,6 +5,8 @@
# $Id$
#
+lappend auto_path ..
+
package require Pgtcl
if {[file exists conninfo.tcl]} {
--- a/tests/import_sampledata_prepared.tcl
+++ b/tests/import_sampledata_prepared.tcl
@@ -5,6 +5,8 @@
# $Id$
#
+lappend auto_path ..
+
package require Pgtcl
if {[file exists conninfo.tcl]} {
--- a/tests/import_sampledata_prepared_onetransaction.tcl
+++ b/tests/import_sampledata_prepared_onetransaction.tcl
@@ -5,6 +5,8 @@
# $Id$
#
+lappend auto_path ..
+
package require Pgtcl
if {[file exists conninfo.tcl]} {
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment