Ports: Add ed port (#1159)

This commit is contained in:
Brian Callahan 2020-02-01 14:54:04 -05:00 committed by GitHub
parent d0c230855d
commit c904095333
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: sideshowbarker 2024-07-19 09:43:21 +09:00
4 changed files with 44 additions and 0 deletions

10
Ports/ed/package.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash ../.port_include.sh
port=ed
version=1.15
files="https://ftp.gnu.org/gnu/ed/ed-1.15.tar.lz ed-1.15.tar.lz"
useconfigure=true
depends=pcre2
configure() {
run ./"$configscript" CC=i686-pc-serenity-gcc
}

View file

@ -0,0 +1,11 @@
--- ed-1.15/Makefile.in.orig Sat Feb 1 14:22:52 2020
+++ ed-1.15/Makefile.in Sat Feb 1 14:23:06 2020
@@ -20,7 +20,7 @@
all : $(progname) r$(progname)
$(progname) : $(objs)
- $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(objs)
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(objs) -lpcre2-posix -lpcre2-8
r$(progname) : r$(progname).in
cat $(VPATH)/r$(progname).in > $@

View file

@ -0,0 +1,12 @@
--- ed-1.15/ed.h.orig Sat Feb 1 14:19:01 2020
+++ ed-1.15/ed.h Sat Feb 1 14:19:17 2020
@@ -18,8 +18,7 @@
*/
#ifndef __cplusplus
-enum Bool { false = 0, true = 1 };
-typedef enum Bool bool;
+#include <stdbool.h>
#endif
enum Pflags /* print suffixes */

View file

@ -0,0 +1,11 @@
--- ed-1.15/regex.c.orig Sat Feb 1 14:17:22 2020
+++ ed-1.15/regex.c Sat Feb 1 14:17:34 2020
@@ -19,7 +19,7 @@
#include <stddef.h>
#include <errno.h>
-#include <regex.h>
+#include <pcre2posix.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>