mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-08 06:48:28 +00:00
- Convert to USES=tk
- Convert to new LIB_DEPENDS format - STAGE-clean
This commit is contained in:
parent
cf74c384bb
commit
1b57ea2175
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=345215
@ -13,23 +13,24 @@ COMMENT= Interpreter for Haskell with object-oriented features
|
||||
|
||||
OPTIONS_DEFINE= X11
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
LIB_DEPENDS= readline.6:${PORTSDIR}/devel/readline
|
||||
LIB_DEPENDS= libreadline.so.6:${PORTSDIR}/devel/readline
|
||||
.if empty(PORT_OPTIONS:MX11)
|
||||
LIB_DEPENDS= Tix8.4.3.0:${PORTSDIR}/x11-toolkits/tix
|
||||
LIB_DEPENDS= libTix8.4.3.0.so:${PORTSDIR}/x11-toolkits/tix
|
||||
.endif
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME:S/.src//}
|
||||
BUILD_WRKSRC= ${WRKSRC}/src
|
||||
USES= bison
|
||||
LDFLAGS+= -lm -lreadline -ltermcap
|
||||
.if empty(PORT_OPTIONS:MX11)
|
||||
USE_TK= 84+
|
||||
|
||||
.if ${PORT_OPTIONS:MX11}
|
||||
USES+= tk
|
||||
CFLAGS+= -I${TK_INCLUDEDIR} -I${TCL_INCLUDEDIR} -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib -ltk${TK_VER:S/.//} -ltcl${TCL_VER:S/.//} -lTix8.4.3
|
||||
LDFLAGS+= -L${LOCALBASE}/lib -ltk${TK_SHLIB_VER} -ltcl${TCL_SHLIB_VER} -lTix8.4.3
|
||||
.endif
|
||||
|
||||
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
|
||||
INSTBIN=${PREFIX}/bin INSTLIB=${PREFIX}/lib/ohugs
|
||||
|
||||
|
25
lang/ohugs/files/patch-Makefile
Normal file
25
lang/ohugs/files/patch-Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
--- Makefile.orig 2014-02-20 12:06:18.000000000 +0100
|
||||
+++ Makefile 2014-02-20 12:08:16.000000000 +0100
|
||||
@@ -5,14 +5,14 @@
|
||||
cd src; make
|
||||
|
||||
install: ohugs
|
||||
- rm -rf $(INSTLIB)
|
||||
- rm -f $(INSTBIN)/ohugs $(INSTBIN)/rohugs
|
||||
- mkdir -p $(INSTLIB)
|
||||
- tar cf - lib/*.hs libhugs/*.hs | (cd $(INSTLIB); tar xf -)
|
||||
- cp -p src/ohugs src/rohugs $(INSTLIB)/
|
||||
- sed -e "s#XX_INSTLIB#$(INSTLIB)#" ohugs > $(INSTBIN)/ohugs
|
||||
- sed -e "s#XX_INSTLIB#$(INSTLIB)#" rohugs > $(INSTBIN)/rohugs
|
||||
- chmod 755 $(INSTBIN)/ohugs $(INSTBIN)/rohugs
|
||||
+ rm -rf $(DESTDIR)$(INSTLIB)
|
||||
+ rm -f $(DESTDIR)$(INSTBIN)/ohugs $(DESTDIR)$(INSTBIN)/rohugs
|
||||
+ mkdir -p $(DESTDIR)$(INSTLIB)
|
||||
+ tar cf - lib/*.hs libhugs/*.hs | (cd $(DESTDIR)$(INSTLIB); tar xf -)
|
||||
+ $(BSD_INSTALL_PROGRAM) src/ohugs src/rohugs $(DESTDIR)$(INSTLIB)
|
||||
+ sed -e "s#XX_INSTLIB#$(INSTLIB)#" ohugs > $(DESTDIR)$(INSTBIN)/ohugs
|
||||
+ sed -e "s#XX_INSTLIB#$(INSTLIB)#" rohugs > $(DESTDIR)$(INSTBIN)/rohugs
|
||||
+ chmod 755 $(DESTDIR)$(INSTBIN)/ohugs $(DESTDIR)$(INSTBIN)/rohugs
|
||||
|
||||
clean:
|
||||
cd src; make clean
|
45
lang/ohugs/files/patch-src_tkhaskell.c
Normal file
45
lang/ohugs/files/patch-src_tkhaskell.c
Normal file
@ -0,0 +1,45 @@
|
||||
--- src/tkhaskell.c.orig 2014-02-20 12:00:29.000000000 +0100
|
||||
+++ src/tkhaskell.c 2014-02-20 12:02:44.000000000 +0100
|
||||
@@ -160,17 +160,17 @@
|
||||
Tcl_SetVar(interp, "tcl_interactive", "0", TCL_GLOBAL_ONLY);
|
||||
|
||||
if (Tcl_Init(interp) == TCL_ERROR) {
|
||||
- fprintf(stderr, "%s\n", interp->result);
|
||||
+ fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
|
||||
return(0);
|
||||
}
|
||||
|
||||
if (Tk_Init(interp) == TCL_ERROR) {
|
||||
- fprintf(stderr, "%s\n", interp->result);
|
||||
+ fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
|
||||
return FALSE;
|
||||
}
|
||||
#if O_TIX
|
||||
if (Tix_Init(interp) == TCL_ERROR) {
|
||||
- fprintf(stderr, "%s\n", interp->result);
|
||||
+ fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
@@ -242,17 +242,17 @@
|
||||
String cmd; {
|
||||
char errmsg[200];
|
||||
if (Tcl_Eval(interp,cmd) != TCL_OK) {
|
||||
- fprintf(stderr, "###Tk/Tcl: %s\n", interp->result);
|
||||
+ fprintf(stderr, "###Tk/Tcl: %s\n", Tcl_GetStringResult(interp));
|
||||
strcpy(errmsg,"###internalError {");
|
||||
- strcat (errmsg,interp -> result);
|
||||
+ strcat (errmsg, Tcl_GetStringResult(interp));
|
||||
strcat (errmsg, " }");
|
||||
if (Tcl_Eval(interp,errmsg) != TCL_OK){
|
||||
- fprintf(stderr, "###%s\n", interp->result);
|
||||
+ fprintf(stderr, "###%s\n", Tcl_GetStringResult(interp));
|
||||
exit(1);
|
||||
return ("");
|
||||
}
|
||||
}
|
||||
- return (interp -> result);
|
||||
+ return (Tcl_GetStringResult(interp));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user