Fix build of jsoncpp. am: 70fddb61d1 am: 94f53395ef am: e1c1d65a2b
Original change: https://android-review.googlesource.com/c/platform/tools/ndkports/+/1231408
Change-Id: I647d2366655a19d17ccf4dc8cf3940d4c2d73b7d
diff --git a/ports/jsoncpp/port.kts b/ports/jsoncpp/port.kts
index ba3ab70..8a3e1ba 100644
--- a/ports/jsoncpp/port.kts
+++ b/ports/jsoncpp/port.kts
@@ -31,4 +31,18 @@
override val modules = listOf(
Module("jsoncpp")
)
+
+ override fun extractSource(
+ sourceTarball: File,
+ sourceDirectory: File,
+ workingDirectory: File
+ ): Result<Unit, String> =
+ super.extractSource(sourceTarball, sourceDirectory, workingDirectory)
+ .onSuccess {
+ // jsoncpp has a "version" file on the include path that
+ // conflicts with
+ // https://en.cppreference.com/w/cpp/header/version. Remove it
+ // so we can build.
+ sourceDirectory.resolve("version").delete()
+ }
}