aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-09-08 15:16:23 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-09-12 22:29:39 +0200
commit06efb215c18a0f7225f636c953f7d6bced24eee8 (patch)
tree8c77c9c5c48fb6a0ab149f2085a4c94f0a54e029
parent895ea9ff8be3fffcb38b37a18662c58a928ddbb3 (diff)
downloadrpm-setup-06efb215c18a0f7225f636c953f7d6bced24eee8.tar
rpm-setup-06efb215c18a0f7225f636c953f7d6bced24eee8.tar.gz
rpm-setup-06efb215c18a0f7225f636c953f7d6bced24eee8.tar.bz2
rpm-setup-06efb215c18a0f7225f636c953f7d6bced24eee8.tar.xz
rpm-setup-06efb215c18a0f7225f636c953f7d6bced24eee8.zip
gstreamer/haskell/ruby/typelib will be managed elsewhere
we backported the needed .(attr|prov|req) files from FC/SuSe
-rw-r--r--Makefile.am3
-rw-r--r--NEWS2
-rwxr-xr-xfind-provides.in34
-rwxr-xr-xfind-requires.in21
-rwxr-xr-xgi-find-deps.sh.in118
5 files changed, 3 insertions, 175 deletions
diff --git a/Makefile.am b/Makefile.am
index 75a1e2c..9fb85d5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,8 +44,7 @@ pkg_scripts = \
pkg_gscripts = \
find-provides \
- find-requires \
- gi-find-deps.sh
+ find-requires
pkg_scripts_in = $(pkg_gscripts:=.in)
diff --git a/NEWS b/NEWS
index 978a441..e7eb3c0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
- convert perl-base deps to internal generator
- convert PHP deps to internal generator
+- drop gstreamer/haskell/ruby/typelib deps generators
+ we backported the needed .(attr|prov|req) files from FC/SuSe in other packages
- drop most of the script-based dependency generation bits
- use internal dependency generator instead of "external generator"
(like all other distros) which is way much faster :-)
diff --git a/find-provides.in b/find-provides.in
index 90b0c3d..b03c952 100755
--- a/find-provides.in
+++ b/find-provides.in
@@ -5,8 +5,6 @@
filelist=`sed "s/['\"]/\\\&/g"`
-rubygemlist=$(echo "$filelist"| egrep "\.gemspec$")
-
# fix parsing output of objdump when localized (mga#7883):
export LC_ALL=C
@@ -34,21 +32,6 @@ fi
&& test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/kmod.prov failed' >&2 && exit 1
#
-# --- typelib() gobject-introspection bindings
-[ -x @RPMVENDORDIR@/gi-find-deps.sh ] &&
- echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/gi-find-deps.sh -P | sort -u \
- && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/gi-find-deps.sh failed' >&2 && exit 1
-
-[ -x /usr/lib/rpm/rpmdeps -a -n "$filelist" ] &&
- echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --provides
-
-#
-# --- Ruby gems
-[ -x /usr/bin/ruby -a -x @RPMVENDORDIR@/rubygems.rb -a -n "$rubygemlist" ] &&
- echo $rubygemlist | tr '[:blank:]' \\n | @RPMVENDORDIR@/rubygems.rb --provides | sort -u \
- && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/rubygems.rb failed' >&2 && exit 1
-
-#
# --- .so files.
for i in `echo $filelist | tr '[:blank:]' "\n" | egrep '(/usr(/X11R6)?)?/lib(|64)(/gcc(-lib)?/.+)?/[^/]+\.so$'`; do
objd=`objdump -p ${i} | grep SONAME`
@@ -57,21 +40,4 @@ for i in `echo $filelist | tr '[:blank:]' "\n" | egrep '(/usr(/X11R6)?)?/lib(|64
echo ${objd} | perl -p -e "s/.*SONAME\s+(\S+)\.so.*/devel(\1$lib64)/g"
done | sort -u
-#
-# --- haskell provides
-if [ -x /usr/bin/haskell-find-provides ]; then
-echo $filelist | tr '[:blank:]' '\n' | /usr/bin/haskell-find-provides \
- && test ${PIPESTATUS[2]} -ne 0 && echo 'error: /usr/bin/haskell-find-provides failed' >&2 && exit 1
-fi
-
-#
-# --- gstreamer modules.
-[ -x @RPMVENDORDIR@/gstreamer.prov ] &&
- echo "$solist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/gstreamer.prov | sort -u \
- && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/gstreamer.prov failed' >&2 && exit 1
-
-[ -x @RPMVENDORDIR@/gstreamer1.0.prov ] &&
- echo "$solist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/gstreamer1.0.prov | sort -u \
- && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/gstreamer1.0.prov failed' >&2 && exit 1
-
exit 0
diff --git a/find-requires.in b/find-requires.in
index c56c2e1..377389b 100755
--- a/find-requires.in
+++ b/find-requires.in
@@ -40,8 +40,6 @@ fi
#
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
-rubygemlist=`echo "$filelist"| egrep "\.gemspec$"`
-
#
# --- If libperl.so exists and if XS modules are found, depend on perlapi-<version> and libperl.so
if [ -n "$perllist" ]; then
@@ -62,18 +60,6 @@ fi
echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --requires
#
-# --- typelib() gobject-introspection bindings
-[ -x @RPMVENDORDIR@/gi-find-deps.sh ] &&
- echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/gi-find-deps.sh -R | sort -u \
- && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/gi-find-deps.sh failed' >&2 && exit 1
-
-#
-# --- Ruby gems
-[ -x /usr/bin/ruby -a -x @RPMVENDORDIR@/rubygems.rb -a -n "$rubygemlist" ] &&
- echo $rubygemlist | tr '[:blank:]' \\n | @RPMVENDORDIR@/rubygems.rb --requires | sort -u \
- && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/rubygems.rb failed' >&2 && exit 1
-
-#
# --- .so files.
for i in `echo $filelist | tr '[:blank:]' "\n" | egrep "(/usr(/X11R6)?)?/lib(|64)/[^/]+\.so$"`; do
objd=`objdump -p ${i} | grep SONAME`
@@ -103,11 +89,4 @@ done | egrep -v 'devel\(linux-gate|linux-vdso32|linux-vdso64|lib(c|pthread|rt)(\
# --- multiarch-utils
echo $filelist | tr '[:blank:]' '\n' | grep -q '/multiarch-.*-linux/' && echo multiarch-utils
-#
-# haskell requires
-if [ -x /usr/bin/haskell-find-requires ]; then
-echo $filelist | tr '[:blank:]' '\n' | /usr/bin/haskell-find-requires \
- && test ${PIPESTATUS[2]} -ne 0 && echo 'error: /usr/bin/haskell-find-requires failed' >&2 && exit 1
-fi
-
exit 0
diff --git a/gi-find-deps.sh.in b/gi-find-deps.sh.in
deleted file mode 100755
index 60d8355..0000000
--- a/gi-find-deps.sh.in
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/sh
-
-# Automatically find Provides and Requires for typelib() gobject-introspection bindings.
-# can be started with -R (Requires) and -P (Provides)
-
-# Copyright 2011 by Dominique Leuenberger, Amsterdam, Netherlands (dimstar [at] opensuse.org)
-# This file is released under the GPLv2 or later.
-
-function split_name_version {
-base=$1
-tsymbol=${base%-*}
-# Sometimes we get a Requires on Gdk.Settings.foo, bebause you can directly use imports.gi.Gdk.Settings.Foo in Javascript.
-# We know that the symbol in this case is call Gdk, so we cut everything after the . away.
-symbol=$(echo $tsymbol | awk -F. '{print $1}')
-version=${base#*-}
-# In case there is no '-' in the filename, then the split above 'fails' and version == symbol (thus: no version specified)
-if [ "$tsymbol" = "$version" ]; then
- unset version
-fi
-}
-
-function print_req_prov {
-echo -n "typelib($symbol)"
-if [ ! -z "$version" ]; then
- echo " = ${version}"
-else
- echo ""
-fi
-}
-
-function find_provides {
-while read file; do
- case $file in
- *.typelib)
- split_name_version $(basename $file | sed 's,.typelib$,,')
- print_req_prov
- ;;
- esac
-done
-}
-
-function javascript_requires {
- for module in $(grep -h -P -o "imports\.gi\.([^\s'\";]+)" $1 | grep -v "imports\.gi\.version" | sed -r -e 's,\s+$,,g' -e 's,imports.gi.,,'); do
- split_name_version $module
- print_req_prov
- done
- for module in $(grep -h -P -o "imports\.gi\.versions.([^\s'\";]+)\s*=\s*['\"].+['\"]" $1 | \
- sed -e 's:imports.gi.versions.::' -e "s:['\"]::g" -e 's:=:-:' -e 's: ::g'); do
- split_name_version $module
- print_req_prov
- done
-}
-
-function python_requires {
- for module in $(grep -h -P "from gi\.repository import (\w+)" $1 | sed 's:#.*::' | sed -e 's,.*from gi.repository import,,' -r -e 's:\s+as\s+\w+::g' -e 's:\s*,\s*: :g' -e 's:\s[0-9]+\s: :g' -e 's:[^A-Za-z0-9\.\-]: :g'); do
- split_name_version $module
- print_req_prov
- # Temporarly disabled... this is not true if the python code is written for python3... And there seems no real 'way' to identify this.
- #echo "python-gi >= 2.90.2"
- done
- for module in $(grep -h -P -o "(gi\.require_version\(['\"][^'\"]+['\"],\s*['\"][^'\"]+['\"]\))" $1 | sed -e 's:gi.require_version::' -e "s:[()\"' ]::g" -e 's:,:-:'); do
- split_name_version $module
- print_req_prov
- done
-}
-
-function typelib_requires {
- for module in $(@RPMVENDORDIR@/g-ir-extract-deps $1 | tr '|' ' '); do
- split_name_version $module
- print_req_prov
- done
-}
-
-function find_requires {
-# Currently, we detect:
-# - in python:
-# . from gi.repository import foo [Unversioned requirement of 'foo']
-# . from gi.repository import foo-1.0 [versioned requirement]
-# . gi.require_version('Gtk', '3.0') (To specify a version.. there is still an import needed)
-# . And we do not stumble over:
-# from gi.repository import foo as _bar
-# from gi.repository import foo, bar
-# - in JS:
-# . imports.gi.foo; [unversioned requirement of 'foo']
-# . imports.gi.goo-1.0; [versioned requirement]
-# . imports.gi.versions.Gtk = '3.0';
-# . The imports can be listed on one line, and we catch them.
-
-while read file; do
- case $file in
- *.js)
- javascript_requires "$file"
- ;;
- *.py)
- python_requires "$file"
- ;;
- *.typelib)
- typelib_requires "$file"
- ;;
- *)
- case $(file -b $file) in
- Python\ script*)
- python_requires "$file"
- ;;
- esac
- ;;
- esac
-done
-}
-
-case $1 in
- -P)
- find_provides
- ;;
- -R)
- find_requires
- ;;
-esac