aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openv2g
diff options
context:
space:
mode:
authorOlliver Schinagl <oliver@schinagl.nl>2020-04-07 20:27:46 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-04-09 17:45:25 +0000
commit9ed329c80d569f113fe03c73a7ac09d5e214b0ea (patch)
tree58785ea41e6290978ab7f184f1f003d652f66567 /testing/openv2g
parentcb2baf840cab2fc019bd8bc80d1d513dc7277cfb (diff)
downloadaports-9ed329c80d569f113fe03c73a7ac09d5e214b0ea.tar.bz2
aports-9ed329c80d569f113fe03c73a7ac09d5e214b0ea.tar.xz
testing/openv2g: Make the open-v2g library more versatile
The Open-V2G library can be made a little more versatile by enabling more feature, such as XMLDSIG support. More importantly, the library currently violates the ISO15118 spec by using a home-grown UCS implementation, where everything is treated as 32-bits, e.g. UTF-32, where ISO15118 uses UTF-8 encoding. As this is incompatible, we are better off switching to ASCII for now, a that at least is backwards compatible. To properly fix this, the library needs toe be fixed to properly by a proper UCS implementation or using a library to this end. Note, that these patches are configuration options changing the defaults, and thus are not up streamed. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Diffstat (limited to 'testing/openv2g')
-rw-r--r--testing/openv2g/0001-Enable-XMLDSIG-codec-support.patch20
-rw-r--r--testing/openv2g/0002-Violate-the-spec-less-by-downgrading-to-ASCII-for-UT.patch19
-rw-r--r--testing/openv2g/APKBUILD13
3 files changed, 47 insertions, 5 deletions
diff --git a/testing/openv2g/0001-Enable-XMLDSIG-codec-support.patch b/testing/openv2g/0001-Enable-XMLDSIG-codec-support.patch
new file mode 100644
index 0000000000..9a6133e8e2
--- /dev/null
+++ b/testing/openv2g/0001-Enable-XMLDSIG-codec-support.patch
@@ -0,0 +1,20 @@
+diff --git a/testing/openv2g/0001-Enable-XMLDSIG-codec-support.patch b/testing/openv2g/0001-Enable-XMLDSIG-codec-support.patch
+new file mode 100644
+index 0000000000..c320f05aab
+--- /dev/null
++++ b/testing/openv2g/0001-Enable-XMLDSIG-codec-support.patch
+@@ -0,0 +1,14 @@
++diff --git a/src/xmldsig/xmldsigEXIDatatypes.h b/Release/src/xmldsig/xmldsigEXIDatatypes.h
++index 8b06393..ee7ac88 100755
++--- a/src/xmldsig/xmldsigEXIDatatypes.h
+++++ b/src/xmldsig/xmldsigEXIDatatypes.h
++@@ -44,8 +44,8 @@ extern "C" {
++
++ #define SUPPORT_YES 1
++ #define SUPPORT_NO 2
++-#define DEPLOY_XMLDSIG_CODEC SUPPORT_NO
++-#define DEPLOY_XMLDSIG_CODEC_FRAGMENT SUPPORT_NO
+++#define DEPLOY_XMLDSIG_CODEC SUPPORT_YES
+++#define DEPLOY_XMLDSIG_CODEC_FRAGMENT SUPPORT_YES
++
++ #if DEPLOY_XMLDSIG_CODEC == SUPPORT_YES
diff --git a/testing/openv2g/0002-Violate-the-spec-less-by-downgrading-to-ASCII-for-UT.patch b/testing/openv2g/0002-Violate-the-spec-less-by-downgrading-to-ASCII-for-UT.patch
new file mode 100644
index 0000000000..df9da8bb8b
--- /dev/null
+++ b/testing/openv2g/0002-Violate-the-spec-less-by-downgrading-to-ASCII-for-UT.patch
@@ -0,0 +1,19 @@
+diff --git a/testing/openv2g/0002-Violate-the-spec-less-by-downgrading-to-ASCII-for-UT.patch b/testing/openv2g/0002-Violate-the-spec-less-by-downgrading-to-ASCII-for-UT.patch
+new file mode 100644
+index 0000000000..bf76a6943c
+--- /dev/null
++++ b/testing/openv2g/0002-Violate-the-spec-less-by-downgrading-to-ASCII-for-UT.patch
+@@ -0,0 +1,13 @@
++diff --git a/src/codec/EXIConfig.h b/Release/src/codec/EXIConfig.h
++index edbb2dc..24669f6 100755
++--- a/src/codec/EXIConfig.h
+++++ b/src/codec/EXIConfig.h
++@@ -79,7 +79,7 @@ extern "C" {
++ *
++ * ASCII or UCS
++ * */
++-#define STRING_REPRESENTATION STRING_REPRESENTATION_UCS
+++#define STRING_REPRESENTATION STRING_REPRESENTATION_ASCII
++
++
++ /* in the case of ASCII an extra char (null terminator) for printf and other functions is useful */
diff --git a/testing/openv2g/APKBUILD b/testing/openv2g/APKBUILD
index 0a11bf1c62..f65f4b93c9 100644
--- a/testing/openv2g/APKBUILD
+++ b/testing/openv2g/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname=openv2g
pkgver=0.9.4
-pkgrel=0
+pkgrel=1
pkgdesc="Implements ISO IEC 15118 and also the DIN 70121 vehicle to grid (V2G) communication interface"
url="https://openv2g.org/"
arch="all"
@@ -10,6 +10,8 @@ license="LGPL-3.0-or-later"
options="!check" # No tests available
subpackages="lib$pkgname:libs $pkgname-dev"
source="
+ 0001-Enable-XMLDSIG-codec-support.patch
+ 0002-Violate-the-spec-less-by-downgrading-to-ASCII-for-UT.patch
makefiles.patch
$pkgname-$pkgver.zip::https://downloads.sourceforge.net/sourceforge/openv2g/OpenV2G_$pkgver.zip
"
@@ -17,9 +19,8 @@ source="
unpack() {
mkdir -p "$builddir"
unzip "$srcdir/$pkgname-$pkgver.zip" -d "$builddir"
- find "$builddir" \
- \( -iname 'makefile' -o -iname '*.mk' \) \
- -exec dos2unix '{}' \;
+ # To ensure patches can be applied, convert the \r\n code-base first.
+ find "$builddir" -type f -exec dos2unix '{}' \;
}
build() {
@@ -33,5 +34,7 @@ package() {
make DESTDIR="$pkgdir/usr" install
}
-sha512sums="5c4e8df3033a9ebed412a004efdb812528e3d7c7e8d126dc1a1139c106391eeba58a7b13f88a21d4addd176b6f65dee3d1e2243cb46177628c5dd2b6e3f59f33 makefiles.patch
+sha512sums="a445b77e0870ac6f0bb5b419e862de7eaffc1da1421bffd267ea06c976b869d70111179dc54a373f0c28f6bdae83629cbc6e45c68ec03b571692a631b6436c67 0001-Enable-XMLDSIG-codec-support.patch
+fd2ee6c2a223e462f2142b16d1887b2a43e2c0c4e30cb40569d04dd116c83581e75d1867244691ac2b9f0ea21eb453a6df85fc4d9378154f4772f07648b792e7 0002-Violate-the-spec-less-by-downgrading-to-ASCII-for-UT.patch
+5c4e8df3033a9ebed412a004efdb812528e3d7c7e8d126dc1a1139c106391eeba58a7b13f88a21d4addd176b6f65dee3d1e2243cb46177628c5dd2b6e3f59f33 makefiles.patch
0fe088bc3ae0f0dc6af8c9c3a989301e5e155a9406b80cb9025ceb5b548dc94202dde37993711c589fac6eddf626897c7ef003b73e01cb1c5b20b7b73365b930 openv2g-0.9.4.zip"