From owner-svn-ports-head@freebsd.org Fri May 25 15:48:14 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BC9BEEB088; Fri, 25 May 2018 15:48:14 +0000 (UTC) (envelope-from acm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDAE086857; Fri, 25 May 2018 15:48:13 +0000 (UTC) (envelope-from acm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBE2B22C9E; Fri, 25 May 2018 15:48:13 +0000 (UTC) (envelope-from acm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4PFmD6G072661; Fri, 25 May 2018 15:48:13 GMT (envelope-from acm@FreeBSD.org) Received: (from acm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4PFmD1V072660; Fri, 25 May 2018 15:48:13 GMT (envelope-from acm@FreeBSD.org) Message-Id: <201805251548.w4PFmD1V072660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: acm set sender to acm@FreeBSD.org using -f From: Jose Alonso Cardenas Marquez Date: Fri, 25 May 2018 15:48:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r470843 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: acm X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 470843 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 15:48:14 -0000 Author: acm Date: Fri May 25 15:48:13 2018 New Revision: 470843 URL: https://svnweb.freebsd.org/changeset/ports/470843 Log: - Add Uses/lazarus.mk Approved by: portmgr Added: head/Mk/Uses/lazarus.mk (contents, props changed) Added: head/Mk/Uses/lazarus.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/Uses/lazarus.mk Fri May 25 15:48:13 2018 (r470843) @@ -0,0 +1,145 @@ +# +# $FreeBSD$ +# +# Support for Lazarus-based ports. +# +# Feature: lazarus +# Usage: USES=lazarus +# Valid ARGS: (none), gtk2, qt4, qt5, flavors +# +# (none) - This automatically build lazarus-app with gtk2 interface +# +# gtk2 - This automatically build lazarus-app with gtk2 interface +# +# qt4 - This automatically build lazarus-app with qt4 interface +# +# qt5 - This automatically build lazarus-app with qt5 interface +# +# flavors - This automatically build lazarus-app with flavors feature +# +# If the port not requires compile lazarus project files automatically, you can +# defined the following: +# +# NO_LAZBUILD= yes +# +# Variables for ports: +# +# LAZARUS_PROJECT_FILES - List of lpi files. It must not be empty +# Default: empty +# LAZARUS_DIR - Path to lazarus installation directory +# Default: ${LOCALBASE}/share/lazarus-${LAZARUS_VER} +# LAZBUILD_ARGS - lazbuild extra args. It could be -d most of cases. +# See man lazbuild for more information +# Default: empty +# LAZARUS_NO_FLAVORS - Do NOT build these lazarus flavors. +# If LAZARUS_NO_FLAVORS is not define then all +# valid lazarus flavors are assumed. +# +# Example: +# +# USES+= lazarus:flavors +# LAZARUS_NO_FLAVORS=qt5 +# + +.if !defined(_INCLUDE_USES_LAZARUS_MK) + +LAZARUS_Include_MAINTAINER= acm@FreeBSD.org + +_INCLUDE_USES_LAZARUS_MK= yes + +.if defined(DEFAULT_LAZARUS_VER) +WARNING+= "DEFAULT_LAZARUS_VER is defined, consider using DEFAULT_VERSIONS=lazarus=${DEFAULT_LAZARUS_VER} instead" +.endif + +.if ${lazarus_ARGS:Ngtk2:Nqt4:Nqt5:Nflavors} +IGNORE= Unknown argument for USES=lazarus: ${lazarus_ARGS:Ngtk2:Nqt4:Nqt5:Nflavors} +.endif + +.if !empty(LAZARUS_NO_FLAVORS) +.if ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt4:Nqt5} +IGNORE= Unknown argument for LAZARUS_NO_FLAVORS: ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt4:Nqt5} +.endif +.endif + +DEFAULT_LAZARUS_VER= ${LAZARUS_DEFAULT} +DEFAULT_FPC_VER= ${FPC_DEFAULT} +# When adding a version, please keep the comment in +# Mk/bsd.default-versions.mk in sync. +LAZARUS_VER= ${DEFAULT_LAZARUS_VER} +FPC_VER= ${DEFAULT_FPC_VER} +LAZARUS_ARCH= ${ARCH:S/amd64/x86_64/} +LAZARUS_PROJECT_FILES?= # empty +LAZARUS_DIR?= ${LOCALBASE}/share/lazarus-${LAZARUS_VER} + +ONLY_FOR_ARCHS= i386 amd64 +ONLY_FOR_ARCHS_REASON= not yet ported to anything other than i386 and amd64 + +BUILD_DEPENDS+= fpcres:lang/fpc-utils + +BUILDNAME= ${LAZARUS_ARCH}-${OPSYS:tl} +LCL_UNITS_DIR= ${LOCALBASE}/share/lazarus-${LAZARUS_VER}/lcl/units/${BUILDNAME} +MKINSTDIR= ${LOCALBASE}/lib/fpc/${FPC_VER}/fpmkinst/${BUILDNAME} + +LAZARUS_FLAVORS= gtk2 qt4 qt5 + +.if ${lazarus_ARGS:Mflavors} +. if defined(LAZARUS_NO_FLAVORS) +. for flavor in ${LAZARUS_NO_FLAVORS} +FLAVORS:= ${LAZARUS_FLAVORS:N${flavor}} +. endfor +. else +FLAVORS:= ${LAZARUS_FLAVORS} +. endif + +. if empty(FLAVOR) +FLAVOR= ${FLAVORS:[1]} +. endif +.endif + +LAZARUS_PKGNAMESUFFIX= -${FLAVOR} + +.if ${lazarus_ARGS:Mgtk2} || ${FLAVOR} == gtk2 +BUILD_DEPENDS+= ${MKINSTDIR}/gtk2.fpm:x11-toolkits/fpc-gtk2 +LIB_DEPENDS+= libglib-2.0.so:devel/glib20 \ + libgtk-x11-2.0.so:x11-toolkits/gtk20 \ + libatk-1.0.so:accessibility/atk \ + libpango-1.0.so:x11-toolkits/pango \ + libgdk_pixbuf-2.0.so:graphics/gdk-pixbuf2 +LCL_PLATFORM= gtk2 +BUILD_DEPENDS+= ${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus +.endif + +.if ${lazarus_ARGS:Mqt4} || ${FLAVOR} == qt4 +LIB_DEPENDS+= libQt4Pas.so:x11-toolkits/qt4pas +LCL_PLATFORM= qt +BUILD_DEPENDS+= ${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus-qt4 +.endif + +.if ${lazarus_ARGS:Mqt5} || ${FLAVOR} == qt5 +LIB_DEPENDS+= libQt5Pas.so:x11-toolkits/qt5pas +LCL_PLATFORM= qt5 +BUILD_DEPENDS+= ${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus-qt5 +.endif + +LAZBUILD_CMD= ${LOCALBASE}/bin/lazbuild +LAZBUILD_ARGS?= # empty + +_USES_POST+= lazarus +.endif +# End of _INCLUDE_USES_LAZARUS_MK + +.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LAZARUS_POST_MK) +_INCLUDE_USES_LAZARUS_POST_MK= yes + +.if !defined(NO_LAZBUILD) +.if !target(do-build) +do-build: +. for PROJECT_FILE in ${LAZARUS_PROJECT_FILES} + @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${LAZBUILD_CMD} \ + ${LAZBUILD_ARGS} --ws=${LCL_PLATFORM} --lazarusdir=${LAZARUS_DIR} ${PROJECT_FILE}) +. endfor +.endif # !target(do-build) +.endif + +.endif +# End of _INCLUDE_USES_LAZARUS_POST_MK