Framework: partially sync with upstream

Taken from: FreeBSD
This commit is contained in:
Franco Fichtner 2017-04-18 22:50:39 +02:00
parent 94422545ed
commit ce407ecf06
5 changed files with 104 additions and 3 deletions

View file

@ -10,6 +10,11 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
20170417:
AUTHOR: kwm@FreeBSD.org
New USES: meson, to handle properly the meson building system.
20170313:
AUTHOR: tijl@FreeBSD.org

5
MOVED
View file

@ -7604,7 +7604,6 @@ multimedia/avidemux26-qt4|multimedia/avidemux-qt4|2015-06-13|Renamed
editors/zim|deskutils/zim|2015-06-18|Move to more appropriate category
net/py-ldap2|net/py-ldap|2015-06-18|Rename to better match upstream name
devel/erlang-mustache|devel/erlang-bbmustache|2015-06-21|Renamed upstream
security/py-backports.ssl_match_hostname||2015-06-23|This functionality was backported to python 2.7.9
dns/maradns1|dns/maradns|2015-06-23|Has expired: MaraDNS 1 end-of-life: June 21, 2015, use dns/maradns
net/py-soappy-devel||2015-06-25|Please use net/py-soappy instead. It's fresher than -devel
devel/armv6-freebsd10.0-xdev||2015-06-27|Not usable for the purpose it has been intended for
@ -9234,3 +9233,7 @@ graphics/opencv2-java|graphics/opencv-java|2017-04-14|Revert previous rename
graphics/py-opencv2|graphics/py-opencv|2017-04-14|Revert previous rename
databases/pgpool-II-22|databases/pgpool|2017-04-14|Has expired: Deprecated by upstream; use database/pgpool instead
databases/pgpool-II-23|databases/pgpool|2017-04-14|Has expired: Deprecated by upstream; use database/pgpool instead
net/py-matrix-synapse|net-im/py-matrix-synapse|2017-04-17|Move to net-im which is a more appropriate category
graphics/shiva-collections||2017-04-17|Has expired: Project is dead and has no end user
graphics/opengtl||2017-04-17|Has expired: Project is dead, has no end user, and relies on EOLed LLVM
graphics/qtgtl||2017-04-17|Has expired: Project is dead and has had no consumer for over a year

68
Mk/Uses/meson.mk Normal file
View file

@ -0,0 +1,68 @@
# $FreeBSD$
#
# Provide support for Meson based projects
#
# Feature: meson
# Usage: USES=meson
#
# The following files are bundled in source tar files.
# meson.build - Instructions for meson like autoconf configure,
# there is no changeable parts in the file.
# meson_options.txt - All the options meson understands
#
# Variables for ports:
# MESON_ARGS - Arguments passed to meson
# format: -Denable_foo=true
# MESON_BUILD_DIR - Path to the build directory
# Default: ${WRKSRC}/_build
#
# MAINTAINER: gnome@FreeBSD.org
.if !defined(_INCLUDE_USES_MESON_MK)
_INCLUDE_USES_MESON_MK= yes
# Sanity check
.if !empty(meson_ARGS)
IGNORE= Incorrect 'USES+= meson:${meson_ARGS}'. meson takes no arguments
.endif
BUILD_DEPENDS+= meson:devel/meson
# meson uses ninja
.include "${USESDIR}/ninja.mk"
# meson might have issues with non-unicode locales
USE_LOCALE?= en_US.UTF-8
CONFIGURE_ARGS+= --prefix ${PREFIX} \
--mandir man
# meson has it own strip mechanic
INSTALL_TARGET= install
# should we have strip separate from WITH_DEBUG?
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= --buildtype debug
.else
CONFIGURE_ARGS+= --buildtype release \
--strip
.endif
HAS_CONFIGURE= yes
CONFIGURE_CMD= meson
# Pull in manual set settings and from options
CONFIGURE_ARGS+= ${MESON_ARGS}
BUILD_WRKSRC= ${WRKSRC}/${MESON_BUILD_DIR}
INSTALL_WRKSRC= ${WRKSRC}/${MESON_BUILD_DIR}
TEST_WRKSRC= ${WRKSRC}/${MESON_BUILD_DIR}
TEST_TARGET= test
MESON_BUILD_DIR?= _build
# Add meson build dir at the end.
CONFIGURE_ARGS+= ${MESON_BUILD_DIR}
.endif #!defined(_INCLUDE_USES_MESON_MK)

View file

@ -423,6 +423,7 @@ REDIS_DESC?= Redis key-value store database support
REGEX_DESC?= Regular expression support
RESIN3_DESC?= Resin 3.x support
RTMP_DESC?= RTMP protocol support via librtmp
RTMPDUMP_DESC?= RTMP protocol support via rtmpdump
RUBY_DESC?= Ruby bindings or support
SAMPLERATE_DESC?= Sample rate conversion support
SANE_DESC?= SANE API scanner support

View file

@ -112,6 +112,18 @@
# ${opt}_QMAKE_OFF When option is disabled, it will add its content to
# the QMAKE_ARGS.
#
# ${opt}_MESON_ON When option is enabled, it will add its
# content to MESON_ARGS.
# ${opt}_MESON_OFF When option is disabled, it will add its
# content to MESON_ARGS.
#
# ${opt}_MESON_TRUE Will add to MESON_ARGS:
# Option enabled -D${content}=true
# Option disabled -D${content}=false
# ${opt}_MESON_FALSE Will add to MESON_ARGS:
# Option enabled -D${content}=false
# Option disabled -D${content}=true
#
# ${opt}_IMPLIES When opt is enabled, options named in IMPLIES will
# get enabled too.
# ${opt}_PREVENTS When opt is enabled, if any options in PREVENTS are
@ -521,7 +533,13 @@ CMAKE_ARGS+= ${${opt}_CMAKE_BOOL:C/.*/-D&:BOOL=true/}
. if defined(${opt}_CMAKE_BOOL_OFF)
CMAKE_ARGS+= ${${opt}_CMAKE_BOOL_OFF:C/.*/-D&:BOOL=false/}
. endif
. for configure in CONFIGURE CMAKE QMAKE
. if defined(${opt}_MESON_TRUE)
MESON_ARGS+= ${${opt}_MESON_TRUE:C/.*/-D&=true/}
. endif
. if defined(${opt}_MESON_FALSE)
MESON_ARGS+= ${${opt}_MESON_FALSE:C/.*/-D&=false/}
. endif
. for configure in CONFIGURE CMAKE MESON QMAKE
. if defined(${opt}_${configure}_ON)
${configure}_ARGS+= ${${opt}_${configure}_ON}
. endif
@ -571,7 +589,13 @@ CMAKE_ARGS+= ${${opt}_CMAKE_BOOL:C/.*/-D&:BOOL=false/}
. if defined(${opt}_CMAKE_BOOL_OFF)
CMAKE_ARGS+= ${${opt}_CMAKE_BOOL_OFF:C/.*/-D&:BOOL=true/}
. endif
. for configure in CONFIGURE CMAKE QMAKE
. if defined(${opt}_MESON_TRUE)
MESON_ARGS+= ${${opt}_MESON_TRUE:C/.*/-D&=false/}
. endif
. if defined(${opt}_MESON_FALSE)
MESON_ARGS+= ${${opt}_MESON_FALSE:C/.*/-D&=true/}
. endif
. for configure in CONFIGURE CMAKE MESON QMAKE
. if defined(${opt}_${configure}_OFF)
${configure}_ARGS+= ${${opt}_${configure}_OFF}
. endif