diff options
author | joerg <joerg@pkgsrc.org> | 2015-02-20 23:39:31 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-02-20 23:39:31 +0000 |
commit | 0cdd9bd41c03f99ee4396292c608aef58c8d2cf8 (patch) | |
tree | 22f20c6f42d4e8ceba312e673c8bf93afc74738b /x11 | |
parent | 58dd3feeaad9f209a468103431bc79d8bfbea430 (diff) | |
download | pkgsrc-0cdd9bd41c03f99ee4396292c608aef58c8d2cf8.tar.gz |
Build shared library. Fix soname passing. Fix format strings. Explicitly
truncate pointers (XXX revisit by somewhere with more Haskellfu). Fix
bit masking.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/wxhaskell/Makefile | 6 | ||||
-rw-r--r-- | x11/wxhaskell/distinfo | 9 | ||||
-rw-r--r-- | x11/wxhaskell/patches/patch-aa | 15 | ||||
-rw-r--r-- | x11/wxhaskell/patches/patch-wxc_src_ewxw_eljcolour.cpp | 13 | ||||
-rw-r--r-- | x11/wxhaskell/patches/patch-wxc_src_ewxw_eljtoolbar.cpp | 13 | ||||
-rw-r--r-- | x11/wxhaskell/patches/patch-wxc_src_extra.cpp | 70 | ||||
-rw-r--r-- | x11/wxhaskell/patches/patch-wxc_src_image.cpp | 43 | ||||
-rw-r--r-- | x11/wxhaskell/patches/patch-wxc_src_treectrl.cpp | 16 |
8 files changed, 177 insertions, 8 deletions
diff --git a/x11/wxhaskell/Makefile b/x11/wxhaskell/Makefile index 8b0d698950a..adc52b11c98 100644 --- a/x11/wxhaskell/Makefile +++ b/x11/wxhaskell/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.51 2014/05/05 00:48:34 ryoon Exp $ +# $NetBSD: Makefile,v 1.52 2015/02/20 23:39:31 joerg Exp $ DISTNAME= wxhaskell-src-0.9.4 PKGNAME= ${DISTNAME:S/-src//} -PKGREVISION= 33 +PKGREVISION= 34 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=wxhaskell/} EXTRACT_SUFX= .zip @@ -33,7 +33,7 @@ pre-configure: INSTALL_TARGET= install-files -.include "../../lang/ghc/buildlink3.mk" +.include "../../lang/ghc7/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 ccbbfbadc13..193b43cfbe9 100644 --- a/x11/wxhaskell/distinfo +++ b/x11/wxhaskell/distinfo @@ -1,7 +1,12 @@ -$NetBSD: distinfo,v 1.6 2013/12/14 08:26:30 dholland Exp $ +$NetBSD: distinfo,v 1.7 2015/02/20 23:39:31 joerg 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) = d1809cd32ff942c82cf540804b1aba66d1162045 +SHA1 (patch-aa) = 8d19820883faa8cc4d5605547ab80ba24f4a709a SHA1 (patch-ab) = 6d2b08d6fd476839f480be73d699423ea97f20b1 +SHA1 (patch-wxc_src_ewxw_eljcolour.cpp) = ded5b65de343f6e254f0c5375acad34f07463cb9 +SHA1 (patch-wxc_src_ewxw_eljtoolbar.cpp) = d2104d69ec2380fe27800dd353bd91a44025e2b4 +SHA1 (patch-wxc_src_extra.cpp) = 29774dfe0f9dbaac5aaa99471299961d1f466e8d +SHA1 (patch-wxc_src_image.cpp) = 3964efd0c63af94ceab08cbabf257004dddc168c +SHA1 (patch-wxc_src_treectrl.cpp) = 3099efda7f2f08f87ac20e411b2076926cda9f0e diff --git a/x11/wxhaskell/patches/patch-aa b/x11/wxhaskell/patches/patch-aa index 9295f0a2164..bca9b112709 100644 --- a/x11/wxhaskell/patches/patch-aa +++ b/x11/wxhaskell/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.3 2013/12/14 08:26:30 dholland Exp $ +$NetBSD: patch-aa,v 1.4 2015/02/20 23:39:31 joerg 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. @@ -13,7 +13,7 @@ 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 ++++ makefile @@ -424,7 +424,7 @@ $(WXD-EXE): $(WXD-OBJS) # create an object file from source files. @@ -60,7 +60,16 @@ happy importing wxcore interfaces while building wx. WXC-DEPS =$(call make-deps, $(WXC-OUTDIR), $(WXC-SOURCES)) WXC-LIBS =$(WXWIN-LIBS) -WXC-CXXFLAGS =$(WXWIN-CXXFLAGS) -I$(WXC-INCDIR) -+WXC-CXXFLAGS =$(WXWIN-CXXFLAGS) -I$(WXC-INCDIR) -I$(X11BASE)/include ++WXC-CXXFLAGS =$(WXWIN-CXXFLAGS) -I$(WXC-INCDIR) -I$(X11BASE)/include -fPIC wxc: wxc-dirs $(WXC-LIB) +@@ -711,7 +712,7 @@ endif + + # dynamic link library on unix: generates single .so file + $(basename $(WXC-LIB)).so: $(WXC-OBJS) +- $(CXX) -shared -o $@ $^ $(WXC-LIBS) -Wl --soname=$(SHARED-PREFIX)$(notdir $@) ++ $(CXX) -shared -o $@ $^ $(WXC-LIBS) -Wl,--soname=$(SHARED-PREFIX)$(notdir $@) + + # dynamic link library on macOSX: generates single .so file + $(basename $(WXC-LIB)).dylib: $(WXC-OBJS) diff --git a/x11/wxhaskell/patches/patch-wxc_src_ewxw_eljcolour.cpp b/x11/wxhaskell/patches/patch-wxc_src_ewxw_eljcolour.cpp new file mode 100644 index 00000000000..103face75cb --- /dev/null +++ b/x11/wxhaskell/patches/patch-wxc_src_ewxw_eljcolour.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-wxc_src_ewxw_eljcolour.cpp,v 1.1 2015/02/20 23:39:31 joerg Exp $ + +--- wxc/src/ewxw/eljcolour.cpp.orig 2015-02-20 23:00:58.000000000 +0000 ++++ wxc/src/ewxw/eljcolour.cpp +@@ -93,7 +93,7 @@ EWXWEXPORT(void, wxColour_SetByName)(voi + + EWXWEXPORT(int, wxColour_ValidName)(void* _name) + { +- return (int) wxTheColourDatabase->FindColour ((char*)_name); ++ return (int)(intptr_t) wxTheColourDatabase->FindColour ((char*)_name); + } + + } diff --git a/x11/wxhaskell/patches/patch-wxc_src_ewxw_eljtoolbar.cpp b/x11/wxhaskell/patches/patch-wxc_src_ewxw_eljtoolbar.cpp new file mode 100644 index 00000000000..cb09a2f6b6c --- /dev/null +++ b/x11/wxhaskell/patches/patch-wxc_src_ewxw_eljtoolbar.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-wxc_src_ewxw_eljtoolbar.cpp,v 1.1 2015/02/20 23:39:31 joerg Exp $ + +--- wxc/src/ewxw/eljtoolbar.cpp.orig 2015-02-20 23:10:53.000000000 +0000 ++++ wxc/src/ewxw/eljtoolbar.cpp +@@ -15,7 +15,7 @@ EWXWEXPORT(void, wxToolBar_Delete) (void + + EWXWEXPORT(int, wxToolBar_AddControl) (void* _obj, void* ctrl) + { +- return (int)((wxToolBar*)_obj)->AddControl ((wxControl*)ctrl); ++ return (int)(intptr_t)((wxToolBar*)_obj)->AddControl ((wxControl*)ctrl); + } + + EWXWEXPORT(void, wxToolBar_AddSeparator) (void* _obj) diff --git a/x11/wxhaskell/patches/patch-wxc_src_extra.cpp b/x11/wxhaskell/patches/patch-wxc_src_extra.cpp new file mode 100644 index 00000000000..f58c1396cc4 --- /dev/null +++ b/x11/wxhaskell/patches/patch-wxc_src_extra.cpp @@ -0,0 +1,70 @@ +$NetBSD: patch-wxc_src_extra.cpp,v 1.1 2015/02/20 23:39:31 joerg Exp $ + +--- wxc/src/extra.cpp.orig 2015-02-20 22:48:26.000000000 +0000 ++++ wxc/src/extra.cpp +@@ -221,7 +221,7 @@ void wxInputSink::Start() + + int wxInputSink::GetId() + { +- return (int)m_input; ++ return (int)(intptr_t)m_input; + } + + wxThread::ExitCode wxInputSink::Entry() +@@ -2256,47 +2256,47 @@ EWXWEXPORT(void*,wxLog_GetTimestamp)(voi + + EWXWEXPORT(void,LogError)(void* _msg) + { +- wxLogError((char*)_msg); ++ wxLogError("%s", (char*)_msg); + } + + EWXWEXPORT(void,LogFatalError)(void* _msg) + { +- wxLogFatalError((char*)_msg); ++ wxLogFatalError("%s", (char*)_msg); + } + + EWXWEXPORT(void,LogWarning)(void* _msg) + { +- wxLogWarning((char*)_msg); ++ wxLogWarning("%s", (char*)_msg); + } + + EWXWEXPORT(void,LogMessage)(void* _msg) + { +- wxLogMessage((char*)_msg); ++ wxLogMessage("%s", (char*)_msg); + } + + EWXWEXPORT(void,LogVerbose)(void* _msg) + { +- wxLogVerbose((char*)_msg); ++ wxLogVerbose("%s", (char*)_msg); + } + + EWXWEXPORT(void,LogStatus)(void* _msg) + { +- wxLogStatus((char*)_msg); ++ wxLogStatus("%s", (char*)_msg); + } + + EWXWEXPORT(void,LogSysError)(void* _msg) + { +- wxLogSysError((char*)_msg); ++ wxLogSysError("%s", (char*)_msg); + } + + EWXWEXPORT(void,LogDebug)(void* _msg) + { +- wxLogDebug((char*)_msg); ++ wxLogDebug("%s", (char*)_msg); + } + + EWXWEXPORT(void,LogTrace)(void* mask, void* _msg) + { +- wxLogTrace((char*) mask, (char*)_msg); ++ wxLogTrace("%s", (char*) mask, (char*)_msg); + } + + /*----------------------------------------------------------------------------- diff --git a/x11/wxhaskell/patches/patch-wxc_src_image.cpp b/x11/wxhaskell/patches/patch-wxc_src_image.cpp new file mode 100644 index 00000000000..1abf93e53f7 --- /dev/null +++ b/x11/wxhaskell/patches/patch-wxc_src_image.cpp @@ -0,0 +1,43 @@ +$NetBSD: patch-wxc_src_image.cpp,v 1.1 2015/02/20 23:39:31 joerg Exp $ + +--- wxc/src/image.cpp.orig 2015-02-20 22:58:51.000000000 +0000 ++++ wxc/src/image.cpp +@@ -60,9 +60,9 @@ EWXWEXPORT(int, wxcGetPixelRGB)( unsigne + + EWXWEXPORT(void, wxcSetPixelRowRGB)( unsigned char* buffer, int width, int x, int y, int rgb0, int rgb1, int count ) + { +- int r0 = ((rgb0 >> 16) && 0xFF); +- int g0 = ((rgb0 >> 8) && 0xFF); +- int b0 = (rgb0 && 0xFF); ++ int r0 = ((rgb0 >> 16) & 0xFF); ++ int g0 = ((rgb0 >> 8) & 0xFF); ++ int b0 = (rgb0 & 0xFF); + int start = 3*(width*y+x); + int i; + +@@ -76,9 +76,9 @@ EWXWEXPORT(void, wxcSetPixelRowRGB)( uns + } + else { + /* do linear interpolation of the color */ +- int r1 = ((rgb1 >> 16) && 0xFF); +- int g1 = ((rgb1 >> 8) && 0xFF); +- int b1 = (rgb1 && 0xFF); ++ int r1 = ((rgb1 >> 16) & 0xFF); ++ int g1 = ((rgb1 >> 8) & 0xFF); ++ int b1 = (rgb1 & 0xFF); + + int rd = ((r1 - r0) << 16) / (count-1); + int gd = ((g1 - g0) << 16) / (count-1); +@@ -102,9 +102,9 @@ EWXWEXPORT(void, wxcSetPixelRowRGB)( uns + EWXWEXPORT(void, wxcInitPixelsRGB)( unsigned char* buffer, int width, int height, int rgb ) + { + int count = width*height*3; +- unsigned char r = ((rgb >> 16) && 0xFF); +- unsigned char g = ((rgb >> 8) && 0xFF); +- unsigned char b = rgb && 0xFF; ++ unsigned char r = ((rgb >> 16) & 0xFF); ++ unsigned char g = ((rgb >> 8) & 0xFF); ++ unsigned char b = rgb & 0xFF; + int i; + + if (r==g && g==b) { diff --git a/x11/wxhaskell/patches/patch-wxc_src_treectrl.cpp b/x11/wxhaskell/patches/patch-wxc_src_treectrl.cpp new file mode 100644 index 00000000000..bc1c5897353 --- /dev/null +++ b/x11/wxhaskell/patches/patch-wxc_src_treectrl.cpp @@ -0,0 +1,16 @@ +$NetBSD: patch-wxc_src_treectrl.cpp,v 1.1 2015/02/20 23:39:31 joerg Exp $ + +--- wxc/src/treectrl.cpp.orig 2015-02-20 22:58:12.000000000 +0000 ++++ wxc/src/treectrl.cpp +@@ -310,9 +310,9 @@ EWXWEXPORT(int, wxTreeCtrl_GetSelections + *(((wxTreeItemId**)selections)[i]) = sel[i]; + */ + #if wxCHECK_VERSION(2,5,0) +- selections[i] = (int)(((wxTreeItemId*)sel[i])->m_pItem); ++ selections[i] = (int)(intptr_t)(((wxTreeItemId*)sel[i])->m_pItem); + #else +- selections[i] = (int)(sel[i].m_pItem); ++ selections[i] = (int)(intptr_t)(sel[i].m_pItem); + #endif + } + } |