aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/sqsh/APKBUILD19
-rw-r--r--main/sqsh/datetime.patch16
-rw-r--r--main/sqsh/tds-version.patch32
3 files changed, 62 insertions, 5 deletions
diff --git a/main/sqsh/APKBUILD b/main/sqsh/APKBUILD
index f283c7a57c..96d29f5d0e 100644
--- a/main/sqsh/APKBUILD
+++ b/main/sqsh/APKBUILD
@@ -7,7 +7,7 @@ case $pkgver in
*.*.*) _v=${pkgver%.*};;
*) _v=$pkgver;;
esac
-pkgrel=0
+pkgrel=1
pkgdesc="Sybase iSQL replacement"
url="http://www.sqsh.org"
arch="all"
@@ -17,7 +17,10 @@ depends_dev=""
makedepends="freetds-dev readline-dev ncurses-dev"
install=""
subpackages="$pkgname-doc"
-source="http://downloads.sourceforge.net/project/sqsh/sqsh/sqsh-$_v/sqsh-$pkgver.tgz"
+source="http://downloads.sourceforge.net/project/sqsh/sqsh/sqsh-$_v/sqsh-$pkgver.tgz
+ tds-version.patch
+ datetime.patch
+ "
builddir="$srcdir"/$pkgname-$_v
prepare() {
@@ -51,6 +54,12 @@ package() {
make DESTDIR="$pkgdir" install.man || return 1
}
-md5sums="8ddbc202f1457a98e9ad74eb54cd668b sqsh-2.5.16.1.tgz"
-sha256sums="d6641f365ace60225fc0fa48f82b9dbed77a4e506a0e497eb6889e096b8320f2 sqsh-2.5.16.1.tgz"
-sha512sums="d011d413f5a21059e1b043c75f0a15ea29d10972b59ea980ebcb010b1b0e16eb377a66d21ba4f3ea4433c4deac5ba80b1af7e858129a306a6611de32da48981c sqsh-2.5.16.1.tgz"
+md5sums="8ddbc202f1457a98e9ad74eb54cd668b sqsh-2.5.16.1.tgz
+7638a7cab03fa4206e335607d368eaf6 tds-version.patch
+68574ec4adaffa0f877575c6f79f0b68 datetime.patch"
+sha256sums="d6641f365ace60225fc0fa48f82b9dbed77a4e506a0e497eb6889e096b8320f2 sqsh-2.5.16.1.tgz
+401a66a244cd3c61d73bc031a8a34cb9b639c144aa9c002a06295f7a86cd156d tds-version.patch
+10063f6fb3a3562c6802f265a461c265f410d18c7778ae48760585a4889c0d8d datetime.patch"
+sha512sums="d011d413f5a21059e1b043c75f0a15ea29d10972b59ea980ebcb010b1b0e16eb377a66d21ba4f3ea4433c4deac5ba80b1af7e858129a306a6611de32da48981c sqsh-2.5.16.1.tgz
+f73696f016e6a0f3c8f4020ba79b7dc9618c1958872dbb531e31c1b2709d7d7af227a3206b466bda932d8319443c838f6b05042b79b50560a9de842502274798 tds-version.patch
+6b424d995755d07fab6986a0594350e3d045c36fd4852f28608dee918d1052e0ec8e92b8758347c18f39a2eefa42a8421d44d54c799386a533a606b6b4802352 datetime.patch"
diff --git a/main/sqsh/datetime.patch b/main/sqsh/datetime.patch
new file mode 100644
index 0000000000..2a02504c59
--- /dev/null
+++ b/main/sqsh/datetime.patch
@@ -0,0 +1,16 @@
+diff --git a/src/dsp_conv.c b/src/dsp_conv.c
+index 6c6878c..e141b99 100644
+--- a/src/dsp_conv.c
++++ b/src/dsp_conv.c
+@@ -660,11 +660,6 @@ CS_RETCODE dsp_datetime_conv( ctx, dt_fmt, dt, buf, len, type )
+ * type of date that we are processing and replace the ms
+ * field if it exists.
+ */
+-#if defined(CS_BIGDATETIME_TYPE) && defined(CS_BIGTIME_TYPE)
+- if (dt_fmt->datatype == CS_BIGDATETIME_TYPE || dt_fmt->datatype == CS_BIGTIME_TYPE)
+- fmt = dsp_datetime_strip( dt_fmt->datatype, conv_fmt, (int) dr.datesecfrac );
+- else
+-#endif
+ fmt = dsp_datetime_strip( dt_fmt->datatype, conv_fmt, (int) dr.datemsecond );
+
+ /*
diff --git a/main/sqsh/tds-version.patch b/main/sqsh/tds-version.patch
new file mode 100644
index 0000000000..75907d10f0
--- /dev/null
+++ b/main/sqsh/tds-version.patch
@@ -0,0 +1,32 @@
+Regarding obsolete versions
+
+In the earlier days of FreeTDS, Microsoft did not release official specs for the TDS protocol. When MSSQL 2000 (product 8.0) was released, there was semi-official indications from the Microsoft community that the TDS protocol would be version 8.0. So the FreeTDS developers adopted that version for FreeTDS. Years later, when Microsoft started releasing official specs of the protocol, it became obvious that the TDS versions that FreeTDS had labeled 8.0 and 9.0 were actually versions 7.1 and 7.2 respectively.
+
+http://www.freetds.org/userguide/choosingtdsprotocol.htm#AEN910
+
+diff --git a/src/cmd_connect.c b/src/cmd_connect.c
+index e1d35cb..2956050 100644
+--- a/src/cmd_connect.c
++++ b/src/cmd_connect.c
+@@ -860,8 +860,8 @@ int cmd_connect( argc, argv )
+ /* Then we use freetds which uses enum instead of defines */
+ else if (strcmp(tds_version, "7.0") == 0)
+ version = CS_TDS_70;
+- else if (strcmp(tds_version, "8.0") == 0)
+- version = CS_TDS_80;
++ else if (strcmp(tds_version, "7.1") == 0)
++ version = CS_TDS_71;
+ #endif
+ else version = CS_TDS_50; /* default version */
+
+@@ -1258,8 +1258,8 @@ int cmd_connect( argc, argv )
+ case CS_TDS_70:
+ env_set( g_env, "tds_version", "7.0" );
+ break;
+- case CS_TDS_80:
+- env_set( g_env, "tds_version", "8.0" );
++ case CS_TDS_71:
++ env_set( g_env, "tds_version", "7.1" );
+ break;
+ #endif
+ default: