PLIST= ${.CURDIR}/pkg-plist PATCHDIR= ${.CURDIR}/files GAMBAS_COMPONENT?= ${PKGNAMESUFFIX:S/-/./g:S/^.//g} GAMBAS_COMPDIRE= ${LOCALBASE}/lib/gambas2 GBI2_CMD= ${LOCALBASE}/bin/gbi2 CONFIGURE_WRKSRC= ${WRKSRC}/${GAMBAS_COMPONENT} BUILD_WRKSRC= ${WRKSRC}/${GAMBAS_COMPONENT} INSTALL_WRKSRC= ${WRKSRC}/${GAMBAS_COMPONENT} CONFIGURE_ARGS= --disable-debug \ --disable-optimization EXTRACT_AFTER_ARGS+= "${DISTNAME}/${GAMBAS_COMPONENT}" .if ${PKGNAMESUFFIX} == "-gb-sdl-sound" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base USE_SDL= sdl mixer .endif .if ${PKGNAMESUFFIX} == "-gb-db-firebird" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base USE_FIREBIRD= yes CONFIGURE_ARGS+= --with-firebird-includes=${LOCALBASE}/include \ --with-firebird-libraries=${LOCALBASE}/lib .endif .if ${PKGNAMESUFFIX} == "-gb-db-mysql" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base USE_MYSQL= yes CONFIGURE_ARGS+= --with-mysql-includes=${LOCALBASE}/include/mysql \ --with-mysql-libraries=${LOCALBASE}/lib/mysql .endif .if ${PKGNAMESUFFIX} == "-gb-db-postgresql" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base USE_PGSQL= yes CONFIGURE_ARGS+= --with-postgresql-includes="${PGSQL_INCLUDES}" \ --with-postgresql-libraries=${LOCALBASE}/lib PGSQL_INCLUDES= ${LOCALBASE}/include/postgresql \ ${LOCALBASE}/include/postgresql/server/catalog \ ${LOCALBASE}/include/postgresql/server .endif .if ${PKGNAMESUFFIX} == "-gb-db-odbc" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC CONFIGURE_ARGS+= --with-odbc-includes=${LOCALBASE}/include \ --with-odbc-libraries=${LOCALBASE}/lib .endif .if ${PKGNAMESUFFIX} == "-gb-db-sqlite2" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base USE_SQLITE= 2 CONFIGURE_ARGS+= --with-sqlite2-includes=${LOCALBASE}/include \ --with-sqlite2-libraries=${LOCALBASE}/lib .endif .if ${PKGNAMESUFFIX} == "-gb-db-sqlite3" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base USE_SQLITE= yes CONFIGURE_ARGS+= --with-sqlite3-includes=${LOCALBASE}/include \ --with-sqlite3-libraries=${LOCALBASE}/lib .endif .if ${PKGNAMESUFFIX} == "-gb-pcre" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre CONFIGURE_ARGS+= --with-pcre-includes=${LOCALBASE}/include \ --with-pcre-libraries=${LOCALBASE}/lib .endif .if ${PKGNAMESUFFIX} == "-gb-corba" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base LIB_DEPENDS+= ACE.5:${PORTSDIR}/devel/ace \ omniORB4.1:${PORTSDIR}/devel/omniORB CONFIGURE_ARGS+= --with-corba-includes=${LOCALBASE}/include \ --with-corba-libraries=${LOCALBASE}/lib .endif .if ${PKGNAMESUFFIX} == "-gb-sdl" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base USE_SDL= sdl image gfx ttf USE_XORG= xft xcursor .endif .if ${PKGNAMESUFFIX} == "-ide" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base \ ${GAMBAS_COMPDIRE}/gb.settings.component:${PORTSDIR}/lang/gambas2-components \ ${GAMBAS_COMPDIRE}/gb.qt.component:${PORTSDIR}/x11-toolkits/gambas2-gb-qt \ ${GAMBAS_COMPDIRE}/gb.desktop.component:${PORTSDIR}/x11/gambas2-gb-desktop .endif .if ${PKGNAMESUFFIX} == "-gb-net-curl" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base LIB_DEPENDS+= curl.6:${PORTSDIR}/ftp/curl .endif .if ${PKGNAMESUFFIX} == "-gb-opengl" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base USE_GL= gl glu CONFIGURE_ARGS+= --with-opengl-includes=${LOCALBASE}/include \ --with-opengl-libraries=${LOCALBASE}/lib .endif .if ${PKGNAMESUFFIX} == "-gb-image" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base .endif .if ${PKGNAMESUFFIX} == "-gb-gtk-svg" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base .include <${PORTSDIR}/Mk/bsd.gnome.mk> USE_GNOME= librsvg2 .endif .if ${PKGNAMESUFFIX} == "-gb-pdf" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base LIB_DEPENDS+= poppler:${PORTSDIR}/graphics/poppler .endif .if ${PKGNAMESUFFIX} == "-components" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base \ ${GAMBAS_COMPDIRE}/gb.qt.component:${PORTSDIR}/x11-toolkits/gambas2-gb-qt .endif .if ${PKGNAMESUFFIX} == "-gb-net-smtp" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base .include <${PORTSDIR}/Mk/bsd.gnome.mk> USE_GNOME= glib20 .endif .if ${PKGNAMESUFFIX} == "-gb-net" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base .endif .if ${PKGNAMESUFFIX} == "-gb-crypt" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base .endif .if ${PKGNAMESUFFIX} == "-gb-xml" .if ${ARCH} == "ia64" BROKEN= Does not compile on ia64 .endif BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base \ ${GAMBAS_COMPDIRE}/gb.net.component:${PORTSDIR}/net/gambas2-gb-net \ ${GAMBAS_COMPDIRE}/gb.net.curl.component:${PORTSDIR}/ftp/gambas2-gb-net-curl .include <${PORTSDIR}/Mk/bsd.gnome.mk> USE_GNOME= libxml2 libxslt .endif .if ${PKGNAMESUFFIX} == "-gb-gtk" .if ${ARCH} == "ia64" BROKEN= Does not compile on ia64 .endif EXTRACT_AFTER_ARGS+= "${DISTNAME}/gb.qt" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base .include <${PORTSDIR}/Mk/bsd.gnome.mk> USE_GNOME= gtk20 .endif .if ${PKGNAMESUFFIX} == "-gb-qt-kde" EXTRACT_AFTER_ARGS+= "${DISTNAME}/gb.qt" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base USE_KDELIBS_VER=3 .include <${PORTSDIR}/Mk/bsd.kde.mk> .endif .if ${PKGNAMESUFFIX} == "-gb-desktop" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base \ ${GAMBAS_COMPDIRE}/gb.settings.component:${PORTSDIR}/lang/gambas2-components \ ${GAMBAS_COMPDIRE}/gb.qt.component:${PORTSDIR}/x11-toolkits/gambas2-gb-qt USE_XORG= xtst .endif .if ${PKGNAMESUFFIX} == "-gb-qt" BUILD_DEPENDS+= gbi2:${PORTSDIR}/lang/gambas2-base USE_QT_VER= 3 .include <${PORTSDIR}/Mk/bsd.kde.mk> CONFIGURE_ARGS+= --with-qtopengl-includes=${LOCALBASE}/include/GL \ --with-qtopengl-libraries=${LOCALBASE}/lib .endif post-patch: @cd ${WRKSRC} && \ ${FIND} * -type f -name configure -print0 | ${XARGS} -0 ${REINPLACE_CMD} \ -e 's|-pipe -Wall -Wno-unused-value -fsigned-char|$$CFLAGS|g' \ -e 's|-pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char|$$CXXFLAGS|g' \ -e 's|-O0||g' @cd ${WRKSRC} && \ ${FIND} * -type f -name Makefile.in -print0 | ${XARGS} -0 ${REINPLACE_CMD} \ -e 's|(GAMBAS_VERSION) -r|(GAMBAS_VERSION) -p -r|g' pre-install: .if exists(${GBI2_CMD}) @${GBI2_CMD} -p -r ${PREFIX} .endif security-check: gambas2-check-install gambas2-check-install: check-makevars:: @${ECHO_CMD} "###################################################################" @${ECHO_CMD} "" @${ECHO_CMD} " The following gambas2 component will be installed in your system: " @${ECHO_CMD} "" @${ECHO_CMD} " * ${PORTNAME}${PKGNAMESUFFIX}" @${ECHO_CMD} "" @${ECHO_CMD} "###################################################################"