[libnative-platform-java] 01/01: Fix the FTBFS on architecutres other than x86
Kai-Chung Yan
seamlik-guest at moszumanska.debian.org
Tue Nov 8 09:32:10 UTC 2016
This is an automated email from the git hooks/post-receive script.
seamlik-guest pushed a commit to branch master
in repository libnative-platform-java.
commit 0bd6762007fdb00f6cebf30d9772273243d9cd03
Author: Kai-Chung Yan (殷啟聰) <seamlikok at gmail.com>
Date: Tue Nov 8 17:31:05 2016 +0800
Fix the FTBFS on architecutres other than x86
---
debian/patches/PosixFile_rename.patch | 2 +-
debian/patches/build_scripts.patch | 76 ++++++++++++++++++++---------------
2 files changed, 44 insertions(+), 34 deletions(-)
diff --git a/debian/patches/PosixFile_rename.patch b/debian/patches/PosixFile_rename.patch
index e0aef0f..e173895 100644
--- a/debian/patches/PosixFile_rename.patch
+++ b/debian/patches/PosixFile_rename.patch
@@ -6,7 +6,7 @@ Author: Kai-Chung Yan (殷啟聰)
Last-Update: 2016-10-27
--- a/build.gradle
+++ b/build.gradle
-@@ -223,3 +223,7 @@
+@@ -208,3 +208,7 @@
dep.appendNode('version', project.version)
}
}
diff --git a/debian/patches/build_scripts.patch b/debian/patches/build_scripts.patch
index c548a41..f199ac6 100644
--- a/debian/patches/build_scripts.patch
+++ b/debian/patches/build_scripts.patch
@@ -14,11 +14,9 @@ Forwarded: not-needed
} else if (project.hasProperty('snapshot')) {
repository(url: uri("https://gradle.artifactoryonline.com/gradle/libs-snapshots-local")) {
authentication(userName: artifactoryUserName, password: artifactoryPassword)
-@@ -90,48 +87,24 @@
- def deployer = uploadJni.repositories.mavenDeployer
+@@ -91,47 +88,21 @@
model {
-+ /*
platforms {
- osx_i386 {
- architecture "i386"
@@ -51,40 +49,62 @@ Forwarded: not-needed
- freebsd_amd64 {
- architecture "amd64"
- operatingSystem "freebsd"
-+ linux {
++ debian {
+ architecture "${"dpkg-architecture --query DEB_HOST_ARCH".execute().text}"
-+ operatingSystem 'linux'
++ operatingSystem "${"dpkg-architecture --query DEB_HOST_ARCH_OS".execute().text}"
++ }
++ }
++ toolChains {
++ cxx(Gcc) {
++ //path '/usr/bin/c++'
++ target 'debian'
}
}
-+ */
-
+-
components {
nativePlatform(NativeLibrarySpec) {
baseName 'native-platform'
- // TODO - this should be the default. Figure out why this is not working
-+ /*
- $.platforms.each { p ->
- targetPlatform p.name
- }
-+ */
+- // TODO - this should be the default. Figure out why this is not working
+- $.platforms.each { p ->
+- targetPlatform p.name
+- }
++ targetPlatform 'debian'
sources {
cpp {
source.srcDirs = ['src/shared/cpp', 'src/main/cpp']
-@@ -142,11 +115,13 @@
+@@ -142,11 +113,7 @@
nativePlatformCurses(NativeLibrarySpec) {
baseName 'native-platform-curses'
-+ /*
- $.platforms.each { p ->
- if (!p.operatingSystem.windows) {
- targetPlatform p.name
- }
- }
-+ */
+- $.platforms.each { p ->
+- if (!p.operatingSystem.windows) {
+- targetPlatform p.name
+- }
+- }
++ targetPlatform 'debian'
sources {
cpp {
source.srcDirs = ['src/shared/cpp', 'src/curses/cpp']
-@@ -181,6 +156,15 @@
+@@ -165,7 +132,7 @@
+ cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/darwin"
+ cppCompiler.args '-mmacosx-version-min=10.4'
+ linker.args '-mmacosx-version-min=10.4'
+- } else if (targetPlatform.operatingSystem.linux) {
++ } else if (targetPlatform.operatingSystem.linux || targetPlatform.operatingSystem.name.contains('hurd')) {
+ cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
+ cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/linux"
+ cppCompiler.args '-D_FILE_OFFSET_BITS=64'
+@@ -173,14 +140,23 @@
+ cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
+ cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include/win32"
+ linker.args "Shlwapi.lib", "Advapi32.lib"
+- } else if (targetPlatform.operatingSystem.freeBSD) {
++ } else if (targetPlatform.operatingSystem.freeBSD || targetPlatform.operatingSystem.name.contains('bsd')) {
+ cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
+- cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/freebsd"
++ cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/bsd"
+ }
+ cppCompiler.args "-I${nativeHeadersDir}"
tasks.withType(CppCompile) { task ->
task.dependsOn project.tasks.nativeHeaders
}
@@ -100,7 +120,7 @@ Forwarded: not-needed
}
// Using internal class here to make this simple
-@@ -190,43 +174,16 @@
+@@ -190,40 +166,6 @@
if (!buildable) {
return
}
@@ -141,13 +161,3 @@ Forwarded: not-needed
}
}
}
-+/*
-+ toolChains {
-+ gcc(Gcc) {
-+ path '/usr/bin/c++'
-+ }
-+ }
-+ */
- }
-
- javadoc {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libnative-platform-java.git
More information about the pkg-java-commits
mailing list