summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authordholland <dholland>2013-12-14 08:26:30 +0000
committerdholland <dholland>2013-12-14 08:26:30 +0000
commit7064fa9dc46703cbc9cc13e40258dbfc25ec72dd (patch)
tree4f024ee9dcdd56b3f77eac699dca30470fa8e4fc /x11
parent8fef98b74a9508e2c3229d786d5c398e65ecc19b (diff)
downloadpkgsrc-7064fa9dc46703cbc9cc13e40258dbfc25ec72dd.tar.gz
Turn on DESTDIR mode, clear BROKEN.
Deploy a pile of horrible hacks to more or less fix the build; this version of this package does not seem to be fully compatible with even the ancient ghc we have in pkgsrc. Bump PKGREVISION.
Diffstat (limited to 'x11')
-rw-r--r--x11/wxhaskell/DEINSTALL10
-rw-r--r--x11/wxhaskell/INSTALL10
-rw-r--r--x11/wxhaskell/Makefile15
-rw-r--r--x11/wxhaskell/distinfo5
-rw-r--r--x11/wxhaskell/files/fixup.sh27
-rw-r--r--x11/wxhaskell/patches/patch-aa61
-rw-r--r--x11/wxhaskell/patches/patch-ab25
7 files changed, 142 insertions, 11 deletions
diff --git a/x11/wxhaskell/DEINSTALL b/x11/wxhaskell/DEINSTALL
new file mode 100644
index 00000000000..0d8ff59f049
--- /dev/null
+++ b/x11/wxhaskell/DEINSTALL
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2013/12/14 08:26:30 dholland Exp $
+
+case ${STAGE} in
+DEINSTALL)
+ ghc-pkg unregister wx
+ ghc-pkg unregister wxcore
+ ;;
+esac
diff --git a/x11/wxhaskell/INSTALL b/x11/wxhaskell/INSTALL
new file mode 100644
index 00000000000..359ba74a4ac
--- /dev/null
+++ b/x11/wxhaskell/INSTALL
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2013/12/14 08:26:30 dholland Exp $
+
+case ${STAGE} in
+POST-INSTALL)
+ ghc-pkg register ${PREFIX}/lib/wxcore.pkg
+ ghc-pkg register ${PREFIX}/lib/wx.pkg
+ ;;
+esac
diff --git a/x11/wxhaskell/Makefile b/x11/wxhaskell/Makefile
index 721f2192193..653dd3d65c3 100644
--- a/x11/wxhaskell/Makefile
+++ b/x11/wxhaskell/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.49 2013/10/24 10:31:02 wiz Exp $
+# $NetBSD: Makefile,v 1.50 2013/12/14 08:26:30 dholland Exp $
DISTNAME= wxhaskell-src-0.9.4
PKGNAME= ${DISTNAME:S/-src//}
-PKGREVISION= 31
+PKGREVISION= 32
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=wxhaskell/}
EXTRACT_SUFX= .zip
@@ -11,11 +11,9 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://haskell.org/haskellwiki/WxHaskell
COMMENT= Haskell wxGTK bindings
-PKG_DESTDIR_SUPPORT= none
-BROKEN= Does not support DESTDIR; will be removed after 2013Q4
-
USE_LANGUAGES= c c++
USE_TOOLS+= gmake
+MAKE_JOBS_SAFE= no
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
@@ -26,9 +24,16 @@ MAKE_FLAGS+= X11BASE=${X11BASE:Q}
PLIST_SUBST+= GTKVERSION=2.6.3
CHECK_FILES_SKIP+= lib/ghc-6.4.1/package.conf.old
+post-extract:
+ ${SED} < ${FILESDIR}/fixup.sh > ${WRKSRC}/fixup.sh \
+ -e s,@WRKSRC@,${WRKSRC:Q},g
+
pre-configure:
cd ${WRKSRC} && ./configure --prefix=${PREFIX} --with-opengl
+INSTALL_TARGET= install-files
+
.include "../../lang/ghc/buildlink3.mk"
+.include "../../graphics/glu/buildlink3.mk"
.include "../../x11/wxGTK26/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/x11/wxhaskell/distinfo b/x11/wxhaskell/distinfo
index 98f63a7a437..ccbbfbadc13 100644
--- a/x11/wxhaskell/distinfo
+++ b/x11/wxhaskell/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.5 2005/10/23 20:29:42 rillig Exp $
+$NetBSD: distinfo,v 1.6 2013/12/14 08:26:30 dholland Exp $
SHA1 (wxhaskell-src-0.9.4.zip) = 6133991fb1e6c76a3b5b2bf175277ce56c2adad3
RMD160 (wxhaskell-src-0.9.4.zip) = 70c386cb2451509dbd5bca652435bab35b808ed1
Size (wxhaskell-src-0.9.4.zip) = 569954 bytes
-SHA1 (patch-aa) = 3949a41757a2e37e692746acab1ece5f775a574a
+SHA1 (patch-aa) = d1809cd32ff942c82cf540804b1aba66d1162045
+SHA1 (patch-ab) = 6d2b08d6fd476839f480be73d699423ea97f20b1
diff --git a/x11/wxhaskell/files/fixup.sh b/x11/wxhaskell/files/fixup.sh
new file mode 100644
index 00000000000..ea883894b46
--- /dev/null
+++ b/x11/wxhaskell/files/fixup.sh
@@ -0,0 +1,27 @@
+#
+# Hack to fix up the Haskell package system bits.
+#
+
+# Remove nonexistent depends from wxcore.pkg.
+mv config/wxcore.pkg config/wxcore.pkg.orig
+sed < config/wxcore.pkg.orig \
+ -e "/depends/s/,lang//;/depends/s/,concurrent//" \
+ > config/wxcore.pkg
+
+# Create a temporary package database to import wxcore through while
+# building wx. Otherwise it doesn't work.
+echo '[]' > tmp-pkgdb
+mkdir -p out/wx/imports
+sed < config/wxcore.pkg \
+ -e "s,.{wxhlibdir},@WRKSRC@/out/wx," \
+ | ghc-pkg -f tmp-pkgdb register -
+
+
+# And since we appear to *also* need to include from the output
+# directory, make a version of it that doesn't show wxcore; otherwise
+# ghc reads wxcore through the include path instead of its package
+# system, and then fails.
+
+mkdir -p out2/wx/imports/Graphics/UI/
+ln -sf ../../../../../out/wx/imports/Graphics/UI/WX \
+ out2/wx/imports/Graphics/UI/WX
diff --git a/x11/wxhaskell/patches/patch-aa b/x11/wxhaskell/patches/patch-aa
index befb1ef89c6..9295f0a2164 100644
--- a/x11/wxhaskell/patches/patch-aa
+++ b/x11/wxhaskell/patches/patch-aa
@@ -1,8 +1,61 @@
-$NetBSD: patch-aa,v 1.2 2005/10/23 20:29:42 rillig Exp $
+$NetBSD: patch-aa,v 1.3 2013/12/14 08:26:30 dholland Exp $
---- makefile.orig Tue Jul 27 16:12:15 2004
-+++ makefile Sat Nov 20 16:35:27 2004
-@@ -632,7 +632,7 @@
+- Add an extra arg to compile-hs so we can control whether -i is passed.
+This is needed for building wxcore but not wx.
+
+- Add the version to the wxcore package name. XXX: it is hardcoded,
+which is bad, but it's likely that the next update to this package
+will remove most of this patch.
+
+- Run fixup.sh to create a dummy package installation to make ghc
+happy importing wxcore interfaces while building wx.
+
+- Add X11BASE to the include path.
+
+--- makefile.orig 2005-04-29 09:31:37.000000000 +0000
++++ makefile 2013-12-14 04:26:08.000000000 +0000
+@@ -424,7 +424,7 @@ $(WXD-EXE): $(WXD-OBJS)
+
+ # create an object file from source files.
+ $(WXD-OBJS): $(WXD-OUTDIR)/%.o: $(WXD-SRCDIR)/%.hs
+- @$(call compile-hs,$@,$<,$(HCFLAGS) $(PKG-PARSEC),$(WXD-OUTDIR),-i$(WXD-SRCDIR))
++ @$(call compile-hs,$@,$<,$(HCFLAGS) $(PKG-PARSEC),$(WXD-OUTDIR),-i$(WXD-SRCDIR),-i$(WXD-OUTDIR))
+
+ # automatically include all dependency information.
+ -include $(WXD-DEPS)
+@@ -471,11 +471,12 @@ WXCORE-NONGEN-HS=$(filter-out $(WXCORE-G
+
+ WXCORE-BINS =$(WXCORE-HIS) $(WXCORE-LIBS)
+ WXCORE-DOCS =$(filter-out $(WXCORE-SRCDIR)/$(WXCORE-HPATH)/IntMap.hs,$(WXCORE-HS))
+-WXCORE-HCFLAGS =$(HCFLAGS) -fvia-C -package-name $(WXCORE)
++WXCORE-HCFLAGS =$(HCFLAGS) -fvia-C -package-name $(WXCORE)-0.9.4
+
+
+ # build main library
+ wxcore: wxc wxd wxcore-dirs $(WXCORE-LIBS)
++ sh fixup.sh
+
+ wxcore-dirs:
+ @$(call ensure-dirs-of-files,$(WXCORE-OBJS))
+@@ -553,7 +554,7 @@ $(WXCORE-CORE-C-LIB): $(WXCORE-CORE-C-OB
+
+ # create an object file from source files.
+ $(WXCORE-CORE-A-OBJS) $(WXCORE-CORE-B-OBJS) $(WXCORE-CORE-C-OBJS) $(WXCORE-OBJS): $(WXCORE-IMPORTSDIR)/%.o: $(WXCORE-SRCDIR)/%.hs
+- @$(call compile-hs,$@,$<,$(WXCORE-HCFLAGS) -Iwxc/include,$(WXCORE-IMPORTSDIR),$(WXCORE-HSDIRS) )
++ @$(call compile-hs,$@,$<,$(WXCORE-HCFLAGS) -Iwxc/include,$(WXCORE-IMPORTSDIR),$(WXCORE-HSDIRS),-i$(WXCORE-IMPORTSDIR) )
+
+ $(WXCORE-STUB-OBJS): $(WXCORE-IMPORTSDIR)/%_stub.o: $(WXCORE-SRCDIR)/%.hs
+ $(HC) -c $(basename $@).c
+@@ -626,7 +627,7 @@ $(WX-LIB): $(WX-OBJS)
+
+ # create an object file from source files.
+ $(WX-OBJS): $(WX-IMPORTSDIR)/%.o: $(WX-SRCDIR)/%.hs
+- @$(call compile-hs,$@,$<,$(WX-HCFLAGS) -i$(WXCORE-IMPORTSDIR),$(WX-IMPORTSDIR),$(WX-HSDIRS))
++ @$(call compile-hs,$@,$<,$(WX-HCFLAGS) -package-conf tmp-pkgdb -package wxcore,$(WX-IMPORTSDIR),$(WX-HSDIRS),-i$(patsubst out/%,out2/%,$(WX-IMPORTSDIR)))
+
+ # automatically include all dependency information.
+ -include $(WX-DEPS)
+@@ -651,7 +652,7 @@ WXC-LIB =$(WXC-OUTDIR)/$(LIB)$(WXC-LIBN
WXC-OBJS =$(call make-objs, $(WXC-OUTDIR), $(WXC-SOURCES))
WXC-DEPS =$(call make-deps, $(WXC-OUTDIR), $(WXC-SOURCES))
WXC-LIBS =$(WXWIN-LIBS)
diff --git a/x11/wxhaskell/patches/patch-ab b/x11/wxhaskell/patches/patch-ab
new file mode 100644
index 00000000000..ff4062cd1cc
--- /dev/null
+++ b/x11/wxhaskell/patches/patch-ab
@@ -0,0 +1,25 @@
+$NetBSD: patch-ab,v 1.1 2013/12/14 08:26:30 dholland Exp $
+
+- Add an extra arg to compile-hs so we can control whether -i is passed.
+This is needed for building wxcore but not wx.
+
+--- makefile.lib.orig 2005-04-29 10:32:51.000000000 +0000
++++ makefile.lib 2013-12-14 04:26:31.000000000 +0000
+@@ -137,14 +137,14 @@ else
+ silent-move-stubs =$(call silent-move-file,$(basename $(2))_stub.h,$(dir $(1))) && \
+ $(call silent-move-file,$(basename $(2))_stub.c,$(dir $(1)))
+
+-make-hs-obj =$(call run-with-echo,$(HC) -c $(2) -o $(1) -i$(4) -odir $(4) -hidir $(4) $(3))
++make-hs-obj =$(call run-with-echo,$(HC) -c $(2) -o $(1) $(5) -odir $(4) -hidir $(4) $(3))
+
+ # make-hs-deps(<output .o>,<input .hs>,<compile flags>,<top output directory>,<hs directories>)
+ make-hs-deps =$(HC) $(2) $(3) -odir $(4) -hidir $(4) $(5) -M -optdep-f -optdep$(basename $(1)).d.in && \
+ sed -e 's|\.hi|\.o|g' $(basename $(1)).d.in | grep '^$(1)' > $(basename $(1)).d
+
+-# compile-hs(<output .o>,<input .hs>,<compile flags>,<top output directory>,<hs directories>)
+-compile-hs =$(call make-hs-obj,$(1),$(2),$(3),$(4)) && \
++# compile-hs(<output .o>,<input .hs>,<compile flags>,<top output directory>,<hs directories>,<-i top output directory if any>)
++compile-hs =$(call make-hs-obj,$(1),$(2),$(3),$(4),$(6)) && \
+ $(call silent-move-stubs,$(1),$(2)) && \
+ $(call make-hs-deps,$(1),$(2),$(3),$(4),$(5))
+