[arch-commits] Commit in facter/trunk (FindRuby-2.7.patch FindUDEV.cmake PKGBUILD)

Tim Meusel bastelfreak at archlinux.org
Sun May 16 11:30:32 UTC 2021


    Date: Sunday, May 16, 2021 @ 11:30:31
  Author: bastelfreak
Revision: 935739

build facter against ruby2.7

Added:
  facter/trunk/FindRuby-2.7.patch
Modified:
  facter/trunk/PKGBUILD
Deleted:
  facter/trunk/FindUDEV.cmake

--------------------+
 FindRuby-2.7.patch |   13 ++++++++
 FindUDEV.cmake     |   79 ---------------------------------------------------
 PKGBUILD           |   31 +++++++++-----------
 3 files changed, 28 insertions(+), 95 deletions(-)

Added: FindRuby-2.7.patch
===================================================================
--- FindRuby-2.7.patch	                        (rev 0)
+++ FindRuby-2.7.patch	2021-05-16 11:30:31 UTC (rev 935739)
@@ -0,0 +1,13 @@
+diff --git a/cmake/FindRuby.cmake b/cmake/FindRuby.cmake
+index 4f57d619e..075ab52fe 100644
+--- a/cmake/FindRuby.cmake
++++ b/cmake/FindRuby.cmake
+@@ -55,7 +55,7 @@
+ 
+ # Determine the list of possible names of the ruby executable depending
+ # on which version of ruby is required
+-set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ruby)
++set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ruby-2.7)
+ 
+ # if 1.9 is required, don't look for ruby18 and ruby1.8, default to version 1.8
+ if(DEFINED Ruby_FIND_VERSION_MAJOR AND DEFINED Ruby_FIND_VERSION_MINOR)

Deleted: FindUDEV.cmake
===================================================================
--- FindUDEV.cmake	2021-05-16 11:25:08 UTC (rev 935738)
+++ FindUDEV.cmake	2021-05-16 11:30:31 UTC (rev 935739)
@@ -1,79 +0,0 @@
-##
-# based on https://github.com/rpavlik/cmake-modules/blob/master/Findudev.cmake
-##
-# - try to find the udev library
-#
-# Cache Variables: (probably not for direct use in your scripts)
-#  UDEV_INCLUDE_DIR
-#  UDEV_SOURCE_DIR
-#  UDEV_LIBRARY
-#
-# Non-cache variables you might use in your CMakeLists.txt:
-#  UDEV_FOUND
-#  UDEV_INCLUDE_DIRS
-#  UDEV_LIBRARIES
-#
-# Requires these CMake modules:
-#  FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
-#
-# Original Author:
-# 2014 Kevin M. Godby <kevin at godby.org>
-#
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-set(UDEV_ROOT_DIR
-    "${UDEV_ROOT_DIR}"
-	CACHE
-	PATH
-    "Directory to search for udev")
-
-find_package(PkgConfig QUIET)
-if(PKG_CONFIG_FOUND)
-	pkg_check_modules(PC_LIBUDEV libudev)
-endif()
-
-find_library(UDEV_LIBRARY
-	NAMES
-	udev
-	PATHS
-	${PC_LIBUDEV_LIBRARY_DIRS}
-	${PC_LIBUDEV_LIBDIR}
-	HINTS
-	"${UDEV_ROOT_DIR}"
-	PATH_SUFFIXES
-	lib
-	)
-
-get_filename_component(_libdir "${UDEV_LIBRARY}" PATH)
-
-find_path(UDEV_INCLUDE_DIR
-	NAMES
-	libudev.h
-	PATHS
-	${PC_LIBUDEV_INCLUDE_DIRS}
-	${PC_LIBUDEV_INCLUDEDIR}
-	HINTS
-	"${_libdir}"
-	"${_libdir}/.."
-	"${UDEV_ROOT_DIR}"
-	PATH_SUFFIXES
-	include
-	)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(UDEV
-	DEFAULT_MSG
-	UDEV_LIBRARY
-	UDEV_INCLUDE_DIR
-	)
-
-if(UDEV_FOUND)
-	list(APPEND UDEV_LIBRARIES ${UDEV_LIBRARY})
-	list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
-	mark_as_advanced(UDEV_ROOT_DIR)
-endif()
-
-mark_as_advanced(UDEV_INCLUDE_DIR
-	UDEV_LIBRARY)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-16 11:25:08 UTC (rev 935738)
+++ PKGBUILD	2021-05-16 11:30:31 UTC (rev 935739)
@@ -1,6 +1,6 @@
-# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
 # Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
-# Contributor: Tim Meusel <tim at bastelfreak.de>
+# Maintainer: Tim Meusel <tim at bastelfreak.de>
+# Contributor: Christian Rebischke <chris.rebischke at archlinux.org>
 # Contributor: Jonathan Steel <jsteel at archlinux.org>
 # Contributor: Greg Sutcliffe <facter_aur (at) emeraldreverie.orgr>
 # Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux at free.fr>
@@ -10,7 +10,7 @@
 
 pkgname=facter
 pkgver=3.14.16
-pkgrel=2
+pkgrel=3
 pkgdesc="Collect and display system facts"
 arch=('x86_64')
 url="https://puppetlabs.com/facter"
