aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2014-02-27 09:00:19 +0000
committerMartin Wilke <miwi@FreeBSD.org>2014-02-27 09:00:19 +0000
commit703301fbb470f588724f85fd6835d304a6df7f98 (patch)
treeefc3d3c7b36b23a08588c5fe1ea6de0d3904759a /net
parentc5a0aa1231805475e5a4a8e8968d6afb7cf26dca (diff)
downloadports-703301fbb470f588724f85fd6835d304a6df7f98.tar.gz
ports-703301fbb470f588724f85fd6835d304a6df7f98.zip
- Fix build
- Stage support PR: 184235 Submitted by: ports fury
Notes
Notes: svn path=/head/; revision=346273
Diffstat (limited to 'net')
-rw-r--r--net/pmf/Makefile42
-rw-r--r--net/pmf/files/patch-Makefile24
-rw-r--r--net/pmf/files/patch-help.c30
-rw-r--r--net/pmf/files/patch-ipc.c42
-rw-r--r--net/pmf/files/patch-putget.c56
5 files changed, 158 insertions, 36 deletions
diff --git a/net/pmf/Makefile b/net/pmf/Makefile
index eaae46c6e8b4..80a4628a7250 100644
--- a/net/pmf/Makefile
+++ b/net/pmf/Makefile
@@ -12,35 +12,29 @@ COMMENT= Padrone's Mud Frontend
WRKSRC= ${WRKDIR}/pmfdir/src
-SYSSRC= ${WRKSRC}/../system_dir
-DOCSRC= ${WRKSRC}/../doc
-XMPSRC= ${WRKSRC}/../examples
-SUB_FILES= pmfrc.default
-
-CFLAGS+= -Wno-return-type
+USES= readline
-NO_STAGE= yes
+SUB_FILES= pmfrc.default
OPTIONS_DEFINE= DOCS EXAMPLES
-.include <bsd.port.options.mk>
+post-build:
+ @${LN} -sf .pmfrc ${WRKSRC}/../examples/dot.pmfrc
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/pmf ${PREFIX}/bin
- @${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${SYSSRC}/NEWS ${DATADIR}
- ${INSTALL_DATA} ${WRKDIR}/pmfrc.default ${DATADIR}
- @${MKDIR} ${DATADIR}/helpfiles
- ${INSTALL_DATA} ${SYSSRC}/helpfiles/.pmfrc ${DATADIR}/helpfiles
- ${INSTALL_DATA} ${SYSSRC}/helpfiles/* ${DATADIR}/helpfiles
-.if ${PORT_OPTIONS:MEXAMPLES}
- @${MKDIR} ${EXAMPLESDIR}
- ${INSTALL_DATA} ${XMPSRC}/.pmfrc ${EXAMPLESDIR}/dot.pmfrc
- ${INSTALL_DATA} ${XMPSRC}/* ${EXAMPLESDIR}
-.endif
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${DOCSRC}/* ${DOCSDIR}
-.endif
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} pmf ${STAGEDIR}${PREFIX}/bin)
+ @${MKDIR} ${STAGEDIR}${DATADIR}
+ (cd ${WRKSRC}/../system_dir && ${INSTALL_DATA} NEWS \
+ ${STAGEDIR}${DATADIR})
+ (cd ${WRKDIR} && ${INSTALL_DATA} pmfrc.default \
+ ${STAGEDIR}${DATADIR})
+ @(cd ${WRKSRC}/../system_dir && ${COPYTREE_SHARE} helpfiles \
+ ${STAGEDIR}${DATADIR})
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ (cd ${WRKSRC}/../doc && ${INSTALL_DATA} * \
+ ${STAGEDIR}${DOCSDIR})
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ (cd ${WRKSRC}/../examples && ${INSTALL_DATA} * \
+ ${STAGEDIR}${EXAMPLESDIR})
.include <bsd.port.mk>
diff --git a/net/pmf/files/patch-Makefile b/net/pmf/files/patch-Makefile
index 0eee3c6f16f0..8a32a366841f 100644
--- a/net/pmf/files/patch-Makefile
+++ b/net/pmf/files/patch-Makefile
@@ -34,26 +34,26 @@
######################################################################
-@@ -104,7 +105,8 @@
- READLINE_LIB = $(READLINE_DIR)/libreadline.a
- C_PACKAGES_LIB = $(C_PACKAGES_DIR)/libc_packs.a
+@@ -101,7 +102,7 @@
--LIBS = $(READLINE_LIB) $(C_PACKAGES_LIB)
-+#LIBS = $(READLINE_LIB) $(C_PACKAGES_LIB)
-+LIBS = $(C_PACKAGES_LIB) -lreadline -lcompat
+ READLINE_DIR = readline
+ C_PACKAGES_DIR = c_packages
+-READLINE_LIB = $(READLINE_DIR)/libreadline.a
++#READLINE_LIB = $(READLINE_DIR)/libreadline.a
+ C_PACKAGES_LIB = $(C_PACKAGES_DIR)/libc_packs.a
- INCLUDEDIRS = -I$(C_PACKAGES_DIR)/safe_malloc \
- -I$(C_PACKAGES_DIR)/generic_list \
-@@ -123,7 +125,7 @@
+ LIBS = $(READLINE_LIB) $(C_PACKAGES_LIB)
+@@ -123,8 +124,7 @@
pmf: $(OBJECTS) $(LIBS)
rm -f compile_time.c
- $(CC) -o pmf $(CFLAGS) $(OBJECTS) $(LIBS) -ltermcap -lresolv
-+ $(CC) -o pmf $(CFLAGS) $(OBJECTS) $(LIBS) -ltermcap
- strip pmf
+- strip pmf
++ $(CC) -o pmf $(CFLAGS) $(OBJECTS) $(LIBS) -ltermcap -lreadline -lcompat
rm -f compile_time.o
-@@ -133,10 +135,10 @@
+ compile_time.c:
+@@ -133,10 +133,10 @@
######################################################################
$(READLINE_LIB):
diff --git a/net/pmf/files/patch-help.c b/net/pmf/files/patch-help.c
new file mode 100644
index 000000000000..8be26c9f0089
--- /dev/null
+++ b/net/pmf/files/patch-help.c
@@ -0,0 +1,30 @@
+--- help.c.orig
++++ help.c
+@@ -16,10 +16,11 @@
+ #include "globals.h"
+
+ extern char compile_time[], version[];
++extern void cmd_help();
+
+ /*---------------------------------------------------------------------------*/
+
+-cmd_help(orig_arg)
++void cmd_help(orig_arg)
+ char *orig_arg;
+ {
+ char *arg, *lc = NULL, *try2 = NULL, *try3 = NULL, *try4 = NULL;
+--- help.c.orig
++++ help.c
+@@ -16,10 +16,11 @@
+ #include "globals.h"
+
+ extern char compile_time[], version[];
++extern void cmd_help();
+
+ /*---------------------------------------------------------------------------*/
+
+-cmd_help(orig_arg)
++void cmd_help(orig_arg)
+ char *orig_arg;
+ {
+ char *arg, *lc = NULL, *try2 = NULL, *try3 = NULL, *try4 = NULL;
diff --git a/net/pmf/files/patch-ipc.c b/net/pmf/files/patch-ipc.c
new file mode 100644
index 000000000000..74e69e66e607
--- /dev/null
+++ b/net/pmf/files/patch-ipc.c
@@ -0,0 +1,42 @@
+--- ipc.c.orig
++++ ipc.c
+@@ -35,8 +35,7 @@
+ #endif /* FD_ZERO */
+
+ extern char *get_now_date_string();
+-
+-extern int errno;
++extern void telnet_protocol();
+
+ static struct in_addr host_address;
+ static struct sockaddr_in socket_address;
+@@ -360,7 +359,7 @@
+ /* This function takes the three bytes from a telnet command,
+ * and implements a very limited telnet protocol.
+ */
+-telnet_protocol(one, two, three)
++void telnet_protocol(one, two, three)
+ unsigned int one, two, three;
+ {
+ unsigned char reply[3];
+--- ipc.c.orig
++++ ipc.c
+@@ -35,8 +35,7 @@
+ #endif /* FD_ZERO */
+
+ extern char *get_now_date_string();
+-
+-extern int errno;
++extern void telnet_protocol();
+
+ static struct in_addr host_address;
+ static struct sockaddr_in socket_address;
+@@ -360,7 +359,7 @@
+ /* This function takes the three bytes from a telnet command,
+ * and implements a very limited telnet protocol.
+ */
+-telnet_protocol(one, two, three)
++void telnet_protocol(one, two, three)
+ unsigned int one, two, three;
+ {
+ unsigned char reply[3];
diff --git a/net/pmf/files/patch-putget.c b/net/pmf/files/patch-putget.c
new file mode 100644
index 000000000000..f1948bf46a45
--- /dev/null
+++ b/net/pmf/files/patch-putget.c
@@ -0,0 +1,56 @@
+--- putget.c.orig
++++ putget.c
+@@ -30,6 +30,7 @@
+ *expand_variables(),
+ *find_robot_action_string(),
+ *return_last();
++extern void cmd_putfile(), cmd_getfile();
+
+ /* This is a temporary buffer of text received from the MUD game.
+ * If the flag "getfiling" is true, the routines that receive the MUD
+@@ -44,7 +45,7 @@
+ /*---------------------------------------------------------------------------*/
+
+ /* Send a file to LPmud using the built-in editor */
+-cmd_putfile(filename, optional_filename)
++void cmd_putfile(filename, optional_filename)
+ char *filename, *optional_filename;
+ {
+ char *local_filename, *remote_filename, cmd_buffer[MAX_LINE_LENGTH + 1];
+@@ -103,7 +104,7 @@
+ /*---------------------------------------------------------------------------*/
+
+ /* Get a file from LPmud using the built-in editor */
+-cmd_getfile(filename, optional_filename)
++void cmd_getfile(filename, optional_filename)
+ char *filename, *optional_filename;
+ {
+ char *local_filename, *remote_filename, cmd_buffer[MAX_LINE_LENGTH + 1];
+--- putget.c.orig
++++ putget.c
+@@ -30,6 +30,7 @@
+ *expand_variables(),
+ *find_robot_action_string(),
+ *return_last();
++extern void cmd_putfile(), cmd_getfile();
+
+ /* This is a temporary buffer of text received from the MUD game.
+ * If the flag "getfiling" is true, the routines that receive the MUD
+@@ -44,7 +45,7 @@
+ /*---------------------------------------------------------------------------*/
+
+ /* Send a file to LPmud using the built-in editor */
+-cmd_putfile(filename, optional_filename)
++void cmd_putfile(filename, optional_filename)
+ char *filename, *optional_filename;
+ {
+ char *local_filename, *remote_filename, cmd_buffer[MAX_LINE_LENGTH + 1];
+@@ -103,7 +104,7 @@
+ /*---------------------------------------------------------------------------*/
+
+ /* Get a file from LPmud using the built-in editor */
+-cmd_getfile(filename, optional_filename)
++void cmd_getfile(filename, optional_filename)
+ char *filename, *optional_filename;
+ {
+ char *local_filename, *remote_filename, cmd_buffer[MAX_LINE_LENGTH + 1];