- Fix build

- Stage support

PR:		184235
Submitted by:	ports fury
This commit is contained in:
Martin Wilke 2014-02-27 09:00:19 +00:00
parent c5a0aa1231
commit 703301fbb4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=346273
5 changed files with 158 additions and 36 deletions

View file

@ -12,35 +12,29 @@ COMMENT= Padrone's Mud Frontend
WRKSRC= ${WRKDIR}/pmfdir/src
SYSSRC= ${WRKSRC}/../system_dir
DOCSRC= ${WRKSRC}/../doc
XMPSRC= ${WRKSRC}/../examples
USES= readline
SUB_FILES= pmfrc.default
CFLAGS+= -Wno-return-type
NO_STAGE= yes
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>

View file

@ -34,26 +34,26 @@
######################################################################
@@ -104,7 +105,8 @@
READLINE_LIB = $(READLINE_DIR)/libreadline.a
@@ -101,7 +102,7 @@
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
-LIBS = $(READLINE_LIB) $(C_PACKAGES_LIB)
+#LIBS = $(READLINE_LIB) $(C_PACKAGES_LIB)
+LIBS = $(C_PACKAGES_LIB) -lreadline -lcompat
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):

View file

@ -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;

42
net/pmf/files/patch-ipc.c Normal file
View file

@ -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];

View file

@ -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];