@@ -18,29 +18,29 @@
 depends=('yaml-cpp' 'boost-libs' 'curl' 'libwhereami' 'libwhereami.so' 'cpp-hocon' 'libcpp-hocon.so'
          'systemd-libs' 'leatherman' 'leatherman_curl.so' 'leatherman_ruby.so' 'leatherman_execution.so'
          'leatherman_file_util.so' 'leatherman_util.so' 'leatherman_logging.so' 'leatherman_locale.so'
-         'openssl' 'gcc-libs' 'glibc' 'util-linux-libs' 'ruby' 'libblkid.so' 'yaml-cpp')
-makedepends=('boost' 'cmake' 'java-environment>=10' 'ruby' 'python' 'rapidjson')
-checkdepends=('ruby-rake' 'ruby-diff-lcs' 'ruby-mocha' 'ruby-rspec-support'
-              'ruby-rspec-core' 'ruby-rspec-expectations' 'ruby-rspec-mocks'
-              'ruby-rspec')
+         'openssl' 'gcc-libs' 'glibc' 'util-linux-libs' 'ruby2.7' 'libblkid.so' 'yaml-cpp')
+makedepends=('boost' 'cmake' 'java-environment>=10' 'python' 'rapidjson')
+checkdepends=('ruby27-rake' 'ruby27-diff-lcs' 'ruby27-mocha' 'ruby27-rspec-support'
+              'ruby27-rspec-core' 'ruby27-rspec-expectations' 'ruby27-rspec-mocks'
+              'ruby27-rspec')
 optdepends=('java-runtime>=8: jruby support'
             'puppet: retrieve puppet facts')
 replaces=('cfacter')
 provides=('libfacter.so')
 source=("https://downloads.puppet.com/facter/facter-${pkgver}.tar.gz"{,.asc}
-        'FindUDEV.cmake'
         'fix-shared-libwhereami-detection.patch'
         'shared_cpp_hcon.patch'
         'rapidjson-1.1-compat.patch'
-        'workaround-broken-double-test.patch')
+        'workaround-broken-double-test.patch'
+        'FindRuby-2.7.patch')
 validpgpkeys=('D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26') # "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release at puppet.com>"
 sha512sums=('d17102d331a2bf71f38ecd295617a2f51f2f26b5a18a3b161a5588601065430db570b681c65af4b7aff75e17c80c8025da4817024cdc850fb6a89398f690d5ef'
             'SKIP'
-            'c06f8b75a697c89c696729aaca88d30cf4d8652406245d457d97a0de973f6129a037e226847e71785070dc16d5b40b98f287258f961da7904cf5338eb601fc09'
             '1f5d2595cd6b2a63fc01c92c84eccf8f92bd9e9f0721ea1a3f59836d7d02f5ec6e6e3711b223b240d46ca55f7377f27339b7458c12d6c21564a2764c76df12b2'
             '15fdfb75bb1045e160c095b62025f10d0a04c167223340072a9b8d065a2a185e942d299f86c80449661f37be5e1807efb49e77def44b8de4a9a9f7c2cc111e1a'
             'a1fb08be2c6c9b2a4085404f1d13b13c9d41e3c1a38d35cbad1d29bbd497380492dab368a0fa7288d141f7f94ff7a7a0ae5ce271119e7074e039868682cc766f'
-            '335c6db6a4953cf3678877ba81506c475d93f461ec2ee75c22fba4a3f938db0bca7f6cf3ee0376eb4c34b43f1f3fb1a35a0a0e64be5a484c344bd689641ddc2b')
+            '335c6db6a4953cf3678877ba81506c475d93f461ec2ee75c22fba4a3f938db0bca7f6cf3ee0376eb4c34b43f1f3fb1a35a0a0e64be5a484c344bd689641ddc2b'
+            '84d6f0ac1f4a47269d3e9bb75036b0cf15ce8624ab293355795e8318be4248958a927d31bba182e064fca581edd4ea1e4f1399c77612a9ce6d98c1ec6c06ebeb')
 
 prepare() {
   cd "${srcdir}/${pkgname}-${pkgver}"
@@ -57,9 +57,6 @@
   # strip version boundary of gems
   sed -i -r 's|(gem .\w+.).*|\1|' lib/Gemfile
 
-  # add missing cmake helper to find the udev lib (provided by systemd)
-  install -Dm644 "${srcdir}/FindUDEV.cmake" cmake/
-
   # patch *.cmake so that it works with shared libs
   patch -p1 -N -i "${srcdir}/fix-shared-libwhereami-detection.patch"
   patch -p1 -N -i "${srcdir}/shared_cpp_hcon.patch"
@@ -66,6 +63,8 @@
   patch -p1 -N -i "${srcdir}/rapidjson-1.1-compat.patch"
 
   patch -p1 -N -i "${srcdir}/workaround-broken-double-test.patch"
+  # build against Ruby-2.7 and not Ruby
+  patch -p1 -N -i "${srcdir}/FindRuby-2.7.patch"
 }
 
 build() {
@@ -89,7 +88,7 @@
 package() {
   cd "${srcdir}/${pkgname}-${pkgver}"
 
-  local _gemdir="$(gem env gemdir)"
+  local _gemdir="$(gem-2.7 env gemdir)"
 
   make -C build DESTDIR="${pkgdir}" install
 



More information about the arch-commits mailing list