X-Loop: help-debbugs@HIDDEN Subject: [bug#61675] [PATCH 0/2] gnu: Add latino. Resent-From: Adam Faiz <adam.faiz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Tue, 21 Feb 2023 13:21:02 +0000 Resent-Message-ID: <handler.61675.B.167698564415676 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 61675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61675 <at> debbugs.gnu.org X-Debbugs-Original-To: guix-patches@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.167698564415676 (code B ref -1); Tue, 21 Feb 2023 13:21:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Feb 2023 13:20:44 +0000 Received: from localhost ([127.0.0.1]:54955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pUSZY-00044m-2O for submit <at> debbugs.gnu.org; Tue, 21 Feb 2023 08:20:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:50360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <adam.faiz@HIDDEN>) id 1pUSZS-00044Z-OP for submit <at> debbugs.gnu.org; Tue, 21 Feb 2023 08:20:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <adam.faiz@HIDDEN>) id 1pUSZQ-0006oe-LD for guix-patches@HIDDEN; Tue, 21 Feb 2023 08:20:36 -0500 Received: from knopi.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <adam.faiz@HIDDEN>) id 1pUSZM-0005eW-ID for guix-patches@HIDDEN; Tue, 21 Feb 2023 08:20:34 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id ABB5D44578 for <guix-patches@HIDDEN>; Tue, 21 Feb 2023 14:20:25 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FlvBN_oury6B for <guix-patches@HIDDEN>; Tue, 21 Feb 2023 14:20:24 +0100 (CET) Message-ID: <5a9da59f-0f77-6fec-aa7f-8a1968e7af5f@HIDDEN> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1676985624; bh=K47FcfUZiZayc8lgbDFDi8Nupcb43pT3iH1RO9gTVM8=; h=Date:To:From:Subject; b=I3Xrz+OgXQyRZxZ7tsTs+4DcPUa/ri+mfhAwjJVEsnPPG24DWxWkhqhvYN/2ULiPe eWtGC2CBXYGR7y6RGQJWjtPJQ94FP7KpuxbHKhC2Ix4W0mMCu2FiHr4WqfVaHqZLIl u0D1iyfhkD8HcbHWVuIJssJ83ZW4k2Ms9reJcUTSZe1X6dn+hY4HWl1typ7IICzTwT 24t3cAkD76J9scx0uzPB3Dptstx5PUKhx09od1qAY1NAqwRzWfuXUa7j8K3mSsYy9t nmAthzp0PzWSCejuCzbTFmFMtDrHqeh4yeIkC4AlSz/uHyRa10lk3FSlbCFeXGsvDD xethCaoLcdTlA== Date: Tue, 21 Feb 2023 21:20:16 +0800 MIME-Version: 1.0 Content-Language: en-US From: Adam Faiz <adam.faiz@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=178.21.23.139; envelope-from=adam.faiz@HIDDEN; helo=knopi.disroot.org 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) From 61ad312f6f4663b1208eba1cd175df0e0bc15837 Mon Sep 17 00:00:00 2001 Message-Id: <cover.1676971062.git.adam.faiz@HIDDEN> From: AwesomeAdam54321 <adam.faiz@HIDDEN> Date: Tue, 21 Feb 2023 17:17:42 +0800 Subject: [PATCH 0/2] gnu: Add latino. The first patch fixes linenoise to provide shared libraries. The second patch adds the Latino programming language. AwesomeAdam54321 (2): gnu: linenoise: Patch in a 'make install' target. gnu: Add latino. gnu/local.mk | 4 + gnu/packages/latino.scm | 66 +++++++++++++ .../linenoise-add-install-target.patch | 51 ++++++++++ .../patches/linenoise-add-symbol-map.patch | 25 +++++ ...noise-mark-internal-functions-static.patch | 95 +++++++++++++++++++ .../patches/linenoise-use-symbol-map.patch | 14 +++ gnu/packages/shells.scm | 32 +++---- 7 files changed, 270 insertions(+), 17 deletions(-) create mode 100644 gnu/packages/latino.scm create mode 100644 gnu/packages/patches/linenoise-add-install-target.patch create mode 100644 gnu/packages/patches/linenoise-add-symbol-map.patch create mode 100644 gnu/packages/patches/linenoise-mark-internal-functions-static.patch create mode 100644 gnu/packages/patches/linenoise-use-symbol-map.patch base-commit: 08edbd2535ae622d319a51e6f877d23d75dc24f3 -- 2.39.1
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Adam Faiz <adam.faiz@HIDDEN> Subject: bug#61675: Acknowledgement ([PATCH 0/2] gnu: Add latino.) Message-ID: <handler.61675.B.167698564415676.ack <at> debbugs.gnu.org> References: <5a9da59f-0f77-6fec-aa7f-8a1968e7af5f@HIDDEN> X-Gnu-PR-Message: ack 61675 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 61675 <at> debbugs.gnu.org Date: Tue, 21 Feb 2023 13:21:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 61675 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 61675: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61675 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: [bug#61675] [PATCH 1/2] gnu: linenoise: Patch in a 'make install' target. References: <5a9da59f-0f77-6fec-aa7f-8a1968e7af5f@HIDDEN> In-Reply-To: <5a9da59f-0f77-6fec-aa7f-8a1968e7af5f@HIDDEN> Resent-From: Adam Faiz <adam.faiz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Tue, 21 Feb 2023 13:37:01 +0000 Resent-Message-ID: <handler.61675.B61675.167698658518933 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 61675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61675 <at> debbugs.gnu.org Received: via spool by 61675-submit <at> debbugs.gnu.org id=B61675.167698658518933 (code B ref 61675); Tue, 21 Feb 2023 13:37:01 +0000 Received: (at 61675) by debbugs.gnu.org; 21 Feb 2023 13:36:25 +0000 Received: from localhost ([127.0.0.1]:55014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pUSoi-0004vA-Ga for submit <at> debbugs.gnu.org; Tue, 21 Feb 2023 08:36:25 -0500 Received: from knopi.disroot.org ([178.21.23.139]:38848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <adam.faiz@HIDDEN>) id 1pUSoe-0004uD-PS for 61675 <at> debbugs.gnu.org; Tue, 21 Feb 2023 08:36:22 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 33D0944635 for <61675 <at> debbugs.gnu.org>; Tue, 21 Feb 2023 14:36:19 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VUIERREt4wnA for <61675 <at> debbugs.gnu.org>; Tue, 21 Feb 2023 14:36:17 +0100 (CET) Message-ID: <b0d33734-c5e2-8e50-739e-9d6c3a5fcf43@HIDDEN> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1676986577; bh=4/v9sfCL9XUZYHHjcaMCv+wiAViKjxl17bLsyy7YagE=; h=Date:To:From:Subject; b=XrHVOmQls6t3usCNyICdb1Ow+Yc523PeCQxcRm/AAamWkpxZUL8vtNXr0x93pRsX5 xyiB5jDgdgYw3Qpc+0tXHmrcvqYVFWuzpfs7YS2S+UZWTv0LkQ/x2fsED+Qj9dghMs tttmAw7XynvFkkDYZAKsbDwed7UrpnExdqfq6wdI2PGYEbKXnny2QYGt+ilSO0i/vX hKzBgUEM/l6clWSpwOw3Mu/eYA0qORPZ3FYBr/m4uliDElpsn8lfNsDL4SHo0/ReTc IygLyzFXVxOi6j3YDdAzwIBdN7MhhRq1a2ABGHencqXd8acgkm7w8xfSD142rCZdj6 jiyk2wqRi3oaw== Date: Tue, 21 Feb 2023 21:36:09 +0800 MIME-Version: 1.0 Content-Language: en-US From: Adam Faiz <adam.faiz@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) From 8739b1b5d6eb9de504d7799e22efd7996acfac83 Mon Sep 17 00:00:00 2001 Message-Id: <8739b1b5d6eb9de504d7799e22efd7996acfac83.1676986321.git.adam.faiz@HIDDEN> From: AwesomeAdam54321 <adam.faiz@HIDDEN> Date: Tue, 21 Feb 2023 17:02:14 +0800 Subject: [PATCH 1/2] gnu: linenoise: Patch in a 'make install' target. * gnu/packages/shells.scm (linenoise): Patch in a 'make install' target. [source]: Remove '-checkout' suffix. Add patches for a 'make install' target. [arguments]: Use gexps. Proceed with build procedure in GNUmakefile.libs. * gnu/packages/patches/linenoise-add-install-target.patch: New file. * gnu/packages/patches/linenoise-add-symbol-map.patch: New file. * gnu/packages/patches/linenoise-mark-internal-functions-static.patch: New file. * gnu/packages/patches/linenoise-use-symbol-map.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 4 + .../linenoise-add-install-target.patch | 51 ++++++++++ .../patches/linenoise-add-symbol-map.patch | 25 +++++ ...noise-mark-internal-functions-static.patch | 95 +++++++++++++++++++ .../patches/linenoise-use-symbol-map.patch | 14 +++ gnu/packages/shells.scm | 32 +++---- 6 files changed, 204 insertions(+), 17 deletions(-) create mode 100644 gnu/packages/patches/linenoise-add-install-target.patch create mode 100644 gnu/packages/patches/linenoise-add-symbol-map.patch create mode 100644 gnu/packages/patches/linenoise-mark-internal-functions-static.patch create mode 100644 gnu/packages/patches/linenoise-use-symbol-map.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5fcbdd4586..b64d6fc966 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1384,6 +1384,10 @@ dist_patch_DATA = \ %D%/packages/patches/lightdm-arguments-ordering.patch \ %D%/packages/patches/lightdm-vncserver-check.patch \ %D%/packages/patches/lightdm-vnc-color-depth.patch \ + %D%/packages/patches/linenoise-add-install-target.patch \ + %D%/packages/patches/linenoise-add-symbol-map.patch \ + %D%/packages/patches/linenoise-mark-internal-functions-static.patch \ + %D%/packages/patches/linenoise-use-symbol-map.patch \ %D%/packages/patches/localed-xorg-keyboard.patch \ %D%/packages/patches/kcontacts-incorrect-country-name.patch \ %D%/packages/patches/kde-cli-tools-delay-mime-db.patch \ diff --git a/gnu/packages/patches/linenoise-add-install-target.patch b/gnu/packages/patches/linenoise-add-install-target.patch new file mode 100644 index 0000000000..7371126574 --- /dev/null +++ b/gnu/packages/patches/linenoise-add-install-target.patch @@ -0,0 +1,51 @@ +This patch is taken from https://github.com/antirez/linenoise/pull/174 + +Subject: [PATCH] linenoise: Add a makefile for creating and installing libraries and headers. +--- a/GNUmakefile.libs 1970-01-01 07:30:00.000000000 +0730 ++++ b/GNUmakefile.libs 2023-02-21 13:29:52.275610851 +0800 +@@ -0,0 +1,45 @@ ++PREFIX ?= /usr/local ++INCLUDEDIR ?= $(PREFIX)/include ++LIBDIR ?= $(PREFIX)/lib ++ ++SOURCES = linenoise.c ++HEADERS = $(SOURCES:%.c=%.h) ++OBJECTS = $(SOURCES:%.c=%.o) ++ ++LIBVERSION = 0.0.0 ++ ++SHLIBNAME = liblinenoise.so.$(LIBVERSION) ++SONAME = liblinenoise.so.$(word 1, $(subst ., ,$(LIBVERSION))) ++STLIBNAME = liblinenoise.a ++ ++LD = $(CC) ++ ++DEFAULT_CPPFLAGS = ++DEFAULT_CFLAGS = -Wall -W -O2 -g -fPIC ++DEFAULT_LDFLAGS = -shared -Wl,-soname,$(SONAME) ++ ++all: $(SHLIBNAME) $(STLIBNAME) ++ ++$(SHLIBNAME): $(OBJECTS) ++ $(LD) $(DEFAULT_LDFLAGS) $(LDFLAGS) $^ -o $@ ++ ++$(STLIBNAME): $(OBJECTS) ++ $(AR) $(ARFLAGS) $@ $^ ++ ++$(OBJECTS) : %.o : %.c ++ $(CC) $(DEFAULT_CPPFLAGS) $(CPPFLAGS) $(DEFAULT_CFLAGS) $(CFLAGS) \ ++ -c $< -o $@ ++ ++install: $(SHLIBNAME) ++ install -d $(DESTDIR)$(INCLUDEDIR) ++ install -m 0644 $(HEADERS) $(DESTDIR)$(INCLUDEDIR) ++ install -d $(DESTDIR)$(LIBDIR) ++ install -m 0644 $(STLIBNAME) $(DESTDIR)$(LIBDIR) ++ install -m 0755 $(SHLIBNAME) $(DESTDIR)$(LIBDIR) ++ ln -sf $(SHLIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) ++ ln -sf $(SHLIBNAME) $(DESTDIR)$(LIBDIR)/liblinenoise.so ++ ++clean: ++ rm -f $(SHLIBNAME) $(STLIBNAME) $(OBJECTS) ++ ++.PHONY: all clean install diff --git a/gnu/packages/patches/linenoise-add-symbol-map.patch b/gnu/packages/patches/linenoise-add-symbol-map.patch new file mode 100644 index 0000000000..ec241e60b1 --- /dev/null +++ b/gnu/packages/patches/linenoise-add-symbol-map.patch @@ -0,0 +1,25 @@ +This patch is taken from https://github.com/antirez/linenoise/pull/174 + +Subject: [PATCH] linenoise: Add a symbol-map for versioning symbols in the shared library. +--- a/symbol.map 1970-01-01 07:30:00.000000000 +0730 ++++ b/symbol.map 2023-02-21 13:31:08.620340334 +0800 +@@ -0,0 +1,19 @@ ++LINENOISE_0.0 { ++global: ++ linenoiseSetCompletionCallback; ++ linenoiseSetHintsCallback; ++ linenoiseSetFreeHintsCallback; ++ linenoiseAddCompletion; ++ linenoise; ++ linenoiseFree; ++ linenoiseHistoryAdd; ++ linenoiseHistorySetMaxLen; ++ linenoiseHistorySave; ++ linenoiseHistoryLoad; ++ linenoiseClearScreen; ++ linenoiseSetMultiLine; ++ linenoisePrintKeyCodes; ++ ++local: ++ *; ++}; diff --git a/gnu/packages/patches/linenoise-mark-internal-functions-static.patch b/gnu/packages/patches/linenoise-mark-internal-functions-static.patch new file mode 100644 index 0000000000..e08bb05f19 --- /dev/null +++ b/gnu/packages/patches/linenoise-mark-internal-functions-static.patch @@ -0,0 +1,95 @@ +This patch is adapted from https://github.com/antirez/linenoise/pull/174 + +Subject: [PATCH] linenoise: Mark functions that are not part of the API as static. +--- a/linenoise.c 1970-01-01 07:30:01.000000000 +0730 ++++ b/linenoise.c 2023-02-21 13:28:59.739080092 +0800 +@@ -473,7 +473,7 @@ + + /* Helper of refreshSingleLine() and refreshMultiLine() to show hints + * to the right of the prompt. */ +-void refreshShowHints(struct abuf *ab, struct linenoiseState *l, int plen) { ++static void refreshShowHints(struct abuf *ab, struct linenoiseState *l, int plen) { + char seq[64]; + if (hintsCallback && plen+l->len < l->cols) { + int color = -1, bold = 0; +@@ -635,7 +637,7 @@ + /* Insert the character 'c' at cursor current position. + * + * On error writing to the terminal -1 is returned, otherwise 0. */ +-int linenoiseEditInsert(struct linenoiseState *l, char c) { ++static int linenoiseEditInsert(struct linenoiseState *l, char c) { + if (l->len < l->buflen) { + if (l->len == l->pos) { + l->buf[l->pos] = c; +@@ -662,7 +664,7 @@ + } + + /* Move cursor on the left. */ +-void linenoiseEditMoveLeft(struct linenoiseState *l) { ++static void linenoiseEditMoveLeft(struct linenoiseState *l) { + if (l->pos > 0) { + l->pos--; + refreshLine(l); +@@ -670,7 +672,7 @@ + } + + /* Move cursor on the right. */ +-void linenoiseEditMoveRight(struct linenoiseState *l) { ++static void linenoiseEditMoveRight(struct linenoiseState *l) { + if (l->pos != l->len) { + l->pos++; + refreshLine(l); +@@ -678,7 +680,7 @@ + } + + /* Move cursor to the start of the line. */ +-void linenoiseEditMoveHome(struct linenoiseState *l) { ++static void linenoiseEditMoveHome(struct linenoiseState *l) { + if (l->pos != 0) { + l->pos = 0; + refreshLine(l); +@@ -686,7 +688,7 @@ + } + + /* Move cursor to the end of the line. */ +-void linenoiseEditMoveEnd(struct linenoiseState *l) { ++static void linenoiseEditMoveEnd(struct linenoiseState *l) { + if (l->pos != l->len) { + l->pos = l->len; + refreshLine(l); +@@ -697,7 +699,7 @@ + * entry as specified by 'dir'. */ + #define LINENOISE_HISTORY_NEXT 0 + #define LINENOISE_HISTORY_PREV 1 +-void linenoiseEditHistoryNext(struct linenoiseState *l, int dir) { ++static void linenoiseEditHistoryNext(struct linenoiseState *l, int dir) { + if (history_len > 1) { + /* Update the current history entry before to + * overwrite it with the next one. */ +@@ -721,7 +723,7 @@ + + /* Delete the character at the right of the cursor without altering the cursor + * position. Basically this is what happens with the "Delete" keyboard key. */ +-void linenoiseEditDelete(struct linenoiseState *l) { ++static void linenoiseEditDelete(struct linenoiseState *l) { + if (l->len > 0 && l->pos < l->len) { + memmove(l->buf+l->pos,l->buf+l->pos+1,l->len-l->pos-1); + l->len--; +@@ -731,7 +733,7 @@ + } + + /* Backspace implementation. */ +-void linenoiseEditBackspace(struct linenoiseState *l) { ++static void linenoiseEditBackspace(struct linenoiseState *l) { + if (l->pos > 0 && l->len > 0) { + memmove(l->buf+l->pos-1,l->buf+l->pos,l->len-l->pos); + l->pos--; +@@ -743,7 +745,7 @@ + + /* Delete the previosu word, maintaining the cursor at the start of the + * current word. */ +-void linenoiseEditDeletePrevWord(struct linenoiseState *l) { ++static void linenoiseEditDeletePrevWord(struct linenoiseState *l) { + size_t old_pos = l->pos; + size_t diff; + diff --git a/gnu/packages/patches/linenoise-use-symbol-map.patch b/gnu/packages/patches/linenoise-use-symbol-map.patch new file mode 100644 index 0000000000..c58378adf1 --- /dev/null +++ b/gnu/packages/patches/linenoise-use-symbol-map.patch @@ -0,0 +1,14 @@ +This patch is taken from https://github.com/antirez/linenoise/pull/174 + +Subject: [PATCH] linenoise: Add a symbol-map for versioning symbols in the shared library. +--- a/GNUmakefile.libs 2023-02-21 13:29:52.275610851 +0800 ++++ b/GNUmakefile.libs 2023-02-21 13:30:55.336216832 +0800 +@@ -16,7 +16,7 @@ + + DEFAULT_CPPFLAGS = + DEFAULT_CFLAGS = -Wall -W -O2 -g -fPIC +-DEFAULT_LDFLAGS = -shared -Wl,-soname,$(SONAME) ++DEFAULT_LDFLAGS = -shared -Wl,-soname,$(SONAME) -Wl,--version-script=symbol.map + + all: $(SHLIBNAME) $(STLIBNAME) + diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 0c8cbf3f4c..8561db835f 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -658,27 +658,25 @@ (define-public linenoise (uri (git-reference (url "https://github.com/antirez/linenoise") (commit commit))) - (file-name (string-append name "-" version "-checkout")) + (file-name (git-file-name name version)) (sha256 (base32 - "1z16qwix8z6a40fskdgxsibkqgdrp4q6ncp4n6hnv4r9iihy2d8r")))) + "1z16qwix8z6a40fskdgxsibkqgdrp4q6ncp4n6hnv4r9iihy2d8r")) + (patches (search-patches + "linenoise-mark-internal-functions-static.patch" + "linenoise-add-install-target.patch" + "linenoise-add-symbol-map.patch" + "linenoise-use-symbol-map.patch")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; no tests are included - #:make-flags - (list ,(string-append "CC=" (cc-for-target))) - #:phases - (modify-phases %standard-phases - (delete 'configure) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - ;; At the moment there is no 'make install' in upstream. - (let* ((out (assoc-ref outputs "out"))) - (install-file "linenoise.h" - (string-append out "/include/linenoise")) - (install-file "linenoise.c" - (string-append out "/include/linenoise")) - #t)))))) + (list #:tests? #f ; no tests are included + #:make-flags + #~(list (string-append "CC=" #$(cc-for-target)) + (string-append "PREFIX=" #$output) + "--makefile=GNUmakefile.libs") + #:phases + #~(modify-phases %standard-phases + (delete 'configure)))) (home-page "https://github.com/antirez/linenoise") (synopsis "Minimal zero-config readline replacement") (description base-commit: 08edbd2535ae622d319a51e6f877d23d75dc24f3 -- 2.39.1
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.