aboutsummaryrefslogtreecommitdiff
path: root/lang/ohugs
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2014-02-20 11:07:51 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2014-02-20 11:07:51 +0000
commit1b57ea217573620037d89d7e25570ceb47745438 (patch)
tree3b4961aec4460af8b988746a2ba5f332c628d8df /lang/ohugs
parentcf74c384bb6273484a6093a16986ddcc86fea105 (diff)
downloadports-1b57ea217573620037d89d7e25570ceb47745438.tar.gz
ports-1b57ea217573620037d89d7e25570ceb47745438.zip
Notes
Diffstat (limited to 'lang/ohugs')
-rw-r--r--lang/ohugs/Makefile13
-rw-r--r--lang/ohugs/files/patch-Makefile25
-rw-r--r--lang/ohugs/files/patch-src_tkhaskell.c45
3 files changed, 77 insertions, 6 deletions
diff --git a/lang/ohugs/Makefile b/lang/ohugs/Makefile
index 29b6f0f12e4e..d70ecce85a5c 100644
--- a/lang/ohugs/Makefile
+++ b/lang/ohugs/Makefile
@@ -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
diff --git a/lang/ohugs/files/patch-Makefile b/lang/ohugs/files/patch-Makefile
new file mode 100644
index 000000000000..837eb46cc88c
--- /dev/null
+++ b/lang/ohugs/files/patch-Makefile
@@ -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
diff --git a/lang/ohugs/files/patch-src_tkhaskell.c b/lang/ohugs/files/patch-src_tkhaskell.c
new file mode 100644
index 000000000000..1b7b9e144242
--- /dev/null
+++ b/lang/ohugs/files/patch-src_tkhaskell.c
@@ -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));
+ }
+
+