2007-01-15 23:30:30 +00:00
|
|
|
#
|
2013-10-08 06:18:34 +00:00
|
|
|
# spec file for package perl-ExtUtils-Depends
|
2007-01-15 23:30:30 +00:00
|
|
|
#
|
2025-04-14 11:18:07 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2007-01-15 23:30:30 +00:00
|
|
|
#
|
2008-09-12 16:10:26 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-04-10 14:28:49 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-15 23:30:30 +00:00
|
|
|
#
|
|
|
|
|
2010-11-26 16:24:23 +00:00
|
|
|
|
2021-05-18 09:24:36 +00:00
|
|
|
%define cpan_name ExtUtils-Depends
|
2008-04-02 23:53:11 +00:00
|
|
|
Name: perl-ExtUtils-Depends
|
2025-04-14 11:18:07 +00:00
|
|
|
Version: 0.8002
|
2013-10-08 06:18:34 +00:00
|
|
|
Release: 0
|
2021-05-18 09:24:36 +00:00
|
|
|
#Upstream: SUSE-Public-Domain
|
2019-04-10 14:28:49 +00:00
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2025-04-14 11:18:07 +00:00
|
|
|
Summary: Easily build XS extensions that depend on XS extensions
|
2021-05-18 09:24:36 +00:00
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
2025-04-14 11:18:07 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETJ/%{cpan_name}-%{version}.tar.gz
|
2015-12-03 18:10:14 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:13:58 +02:00
|
|
|
Source100: README.md
|
2010-11-24 19:24:08 +00:00
|
|
|
BuildArch: noarch
|
2010-10-19 10:54:13 +00:00
|
|
|
BuildRequires: perl
|
2010-11-24 19:24:08 +00:00
|
|
|
BuildRequires: perl-macros
|
2021-05-18 09:24:36 +00:00
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 7.44
|
2025-04-14 11:18:07 +00:00
|
|
|
BuildRequires: perl(Test::More) >= 0.88
|
2021-05-18 09:24:36 +00:00
|
|
|
Requires: perl(ExtUtils::MakeMaker) >= 7.44
|
2013-10-08 06:18:34 +00:00
|
|
|
%{perl_requires}
|
2007-01-15 23:30:30 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This module tries to make it easy to build Perl extensions that use
|
2010-11-24 19:24:08 +00:00
|
|
|
functions and typemaps provided by other perl extensions. This means that a
|
|
|
|
perl extension is treated like a shared library that provides also a C and
|
|
|
|
an XS interface besides the perl one.
|
|
|
|
|
2025-04-14 11:18:07 +00:00
|
|
|
This works as long as the base (or "producing") extension is loaded with
|
|
|
|
the 'RTLD_GLOBAL' flag (usually done with a
|
2010-11-24 19:24:08 +00:00
|
|
|
|
|
|
|
sub dl_load_flags {0x01}
|
|
|
|
|
2025-04-14 11:18:07 +00:00
|
|
|
in the main _.pm_ file) if you need to use functions defined in the module.
|
|
|
|
That "producing" extension will also need to tell ExtUtils::MakeMaker the
|
|
|
|
specific functions to export, with arguments to 'WriteMakefile' like:
|
|
|
|
|
|
|
|
FUNCLIST => [qw(function_name)],
|
|
|
|
DL_FUNCS => { 'Extension::Name' => [] },
|
2010-11-24 19:24:08 +00:00
|
|
|
|
|
|
|
The basic scheme of operation is to collect information about a module in
|
|
|
|
the instance, and then store that data in the Perl library where it may be
|
|
|
|
retrieved later. The object can also reformat this information into the
|
|
|
|
data structures required by ExtUtils::MakeMaker's WriteMakefile function.
|
|
|
|
|
2015-12-03 18:10:14 +00:00
|
|
|
For information on how to make your module fit into this scheme, see
|
|
|
|
"hashref = ExtUtils::Depends::load (name)".
|
2014-09-19 12:27:45 +00:00
|
|
|
|
2010-11-24 19:24:08 +00:00
|
|
|
When creating a new Depends object, you give it a name, which is the name
|
|
|
|
of the module you are building. You can also specify the names of modules
|
|
|
|
on which this module depends. These dependencies will be loaded
|
|
|
|
automatically, and their typemaps, header files, etc merged with your new
|
|
|
|
object's stuff. When you store the data for your object, the list of
|
|
|
|
dependencies are stored with it, so that another module depending on your
|
|
|
|
needn't know on exactly which modules yours depends.
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
Gtk2 depends on Glib
|
2007-01-15 23:30:30 +00:00
|
|
|
|
2010-11-24 19:24:08 +00:00
|
|
|
Gnome2::Canvas depends on Gtk2
|
2007-01-15 23:30:30 +00:00
|
|
|
|
2010-11-24 19:24:08 +00:00
|
|
|
ExtUtils::Depends->new ('Gnome2::Canvas', 'Gtk2');
|
|
|
|
this command automatically brings in all the stuff needed
|
|
|
|
for Glib, since Gtk2 depends on it.
|
2007-01-15 23:30:30 +00:00
|
|
|
|
2014-09-19 12:27:45 +00:00
|
|
|
When the configuration information is saved, it also includes a class
|
|
|
|
method called 'Inline', inheritable by your module. This allows you in your
|
|
|
|
module to simply say at the top:
|
|
|
|
|
|
|
|
package Mymod;
|
|
|
|
use parent 'Mymod::Install::Files'; # to inherit 'Inline' method
|
|
|
|
|
2015-12-03 18:10:14 +00:00
|
|
|
And users of 'Mymod' who want to write inline code (using Inline) will
|
|
|
|
simply be able to write:
|
2014-09-19 12:27:45 +00:00
|
|
|
|
|
|
|
use Inline with => 'Mymod';
|
|
|
|
|
|
|
|
And all the necessary header files, defines, and libraries will be added
|
|
|
|
for them.
|
|
|
|
|
|
|
|
The 'Mymod::Install::Files' will also implement a 'deps' method, which will
|
|
|
|
return a list of any modules that 'Mymod' depends on - you will not
|
|
|
|
normally need to use this:
|
|
|
|
|
|
|
|
require Mymod::Install::Files;
|
|
|
|
@deps = Mymod::Install::Files->deps;
|
|
|
|
|
2007-01-15 23:30:30 +00:00
|
|
|
%prep
|
2025-04-14 11:18:07 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{version} -p1
|
2007-01-15 23:30:30 +00:00
|
|
|
|
|
|
|
%build
|
2019-04-10 14:28:49 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
2021-05-18 09:24:36 +00:00
|
|
|
%make_build
|
2008-09-12 16:10:26 +00:00
|
|
|
|
|
|
|
%check
|
2019-04-10 14:28:49 +00:00
|
|
|
make test
|
2007-01-15 23:30:30 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
2010-11-24 19:24:08 +00:00
|
|
|
%perl_gen_filelist
|
2007-01-15 23:30:30 +00:00
|
|
|
|
2010-11-24 19:24:08 +00:00
|
|
|
%files -f %{name}.files
|
2015-12-03 18:10:14 +00:00
|
|
|
%doc Changes README
|
2007-01-15 23:30:30 +00:00
|
|
|
|
2008-04-02 23:53:11 +00:00
|
|
|
%changelog
|