aboutsummaryrefslogtreecommitdiff
path: root/graphics/xaralx
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2008-02-09 09:52:21 +0000
committerVasil Dimov <vd@FreeBSD.org>2008-02-09 09:52:21 +0000
commitc4ea51a43448246081b20bed205e49ab0e0cdf05 (patch)
tree9c1b7442cbbf561939e8f2f3149d2baa05fae460 /graphics/xaralx
parent0b90508989ee07b639b1dacd68554b799638d4da (diff)
downloadports-c4ea51a43448246081b20bed205e49ab0e0cdf05.tar.gz
ports-c4ea51a43448246081b20bed205e49ab0e0cdf05.zip
Notes
Diffstat (limited to 'graphics/xaralx')
-rw-r--r--graphics/xaralx/Makefile23
-rw-r--r--graphics/xaralx/files/patch-wxOil_compatdef.h15
2 files changed, 32 insertions, 6 deletions
diff --git a/graphics/xaralx/Makefile b/graphics/xaralx/Makefile
index 57704379d654..ec997cbf795f 100644
--- a/graphics/xaralx/Makefile
+++ b/graphics/xaralx/Makefile
@@ -7,7 +7,7 @@
PORTNAME= XaraLX
PORTVERSION?= 0.7r1692
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES= graphics
MASTER_SITES= http://downloads.xara.com/opensource/ \
${MASTER_SITE_LOCAL}
@@ -24,18 +24,15 @@ BUILD_DEPENDS+= pkg-config:${PORTSDIR}/devel/pkg-config \
xml2-config:${PORTSDIR}/textproc/libxml2 \
zip:${PORTSDIR}/archivers/zip
RUN_DEPENDS+= convert:${PORTSDIR}/graphics/ImageMagick
-LIB_DEPENDS+= dlmalloc.2:${PORTSDIR}/devel/libdlmalloc \
- xml2.5:${PORTSDIR}/textproc/libxml2
+LIB_DEPENDS+= xml2.5:${PORTSDIR}/textproc/libxml2
USE_AUTOTOOLS= autoconf:261:env aclocal:19:env automake:19:env libtool:15:env
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS+= --program-suffix=${PKGNAMESUFFIX}
-# we're using dlmalloc because the stock libc does not have malloc_usable_size()
-CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib -ldlmalloc"
USE_GMAKE= yes
-MAKE_ENV?= INCLUDES="-I${LOCALBASE}/include/dlmalloc" LANG=C
+MAKE_ENV?= LANG=C
USE_GCC= 3.4+
USE_WX= 2.6
@@ -73,6 +70,13 @@ NO_PACKAGE= yes
BROKEN= does not configure due to the lack of CDraw libraries for ${ARCH}
.endif
+.if ${OSVERSION} < 700036
+# we're using dlmalloc because the stock libc does not have malloc_usable_size()
+LIB_DEPENDS+= dlmalloc.2:${PORTSDIR}/devel/libdlmalloc
+CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib -ldlmalloc"
+MAKE_ENV+= INCLUDES="-I${LOCALBASE}/include/dlmalloc"
+.endif
+
post-patch:
${REINPLACE_CMD} -E \
-e 's/^Name=Xara Xtreme$$/Name=Xara Xtreme ${PORTVERSION}/' \
@@ -81,6 +85,13 @@ post-patch:
-e 's/^Exec=xaralx %F$$/Exec=xaralx${PKGNAMESUFFIX} %F/' \
-e 's/^TryExec=xaralx$$/TryExec=xaralx${PKGNAMESUFFIX}/' \
${WRKSRC}/xaralx.desktop
+.if ${OSVERSION} >= 700036
+ ${REINPLACE_CMD} \
+ -e 's/malloc\/malloc.h/stdlib.h/' \
+ -e 's/malloc.h/stdlib.h/' \
+ ${WRKSRC}/wxOil/fixmem.cpp \
+ ${WRKSRC}/wxOil/stdwx.h
+.endif
pre-configure:
cd ${WRKSRC} && \
diff --git a/graphics/xaralx/files/patch-wxOil_compatdef.h b/graphics/xaralx/files/patch-wxOil_compatdef.h
new file mode 100644
index 000000000000..e375aeb298f3
--- /dev/null
+++ b/graphics/xaralx/files/patch-wxOil_compatdef.h
@@ -0,0 +1,15 @@
+--- wxOil/compatdef.h.orig 2006-08-10 22:36:43.000000000 +0300
++++ wxOil/compatdef.h 2008-02-09 09:23:24.000000000 +0200
+@@ -595,6 +595,12 @@
+ const size_t MAX_PATH = 256;
+
+ #if !defined(__WXMAC__)
++#if __FreeBSD__ >= 7
++#include <osreldate.h>
++#if __FreeBSD_version >= 700036
++#include <malloc_np.h>
++#endif /* __FreeBSD_version >= 700036 */
++#endif /* __FreeBSD__ >= 7 */
+ inline size_t _msize( PVOID ptr )
+ {
+ return malloc_usable_size( ptr );