1 ################################################################################
3 # gtk2-perl.cygclass - functions for building Gtk2-Perl bindings
5 # Part of cygport - Cygwin packaging application
6 # Copyright (C) 2006-2020 Cygport authors
7 # Provided by the Cygwin project <https://cygwin.com/>
9 # cygport is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # cygport is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with cygport. If not, see <https://www.gnu.org/licenses/>.
22 ################################################################################
24 #****h* Cygclasses/gtk2-perl.cygclass
26 # [CPAN_AUTHOR=username]
29 # The Gtk2-Perl project provides Perl bindings for the GLib, GTK+, and GNOME
30 # libraries, allowing full-fledged GNOME programs to be written in the Perl
31 # programming language. Source packages are based on the ExtUtils::MakeMaker
32 # system with some additions to handle the unique requirements of inter-module
33 # dependencies and POD generation from XS. Several third-party modules are
34 # also available on CPAN which use the same system to bind libraries not yet
35 # covered by the Gtk2-Perl project.
37 # This cygclass builds both official and third-party Gtk2-Perl binding packages.
41 # perl-ExtUtils-Depends, perl-ExtUtils-PkgConfig
46 if ! defined CPAN_AUTHOR
48 #****o* gtk2-perl.cygclass/CATEGORY (gtk2-perl)
52 #****o* gtk2-perl.cygclass/SUMMARY (gtk2-perl)
54 SUMMARY="Perl ${ORIG_PN//-/::} bindings"
56 #****o* gtk2-perl.cygclass/HOMEPAGE (gtk2-perl)
58 # Homepage of the Gtk2-Perl project.
60 # If CPAN_AUTHOR is defined, the value set by perl.cygclass is used instead.
62 HOMEPAGE="http://gtk2-perl.sourceforge.net/"
64 #****o* gtk2-perl.cygclass/SRC_URI (gtk2-perl)
66 # Download location of the release tarball from the Gtk2-Perl project.
68 # If CPAN_AUTHOR is defined, the value set by perl.cygclass is used instead.
70 SRC_URI="mirror://sourceforge/gtk2-perl/${ORIG_PN}-${PV}.tar.gz"
72 fi # ! defined CPAN_AUTHOR
74 #****o* gtk2-perl.cygclass/DEPS_PATH (gtk2-perl)
76 # Gtk2-Perl modules are unique that they are not only linked against the C
77 # libraries which they bind, but also expose an API to bindings higher up in
78 # the stack which link against them as well. Therefore, DEPS_PATH is set to
79 # catch these inter-module link dependencies.
81 DEPS_PATH="${PERL_VENDORARCH}/auto/Cairo:${PERL_VENDORARCH}/auto/Glib:${PERL_VENDORARCH}/auto/Gtk2:${PERL_VENDORARCH}/auto/Gnome2/VFS:${PERL_VENDORARCH}/auto/Gnome2/GConf:${PERL_VENDORARCH}/auto/Pango"
83 #****iC* gtk2-perl.cygclass/gtk2_perl_compile
85 # An alias for perl_compile.
87 # Gtk2-Perl's build system originally posed some challenges on Cygwin:
88 # * Inter-module linking. ExtUtils-Depends did not support this for quite
89 # some time, so the necessary link libraries had to be specially added.
90 # * POD manpages. On other *NIX systems, POD manpages are generated from
91 # hand-written POD files and include '::' in their filename, which was
92 # illegal on Cygwin until 1.7, so perl and man are patched to substitute
93 # '::' with '.'. Gtk2-Perl uses its own system to first build POD files
94 # from XS, then build manpages from those, so the 's/::/./g' substitution
95 # was not available and intervention was required to create the manpages.
96 # Since Cygwin 1.7, however, technically this would no longer necessary, as
97 # filenames can include ':', but man still makes the substitution.
98 # Therefore, this function no longer serves a purpose. Now, the manpages
99 # are built and installed with '::' as on other platforms, but are renamed
100 # during postinstall so that man can find them.
102 gtk2_perl_compile() {
106 readonly -f gtk2_perl_compile