From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MCXXDwZYemL7oAAAbAwnHQ (envelope-from ) for ; Tue, 10 May 2022 14:18:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uBINDwZYemLFNgEAG6o9tA (envelope-from ) for ; Tue, 10 May 2022 14:18:14 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 326776C3 for ; Tue, 10 May 2022 14:18:13 +0200 (CEST) Received: from localhost ([::1]:44434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noOoe-0000GV-9j for larch@yhetil.org; Tue, 10 May 2022 08:18:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noOoU-0000GK-Ht for guix-patches@gnu.org; Tue, 10 May 2022 08:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38400) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1noOoU-0005qe-86 for guix-patches@gnu.org; Tue, 10 May 2022 08:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1noOoU-0005rc-3T for guix-patches@gnu.org; Tue, 10 May 2022 08:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55349] [PATCH]: Add libobjc2. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 May 2022 12:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55349 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55349@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165218503621538 (code B ref -1); Tue, 10 May 2022 12:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 May 2022 12:17:16 +0000 Received: from localhost ([127.0.0.1]:60530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noOnd-0005WD-4E for submit@debbugs.gnu.org; Tue, 10 May 2022 08:17:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:53516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noOnY-0005Sr-Uy for submit@debbugs.gnu.org; Tue, 10 May 2022 08:17:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noOnX-0000CX-PK for guix-patches@gnu.org; Tue, 10 May 2022 08:17:04 -0400 Received: from mail-m973.mail.163.com ([123.126.97.3]:19560) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noOnQ-0005jW-5G for guix-patches@gnu.org; Tue, 10 May 2022 08:17:00 -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=ZaVJc 4c+xuTLppMXorncA4p3cu+IuC4Qrvw+QtxNRFU=; b=KSD5ULsFHu7Q3zwbE1dVp dHObO6EngYbyf0HXIQ8VJMcqpmef2JaS5UV2VFl26yVwFmvqePYxjUKjDs8izVwR 0M6wSpqKcpNhXpJj+lrJ+1CDRAWNMlMhEtbrfw+6I1giQfGBQqpGczMDzDfvQLnp /JlovrkNpUJu6aZE8wMTCk= Received: from asus-laptop (unknown [27.38.115.130]) by smtp3 (Coremail) with SMTP id G9xpCgA3unuNV3piXijdBw--.9039S2; Tue, 10 May 2022 20:16:14 +0800 (CST) User-agent: mu4e 1.6.10; emacs 27.2 From: Zhu Zihao Date: Tue, 10 May 2022 20:15:25 +0800 Message-ID: <86k0atbn1y.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-CM-TRANSID: G9xpCgA3unuNV3piXijdBw--.9039S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUOPESUUUUU X-Originating-IP: [27.38.115.130] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiKQf8r1Xl3PITGQACsr Received-SPF: pass client-ip=123.126.97.3; envelope-from=all_but_last@163.com; helo=mail-m973.mail.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652185093; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=ZaVJc4c+xuTLppMXorncA4p3cu+IuC4Qrvw+QtxNRFU=; b=Zay3PYWW/te4LbwzOAp91WjT601np1quTPZa8dRjP4srr0WYwBBUWSQ13/XLB1o22wMbyg rDBkDo2jpR2PAjCIFmpdE0nkNcMYBvMrKNcaGGsOreiSDK7cYoR0Gpvinrdlgc2hQDqh2p i5zeEfZAl0dmK3JT0L/nsFQOHDzOpYT0Ja+yonYc+xk3W3yX+exAHzV/S319Q3n8GPrzTV AhAbs3jkQjiVuWH0MPtt3mxlkUicEXG4dkMM//sMUQ2gDkQ0Pnq95ewybyXb9Hwax7yQJs CXaVbEEZgOYj0pOO32r9MnKFtg3Yn5TReMDPhWyVqjDBtRPCWe+IioNDwp+NYQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652185093; a=rsa-sha256; cv=none; b=h/WM40p2ze54V4mOPB6iZggl+Dt7o91qgEufeoGURAxmDkeO0B+V7DtX6+rK8Kkj4MelYz JrIli79SeUsROC7zS7JouQWhbX9T0q5VgZPMi7QMeWCdx5eIuh+Dh7F0jDKbJChu/eZhvf 8MLAt27yvGUswU1V6wA5KKyk5PLPxa9mip3NxORRq2EuexhNuTGqV57AgsxTg+GASm52sC Gw7he7uBIS2AkJc/+V0jlaSmflvJ7xSxGlCmaWE3sl9q4xH8ekcZNPT8Sq3gngSttm/J1I R7ql9hPPyP8rPTPMZPn+VGL4Lee76HnD+zH+p8RIhAmgbyXEow7NpqUwddIFlQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=KSD5ULsF; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 3.70 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=KSD5ULsF; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 326776C3 X-Spam-Score: 3.70 X-Migadu-Scanner: scn1.migadu.com X-TUID: UjOs2F7uuE8q --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYnpXiRUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQZjl/hPdmk/mmdAEA+qfdiIj2hOkMP0eMIZAQEnhQ2HxJ Cku8TSNR+iuD4W4A/1IzSSPDVQ9kpTcttr/TdOtHa3iMvF/mPHHTx7d8YEMF =Ij3n -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Use-license-prefix-for-gnu-packages-gnustep.scm.patch Content-Transfer-Encoding: quoted-printable >From 8ecb351adf9220651d7901d88c1acc120b2572f2 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Tue, 10 May 2022 19:57:17 +0800 Subject: [PATCH 1/3] gnu: Use license: prefix for gnu/packages/gnustep.scm. * gnu/packages/gnustep.scm (gnustep-make)[license]: Use "license:" prefix. (windowmaker): Ditto. (wmbattery): Ditto. (wmnd): Ditto. (wmcpuload): Ditto. (wmclock): Ditto. (wmfire): Ditto. --- gnu/packages/gnustep.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/gnu/packages/gnustep.scm b/gnu/packages/gnustep.scm index eef3863949..a6c7c800a8 100644 --- a/gnu/packages/gnustep.scm +++ b/gnu/packages/gnustep.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2016, 2017 Kei Kebreau ;;; Copyright =C2=A9 2018 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2018 Ricardo Wurmus +;;; Copyright =C2=A9 2022 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,7 +24,7 @@ (define-module (gnu packages gnustep) #:use-module (guix download) #:use-module (guix packages) #:use-module (guix build-system gnu) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages xorg) @@ -62,7 +63,7 @@ (define-public gnustep-make project without having to deal with the complex issues associated with configuration, building, installation, and packaging. It also allows the = user to easily create cross-compiled binaries.") - (license gpl3+))) + (license license:gpl3+))) =20 (define-public windowmaker (package @@ -153,7 +154,7 @@ (define-public windowmaker interface. It is fast, feature rich, easy to configure, and easy to use.") =20 ;; Artwork is distributed under the WTFPL. - (license gpl2+))) + (license license:gpl2+))) =20 (define-public wmbattery (package @@ -180,7 +181,7 @@ (define-public wmbattery This includes if it is plugged in, if the battery is charging, how many mi= nutes of battery life remain, battery life remaining (with both a percentage and= a graph), and battery status (high - green, low - yellow, or critical - red)= .") - (license gpl2))) + (license license:gpl2))) =20 (define-public wmnd (package @@ -204,7 +205,7 @@ (define-public wmnd (description "WMND is a dockapp for monitoring network interfaces under WindowMake= r and other compatible window managers.") - (license gpl2+))) + (license license:gpl2+))) =20 (define-public wmcpuload (package @@ -231,7 +232,7 @@ (define-public wmcpuload on and off by clicking the mouse button over the application. If the CPU = usage hits a certain threshold, an alarm-mode will alert you by turning back-lig= ht on.") - (license gpl2+))) + (license license:gpl2+))) =20 (define-public wmclock (package @@ -257,7 +258,7 @@ (define-public wmclock "wmclock is an applet for Window Maker which displays the date and ti= me in a dockable tile. It features multiple language support, 24h or 12h time display, and can run a user-specified program on mouse click.") - (license gpl2+))) + (license license:gpl2+))) =20 (define-public wmfire (package @@ -286,4 +287,4 @@ (define-public wmfire entering the dock a burning spot replaces the cursor, and after two seconds symbols to represent the current monitor are \"burnt\" onscreen. The flame colour can also be changed.") - (license gpl2+))) + (license license:gpl2+))) --=20 2.36.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-Add-libobjc2.patch >From b73e30fa1a9d07c3d7f0f3ca0574b09c55622f85 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Sun, 27 Mar 2022 01:11:15 +0800 Subject: [PATCH 2/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 | 50 +++++++++++++++++++ .../patches/libobjc2-unbundle-robin-map.patch | 47 +++++++++++++++++ 3 files changed, 98 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..dd0b645395 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,50 @@ (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 + gcc-objc ;For Objective-C headers + 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0003-gnu-clang-Add-OBJC_INCLUDE_PATH-to-native-search-pat.patch >From a0974ff954165732c90be02f20ac6e8701f4fb43 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Tue, 10 May 2022 19:27:25 +0800 Subject: [PATCH 3/3] gnu: clang: Add OBJC_INCLUDE_PATH to native-search-paths. Clang is also a compiler for Objective-C. * gnu/packages/llvm.scm (clang-for-llvm): Add OBJC_INCLUDE_PATH to native-search-paths. --- gnu/packages/llvm.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 0fc2a8e380..619c3280fc 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -388,6 +388,9 @@ (define* (clang-from-llvm llvm clang-runtime (search-path-specification (variable "CPLUS_INCLUDE_PATH") (files '("include/c++" "include"))) + (search-path-specification + (variable "OBJC_INCLUDE_PATH") + (files '("include"))) (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64"))))) -- 2.36.0 --=-=-= Content-Type: text/plain -- Retrieve my PGP public key: gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F Zihao --=-=-=--