summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2016-07-29 22:52:24 +0000
committerbapt <bapt@FreeBSD.org>2016-07-29 22:52:24 +0000
commit3d97fa471fd665a85d7dcd4b37a79050f7a9f6fe (patch)
tree9c2723396be046dda0d258c827a1df8868877f73
parent781561b400d82e948a243acfa1237eeeeac6141f (diff)
downloadFreeBSD-ports-3d97fa471fd665a85d7dcd4b37a79050f7a9f6fe.zip
FreeBSD-ports-3d97fa471fd665a85d7dcd4b37a79050f7a9f6fe.tar.gz
Prevent collision with getline(3)
While here regenerate the patches
-rw-r--r--devel/libreadline-java/Makefile4
-rw-r--r--devel/libreadline-java/files/patch-Makefile14
-rw-r--r--devel/libreadline-java/files/patch-src-native-getline.c10
-rw-r--r--devel/libreadline-java/files/patch-src_Makefile (renamed from devel/libreadline-java/files/patch-src-Makefile)6
-rw-r--r--devel/libreadline-java/files/patch-src_native_Makefile (renamed from devel/libreadline-java/files/patch-src-native-Makefile)17
-rw-r--r--devel/libreadline-java/files/patch-src_native_getline.c82
-rw-r--r--devel/libreadline-java/files/patch-src_native_getline.h29
-rw-r--r--devel/libreadline-java/files/patch-src_native_org__gnu__readline__Readline.c (renamed from devel/libreadline-java/files/patch-src-native-org_gnu_readline_Readline.c)8
-rw-r--r--devel/libreadline-java/files/patch-src_org_gnu_readline_Readline.java (renamed from devel/libreadline-java/files/patch-src-org-gnu-readline-Readline.java)8
9 files changed, 138 insertions, 40 deletions
diff --git a/devel/libreadline-java/Makefile b/devel/libreadline-java/Makefile
index a83bf21..20e3f05 100644
--- a/devel/libreadline-java/Makefile
+++ b/devel/libreadline-java/Makefile
@@ -28,10 +28,6 @@ MAKE_JOBS_UNSAFE= yes
OPTIONS_DEFINE= DOCS
-post-patch:
- ${REINPLACE_CMD} -e 's|-ltermcap|-lncurses|' \
- ${WRKSRC}/src/native/Makefile
-
do-install:
${INSTALL_DATA} ${WRKSRC}/libreadline-java.jar \
${STAGEDIR}${JAVAJARDIR}
diff --git a/devel/libreadline-java/files/patch-Makefile b/devel/libreadline-java/files/patch-Makefile
index 58681a1..010d8f1 100644
--- a/devel/libreadline-java/files/patch-Makefile
+++ b/devel/libreadline-java/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile 2003-01-07 11:14:35.000000000 +0100
-+++ /tmp/libreadline-java-0.8.0/Makefile 2007-09-22 22:11:13.000000000 +0200
-@@ -54,11 +54,11 @@
+--- Makefile.orig 2003-01-07 10:14:35 UTC
++++ Makefile
+@@ -54,11 +54,11 @@ DOCDIR = $(PREFIX)/doc
JAVALIBDIR= $(PREFIX)/share/java
# libraries to build
@@ -14,7 +14,7 @@
ifeq (MSC,$(WIN32))
JAVA_HOME := c:/j2sdk1.4.0
-@@ -69,9 +69,14 @@
+@@ -69,9 +69,14 @@ ARGS = Getline
endif
## normal javac
@@ -30,7 +30,7 @@
## with jikes
#JAVAC = jikes
#JC_FLAGS = -O +E
-@@ -86,7 +91,7 @@
+@@ -86,7 +91,7 @@ RPM_BASE = `pwd`/$(BUILDDIR)/
world : jar build-native
jar: build-java
@@ -39,7 +39,7 @@
$(JAR):
cd $(BUILDDIR) ; jar -cvmf ../$(MF_STUB) ../$(JAR) *
-@@ -96,7 +101,7 @@
+@@ -96,7 +101,7 @@ build-java: $(BUILDDIR)
build-native:
cd src; $(MAKE) T_LIBS="$(T_LIBS)" JAVAINCLUDE="$(JAVAINCLUDE)" \
@@ -48,7 +48,7 @@
apidoc: $(APIDIR)
javadoc -sourcepath src -d $(APIDIR) -windowtitle $(WTITLE) \
-@@ -140,7 +145,7 @@
+@@ -140,7 +145,7 @@ rpm: src-dist
rpm --define _topdir$(RPM_BASE) -ba $(RPM_BASE)/SPECS/libreadline-java.spec
test: $(JAR) build-native
diff --git a/devel/libreadline-java/files/patch-src-native-getline.c b/devel/libreadline-java/files/patch-src-native-getline.c
deleted file mode 100644
index 8494fc2..0000000
--- a/devel/libreadline-java/files/patch-src-native-getline.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/native/getline.c 2003-01-07 11:14:35.000000000 +0100
-+++ /tmp/libreadline-java-0.8.0/src/native/getline.c 2007-09-22 22:20:06.000000000 +0200
-@@ -136,7 +136,6 @@
- #ifndef __convexc__
- extern int read();
- extern int kill();
--extern int ioctl();
- #endif /* not __convexc__ */
- #ifdef POSIX /* use POSIX interface */
- #include <termios.h>
diff --git a/devel/libreadline-java/files/patch-src-Makefile b/devel/libreadline-java/files/patch-src_Makefile
index 4ef1a90..a685e48 100644
--- a/devel/libreadline-java/files/patch-src-Makefile
+++ b/devel/libreadline-java/files/patch-src_Makefile
@@ -1,6 +1,6 @@
---- src/Makefile 2003-01-07 11:14:35.000000000 +0100
-+++ /tmp/libreadline-java-0.8.0/src/Makefile 2007-09-21 07:45:38.000000000 +0200
-@@ -10,7 +10,7 @@
+--- src/Makefile.orig 2003-01-07 10:14:35 UTC
++++ src/Makefile
+@@ -10,7 +10,7 @@ java: always $(BUILD)
native: always
cd native ; $(MAKE) T_LIBS="$(T_LIBS)" JAVAINCLUDE="$(JAVAINCLUDE)" \
diff --git a/devel/libreadline-java/files/patch-src-native-Makefile b/devel/libreadline-java/files/patch-src_native_Makefile
index 8ec0022..da28b36 100644
--- a/devel/libreadline-java/files/patch-src-native-Makefile
+++ b/devel/libreadline-java/files/patch-src_native_Makefile
@@ -1,6 +1,6 @@
---- src/native/Makefile.orig 2003-01-07 05:14:35.000000000 -0500
-+++ src/native/Makefile 2014-08-16 14:17:39.000000000 -0400
-@@ -38,25 +38,31 @@
+--- src/native/Makefile.orig 2003-01-07 10:14:35 UTC
++++ src/native/Makefile
+@@ -38,25 +38,31 @@ ifeq (MSC,$(WIN32))
INCLUDES = -I "c:/Programme/DevStudio/VC/include" \
-I $(JAVAINCLUDE) -I $(JAVANATINC)
LIB = "c:/Programme/DevStudio/VC/lib"
@@ -13,6 +13,8 @@
else
-INCLUDES = -I $(JAVAINCLUDE) -I $(JAVANATINC)
-LIBPATH = -L/usr/lib/termcap
+-JavaReadline_LIBS = -lreadline -ltermcap -lhistory
+-JavaEditline_LIBS = -ledit -ltermcap
+INCLUDES = -I $(JAVAINCLUDE) -I $(JAVANATINC) -I $(LOCALBASE)/include
+ifeq (JavaEditline,$(TG))
+LIBPATH = -L$(LOCALBASE)/lib -rpath $(LOCALBASE)/lib
@@ -20,9 +22,8 @@
+ifeq (JavaReadline,$(TG))
+LIBPATH = -L$(LOCALBASE)/lib -rpath $(LOCALBASE)/lib
+endif
- JavaReadline_LIBS = -lreadline -ltermcap -lhistory
--JavaEditline_LIBS = -ledit -ltermcap
-+JavaEditline_LIBS = $(LOCALBASE)/lib/libedit.so -ltermcap
++JavaReadline_LIBS = -lreadline -lncurses -lhistory
++JavaEditline_LIBS = $(LOCALBASE)/lib/libedit.so -lncurses
ifeq (cygwin,$(WIN32))
JavaGetline_LIBS = -lcygwin
endif
@@ -38,7 +39,7 @@
OBJECTS := org_gnu_readline_Readline.$(OBJ_EXT)
-@@ -69,13 +75,13 @@
+@@ -69,13 +75,13 @@ all: $(T_LIBS)
lib: $(ROOTDIR)/$(LIB_PRE)$(TG).$(LIB_EXT)
JavaReadline:
@@ -55,7 +56,7 @@
$(ROOTDIR)/$(LIB_PRE)$(TG).$(LIB_EXT): $(OBJECTS)
ifeq (MSC,$(WIN32))
-@@ -110,7 +116,7 @@
+@@ -110,7 +116,7 @@ org_gnu_readline_Readline.$(OBJ_EXT): or
-c org_gnu_readline_Readline.c
org_gnu_readline_Readline.h: $(BUILDDIR)/org/gnu/readline/Readline.class
diff --git a/devel/libreadline-java/files/patch-src_native_getline.c b/devel/libreadline-java/files/patch-src_native_getline.c
new file mode 100644
index 0000000..c4e90c3
--- /dev/null
+++ b/devel/libreadline-java/files/patch-src_native_getline.c
@@ -0,0 +1,82 @@
+--- src/native/getline.c.orig 2003-01-07 10:14:35 UTC
++++ src/native/getline.c
+@@ -41,7 +41,7 @@ char* rl_readline_name;
+
+ /********************* exported interface ********************************/
+
+-char *getline(); /* read a line of input */
++char *get_line(); /* read a line of input */
+ void gl_setwidth(); /* specify width of screen */
+ void gl_histadd(); /* adds entries to hist */
+ void gl_strwidth(); /* to bind gl_strlen */
+@@ -136,7 +136,6 @@ extern void exit();
+ #ifndef __convexc__
+ extern int read();
+ extern int kill();
+-extern int ioctl();
+ #endif /* not __convexc__ */
+ #ifdef POSIX /* use POSIX interface */
+ #include <termios.h>
+@@ -387,7 +386,7 @@ gl_init()
+ hist_init();
+ }
+ if (isatty(0) == 0 || isatty(1) == 0)
+- gl_error("\n*** Error: getline(): not interactive, use stdio.\n");
++ gl_error("\n*** Error: get_line(): not interactive, use stdio.\n");
+ gl_char_init();
+ gl_init_done = 1;
+ }
+@@ -414,7 +413,7 @@ int w;
+ }
+
+ char *
+-getline(prompt)
++get_line(prompt)
+ char *prompt;
+ {
+ int c, loc, tmp;
+@@ -585,7 +584,7 @@ int c;
+ int i;
+
+ if (gl_cnt >= BUF_SIZE - 1)
+- gl_error("\n*** Error: getline(): input buffer overflow\n");
++ gl_error("\n*** Error: get_line(): input buffer overflow\n");
+ if (gl_overwrite == 0 || gl_pos == gl_cnt) {
+ for (i=gl_cnt; i >= gl_pos; i--)
+ gl_buf[i+1] = gl_buf[i];
+@@ -608,7 +607,7 @@ gl_yank()
+ if (len > 0) {
+ if (gl_overwrite == 0) {
+ if (gl_cnt + len >= BUF_SIZE - 1)
+- gl_error("\n*** Error: getline(): input buffer overflow\n");
++ gl_error("\n*** Error: get_line(): input buffer overflow\n");
+ for (i=gl_cnt; i >= gl_pos; i--)
+ gl_buf[i+len] = gl_buf[i];
+ for (i=0; i < len; i++)
+@@ -617,7 +616,7 @@ gl_yank()
+ } else {
+ if (gl_pos + len > gl_cnt) {
+ if (gl_pos + len >= BUF_SIZE - 1)
+- gl_error("\n*** Error: getline(): input buffer overflow\n");
++ gl_error("\n*** Error: get_line(): input buffer overflow\n");
+ gl_buf[gl_pos + len] = 0;
+ }
+ for (i=0; i < len; i++)
+@@ -657,7 +656,7 @@ gl_newline()
+ int loc = gl_width - 5; /* shifts line back to start position */
+
+ if (gl_cnt >= BUF_SIZE - 1)
+- gl_error("\n*** Error: getline(): input buffer overflow\n");
++ gl_error("\n*** Error: get_line(): input buffer overflow\n");
+ if (gl_out_hook) {
+ change = gl_out_hook(gl_buf);
+ len = strlen(gl_buf);
+@@ -916,7 +915,7 @@ char *buf;
+ char *p = buf;
+ int len;
+
+- /* in case we call gl_histadd() before we call getline() */
++ /* in case we call gl_histadd() before we call get_line() */
+ if (gl_init_done < 0) { /* -1 only on startup */
+ hist_init();
+ gl_init_done = 0;
diff --git a/devel/libreadline-java/files/patch-src_native_getline.h b/devel/libreadline-java/files/patch-src_native_getline.h
new file mode 100644
index 0000000..b892fde
--- /dev/null
+++ b/devel/libreadline-java/files/patch-src_native_getline.h
@@ -0,0 +1,29 @@
+--- src/native/getline.h.orig 2003-01-07 10:14:35 UTC
++++ src/native/getline.h
+@@ -9,7 +9,7 @@
+
+ extern char* rl_readline_name; /* unused by getline */
+ #define add_history(buffer) gl_histadd(buffer)
+-#define readline(buffer) getline(buffer)
++#define readline(buffer) get_line(buffer)
+ #define clear_history() hist_init()
+ #define using_history() hist_init()
+
+@@ -18,7 +18,7 @@ extern char* rl_readline_name;
+
+ typedef size_t (*gl_strwidth_proc)(char *);
+
+-char *getline(char *); /* read a line of input */
++char *get_line(char *); /* read a line of input */
+ void gl_setwidth(int); /* specify width of screen */
+ void gl_histadd(char *); /* adds entries to hist */
+ void gl_strwidth(gl_strwidth_proc); /* to bind gl_strlen */
+@@ -30,7 +30,7 @@ extern int (*gl_tab_hook)(char *, int, i
+
+ #else /* not __STDC__ */
+
+-char *getline();
++char *get_line();
+ void gl_setwidth();
+ void gl_histadd();
+ void gl_strwidth();
diff --git a/devel/libreadline-java/files/patch-src-native-org_gnu_readline_Readline.c b/devel/libreadline-java/files/patch-src_native_org__gnu__readline__Readline.c
index f7dda90..708876b 100644
--- a/devel/libreadline-java/files/patch-src-native-org_gnu_readline_Readline.c
+++ b/devel/libreadline-java/files/patch-src_native_org__gnu__readline__Readline.c
@@ -1,6 +1,6 @@
---- src/native/org_gnu_readline_Readline.c.orig 2003-01-07 11:14:35.000000000 +0100
-+++ src/native/org_gnu_readline_Readline.c 2013-12-12 20:40:36.000000000 +0100
-@@ -430,7 +430,7 @@
+--- src/native/org_gnu_readline_Readline.c.orig 2003-01-07 10:14:35 UTC
++++ src/native/org_gnu_readline_Readline.c
+@@ -430,7 +430,7 @@ const char *java_completer(char *text, i
jtext = (*jniEnv)->NewStringUTF(jniEnv,text);
if (jniMethodId == 0) {
@@ -9,7 +9,7 @@
}
completion = (*jniEnv)->CallObjectMethod(jniEnv, jniObject,
-@@ -560,6 +560,21 @@
+@@ -560,6 +560,21 @@ JNIEXPORT void JNICALL
#endif
/* -------------------------------------------------------------------------- */
diff --git a/devel/libreadline-java/files/patch-src-org-gnu-readline-Readline.java b/devel/libreadline-java/files/patch-src_org_gnu_readline_Readline.java
index 601aa2a..62cd3f5 100644
--- a/devel/libreadline-java/files/patch-src-org-gnu-readline-Readline.java
+++ b/devel/libreadline-java/files/patch-src_org_gnu_readline_Readline.java
@@ -1,6 +1,6 @@
---- src/org/gnu/readline/Readline.java.orig 2003-01-07 11:14:35.000000000 +0100
-+++ src/org/gnu/readline/Readline.java 2007-09-27 08:52:01.000000000 +0200
-@@ -568,6 +568,31 @@
+--- src/org/gnu/readline/Readline.java.orig 2003-01-07 10:14:35 UTC
++++ src/org/gnu/readline/Readline.java
+@@ -568,6 +568,31 @@ public class Readline {
/////////////////////////////////////////////////////////////////////////////
/**
@@ -32,7 +32,7 @@
Query the current line buffer. This returns the current content of
the internal line buffer. You might need this in a
{@link ReadlineCompleter} implementation to access the full text
-@@ -838,4 +863,17 @@
+@@ -838,4 +863,17 @@ public class Readline {
private native static void
setWordBreakCharactersImpl(String wordBreakCharacters)
throws UnsupportedEncodingException;
OpenPOWER on IntegriCloud