new package: libobjc2

This commit is contained in:
Tee KOBAYASHI 2022-01-02 02:56:43 +09:00 committed by Henrik Grimler
parent 102cbd7c1c
commit 2160f43df4
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,24 @@
TERMUX_PKG_HOMEPAGE=http://www.gnustep.org/
TERMUX_PKG_DESCRIPTION="The GNUstep Objective-C runtime"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.1
_ROBIN_MAP_COMMIT=757de829927489bee55ab02147484850c687b620
TERMUX_PKG_SRCURL=(https://github.com/gnustep/libobjc2/archive/v${TERMUX_PKG_VERSION}.tar.gz
https://github.com/Tessil/robin-map/archive/${_ROBIN_MAP_COMMIT:0:7}.tar.gz)
TERMUX_PKG_SHA256=(78fc3711db14bf863040ae98f7bdca08f41623ebeaf7efaea7dd49a38b5f054c
0abd2a272947d1d403ce7467e75aae5bdcfe839f4fc8d513ba5bfe170d5f2057)
TERMUX_PKG_DEPENDS="libc++"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DGNUSTEP_CONFIG=OFF
-DTESTS=OFF
"
termux_step_post_get_source() {
mv robin-map-${_ROBIN_MAP_COMMIT}/* third_party/robin-map/
}
termux_step_pre_configure() {
sed -i -e 's|@CMAKE_CXX_COMPILER@|'$CXX'|g' \
"$TERMUX_PKG_SRCDIR"/CMakeLists.txt
}

View File

@ -0,0 +1,27 @@
From 4e07fb8457266b76311b2bf3dc5dbe8db790c0b5 Mon Sep 17 00:00:00 2001
From: David Chisnall <github@theravensnest.org>
Date: Wed, 26 Aug 2020 16:37:06 +0100
Subject: [PATCH] Don't use CXXFLAGS when compiling eh_trampoline.cc
The way that we were doing this didn't handle multiple flags and we
actually don't want the user to override these flags because that file
needs to be compiled in a very specific way.
Fixes #177
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e2746e9..80b7dfe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -317,7 +317,7 @@ if (ENABLE_OBJCXX)
endif()
endif ()
add_custom_command(OUTPUT eh_trampoline.s
- COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -fPIC -S "${CMAKE_SOURCE_DIR}/eh_trampoline.cc" -o - -fexceptions -fno-inline | sed "s/__gxx_personality_v0/test_eh_personality/g" > "${CMAKE_BINARY_DIR}/eh_trampoline.s"
+ COMMAND @CMAKE_CXX_COMPILER@ -fPIC -S "${CMAKE_SOURCE_DIR}/eh_trampoline.cc" -o - -fexceptions -fno-inline | sed "s/__gxx_personality_v0/test_eh_personality/g" > "${CMAKE_BINARY_DIR}/eh_trampoline.s"
MAIN_DEPENDENCY eh_trampoline.cc)
list(APPEND libobjc_ASM_SRCS eh_trampoline.s)
list(APPEND libobjc_CXX_SRCS objcxx_eh.cc)