PLIST_SUB= PORTVERSION=${PORTVERSION} \ BUILDNAME=${BUILDNAME} PLIST= ${.CURDIR}/pkg-plist PATCHDIR= ${.CURDIR}/files WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} UNITPREFIX= unit- UNITEXTRACT_SUFX= .tar.gz UNITNAME= ${UNITPREFIX}${PKGNAMESUFFIX:S/-//}${BUILDNAME:S/^/./}${UNITEXTRACT_SUFX} UNITDIR= lib/fpc/${PORTVERSION}/units/${BUILDNAME} EXTRACT_AFTER_ARGS= | ${TAR} -xf - ${EXTRACTUNITDIR} OPT=-CX MAKE_ENV+= PP=${LOCALBASE}/bin/ppc386 \ FPCMAKE=${LOCALBASE}/bin/fpcmake \ FPCTARGET=${BUILDNAME} \ OPT="${OPT}" \ BSDHIER=1 .if ${PKGNAMESUFFIX} == "-ibase" . if defined(WITH_IBASE) USE_FIREBIRD= yes . endif .endif .if ${PKGNAMESUFFIX} == "-mysql" . if defined(WITH_MYSQL) USE_MYSQL= yes . endif .endif .if ${PKGNAMESUFFIX} == "-odbc" . if defined(WITH_ODBC) LIB_DEPENDS= odbc.1:${PORTSDIR}/databases/unixODBC . endif .endif .if ${PKGNAMESUFFIX} == "-oracle" . if defined(WITH_ORACLE) ORACLE8_LIB= ${LOCALBASE}/oracle8-client/rdbms/lib RUN_DEPENDS= ${ORACLE8_LIB}/env_rdbms.mk:${PORTSDIR}/databases/oracle8-client . endif .endif .if ${PKGNAMESUFFIX} == "-postgres" . if defined(WITH_PGSQL) USE_PGSQL= yes . endif .endif .if ${PKGNAMESUFFIX} == "-sqlite" . if defined(WITH_SQLITE) USE_SQLITE= yes . endif .endif .if ${PKGNAMESUFFIX} == "-bfd" . if defined(WITH_LIBBFD) RUN_DEPENDS= ${LOCALBASE}/lib/libbfd.a:${PORTSDIR}/devel/libbfd . endif .endif .if ${PKGNAMESUFFIX} == "-fftw" . if defined(WITH_FFTW) LIB_DEPENDS= fftw3.4:${PORTSDIR}/math/fftw3 . endif .endif .if ${PKGNAMESUFFIX} == "-imagemagick" . if defined(WITH_IMAGEMAGICK) LIB_DEPENDS= Magick:${PORTSDIR}/graphics/ImageMagick . endif .endif .if ${PKGNAMESUFFIX} == "-xforms" . if defined(WITH_XFORMS) LIB_DEPENDS= forms.1:${PORTSDIR}/x11-toolkits/xforms . endif HAVE_EXAMPLES= true .endif .if ${PKGNAMESUFFIX} == "-fcl-db" OPT+= -Fuunits/${ARCH}-freebsd -Fu../units/${ARCH}-freebsd -Fu../* \ -Fu../../units/${ARCH}-freebsd -Fu../../../units/${ARCH}-freebsd \ -Fu../sqldb/* .endif .if ${PKGNAMESUFFIX} == "-fcl-net" OPT+= -Fu${WRKDIR}/${WRKUNITDIR}/* .endif .if ${PKGNAMESUFFIX} == "-fpgtk" . if defined(WITH_GTK1) .include <${PORTSDIR}/Mk/bsd.gnome.mk> USE_GNOME= gtk12 . endif .endif .if ${PKGNAMESUFFIX} == "-fv" HAVE_EXAMPLES= true .endif .if ${PKGNAMESUFFIX} == "-gdbm" . if defined(WITH_GDBM) LIB_DEPENDS= gdbm.3:${PORTSDIR}/databases/gdbm . endif .endif .if ${PKGNAMESUFFIX} == "-ggi" . if defined(WITH_LIBGGI) LIB_DEPENDS= ggi:${PORTSDIR}/graphics/libggi . endif .endif .if ${PKGNAMESUFFIX} == "-gtk1" . if defined(WITH_GTK1) .include <${PORTSDIR}/Mk/bsd.gnome.mk> USE_GNOME= gtk12 . endif OPT+=-Fu${WRKDIR}/${WRKUNITDIR}/* .endif .if ${PKGNAMESUFFIX} == "-gtk2" . if defined(WITH_GTK2) .include <${PORTSDIR}/Mk/bsd.gnome.mk> USE_GNOME= gtk20 . endif .endif .if ${PKGNAMESUFFIX} == "-httpd13" . if defined(WITH_APACHE13) USE_APACHE= 13 . endif .endif .if ${PKGNAMESUFFIX} == "-httpd20" . if defined(WITH_APACHE20) USE_APACHE= 20 . endif .endif .if ${PKGNAMESUFFIX} == "-httpd22" . if defined(WITH_APACHE22) USE_APACHE= 22 . endif .endif .if ${PKGNAMESUFFIX} == "-imlib" . if defined(WITH_IMLIB) .include <${PORTSDIR}/Mk/bsd.gnome.mk> USE_GNOME= imlib . endif .endif .if ${PKGNAMESUFFIX} == "-cairo" . if defined(WITH_LIBCAIRO) LIB_DEPENDS= cairo.2:${PORTSDIR}/graphics/cairo . endif .endif .if ${PKGNAMESUFFIX} == "-libcurl" . if defined(WITH_LIBCURL) LIB_DEPENDS= curl.5:${PORTSDIR}/ftp/curl . endif .endif .if ${PKGNAMESUFFIX} == "-libgd" . if defined(WITH_LIBGD) LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd . endif .endif .if ${PKGNAMESUFFIX} == "-libpng" . if defined(WITH_LIBPNG) LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png . endif .endif .if ${PKGNAMESUFFIX} == "-opengl" . if defined(WITH_OPENGL) USE_GL= glut . endif HAVE_EXAMPLES= true .endif .if ${PKGNAMESUFFIX} == "-openssl" . if defined(WITH_OPENSSL) USE_OPENSSL= yes . endif .endif .if ${PKGNAMESUFFIX} == "-pcap" . if defined(WITH_LIBPCAP) LIB_DEPENDS= pcap:${PORTSDIR}/net/libpcap . endif .endif .if ${PKGNAMESUFFIX} == "-sdl" . if defined(WITH_SDL) USE_SDL= sdl image mixer ttf gfx . endif .endif .if ${PKGNAMESUFFIX} == "-svgalib" . if defined(WITH_SVGA) LIB_DEPENDS= vga.1:${PORTSDIR}/graphics/svgalib . endif .endif .if ${PKGNAMESUFFIX} == "-tcl" . if defined(WITH_TCL) RUN_DEPENDS= wish8.4:${PORTSDIR}/x11-toolkits/tk84 . endif .endif .if ${PKGNAMESUFFIX} == "-unzip" . if defined(WITH_UNZIP) RUN_DEPENDS= unzip:${PORTSDIR}/archivers/unzip . endif .endif .if ${PKGNAMESUFFIX} == "-utils" OPT+=-Fu../fcl/* .endif .if ${PKGNAMESUFFIX} == "-x11" . if defined(WITH_X11) USE_XLIB= yes . endif .endif post-extract: @cd ${WRKDIR}/${WRKUNITDIR} && \ ${FIND} ${WRKSRC} -type d -name .svn | ${XARGS} ${RM} -rf post-patch: .if ${PKGNAMESUFFIX} == "-utils" @${REINPLACE_CMD} -e 's|fpcm||g' ${WRKDIR}/${WRKUNITDIR}/Makefile \ ${WRKDIR}/${WRKUNITDIR}/Makefile.fpc .endif do-build: @${ECHO_CMD} ${MAKE_ENV} @${ECHO_CMD} "" @cd ${WRKDIR}/${WRKUNITDIR} && ${GMAKE} all ${MAKE_ENV} do-install: @cd ${WRKDIR}/${WRKUNITDIR} && ${GMAKE} install ${MAKE_ENV} . if !defined(NOPORTSDOCS) . if defined(HAVE_EXAMPLES) @cd ${WRKDIR}/${WRKUNITDIR} && ${GMAKE} fpc_exampleinstall . endif . endif