aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openv2g
diff options
context:
space:
mode:
authorOlliver Schinagl <oliver@schinagl.nl>2019-11-08 10:35:39 +0100
committerMilan P. Stanić <mps@arvanta.net>2019-11-21 21:25:55 +0100
commit636de66f4e50c4e1eedd6a7510625ef56b08cb69 (patch)
treed791b1b073c6b809ee59d957631bb73b2b0228d3 /testing/openv2g
parentb6648267953fc96f422bf0fe42d190d59b982b5d (diff)
downloadaports-636de66f4e50c4e1eedd6a7510625ef56b08cb69.tar.bz2
aports-636de66f4e50c4e1eedd6a7510625ef56b08cb69.tar.xz
testing/openv2g: New aport
OpenV2G is an open source implementation of the ISO IEC 15118 and also the DIN 70121 vehicle to grid (V2G) communication interface. The main component are the libraries, but the repository also includes a testing application. The makefile(s) are a bit of a mess, and should be rewritten. However as that is outside of the scope, only the most minimal changes where done to produce a useable build. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Diffstat (limited to 'testing/openv2g')
-rw-r--r--testing/openv2g/APKBUILD34
-rw-r--r--testing/openv2g/makefiles.patch192
2 files changed, 226 insertions, 0 deletions
diff --git a/testing/openv2g/APKBUILD b/testing/openv2g/APKBUILD
new file mode 100644
index 0000000000..845c28c478
--- /dev/null
+++ b/testing/openv2g/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: Olliver Schinagl <oliver@schinagl.nl>
+# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
+pkgname="openv2g"
+pkgver="0.9.4"
+pkgrel=0
+pkgdesc="Implements ISO IEC 15118 and also the DIN 70121 vehicle to grid (V2G) communication interface"
+url="https://openv2g.org/"
+arch="all"
+license="LGPL-3.0-or-later"
+options="!check" # No tests available
+subpackages="lib${pkgname}:libs ${pkgname}-dev"
+source="
+ makefiles.patch
+ ${pkgname}-${pkgver}.zip::https://downloads.sourceforge.net/sourceforge/openv2g/OpenV2G_${pkgver}.zip
+"
+
+unpack() {
+ mkdir -p "${builddir}"
+ unzip "${srcdir}/${pkgname}-${pkgver}.zip" -d "${builddir}"
+}
+
+build() {
+ cd Release
+ make
+}
+
+package() {
+ depends="lib${pkgname}"
+ cd Release
+ make DESTDIR="${pkgdir}/usr" install
+}
+
+sha512sums="8ecb2b31ad9cd8cdb62e5bb32c4e535e2c6717d4d1809f7e42588a0b3071902c54de9be75e0b908ac5ab283aea9375080f6b4a5c4f002e4c27736266a68a2e2f makefiles.patch
+0fe088bc3ae0f0dc6af8c9c3a989301e5e155a9406b80cb9025ceb5b548dc94202dde37993711c589fac6eddf626897c7ef003b73e01cb1c5b20b7b73365b930 openv2g-0.9.4.zip"
diff --git a/testing/openv2g/makefiles.patch b/testing/openv2g/makefiles.patch
new file mode 100644
index 0000000000..43260767e3
--- /dev/null
+++ b/testing/openv2g/makefiles.patch
@@ -0,0 +1,192 @@
+diff --git a/Release/makefile b/Release/makefile
+index f30e46e..2cd455f 100644
+--- a/Release/makefile
++++ b/Release/makefile
+@@ -5,6 +5,7 @@
+ -include ../makefile.init
+
+ RM := rm -rf
++DESTDIR := '/usr/local'
+
+ # All of the sources participating in the build are defined here
+ -include sources.mk
+@@ -30,19 +31,62 @@ endif
+ # Add inputs and outputs from these tool invocations to the build variables
+
+ # All Target
+-all: OpenV2G.exe
++all: OpenV2G
+
+ # Tool invocations
+-OpenV2G.exe: $(OBJS) $(USER_OBJS)
++OpenV2G: $(BIN_OBJS) $(OBJS) $(USER_OBJS)
+ @echo 'Building target: $@'
+ @echo 'Invoking: MinGW C Linker'
+- gcc -o "OpenV2G.exe" $(OBJS) $(USER_OBJS) $(LIBS)
++ @echo 'objs: $(OBJS) userobjs: $(USER_OBJS) libs: $(LIBS)'
++ ar rcs 'libopenv2g.a' $(OBJS) $(USER_OBJS)
++ gcc -shared -o 'libopenv2g.so' $(OBJS) $(USER_OBJS) $(LIBS)
++ gcc -o 'openv2g' $(BIN_OBJS) $(OBJS) $(USER_OBJS) $(LIBS)
+ @echo 'Finished building target: $@'
+ @echo ' '
+
++install: all
++ @install -D -m 755 -t '$(DESTDIR)/bin' 'openv2g'
++ @install -D -m 644 'libopenv2g.so' '$(DESTDIR)/lib/libopenv2g.so.0.9.4'
++ @ln -s 'libopenv2g.so.0.9.4' '$(DESTDIR)/lib/libopenv2g.so.0'
++ @ln -s 'libopenv2g.so.0' '$(DESTDIR)/lib/libopenv2g.so'
++ @install -D -m 644 -t '$(DESTDIR)/lib' 'libopenv2g.a'
++ @install -D -m 644 -t '$(DESTDIR)/include/openv2g/appHandshake' \
++ ../src/appHandshake/appHandEXIDatatypes.h \
++ ../src/appHandshake/appHandEXIDatatypesDecoder.h \
++ ../src/appHandshake/appHandEXIDatatypesEncoder.h
++ @install -D -m 644 -t '$(DESTDIR)/include/openv2g/codec' \
++ ../src/codec/BitInputStream.h \
++ ../src/codec/BitOutputStream.h \
++ ../src/codec/ByteStream.h \
++ ../src/codec/DecoderChannel.h \
++ ../src/codec/EXIConfig.h \
++ ../src/codec/EXIHeaderDecoder.h \
++ ../src/codec/EXIHeaderEncoder.h \
++ ../src/codec/EXIOptions.h \
++ ../src/codec/EXITypes.h \
++ ../src/codec/EncoderChannel.h \
++ ../src/codec/ErrorCodes.h \
++ ../src/codec/MethodsBag.h
++ @install -D -m 644 -t '$(DESTDIR)/include/openv2g/din' \
++ ../src/din/dinEXIDatatypes.h \
++ ../src/din/dinEXIDatatypesDecoder.h \
++ ../src/din/dinEXIDatatypesEncoder.h \
++ ../src/iso1/iso1EXIDatatypes.h \
++ ../src/iso1/iso1EXIDatatypesDecoder.h \
++ ../src/iso1/iso1EXIDatatypesEncoder.h \
++ ../src/iso2/iso2EXIDatatypes.h \
++ ../src/iso2/iso2EXIDatatypesDecoder.h \
++ ../src/iso2/iso2EXIDatatypesEncoder.h
++ @install -D -m 644 -t '$(DESTDIR)/include/openv2g/transport' \
++ ../src/transport/v2gtp.h
++ @install -D -m 644 -t '$(DESTDIR)/include/openv2g/xmldsig' \
++ ../src/xmldsig/xmldsigEXIDatatypes.h \
++ ../src/xmldsig/xmldsigEXIDatatypesDecoder.h \
++ ../src/xmldsig/xmldsigEXIDatatypesEncoder.h
++
+ # Other Targets
+ clean:
+- -$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) OpenV2G.exe
++ -$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) openv2g libopenv2g.a libopenv2g.so
+ -@echo ' '
+
+ .PHONY: all clean dependents
+diff --git a/Release/src/appHandshake/subdir.mk b/Release/src/appHandshake/subdir.mk
+index 9181dcc..cd8e5a3 100644
+--- a/Release/src/appHandshake/subdir.mk
++++ b/Release/src/appHandshake/subdir.mk
+@@ -23,7 +23,7 @@ C_DEPS += \
+ src/appHandshake/%.o: ../src/appHandshake/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
++ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+diff --git a/Release/src/codec/subdir.mk b/Release/src/codec/subdir.mk
+index ecedb18..d1647bf 100644
+--- a/Release/src/codec/subdir.mk
++++ b/Release/src/codec/subdir.mk
+@@ -38,7 +38,7 @@ C_DEPS += \
+ src/codec/%.o: ../src/codec/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
++ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+diff --git a/Release/src/din/subdir.mk b/Release/src/din/subdir.mk
+index 209e552..773d4ce 100644
+--- a/Release/src/din/subdir.mk
++++ b/Release/src/din/subdir.mk
+@@ -23,7 +23,7 @@ C_DEPS += \
+ src/din/%.o: ../src/din/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
++ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+diff --git a/Release/src/iso1/subdir.mk b/Release/src/iso1/subdir.mk
+index d8ea6ae..7920ac8 100644
+--- a/Release/src/iso1/subdir.mk
++++ b/Release/src/iso1/subdir.mk
+@@ -23,7 +23,7 @@ C_DEPS += \
+ src/iso1/%.o: ../src/iso1/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
++ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+diff --git a/Release/src/iso2/subdir.mk b/Release/src/iso2/subdir.mk
+index caf3b79..de3ba35 100644
+--- a/Release/src/iso2/subdir.mk
++++ b/Release/src/iso2/subdir.mk
+@@ -23,7 +23,7 @@ C_DEPS += \
+ src/iso2/%.o: ../src/iso2/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
++ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+diff --git a/Release/src/test/subdir.mk b/Release/src/test/subdir.mk
+index eceb3be..9f5db63 100644
+--- a/Release/src/test/subdir.mk
++++ b/Release/src/test/subdir.mk
+@@ -8,7 +8,7 @@ C_SRCS += \
+ ../src/test/main_databinder.c \
+ ../src/test/main_example.c
+
+-OBJS += \
++BIN_OBJS += \
+ ./src/test/main.o \
+ ./src/test/main_databinder.o \
+ ./src/test/main_example.o
+@@ -23,7 +23,7 @@ C_DEPS += \
+ src/test/%.o: ../src/test/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
++ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+diff --git a/Release/src/transport/subdir.mk b/Release/src/transport/subdir.mk
+index fc10ca1..c4e8b99 100644
+--- a/Release/src/transport/subdir.mk
++++ b/Release/src/transport/subdir.mk
+@@ -17,7 +17,7 @@ C_DEPS += \
+ src/transport/%.o: ../src/transport/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
++ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+diff --git a/Release/src/xmldsig/subdir.mk b/Release/src/xmldsig/subdir.mk
+index 2497b78..20e799f 100644
+--- a/Release/src/xmldsig/subdir.mk
++++ b/Release/src/xmldsig/subdir.mk
+@@ -23,7 +23,7 @@ C_DEPS += \
+ src/xmldsig/%.o: ../src/xmldsig/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
++ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+