2004-03-25 18:10:26 +00:00
|
|
|
# New ports collection makefile for: Gambas
|
|
|
|
# Date created: Jan 24, 2004
|
|
|
|
# Whom: Thierry Thomas <thierry@pompo.net>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= gambas
|
2006-05-02 20:28:52 +00:00
|
|
|
PORTVERSION= 1.0.16
|
2004-03-25 18:10:26 +00:00
|
|
|
CATEGORIES= lang
|
2005-05-11 18:56:37 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
2004-03-25 18:10:26 +00:00
|
|
|
|
2004-05-19 21:31:52 +00:00
|
|
|
MAINTAINER= thierry@FreeBSD.org
|
2004-03-25 18:10:26 +00:00
|
|
|
COMMENT= Gambas Almost Means BASic
|
|
|
|
|
2005-11-08 06:09:30 +00:00
|
|
|
LIB_DEPENDS= curl.3:${PORTSDIR}/ftp/curl \
|
|
|
|
ml.0:${PORTSDIR}/math/ldouble
|
2004-03-25 18:10:26 +00:00
|
|
|
|
2006-02-23 10:40:44 +00:00
|
|
|
USE_AUTOTOOLS= libltdl:15 libtool:15
|
2004-03-25 18:10:26 +00:00
|
|
|
USE_KDELIBS_VER= 3
|
|
|
|
USE_GETTEXT= yes
|
|
|
|
USE_BZIP2= yes
|
|
|
|
USE_GMAKE= yes
|
|
|
|
CONFIGURE_ARGS= --with-conv-includes=${LOCALBASE}/include \
|
2004-05-20 09:44:33 +00:00
|
|
|
--with-conv-libraries=${LOCALBASE}/lib \
|
2005-11-05 16:39:18 +00:00
|
|
|
--with-intl-includes=${LOCALBASE}/include \
|
|
|
|
--with-intl-libraries=${LOCALBASE}/lib \
|
|
|
|
--with-conv-includes=${LOCALBASE}/include \
|
|
|
|
--with-conv-libraries=${LOCALBASE}/lib \
|
|
|
|
--with-gettext-includes=${LOCALBASE}/include \
|
|
|
|
--with-gettext-libraries=${LOCALBASE}/lib \
|
2004-05-20 09:44:33 +00:00
|
|
|
--with-moc=${X11BASE}/bin
|
2004-03-25 18:10:26 +00:00
|
|
|
CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
|
|
|
|
PTHREAD_LIBS="${PTHREAD_LIBS}"
|
2005-08-28 09:08:37 +00:00
|
|
|
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
2004-03-25 18:10:26 +00:00
|
|
|
|
|
|
|
LIBS2FIX= libqt-mt libkdecore libkdeui libDCOP libkio
|
2004-05-19 21:31:52 +00:00
|
|
|
SRC2FIX1= configure src/comp/gbi.c src/exec/gbx_library.c
|
2004-03-25 18:10:26 +00:00
|
|
|
SRC2FIX2= src/comp/gbc_archive.c src/comp/gbi.c \
|
|
|
|
src/exec/gbx_library.c src/share/gb_component.h
|
2004-06-25 21:59:43 +00:00
|
|
|
SRC2FIX3= Makefile.in src/exec/gbx_project.c
|
2004-03-25 18:10:26 +00:00
|
|
|
|
2006-01-21 21:01:15 +00:00
|
|
|
DIR2PRUNE1= help/hello-world
|
|
|
|
DIR2PRUNE2= Miscellaneous/Notepad/.lang Drawing/ImageViewer/.lang \
|
|
|
|
Miscellaneous/Evaluator/.lang Exec/MoviePlayer/.lang \
|
|
|
|
Miscellaneous/Explorer/.lang Database/Database/.lang \
|
|
|
|
Drawing/OnScreenDisplay/.lang Basic/Timer/.lang \
|
|
|
|
Basic/Object/.lang Basic/Collection/.lang \
|
|
|
|
Automation/Scripting/.lang Automation/KateBrowser/.lang
|
|
|
|
|
2005-04-19 21:09:01 +00:00
|
|
|
.if defined(WITHOUT_MYSQL)
|
|
|
|
CONFIGURE_ARGS+= --disable-mysql
|
|
|
|
PLIST_SUB+= MYSQL="@comment "
|
|
|
|
.else
|
2005-11-05 16:39:18 +00:00
|
|
|
CONFIGURE_ARGS+= --with-mysql-includes=${LOCALBASE}/include/mysql \
|
|
|
|
--with-mysql-libraries=${LOCALBASE}/lib/mysql
|
2005-04-19 21:09:01 +00:00
|
|
|
USE_MYSQL= yes
|
|
|
|
PLIST_SUB+= MYSQL=""
|
|
|
|
.endif
|
|
|
|
|
2004-03-25 18:10:26 +00:00
|
|
|
.if !defined(WITHOUT_SDL)
|
|
|
|
USE_SDL= mixer
|
|
|
|
CONFIGURE_ARGS+= --with-sdl-includes="`${SDL_CONFIG} --cflags`" \
|
|
|
|
--with-sdl-libraries="`${SDL_CONFIG} --libs`"
|
|
|
|
PLIST_SUB+= SDL=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-sdl
|
|
|
|
PLIST_SUB+= SDL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2004-12-21 22:18:50 +00:00
|
|
|
.if !defined(WITHOUT_XML)
|
|
|
|
USE_GNOME= libxml2 libxslt
|
|
|
|
PLIST_SUB+= XML=""
|
2005-11-05 16:39:18 +00:00
|
|
|
CONFIGURE_ARGS+= --with-libxml-includes=${LOCALBASE}/include/libxml2 \
|
|
|
|
--with-libxml-libraries=${LOCALBASE}/lib \
|
|
|
|
--with-xslt-includes=${LOCALBASE}/include/libxml2 \
|
|
|
|
--with-xslt-libraries=${LOCALBASE}/lib
|
2004-12-21 22:18:50 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-libxml --disable-xslt
|
|
|
|
PLIST_SUB+= XML="@comment "
|
|
|
|
.endif
|
|
|
|
|
2004-03-25 18:10:26 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2004-06-25 21:59:43 +00:00
|
|
|
.if ${OSVERSION} < 500000
|
2006-03-25 08:52:09 +00:00
|
|
|
BROKEN= Does not compile with gcc-2.95
|
2004-06-25 21:59:43 +00:00
|
|
|
.endif
|
|
|
|
|
2005-05-01 20:36:10 +00:00
|
|
|
.if ${ARCH} == "sparc64" || ${ARCH} == "ia64"
|
2006-03-25 08:52:09 +00:00
|
|
|
BROKEN= Segfault during build on ${ARCH}
|
2005-03-26 22:33:30 +00:00
|
|
|
.endif
|
|
|
|
|
2004-09-06 21:49:01 +00:00
|
|
|
.if ${OSVERSION} < 502110
|
|
|
|
RUN_DEPENDS+= pgrep:${PORTSDIR}/sysutils/pkill
|
|
|
|
.endif
|
|
|
|
|
2004-03-25 18:10:26 +00:00
|
|
|
.for lib in ${LIBS2FIX}
|
|
|
|
NEW${lib:U}!= ${LDCONFIG} -r | ${GREP} ${lib} | ${GREP} -v 'compat/pkg' \
|
|
|
|
| ${AWK} -F 'lib\/' '{print $$2}'
|
|
|
|
.endfor
|
|
|
|
|
2005-01-31 00:35:55 +00:00
|
|
|
.if exists(${LOCALBASE}/bin/pg_config)
|
2004-03-25 18:10:26 +00:00
|
|
|
WITH_PGSQL= yes
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_PGSQL)
|
2005-01-31 00:35:55 +00:00
|
|
|
USE_PGSQL= yes
|
2004-03-25 18:10:26 +00:00
|
|
|
CONFIGURE_ARGS+= --with-postgresql-includes=${LOCALBASE}/include/postgresql/server \
|
|
|
|
--with-postgresql-libraries=${LOCALBASE}/lib
|
|
|
|
PLIST_SUB+= PGSQL=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-postgresql-includes \
|
|
|
|
--without-postgresql-libraries
|
|
|
|
PLIST_SUB+= PGSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2004-06-25 21:59:43 +00:00
|
|
|
.if exists(${LOCALBASE}/include/sqlite.h)
|
2004-03-25 18:10:26 +00:00
|
|
|
WITH_SQLITE= yes
|
|
|
|
.endif
|
2004-06-25 21:59:43 +00:00
|
|
|
.if defined(WITH_SQLITE)
|
2004-12-23 08:25:47 +00:00
|
|
|
LIB_DEPENDS+= sqlite.2:${PORTSDIR}/databases/sqlite2
|
2004-03-25 18:10:26 +00:00
|
|
|
CONFIGURE_ARGS+= --with-sqlite-includes=${LOCALBASE}/include \
|
|
|
|
--with-sqlite-libraries=${LOCALBASE}/lib
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/lib/libpub.a:${PORTSDIR}/devel/publib
|
|
|
|
PLIST_SUB+= SQLITE=""
|
|
|
|
.else
|
2004-06-02 22:16:29 +00:00
|
|
|
CONFIGURE_ARGS+= --disable-sqlite
|
2004-03-25 18:10:26 +00:00
|
|
|
PLIST_SUB+= SQLITE="@comment "
|
|
|
|
.endif
|
|
|
|
|
2004-07-31 19:03:07 +00:00
|
|
|
.if exists(${LOCALBASE}/bin/rpmbuild)
|
|
|
|
WITH_RPMBUILD= yes
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_RPMBUILD)
|
|
|
|
RUN_DEPENDS+= rpmbuild:${PORTSDIR}/archivers/rpm4
|
|
|
|
.endif
|
|
|
|
|
2004-05-19 21:31:52 +00:00
|
|
|
pre-configure:
|
2004-03-25 18:10:26 +00:00
|
|
|
.for src in ${SRC2FIX1}
|
|
|
|
@${REINPLACE_CMD} -e "s|libqt-mt.so.3|${NEWLIBQT-MT}|g" \
|
|
|
|
-e "s|libkdecore.so.4|${NEWLIBKDECORE}|g" \
|
|
|
|
-e "s|libkdeui.so.4|${NEWLIBKDEUI}|g" \
|
|
|
|
-e "s|libDCOP.so.4|${NEWLIBDCOP}|g" \
|
|
|
|
-e "s|libkio.so.4|${NEWLIBKIO}|g" ${WRKSRC}/${src}
|
|
|
|
.endfor
|
|
|
|
.for src in ${SRC2FIX2}
|
|
|
|
@${REINPLACE_CMD} -e "s|/usr/bin/gb|${PREFIX}/bin/gb|g" \
|
|
|
|
${WRKSRC}/${src}
|
|
|
|
.endfor
|
2004-06-25 21:59:43 +00:00
|
|
|
.for src in ${SRC2FIX3}
|
|
|
|
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/${src}
|
|
|
|
.endfor
|
2004-03-25 18:10:26 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${REINPLACE_CMD} -e "s|# FreeBSD-Doc-Comment||" ${WRKSRC}/Makefile.in
|
|
|
|
.endif
|
|
|
|
|
2006-01-21 21:01:15 +00:00
|
|
|
post-install:
|
|
|
|
@${RMDIR} ${DIR2PRUNE1:S|^|${DATADIR}/|}
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${RMDIR} ${DIR2PRUNE2:S|^|${EXAMPLESDIR}/|}
|
|
|
|
.endif
|
|
|
|
|
2004-03-25 18:10:26 +00:00
|
|
|
.include <bsd.port.post.mk>
|