diff options
author | zleslie <zleslie@FreeBSD.org> | 2017-10-04 04:54:29 +0800 |
---|---|---|
committer | zleslie <zleslie@FreeBSD.org> | 2017-10-04 04:54:29 +0800 |
commit | 0f342dd28addd44ce39fa6ea555c392ae83e6430 (patch) | |
tree | a8eb624858b3a702545f465508fc69d6009c96d3 /sysutils/facter | |
parent | e03684132a28bf9dd8014a07f79ecc7ebb0e3d09 (diff) | |
download | freebsd-ports-gnome-0f342dd28addd44ce39fa6ea555c392ae83e6430.tar.gz freebsd-ports-gnome-0f342dd28addd44ce39fa6ea555c392ae83e6430.tar.zst freebsd-ports-gnome-0f342dd28addd44ce39fa6ea555c392ae83e6430.zip |
sysutils/facter: Drop slave port, add Java option default
Here we drop support for the slave port, since it never quite worked as
desired, nor was it ever submitted, and removes the conditionals to support it.
Also, we add a new default option FACTER_JAVA to build support for Java and
install facter.jar to be used by sysutils/puppetserver5.
Approved by: swills(mentor)
Differential Revision: D12498
Diffstat (limited to 'sysutils/facter')
-rw-r--r-- | sysutils/facter/Makefile | 42 | ||||
-rw-r--r-- | sysutils/facter/pkg-plist | 1 |
2 files changed, 17 insertions, 26 deletions
diff --git a/sysutils/facter/Makefile b/sysutils/facter/Makefile index 96de377f9f29..8e5caf4d94ad 100644 --- a/sysutils/facter/Makefile +++ b/sysutils/facter/Makefile @@ -2,7 +2,7 @@ PORTNAME= facter PORTVERSION= 3.9.0 -PORTREVISION?= 2 +PORTREVISION?= 3 CATEGORIES?= sysutils MASTER_SITES= http://downloads.puppetlabs.com/facter/ @@ -12,9 +12,7 @@ COMMENT= Cross-platform library for retrieving facts from OS LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE -USES= cmake - -.if !defined(PKGNAMEPREFIX) +USES= cmake compiler:c++11-lib ssl BROKEN_DragonFly= DragonFly is not supported upstream BROKEN_powerpc64= fails to compile: collection.cc: 'stoi' was not declared in this scope @@ -26,13 +24,24 @@ LIB_DEPENDS= libboost_system.so:devel/boost-libs \ libleatherman_locale.so:devel/leatherman \ libyaml-cpp.so:devel/yaml-cpp -PLIST_SUB+= PORTVERSION="${PORTVERSION}" +PLIST_SUB= PORTVERSION="${PORTVERSION}" USE_LDCONFIG= yes USE_RUBY= yes -USES+= compiler:c++11-lib ssl CMAKE_ARGS+= -DMAN_PATH=${MANPREFIX}/man +OPTIONS_DEFINE= FACTER_JAVA +FACTER_JAVA_DESC= Build with Java bindings for puppetserver +FACTER_JAVA_USE= java=yes +FACTER_JAVA_VARS= JAVA_BUILD=yes +FACTER_JAVA_CMAKE_ON= -DJAVA_HOME=${JAVA_HOME} + +OPTIONS_DEFAULT= FACTER_JAVA + +OPTIONS_SUB= yes + +.include <bsd.port.options.mk> + post-patch: ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ ${WRKSRC}/lib/src/facts/posix/collection.cc \ @@ -42,28 +51,9 @@ test: build cd ${WRKSRC}/lib && bundle install --path vendor cd ${WRKSRC} && ${MAKE_CMD} test -.elif ${PKGNAMEPREFIX} == java- - -LIB_DEPENDS= libfacter.so:sysutils/facter - -ALL_TARGET= facter-jruby -USE_JAVA= yes -JAVA_BUILD= yes -CMAKE_ARGS+= -DJAVA_HOME=${JAVA_HOME} - -# Ignore sysutils/facter's pkg-plist by providing a non-existent file -PLIST= ${WRKDIR}/no-plist -PLIST_FILES= ${PREFIX}/lib/ruby/vendor_ruby/facter.jar - -do-install: - ${MKDIR} ${STAGEDIR}${PREFIX}/lib/ruby/vendor_ruby - cd ${WRKSRC} && ${INSTALL_DATA} lib/facter.jar ${STAGEDIR}${PREFIX}/lib/ruby/vendor_ruby - -.endif - .include <bsd.port.pre.mk> -.if !defined(PKGNAMEPREFIX) && ${OPSYS} == FreeBSD && ${COMPILER_FEATURES:Mlibstdc++} +.if ${OPSYS} == FreeBSD && ${COMPILER_FEATURES:Mlibstdc++} BROKEN= Build with system libstdc++ is unsupported .endif diff --git a/sysutils/facter/pkg-plist b/sysutils/facter/pkg-plist index 90430df4f426..26620f30ed77 100644 --- a/sysutils/facter/pkg-plist +++ b/sysutils/facter/pkg-plist @@ -21,3 +21,4 @@ lib/libfacter.so lib/libfacter.so.%%PORTVERSION%% lib/ruby/vendor_ruby/facter.rb man/man8/facter.8.gz +%%FACTER_JAVA%%lib/ruby/vendor_ruby/facter.jar |