From patchwork Tue May 10 12:34:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Zihao X-Patchwork-Id: 39199 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9DD0227BBE9; Tue, 10 May 2022 13:36:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A776527BBEA for ; Tue, 10 May 2022 13:36:15 +0100 (BST) Received: from localhost ([::1]:58958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noP66-0003Eq-Ob for patchwork@mira.cbaines.net; Tue, 10 May 2022 08:36:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noP5u-0003CW-09 for guix-patches@gnu.org; Tue, 10 May 2022 08:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38459) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1noP5t-0000Bw-NM for guix-patches@gnu.org; Tue, 10 May 2022 08:36:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1noP5t-00008R-LR for guix-patches@gnu.org; Tue, 10 May 2022 08:36:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55349] Acknowledgement ([PATCH]: Add libobjc2.) Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 May 2022 12:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55349 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55349@debbugs.gnu.org Received: via spool by 55349-submit@debbugs.gnu.org id=B55349.1652186158510 (code B ref 55349); Tue, 10 May 2022 12:36:01 +0000 Received: (at 55349) by debbugs.gnu.org; 10 May 2022 12:35:58 +0000 Received: from localhost ([127.0.0.1]:60589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noP5k-00007y-CT for submit@debbugs.gnu.org; Tue, 10 May 2022 08:35:58 -0400 Received: from mail-m972.mail.163.com ([123.126.97.2]:59363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noP5e-00007b-QK for 55349@debbugs.gnu.org; Tue, 10 May 2022 08:35:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=7YqjJ 9R4jIwpGIrYN3QQsPz9s2kV0skVQn54A+B4KHk=; b=bwiPlvkg+Zr8DJdwtkN97 vhvakYrVg1lXW9MF6WOaGQfa5RjerrehWMiSHKDc75M/0ceSruI9lS4p/EnnBFFz Pky7D7h77x83LhUPAUoV7enEIMsSkIpGNYQw5gbg2cMnLT9CR/10IS5rS9TWEnOv xegI22nQ0RVOZw0nNw9pm8= Received: from asus-laptop (unknown [27.38.115.130]) by smtp2 (Coremail) with SMTP id GtxpCgAnquwXXHpiJjzLBw--.8490S2; Tue, 10 May 2022 20:35:36 +0800 (CST) References: <86k0atbn1y.fsf@163.com> User-agent: mu4e 1.6.10; emacs 27.2 From: Zhu Zihao Date: Tue, 10 May 2022 20:34:50 +0800 In-reply-to: Message-ID: <864k1xbm5m.fsf@163.com> MIME-Version: 1.0 X-CM-TRANSID: GtxpCgAnquwXXHpiJjzLBw--.8490S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvj4Rq1v3UUUUU X-Originating-IP: [27.38.115.130] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiTxj8r1sGaycF6gAAs6 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Remove unneeded input gcc-objc. From 6c828759cc66da8a1c7ecfed77abe7cd41aee055 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Sun, 27 Mar 2022 01:11:15 +0800 Subject: [PATCH 3/3] gnu: Add libobjc2. * gnu/packages/patches/libobjc2-unbundle-robin-map.patch: New file. * gnu/local.mk (dist_patch_DATA): Add corresponding file entry. * gnu/packages/gnustep.scm (libobjc2): New variable. --- gnu/local.mk | 1 + gnu/packages/gnustep.scm | 48 +++++++++++++++++++ .../patches/libobjc2-unbundle-robin-map.patch | 47 ++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 gnu/packages/patches/libobjc2-unbundle-robin-map.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3b7db46b26..066aad89e1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1333,6 +1333,7 @@ dist_patch_DATA = \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \ %D%/packages/patches/libffi-float128-powerpc64le.patch \ + %D%/packages/patches/libobjc2-unbundle-robin-map.patch \ %D%/packages/patches/librime-fix-build-with-gcc10.patch \ %D%/packages/patches/libvirt-add-install-prefix.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ diff --git a/gnu/packages/gnustep.scm b/gnu/packages/gnustep.scm index a6c7c800a8..0fde3c0ebe 100644 --- a/gnu/packages/gnustep.scm +++ b/gnu/packages/gnustep.scm @@ -22,15 +22,21 @@ (define-module (gnu packages gnustep) #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix build-system gnu) + #:use-module (guix build-system cmake) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages base) + #:use-module (gnu packages datastructures) #:use-module (gnu packages xorg) #:use-module (gnu packages libffcall) + #:use-module (gnu packages gcc) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) + #:use-module (gnu packages llvm) #:use-module (gnu packages texinfo) #:use-module (gnu packages autotools) #:use-module (gnu packages glib) @@ -65,6 +71,48 @@ (define-public gnustep-make to easily create cross-compiled binaries.") (license license:gpl3+))) +(define-public libobjc2 + (package + (name "libobjc2") + (version "2.1") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/gnustep/libobjc2") + (commit (string-append "v" version)))) + (sha256 + (base32 + "1zjryzvy06gjf36gz6zrkg9icwz6wsf80mp94x6bq1109vkl40b5")) + (patches + (search-patches "libobjc2-unbundle-robin-map.patch")))) + (build-system cmake-build-system) + (arguments + (list + ;; XXX: Cannot use GCC to compile ObjC code due to + ;; https://issues.guix.gnu.org/29644. + #:configure-flags #~(list "-DCMAKE_C_COMPILER=clang" + "-DCMAKE_CXX_COMPILER=clang++"))) + (inputs + (list clang robin-map)) + (home-page "http://www.gnustep.org/") + (synopsis "Objective-C runtime library for Clang") + (description "Libobjc2 is an Objective-C runtime library designed as a +drop-in replacment for GCC runtime. It supports following features beyond +GCC runtime. + +@itemize +@item Modern Objective-C runtime APIs. +@item Blocks (Closures). +@item Synthesised property accessors. +@item Efficient support for @code{@@synchronized()}. +@item Type-dependent dispatch. +@item Associated reference API. +@item Automatic Reference Counting. +@end itemize") + (license license:expat))) + (define-public windowmaker (package (name "windowmaker") diff --git a/gnu/packages/patches/libobjc2-unbundle-robin-map.patch b/gnu/packages/patches/libobjc2-unbundle-robin-map.patch new file mode 100644 index 0000000000..b828a64221 --- /dev/null +++ b/gnu/packages/patches/libobjc2-unbundle-robin-map.patch @@ -0,0 +1,47 @@ +From 2c5b0d5d6eba3bda4e83f489da546060fa8f3a2b Mon Sep 17 00:00:00 2001 +From: Zhu Zihao +Date: Sat, 26 Mar 2022 16:54:43 +0800 +Subject: [PATCH] Unbundle robin-map. + +This patch makes libobjc2 use robin-map header from system instead of cloning +from submodule. +--- + CMakeLists.txt | 8 -------- + arc.mm | 2 +- + 2 files changed, 1 insertion(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e2746e9..cf731f1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -86,14 +86,6 @@ else () + list(APPEND libobjc_C_SRCS eh_personality.c) + endif (WIN32) + +-if (NOT EXISTS "${CMAKE_SOURCE_DIR}/third_party/robin-map/include/tsl/robin_map.h") +- message(FATAL_ERROR "Git submodules not present, please run:\n\n" +- " $ git submodule init && git submodule update\n\n" +- "If you did not checkout via git, you will need to" +- "fetch the submodule's contents from" +- "https://github.com/Tessil/robin-map/") +-endif () +- + # For release builds, we disable spamming the terminal with warnings about + # selector type mismatches + if (CMAKE_BUILD_TYPE STREQUAL Release) +diff --git a/arc.mm b/arc.mm +index c96681f..cc93e7f 100644 +--- a/arc.mm ++++ b/arc.mm +@@ -3,7 +3,7 @@ + #include + #include + #include +-#include "third_party/robin-map/include/tsl/robin_map.h" ++#include + #import "lock.h" + #import "objc/runtime.h" + #import "objc/blocks_runtime.h" +-- +2.34.0 + -- 2.36.0