Projects
openEuler:Mainline
jnr-ffi
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:jnr-ffi.spec
Changed
@@ -1,10 +1,11 @@ Name: jnr-ffi Version: 2.1.8 -Release: 1 +Release: 3 Summary: Java Abstracted Foreign Function Layer License: Apache-2.0 URL: http://github.com/jnr/%{name}/ Source0: https://github.com/jnr/%{name}/archive/%{name}-%{version}.tar.gz +Patch0: 0001-Support-for-LoongArch64.patch BuildRequires: fdupes gcc make maven-local mvn(com.github.jnr:jffi) BuildRequires: mvn(com.github.jnr:jffi::native:) mvn(com.github.jnr:jnr-x86asm) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) @@ -24,16 +25,13 @@ %prep %setup -q -n %{name}-%{name}-%{version} +%patch0 -p1 find -name '*.jar' -o -name '*.class' -exec rm -f '{}' \; %pom_remove_plugin ":maven-javadoc-plugin" sed -i 's|-Werror||' libtest/GNUmakefile %build -%{mvn_build} -f -- \ -%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} - -Dmaven.compiler.release=6 \ -%endif - -Dasm.version=7.0 +%{mvn_build} -f -- -Dasm.version=7.0 %install %mvn_install @@ -46,5 +44,11 @@ %license LICENSE %changelog +* Thu May 18 2023 huajingyun <huajingyun@loongson.cn> - 2.1.8-3 +- Add loongarch64 support + +* Thu May 18 2023 chenchen <chen_aka_jan@163.com> - 2.1.8-2 +- remove redundant macro pkg_vcmp + * Fri Jul 31 2020 Jeffery.Gao <gaojianxing@huawei.com> - 2.1.8-1 - Package init
View file
_service:tar_scm:0001-Support-for-LoongArch64.patch
Added
@@ -0,0 +1,123 @@ +From 261fa25d2f878a63febd883cb82f68033f227f58 Mon Sep 17 00:00:00 2001 +From: Jingyun Hua <huajingyun@loongson.cn> +Date: Wed, 17 May 2023 03:09:55 +0000 +Subject: PATCH Support for LoongArch64 + +--- + src/main/java/jnr/ffi/Platform.java | 6 ++ + .../loongarch64/linux/TypeAliases.java | 72 +++++++++++++++++++ + 2 files changed, 78 insertions(+) + create mode 100644 src/main/java/jnr/ffi/provider/jffi/platform/loongarch64/linux/TypeAliases.java + +diff --git a/src/main/java/jnr/ffi/Platform.java b/src/main/java/jnr/ffi/Platform.java +index dbe84dc..0f06ef4 100644 +--- a/src/main/java/jnr/ffi/Platform.java ++++ b/src/main/java/jnr/ffi/Platform.java +@@ -116,6 +116,9 @@ public abstract class Platform { + /** 64 bit ARM */ + AARCH64, + ++ /** 64 bit LOONGARCH */ ++ LOONGARCH64, ++ + /** + * Unknown CPU architecture. A best effort will be made to infer architecture + * specific values such as address and long size. +@@ -216,6 +219,8 @@ public abstract class Platform { + return CPU.S390X; + } else if (equalsIgnoreCase("aarch64", archString)) { + return CPU.AARCH64; ++ } else if (equalsIgnoreCase("loongarch64", archString)) { ++ return CPU.LOONGARCH64; + } + + // Try to find by lookup up in the CPU list +@@ -273,6 +278,7 @@ public abstract class Platform { + case SPARCV9: + case S390X: + case AARCH64: ++ case LOONGARCH64: + dataModel = 64; + break; + default: +diff --git a/src/main/java/jnr/ffi/provider/jffi/platform/loongarch64/linux/TypeAliases.java b/src/main/java/jnr/ffi/provider/jffi/platform/loongarch64/linux/TypeAliases.java +new file mode 100644 +index 0000000..de700f3 +--- /dev/null ++++ b/src/main/java/jnr/ffi/provider/jffi/platform/loongarch64/linux/TypeAliases.java +@@ -0,0 +1,72 @@ ++/* ++ * Copyright (C) 2022 Wayne Meissner ++ * ++ * This file is part of the JNR project. ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++package jnr.ffi.provider.jffi.platform.loongarch64.linux; ++ ++import jnr.ffi.NativeType; ++import jnr.ffi.TypeAlias; ++ ++import java.util.EnumMap; ++import java.util.Map; ++ ++public final class TypeAliases { ++ public static final Map<TypeAlias, jnr.ffi.NativeType> ALIASES = buildTypeMap(); ++ private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() { ++ Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, jnr.ffi.NativeType>(TypeAlias.class); ++ m.put(TypeAlias.int8_t, NativeType.SCHAR); ++ m.put(TypeAlias.u_int8_t, NativeType.UCHAR); ++ m.put(TypeAlias.int16_t, NativeType.SSHORT); ++ m.put(TypeAlias.u_int16_t, NativeType.USHORT); ++ m.put(TypeAlias.int32_t, NativeType.SINT); ++ m.put(TypeAlias.u_int32_t, NativeType.UINT); ++ m.put(TypeAlias.int64_t, NativeType.SLONGLONG); ++ m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG); ++ m.put(TypeAlias.intptr_t, NativeType.SLONG); ++ m.put(TypeAlias.uintptr_t, NativeType.ULONG); ++ m.put(TypeAlias.caddr_t, NativeType.ADDRESS); ++ m.put(TypeAlias.dev_t, NativeType.ULONG); ++ m.put(TypeAlias.blkcnt_t, NativeType.SLONG); ++ m.put(TypeAlias.blksize_t, NativeType.SINT); ++ m.put(TypeAlias.gid_t, NativeType.UINT); ++ m.put(TypeAlias.in_addr_t, NativeType.UINT); ++ m.put(TypeAlias.in_port_t, NativeType.USHORT); ++ m.put(TypeAlias.ino_t, NativeType.ULONG); ++ m.put(TypeAlias.ino64_t, NativeType.ULONG); ++ m.put(TypeAlias.key_t, NativeType.SINT); ++ m.put(TypeAlias.mode_t, NativeType.UINT); ++ m.put(TypeAlias.nlink_t, NativeType.UINT); ++ m.put(TypeAlias.id_t, NativeType.UINT); ++ m.put(TypeAlias.pid_t, NativeType.SINT); ++ m.put(TypeAlias.off_t, NativeType.SLONG); ++ m.put(TypeAlias.swblk_t, NativeType.SLONG); ++ m.put(TypeAlias.uid_t, NativeType.UINT); ++ m.put(TypeAlias.clock_t, NativeType.SLONG); ++ m.put(TypeAlias.size_t, NativeType.ULONG); ++ m.put(TypeAlias.ssize_t, NativeType.SLONG); ++ m.put(TypeAlias.time_t, NativeType.SLONG); ++ m.put(TypeAlias.fsblkcnt_t, NativeType.ULONG); ++ m.put(TypeAlias.fsfilcnt_t, NativeType.ULONG); ++ m.put(TypeAlias.sa_family_t, NativeType.USHORT); ++ m.put(TypeAlias.socklen_t, NativeType.UINT); ++ m.put(TypeAlias.rlim_t, NativeType.ULONG); ++ m.put(TypeAlias.cc_t, NativeType.UCHAR); ++ m.put(TypeAlias.speed_t, NativeType.UINT); ++ m.put(TypeAlias.tcflag_t, NativeType.UINT); ++ return m; ++ } ++} +-- +2.33.0 +
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/jnr-ffi.git</param> - <param name="revision">71d41d39b06d5f1cdcde6b8b788aab5744f1729f</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2