ExtUtils-CBuilder-0.280236/0000775000175000017500000000000014011761123013652 5ustar ambsambsExtUtils-CBuilder-0.280236/MANIFEST0000644000175000017500000000155414011761123015006 0ustar ambsambs# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.017. CONTRIBUTING Changes LICENSE MANIFEST META.json META.yml Makefile.PL NOTAS-Alberto README README.mkdn README.patching README.release dist.ini lib/ExtUtils/CBuilder.pm lib/ExtUtils/CBuilder/Base.pm lib/ExtUtils/CBuilder/Platform/Unix.pm lib/ExtUtils/CBuilder/Platform/VMS.pm lib/ExtUtils/CBuilder/Platform/Windows.pm lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm lib/ExtUtils/CBuilder/Platform/aix.pm lib/ExtUtils/CBuilder/Platform/android.pm lib/ExtUtils/CBuilder/Platform/cygwin.pm lib/ExtUtils/CBuilder/Platform/darwin.pm lib/ExtUtils/CBuilder/Platform/dec_osf.pm lib/ExtUtils/CBuilder/Platform/os2.pm t/00-have-compiler.t t/01-basic.t t/02-link.t t/03-cplusplus.t t/04-base.t xt/author/pod-syntax.t ExtUtils-CBuilder-0.280236/xt/0000775000175000017500000000000014011761123014305 5ustar ambsambsExtUtils-CBuilder-0.280236/xt/author/0000775000175000017500000000000014011761123015607 5ustar ambsambsExtUtils-CBuilder-0.280236/xt/author/pod-syntax.t0000644000175000017500000000025214011761123020077 0ustar ambsambs#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); ExtUtils-CBuilder-0.280236/LICENSE0000644000175000017500000004365514011761123014672 0ustar ambsambsThis software is copyright (c) 2021 by Ken Williams. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2021 by Ken Williams. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2021 by Ken Williams. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End ExtUtils-CBuilder-0.280236/Changes0000644000175000017500000003704514011761123015154 0ustar ambsambsRevision history for Perl extension ExtUtils::CBuilder. 0.280236 - 2021-02-12 Fix: - Remove image-base generation on Win32/gcc and instead use GCC's built-in `--enable-auto-image-base` linker option. 0.280235 - 2020-11-01 Fix: - Fix compilation on darwin with XCode 12 (-Werror=implicit-function-declaration) Thanks to DrHyde for the patch. 0.280234 - 2020-01-21 Update: - Updated standalone module from blead. 0.280231 - 2019-03-31 Fixed: - Protected RE interpolation in Base.pm 0.280230 - 2017-11-22 Fixed: - Updated Changes - Used OurPkgVersion instead of PkgVersion 0.280229 - 2017-10-13 Fixed: - Remove dependency to 'vars' package. 0.280228 - 2017-07-20 Fixed: - Fix link() on Windows, broken in version 0.280226. 0.280227 - 2017-07-19 Fixed: - Restore compatibility of test suite to Perl 5.6. 0.280226 - 2017-07-14 Fixed: - Fix C++ compiler detection (RT #131749) (thanks to stphnlyd) 0.280225 - 2016-01-04 Fixed: - New location of libperl on Win32 when building core (RT #126632) 0.280224 - 2015-10-09 Enhancements: - Use warnings/strict on all modules. 0.280223 - 2015-06-02 Fixed: - Impose deterministic order on cpp-definition options. Heretofore, ExtUtils::CBuilder put cpp-definition options into the cc command line in non-deterministic order. This produced noise when diffing build logs. Make this order deterministic. (RT #124106) Added: - Add tests for ascii-betical order in t/04-base.t. 0.280220 - 2014-09-27 Fixed: - Added missing 'use Config' from 'android.pm' (thanks Debian community) 0.280219 - 2014-09-01 Fixed: - Fixed regression on Android (thanks to Brian Fraser) 0.280218 - 2014-09-01 Fixed: - Mispelled 'starup' key in BCC support was fixed. #79574 - Fixed the version in the PM file (thanks to Jim Keenan) 0.280217 - 2014-08-22 Fixed: - Quoted perl path for Windows support #98245 [Alberto Simões] 0.280216 - 2014-03-07 Added: - Android support [Brian Fraser and Piotr Roszatycki] Fixed: - Teach ExtUtils::CBuilder to handle mod2fname properly [Brian Fraser] 0.280212 - 2013-09-08 Fixed: - Reversion all modules. 0.280211 - 2013-09-08 Fixed: - Missing dependency Perl::OSType [Leon Timmermans] - Fixed repository location [Alberto Simões] 0.280210 - 2013-09-06 Fixed: - Update INSTALLDIRS to favor installation under 'site' (perl 116479) [James E Keenan] 0.280209 - 2012-10-20 (Perl v5.17.5) Fixed: - Allow options to be passed to prelink in Windows (perl #115100) [Eric Brine] 0.280208 - 2012-06-20 (Perl v5.17.1) Fixed: - Corrected location in which manifest file is looked for on Windows (RT#35943, perl #111798) [snaury@gmail.com] 0.280207 (Not released) Fixed: - Corrected test for existence of manifest file on Windows (perl #111782) [Steve Hay] 0.280206 - 2012-03-20 (Perl v5.15.9) Documented: - Added a SUPPORT section to indicate that upstream is Perl 5 core 0.280205 - 2011-12-20 (Perl v5.15.6) Fixed: - Fixed bug picking up ccflags from Config 0.280204 - 2011-06-20 (Perl v5.15.0) Minor: - Quotation style cleanup 0.280203 - 2011-05-14 (Perl v5.14.0) Fixed: - Appends CFLAGS and LDFLAGS environments instead of overriding - Reset ccflags on compilation for VMS. Changed: - Refactored OS name mapping to use Perl::OSType 0.280202 - Sun Jan 23 10:47:51 EST 2011 - Different file names used for test files; allows EU::CB tests to be run in parallel. [Florian Ragwitz] 0.280201 - Fri Jan 21 15:16:36 EST 2011 Fixed: - t/04-base.t no longer attempt to compile or link as this provokes failures on main platforms - Various typo fixes in Pod or comments 0.2802 - Sun Dec 12 07:22:43 EST 2010 Fixed: - Incorporated another t/04-base.t fix from bleadperl [Chris Williams] 0.2801 - Wed Dec 8 21:36:56 EST 2010 Fixed: - Fixed spurious t/04-base.t failure when run from Perl core [David Golden] 0.2800 - Mon Dec 6 16:05:46 EST 2010 - No changes from 0.27_07 0.27_07 - Wed Sep 29 21:48:55 EDT 2010 Fixed: - Fixed t/02-link.t on perl < 5.8 0.27_06 - Mon Sep 27 15:29:54 EDT 2010 Fixed: - Preserves exit status on VMS [Craig Berry] - Fix Win32 split_like_shell escaping [Christian Walde] 0.27_05 - Wed Jul 28 15:29:59 EDT 2010 Fixed: - Tests no longer fail if user has set the CC environment variable 0.27_04 - Mon Jul 26 22:41:43 EDT 2010 Added: - handle c compiler and c++ compiler separately (adds requirement for IPC::Cmd) [Jens Rehsack] Others: - rely on File::Temp::tempfile and File::Spec::tmpdir to get unique file name for checking for compiler [Jens Rehsack] - Code base modernization and substantial code coverage improvments [Jim Keenan] 0.2703 - Tue Mar 16 17:10:55 EDT 2010 Bugs fixed: - fixed tests for Windows and MSVC [Jan Dubois] 0.2702 - Mon Feb 22 15:10:52 EST 2010 Bugs fixed: - compile() changes in 0.2701 did not work on Windows. Now fixed. 0.2701 - Tue Feb 16 09:12:45 EST 2010 Bugs fixed: - compile() now accepts both string & array for 'include_dirs' argument, as documented.(RT#54606) [Alberto Simões] 0.27 - Thu Oct 29 21:29:56 EDT 2009 Other: - Removed Build.PL to avoid creating a circular dependency - Added version numbers to Windows compiler driver modules 0.26_05 - Sun Oct 25 17:29:02 EDT 2009 Bugs fixed: - Fixed t/02link.t failures on cygwin with Perl 5.8 [David Golden] Other: - Made have_compiler (and have_cplusplus) quiet without echoing the test command to STDOUT [David Golden] 0.26_04 - Mon Oct 19 21:57:46 EDT 2009 Enhancements: - Added 'have_cplusplus()' method to check for C++ support - Added patches for building Perl with mingw64 [Sisyphus] - Allow CC environment variable to override $Config{cc} Bugs fixed: - Fixed link executable command for Win32 MSVC (RT#40819) [Cosimo Streppone] - Removed MSVC version check when embedding a manifest file (RT #43002) [Steve Hay] Other: - Split Windows compiler driver packages into individual *.pm files 0.260301 - Sat Aug 29 11:04:41 EDT 2009 Bugs fixed: - Fixed linking error on Win32 with gcc compiler (RT#49000) [kmx] 0.2603 - Sat Jul 18 06:56:06 EDT 2009 Bugs fixed: - Makefile.PL had wrong INSTALLDIRS setting for older Perls (RT#47985) [David Golden] 0.2602 - Sat Jul 4 10:57:12 EDT 2009 Bugs fixed: - Fixed 00-have-compiler.t if $^X is a relative path [David Wheeler] 0.2601 - Wed Jul 1 09:37:39 EDT 2009 Bugs fixed: - On VMS, cleans up extra files generated during testing [John E. Malmberg, Craig Berry] 0.26 - Mon Jun 29 20:11:52 EDT 2009 - No changes from 0.25_01 0.25_01 - Sat Jun 27 23:13:20 EDT 2009 - Changed test library to Test::More - Added tests for have_compiler - Skips tests that need a compiler if have_compiler is false - have_compiler will try to compile in the current directory if compiling in tmpdir fails for whatever reason 0.25 - Fri Jun 26 16:18:13 EDT 2009 - Slight diagnostic improvements in link.t 0.24_01 - Sun Mar 8 14:50:10 2009 - On Windows, don't generate "mt" command when CRT is statically linked. [Jan Dubois] - On Cygwin, examine $Config{useshrplib} to see whether we're supposed to be linking with a shared perl library or not. [Reini Urban] - In link_executable() on Cygwin, trust $Config{ld} rather than using $Config{cc} for linking. [Reini Urban] - Add 'haiku' as a Unix-like platform. [Ingo Weinhold] 0.24 - Fri Aug 15 22:01:48 2008 - Added 'gnu' and 'gnukfreebsd' as Unix variants. [Niko Tyni] - Brought in some VMS fixes from bleadperl: "Correct and complete CBuilder's handling of external libraries when linking on VMS." [Craig Berry] 0.23 - Sat Apr 19 22:28:03 2008 - Fixed some problems (some old, some new) with Strawberry Perl on Windows. [Alberto Simo~es] - Will now install in the core perl lib directory when the user's perl is new enough to have us in core. [Yi Ma Mao] 0.22 - Fri Feb 8 21:52:21 2008 - Replaced the split_like_shell() method on Windows with a near-no-op, which is probably more correct and has the benefit of not messing up UNC paths. [John R. LoVerso, see http://rt.cpan.org/Ticket/Display.html?id=26545] - Fixed extra_compiler_flags on Windows, they were being ignored. [Robert May] 0.21 - Tue Oct 30 06:46:01 2007 - Clean up perl_src path using Cwd::realpath(). Only affects usage as part of the perl core. - Protect $., $@, $!, $^E, and $? from any clobbering that might occur in our DESTROY method. [Zefram] - From bleadperl, a patch to clean up debug symbol files (.pdb for VC++, .tds for BCC) when running have_compiler(). [Steve Hay & Steve Peters] 0.19 - Sun May 13 14:29:18 2007 - When building as part of the perl core (so this is irrelevant for people downloading from CPAN) we now try a little harder to find the perl sources. [Jos Boumans] - Fixed a part of the manifest thingy that got broken on 64-bit Windows platforms in version 0.18. [Steve Hay, Jan Dubois] 0.18 - Mon Mar 26 21:29:09 2007 - Various OS/2 fixes: + Put .LIB file near .DEF file + Got library-file building working better + Handled libperl_overrides better [Ilya Zakharevich] - On Windows: embed manifest files in DLLs built with Module-Build when using VC8. [Steve Hay] - Added a workaround for a config error on dec_osf: the linker is $Config{cc}, not $Config{ld}. [Jarkko Hietaniemi] - Borland's compiler "response files" will not pass through macro definitions that contain quotes. The quotes get stripped and there seems to be no way to escape them. So we leave macros on the command line. [Randy W. Sims] 0.18 Sat Mar 25 13:35:47 CST 2006 - Yet more fixes for arg_defines() on VMS. [Craig A. Berry and John E. Malmberg] 0.17 Wed Mar 15 22:46:15 CST 2006 - When we're being run from an uninstalled perl distribution (e.g. one that's in the process of being built and tested), we search for perl first in the current working directory. [Randy Sims] - More fixing of the arg_defines() method on VMS. [Craig A. Berry and John E. Malmberg] 0.16 Mon Mar 13 17:08:21 CST 2006 - Fix quoting of command line arguments on Windows. [Yitzchak Scott-Thoennes] - Provided a custom arg_defines() on VMS that does essentially the same thing for /define that version 0.14 did for /include. [Craig A. Berry] - Documented the existing 'quiet' parameter, which silences the printing of system() commands. [Suggested by Yitzchak Scott-Thoennes] 0.15 Mon Oct 3 17:10:32 CDT 2005 - Several OS/2 fixes have been made, including: 1) adding the necessary version string to DLLs, 2) passing the executable's name to 'ldopts' without the .exe extension, 3) avoiding calling 'env' via the 'shrpenv' thingy, since it triggers a fork() bug. [Ilya Zakharevich] - Integrate a couple cleanup-related changes from bleadperl that somehow never got into this copy. [Steve Hay] - Added a new 'defines' parameter to compile(), which gives a platform-independent way to specify various -Dfoo=bar (or the equivalent) compiler defines. [Randy W. Sims] 0.14 Mon Sep 19 13:40:37 CDT 2005 - Several fixes have been made for VMS, including: 1) there can only be one /include qualifier, so merge multiple /includes into one; 2) make sure the executable is named the same way that dynaloader will look for it; 3) make sure the option files for the exported symbols and the PERLSHR image are passed properly to the linker. [John E. Malmberg] 0.13 Wed Aug 24 20:05:59 CDT 2005 - Several temporary files weren't being cleaned up during testing, because the 'cleanup' mechanism was never properly implemented. This is now fixed. [Steve Hay] 0.12 Mon May 30 16:40:10 CDT 2005 - In order to integrate into the perl core, patches were contributed that a) put a $VERSION variable in each .pm file, b) add a 'quiet' parameter to new() to shut up some of the command-echoing, c) checks for the perl source headers in the CORE/ directory in the perl source tree, not in the post-installation location, and d) adjusts the CWD when running the regression tests under the perl core. [Yitzchak Scott-Thoennes] - Various parts of the code were looking for the CORE/ directory in $Config{archlib}, $Config{installarchlib}, and $Config{archlibexp}. Only the latter is correct, so we use that everywhere now. [Curt Tilmes] - For Unix-ish platforms, link_executable() will now prefer $Config{cc} to $Config{ld}, because that typically works better. [Jarkko Hietaniemi and H.Merijn Brand] - Prelinking (invoking ExtUtils::Mksymlists to create options-files) is now only done when we're building dynamic libraries. [Yitzchak Scott-Thoennes] 0.11 Tue Apr 5 20:58:41 CDT 2005 - Added a licensing statement to CBuilder.pm. [Spotted by Chip Salzenberg] 0.10 Mon Mar 14 20:18:19 CST 2005 - Split out a few simple routines that format how compile switches are formatted, so that we can override them for platforms like VMS where they're very different. - Fix compile() and link() on VMS. [Help from Michael Schwern and Peter Prymmer] 0.09 Tue Feb 8 17:57:41 CST 2005 - Fixed a broken link_executable() method on cygwin - it now uses 'gcc' instead of $Config{ld} for the linking, because the latter is actually a shell script which calls a perl script which calls gcc in a way that only works for creating shared libraries, not executables. 0.08 Tue Jan 18 21:54:11 CST 2005 - Fixed a testing error in which I had the prototype wrong for the main() function. [Jose Pedro Oliveira] 0.07 Wed Jan 12 21:50:34 CST 2005 - Added the link_executable() method, which provides the ability to create standalone executables. This is NOT yet implemented on Windows, and therefore the tests for it are skipped on Win32. [Alberto Manuel Brandao Simoes] - Integrated the latest split_like_shell() for Windows from Module::Build (really need to find a better home for this code...), which now does a much better job of handling quotes and backslashes and so on. [Randy Sims] - Fixed a couple of Windows problems related to the output-file name in link(), and some clobbering of the 'include_dirs' parameter to compile(). [Randy Sims] 0.06 Mon Dec 27 22:51:36 CST 2004 - Fixed a bug on Unix environments in which our work-around for shell-commands like "FOO=BAR cc" (which is supposed to be turned into "env FOO=BAR cc" to actually work) wasn't being called. 0.05 Wed Oct 13 23:09:09 CDT 2004 - Fixed a bug in split_like_shell() in which leading whitespace was creating an empty word, manifesting as something like "gcc - no such file or directory" during tests. [Spotted by Warren L. Dodge] - Incorporate another split_like_shell() fix from Module::Build. 0.04 Sun Oct 10 00:31:08 CDT 2004 - Changed the split_like_shell() method to use the shellwords() function from Text::ParseWords (a core module since 5.0), which does a much better job than the split() we were using. 0.03 Fri May 14 23:12:23 CDT 2004 - Fixed minor problems with the Build.PL file, the module names should be quoted. - The VMS module declared itself with the wrong package name. 0.02 Fri Feb 20 10:17:40 CST 2004 - Fixed a bug in .../Platform/Windows.pm, in which compile() was ignoring an 'include_dirs' argument. [Randy Sims] - Fixed a bug in .../Platform/Windows.pm, in which output files were being created in the root directory \ when they should be created in the current directory. [Randy Sims] 0.01 Mon Jan 12 08:12:35 CST 2004 - Original release, taken from Module::Build's C-building code, with patching help from Randy Sims. ExtUtils-CBuilder-0.280236/README.patching0000644000175000017500000000205614011761123016327 0ustar ambsambsPatching instructions for ExtUtils::CBuilder 1. Check for any changes to .pm files since dev or stable Perl release. E.g. to check for changes since v5.15.8: $ cd dist/ExtUtils-CBuilder $ git log v5.15.8..blead -- . 2. If you are making the first change since the last Perl release, you need to bump the $VERSION in all .pm files and update the Changes file with the new version. In the Changes file, put the expected *NEXT* release of Perl (dev or stable) as the release date and version. E.g. after v5.15.8, I added this line to Changes to indicate what will be next release: 0.280206 - 2012-03-20 (Perl v5.15.9) 3. Add an entry to Changes for your work 4. Update Makefile.PL, MANIFEST.SKIP or other support files as necessary. E.g. update Makefile.PL with any changes to prerequisites. 5. Commit all changes (preferably to a branch) 6. Run Configure/make/make test and check for errors. If there are any, fix them. 7. If all is well, push your commits to blead or send a patch to p5p if you do not have commit access to the Perl 5 repository ExtUtils-CBuilder-0.280236/README0000644000175000017500000000057614011761123014540 0ustar ambsambsThis archive contains the distribution ExtUtils-CBuilder, version 0.280236: Compile and link C code for Perl modules This software is copyright (c) 2021 by Ken Williams. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v6.017. ExtUtils-CBuilder-0.280236/t/0000775000175000017500000000000014011761123014115 5ustar ambsambsExtUtils-CBuilder-0.280236/t/04-base.t0000644000175000017500000003124614011761123015441 0ustar ambsambs#! perl -w use strict; use Test::More tests => 65; use Config; use Cwd; use File::Path qw( mkpath ); use File::Temp qw( tempdir ); use ExtUtils::CBuilder::Base; ## N.B. There are pretty severe limits on what can portably be tested ## in the base class. Specifically, don't do anything that will send ## actual compile and link commands to the shell as that won't work ## without the platform-specific overrides. # XXX protect from user CC as we mock everything here local $ENV{CC}; my ( $base, $phony, $cwd ); my ( $source_file, $object_file, $lib_file ); $base = ExtUtils::CBuilder::Base->new(); ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" ); isa_ok( $base, 'ExtUtils::CBuilder::Base' ); { $phony = 'foobar++'; $base = ExtUtils::CBuilder::Base->new( config => { cc => $phony }, ); ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" ); isa_ok( $base, 'ExtUtils::CBuilder::Base' ); is( $base->{config}->{cc}, $phony, "Got expected value when 'config' argument passed to new()" ); } { $phony = 'barbaz'; local $ENV{CC} = $phony; $base = ExtUtils::CBuilder::Base->new(); ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" ); isa_ok( $base, 'ExtUtils::CBuilder::Base' ); is( $base->{config}->{cc}, $phony, "Got expected value \$ENV{CC} set" ); } { my $path_to_perl = $^O eq 'VMS' ? 'perl_root:[000000]perl.exe' : File::Spec->catfile( '', qw| usr bin perl | ); local $^X = $path_to_perl; is( ExtUtils::CBuilder::Base::find_perl_interpreter(), $path_to_perl, "find_perl_interpreter() returned expected absolute path" ); } SKIP: { skip "Base doesn't know about override on VMS", 1 if $^O eq 'VMS'; my $path_to_perl = 'foobar'; local $^X = $path_to_perl; # %Config is read-only. We cannot assign to it and we therefore cannot # simulate the condition that would occur were its value something other # than an existing file. if ( !$ENV{PERL_CORE} and $Config::Config{perlpath}) { is( ExtUtils::CBuilder::Base::find_perl_interpreter(), $Config::Config{perlpath}, "find_perl_interpreter() returned expected file" ); } else { local $^X = $path_to_perl = File::Spec->rel2abs($path_to_perl); is( ExtUtils::CBuilder::Base::find_perl_interpreter(), $path_to_perl, "find_perl_interpreter() returned expected name" ); } } { $cwd = cwd(); my $tdir = tempdir(CLEANUP => 1); chdir $tdir; $base = ExtUtils::CBuilder::Base->new(); ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" ); isa_ok( $base, 'ExtUtils::CBuilder::Base' ); is( scalar keys %{$base->{files_to_clean}}, 0, "No files needing cleaning yet" ); my $file_for_cleaning = File::Spec->catfile( $tdir, 'foobar' ); open my $IN, '>', $file_for_cleaning or die "Unable to open dummy file: $!"; print $IN "\n"; close $IN or die "Unable to close dummy file: $!"; $base->add_to_cleanup( $file_for_cleaning ); is( scalar keys %{$base->{files_to_clean}}, 1, "One file needs cleaning" ); $base->cleanup(); ok( ! -f $file_for_cleaning, "File was cleaned up" ); chdir $cwd; } # fake compiler is perl and will always succeed $base = ExtUtils::CBuilder::Base->new( config => { cc => File::Spec->rel2abs($^X) . " -e1 --", ld => File::Spec->rel2abs($^X) . " -e1 --", } ); ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" ); isa_ok( $base, 'ExtUtils::CBuilder::Base' ); eval { $base->compile(foo => 'bar'); }; like( $@, qr/Missing 'source' argument to compile/, "Got expected error message when lacking 'source' argument to compile()" ); $base = ExtUtils::CBuilder::Base->new( quiet => 1 ); ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" ); isa_ok( $base, 'ExtUtils::CBuilder::Base' ); $source_file = File::Spec->catfile('t', 'baset.c'); create_c_source_file($source_file); ok(-e $source_file, "source file '$source_file' created"); # object filename automatically assigned my $obj_ext = $base->{config}{obj_ext}; is( $base->object_file($source_file), File::Spec->catfile('t', "baset$obj_ext"), "object_file(): got expected automatically assigned name for object file" ); my ($lib, @temps); { local $ENV{PERL_CORE} = '' unless $ENV{PERL_CORE}; my $include_dir = $base->perl_inc(); ok( $include_dir, "perl_inc() returned true value" ); ok( -d $include_dir, "perl_inc() returned directory" ); } $base = ExtUtils::CBuilder::Base->new( quiet => 1 ); ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" ); isa_ok( $base, 'ExtUtils::CBuilder::Base' ); $source_file = File::Spec->catfile('t', 'baset.c'); create_c_source_file($source_file); ok(-e $source_file, "source file '$source_file' created"); my %args = (); my @defines = $base->arg_defines( %args ); ok( ! @defines, "Empty hash passed to arg_defines() returns empty list" ); my @epsilon = ( epsilon => 'zeta' ); my @eta = ( eta => 'theta' ); my @alpha = ( alpha => 'beta' ); my @gamma = ( gamma => 'delta' ); my @all = (\@epsilon, \@eta, \@alpha, \@gamma); %args = map { @{$_} } @all; @defines = $base->arg_defines( %args ); my $defines_seen_ref = { map { $_ => 1 } @defines }; my $defines_expected_ref; for my $r (@all) { $defines_expected_ref->{"-D$r->[0]=$r->[1]"} = 1; } is_deeply( $defines_seen_ref, $defines_expected_ref, "arg_defines(): got expected defines", ); my $ordered_defines_expected_ref = [ sort keys %{$defines_expected_ref} ]; is_deeply(\@defines, $ordered_defines_expected_ref, "Got expected order of defines: RT #124106"); my $include_dirs_seen_ref = { map {$_ => 1} $base->arg_include_dirs( qw| alpha beta gamma | ) }; is_deeply( $include_dirs_seen_ref, { '-Ialpha' => 1, '-Ibeta' => 1, '-Igamma' => 1 }, "arg_include_dirs(): got expected include_dirs", ); is( '-c', $base->arg_nolink(), "arg_nolink(): got expected value" ); my $seen_ref = { map {$_ => 1} $base->arg_object_file('alpha') }; is_deeply( $seen_ref, { '-o' => 1, 'alpha' => 1 }, "arg_object_file(): got expected option flag and value", ); $seen_ref = { map {$_ => 1} $base->arg_share_object_file('alpha') }; my %exp = map {$_ => 1} $base->split_like_shell($base->{config}{lddlflags}); $exp{'-o'} = 1; $exp{'alpha'} = 1; is_deeply( $seen_ref, \%exp, "arg_share_object_file(): got expected option flag and value", ); $seen_ref = { map {$_ => 1} $base->arg_exec_file('alpha') }; is_deeply( $seen_ref, { '-o' => 1, 'alpha' => 1 }, "arg_exec_file(): got expected option flag and value", ); ok(! $base->split_like_shell(undef), "split_like_shell(): handled undefined argument as expected" ); my $array_ref = [ qw| alpha beta gamma | ]; my %split_seen = map { $_ => 1 } $base->split_like_shell($array_ref); %exp = ( alpha => 1, beta => 1, gamma => 1 ); is_deeply( \%split_seen, \%exp, "split_like_shell(): handled array ref as expected" ); { $cwd = cwd(); my $tdir = tempdir(CLEANUP => 1); my $subdir = File::Spec->catdir( $tdir, qw| alpha beta gamma delta epsilon zeta eta theta iota kappa lambda | ); mkpath($subdir, { mode => 0711 } ); chdir $subdir or die "Unable to change to temporary directory for testing"; local $ENV{PERL_CORE} = 1; my $capture = q{}; local $SIG{__WARN__} = sub { $capture = $_[0] }; my $expected_message = qr/PERL_CORE is set but I can't find your perl source!/; #' my $rv; $rv = $base->perl_src(); is( $rv, q{}, "perl_src(): returned empty string as expected" ); like( $capture, $expected_message, "perl_src(): got expected warning" ); $capture = q{}; my $config = File::Spec->catfile( $subdir, 'config_h.SH' ); touch_file($config); $rv = $base->perl_src(); is( $rv, q{}, "perl_src(): returned empty string as expected" ); like( $capture, $expected_message, "perl_src(): got expected warning" ); $capture = q{}; my $perlh = File::Spec->catfile( $subdir, 'perl.h' ); touch_file($perlh); $rv = $base->perl_src(); is( $rv, q{}, "perl_src(): returned empty string as expected" ); like( $capture, $expected_message, "perl_src(): got expected warning" ); $capture = q{}; my $libsubdir = File::Spec->catdir( $subdir, 'lib' ); mkpath($libsubdir, { mode => 0711 } ); my $exporter = File::Spec->catfile( $libsubdir, 'Exporter.pm' ); touch_file($exporter); $rv = $base->perl_src(); ok( -d $rv, "perl_src(): returned a directory" ); my $rp = Cwd::realpath($subdir); SKIP: { if ($^O eq 'dec_osf' && $rp =~ m[^/cluster/members/]) { skip "Tru64 cluster filesystem", 1; } # SKIP elsif ($^O eq 'os390') { # os390 also has cluster-like things called 'sysplexed'. So far, the # tail end of the path matches what we passed it (with some prepended # directories). So test for that. like( uc($rp), qr/\U\Q$rp\E$/, "perl_src(): identified directory" ); } else { is( uc($rv), uc($rp), "perl_src(): identified directory" ); } } is( $capture, q{}, "perl_src(): no warning, as expected" ); chdir $cwd or die "Unable to change from temporary directory after testing"; } my ($dl_file_out, $mksymlists_args); my $dlf = 'Kappa'; %args = ( dl_vars => [ qw| alpha beta gamma | ], dl_funcs => { 'Homer::Iliad' => [ qw(trojans greeks) ], 'Homer::Odyssey' => [ qw(travellers family suitors) ], }, dl_func_list => [ qw| delta epsilon | ], dl_imports => { zeta => 'eta', theta => 'iota' }, dl_name => 'Tk::Canvas', dl_base => 'Tk::Canvas.ext', dl_file => $dlf, dl_version => '7.7', ); ($dl_file_out, $mksymlists_args) = ExtUtils::CBuilder::Base::_prepare_mksymlists_args(\%args); is( $dl_file_out, $dlf, "_prepare_mksymlists_args(): Got expected name for dl_file" ); is_deeply( $mksymlists_args, { DL_VARS => [ qw| alpha beta gamma | ], DL_FUNCS => { 'Homer::Iliad' => [ qw(trojans greeks) ], 'Homer::Odyssey' => [ qw(travellers family suitors) ], }, FUNCLIST => [ qw| delta epsilon | ], IMPORTS => { zeta => 'eta', theta => 'iota' }, NAME => 'Tk::Canvas', DLBASE => 'Tk::Canvas.ext', FILE => $dlf, VERSION => '7.7', }, "_prepare_mksymlists_args(): got expected arguments for Mksymlists", ); $dlf = 'Canvas'; %args = ( dl_name => 'Tk::Canvas', dl_base => 'Tk::Canvas.ext', ); ($dl_file_out, $mksymlists_args) = ExtUtils::CBuilder::Base::_prepare_mksymlists_args(\%args); is( $dl_file_out, $dlf, "_prepare_mksymlists_args(): got expected name for dl_file" ); is_deeply( $mksymlists_args, { DL_VARS => [], DL_FUNCS => {}, FUNCLIST => [], IMPORTS => {}, NAME => 'Tk::Canvas', DLBASE => 'Tk::Canvas.ext', FILE => $dlf, VERSION => '0.0', }, "_prepare_mksymlists_args(): got expected arguments for Mksymlists", ); my %testvars = ( CFLAGS => 'ccflags', LDFLAGS => 'ldflags', ); while (my ($VAR, $var) = each %testvars) { local $ENV{$VAR}; $base = ExtUtils::CBuilder::Base->new( quiet => 1 ); ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" ); isa_ok( $base, 'ExtUtils::CBuilder::Base' ); like($base->{config}{$var}, qr/\Q$Config{$var}/, "honours $var from Config.pm"); $ENV{$VAR} = "-foo -bar"; $base = ExtUtils::CBuilder::Base->new( quiet => 1 ); ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" ); isa_ok( $base, 'ExtUtils::CBuilder::Base' ); like($base->{config}{$var}, qr/\Q$ENV{$VAR}/, "honours $VAR from the environment"); like($base->{config}{$var}, qr/\Q$Config{$var}/, "doesn't override $var from Config.pm with $VAR from the environment"); } ##### for ($source_file, $object_file, $lib_file) { next unless defined $_; tr/"'//d; #" 1 while unlink; } pass("Completed all tests in $0"); if ($^O eq 'VMS') { 1 while unlink 'BASET.LIS'; 1 while unlink 'BASET.OPT'; } sub create_c_source_file { my $source_file = shift; open my $FH, '>', $source_file or die "Can't create $source_file: $!"; print $FH "int boot_baset(void) { return 1; }\n"; close $FH; } sub touch_file { my $f = shift; open my $FH, '>', $f or die "Can't create $f: $!"; print $FH "\n"; close $FH; return $f; } ExtUtils-CBuilder-0.280236/t/03-cplusplus.t0000644000175000017500000000262714011761123016561 0ustar ambsambs#! perl -w use strict; use Test::More; BEGIN { if ($^O eq 'VMS') { # So we can get the return value of system() require vmsish; import vmsish; } } use ExtUtils::CBuilder; use File::Spec; # TEST does not like extraneous output my $quiet = $ENV{PERL_CORE} && !$ENV{HARNESS_ACTIVE}; my ($source_file, $object_file, $lib_file); my $b = ExtUtils::CBuilder->new(quiet => $quiet); # test plan if ( ! $b->have_cplusplus ) { plan skip_all => "no compiler available for testing"; } else { plan tests => 7; } ok $b, "created EU::CB object"; ok $b->have_cplusplus, "have_cplusplus"; $source_file = File::Spec->catfile('t', 'cplust.cc'); { open my $FH, '>', $source_file or die "Can't create $source_file: $!"; print $FH "class Bogus { public: int boot_cplust() { return 1; } };\n"; close $FH; } ok -e $source_file, "source file '$source_file' created"; $object_file = $b->object_file($source_file); ok 1; is $object_file, $b->compile(source => $source_file, 'C++' => 1); $lib_file = $b->lib_file($object_file, module_name => 'cplust'); ok 1; my ($lib, @temps) = $b->link(objects => $object_file, module_name => 'cplust'); $lib =~ tr/"'//d; $_ = File::Spec->rel2abs($_) for $lib_file, $lib; is $lib_file, $lib; for ($source_file, $object_file, $lib_file) { tr/"'//d; 1 while unlink; } if ($^O eq 'VMS') { 1 while unlink 'CPLUST.LIS'; 1 while unlink 'CPLUST.OPT'; } ExtUtils-CBuilder-0.280236/t/01-basic.t0000644000175000017500000000440714011761123015604 0ustar ambsambs#! perl -w use strict; use Test::More; BEGIN { if ($^O eq 'VMS') { # So we can get the return value of system() require vmsish; import vmsish; } } use ExtUtils::CBuilder; use File::Spec; # TEST does not like extraneous output my $quiet = $ENV{PERL_CORE} && !$ENV{HARNESS_ACTIVE}; my ($source_file, $object_file, $lib_file); my $b = ExtUtils::CBuilder->new(quiet => $quiet); # test plan if ( ! $b->have_compiler ) { plan skip_all => "no compiler available for testing"; } else { plan tests => 12; } ok $b, "created EU::CB object"; ok $b->have_compiler, "have_compiler"; $source_file = File::Spec->catfile('t', 'basict.c'); { local *FH; open FH, '>', $source_file or die "Can't create $source_file: $!"; print FH "int boot_basict(void) { return 1; }\n"; close FH; } ok -e $source_file, "source file '$source_file' created"; $object_file = $b->object_file($source_file); ok 1; is $object_file, $b->compile(source => $source_file); $lib_file = $b->lib_file($object_file, module_name => 'basict'); ok 1; my ($lib, @temps) = $b->link(objects => $object_file, module_name => 'basict'); $lib =~ tr/"'//d; $_ = File::Spec->rel2abs($_) for $lib_file, $lib; is $lib_file, $lib; for ($source_file, $object_file, $lib_file) { tr/"'//d; 1 while unlink; } if ($^O eq 'VMS') { 1 while unlink 'BASICT.LIS'; 1 while unlink 'BASICT.OPT'; } my @words = $b->split_like_shell(' foo bar'); SKIP: { skip "MSWindows", 3 if $^O =~ m/MSWin/; is( @words, 2 ); is( $words[0], 'foo' ); is( $words[1], 'bar' ); } # include_dirs should be settable as string or list { package Sub; our @ISA = ('ExtUtils::CBuilder'); my $saw = 0; sub do_system { if ($^O eq "MSWin32") { # ExtUtils::CBuilder::MSVC::write_compiler_script() puts the # include_dirs into a response file and not the commandline for (@_) { next unless /^\@"(.*)"$/; open(my $fh, "<", $1) or next; local $/; $saw = 1 if <$fh> =~ /another dir/; last; } } $saw = 1 if grep {$_ =~ /another dir/} @_; return 1; } package main; my $s = Sub->new(); $s->compile(source => 'foo', include_dirs => 'another dir'); ok $saw; $saw = 0; $s->compile(source => 'foo', include_dirs => ['a dir', 'another dir']); ok $saw; } ExtUtils-CBuilder-0.280236/t/02-link.t0000644000175000017500000000463414011761123015463 0ustar ambsambs#! perl -w use strict; use Test::More; BEGIN { if ($^O eq 'VMS') { # So we can get the return value of system() require vmsish; import vmsish; } } use ExtUtils::CBuilder; use File::Spec; # TEST does not like extraneous output my $quiet = $ENV{PERL_CORE} && !$ENV{HARNESS_ACTIVE}; my ($source_file, $object_file, $exe_file); my $b = ExtUtils::CBuilder->new(quiet => $quiet); # test plan if ($^O =~ / ^ ( MSWin32 | os390 ) $ /xi) { plan skip_all => "link_executable() is not implemented yet on $^O"; } elsif ( ! $b->have_compiler ) { plan skip_all => "no compiler available for testing"; } else { plan tests => 8; } ok $b, "created EU::CB object"; $source_file = File::Spec->catfile('t', 'linkt.c'); { open my $FH, '>', $source_file or die "Can't create $source_file: $!"; print $FH "int main(void) { return 11; }\n"; close $FH; } ok -e $source_file, "generated '$source_file'"; # Compile eval { $object_file = $b->compile(source => $source_file) }; is $@, q{}, "no exception from compilation"; ok -e $object_file, "found object file"; # Link SKIP: { skip "error compiling source", 4 unless -e $object_file; my @temps; eval { ($exe_file, @temps) = $b->link_executable(objects => $object_file) }; is $@, q{}, "no exception from linking"; ok -e $exe_file, "found executable file"; ok -x $exe_file, "executable file appears to be executable"; if ($^O eq 'os2') { # Analogue of LDLOADPATH... # Actually, not needed now, since we do not link with the generated DLL my $old = OS2::extLibpath(); # [builtin function] $old = ";$old" if defined $old and length $old; # To pass the sanity check, components must have backslashes... OS2::extLibpath_set(".\\$old"); } # Try the executable my $ec = my_system($exe_file); is( $ec, 11, "got expected exit code from executable" ) or diag( $ec == -1 ? "Could not run '$exe_file': $!\n" : "Unexpected exit code '$ec'\n"); } # Clean up for ($source_file, $object_file, $exe_file) { tr/"'//d; 1 while unlink; } if ($^O eq 'VMS') { 1 while unlink 'LINKT.LIS'; 1 while unlink 'LINKT.OPT'; } sub my_system { my $cmd = shift; my $ec; if ($^O eq 'VMS') { # Preserve non-posixified status and don't bit shift the result # because we're running under "use vmsish"; $ec = system("mcr $cmd"); return $ec; } else { $ec = system($cmd); return $ec == -1 ? -1 : $ec >> 8; } } ExtUtils-CBuilder-0.280236/t/00-have-compiler.t0000644000175000017500000000500714011761123017252 0ustar ambsambs#! perl -w use File::Spec; my $perl; BEGIN { $perl = File::Spec->rel2abs($^X); $perl = qq{"$perl"}; # So it doesn't fail when there are spaces. } use strict; use Test::More; BEGIN { if ($^O eq 'VMS') { # So we can get the return value of system() require vmsish; import vmsish; } } plan tests => 7; require_ok "ExtUtils::CBuilder"; my $b = eval { ExtUtils::CBuilder->new(quiet => 1) }; ok( $b, "got CBuilder object" ) or diag $@; # test missing compiler { my $b1 = ExtUtils::CBuilder->new(quiet => 1); configure_fake_missing_compilers($b1); # This will fork a child that will print # 'Can't exec "djaadjfkadjkfajdf"' # or similar on STDERR; so make sure fd2 is temporarily redirected to # oblivion before the fork open(OLDERR, ">&STDERR") or die "Can't dup STDERR: $!"; open(STDERR, ">", File::Spec->devnull()) or die "Can't redirect STDERR: $!"; my $res = $b1->have_compiler; open(STDERR, ">&OLDERR") or die "Can't restore STDERR: $!"; close(OLDERR); is($res, 0, "have_compiler: fake missing cc" ); } { my $b2 = ExtUtils::CBuilder->new(quiet => 1); configure_fake_missing_compilers($b2); open(OLDERR, ">&STDERR") or die "Can't dup STDERR: $!"; open(STDERR, ">", File::Spec->devnull()) or die "Can't redirect STDERR: $!"; my $res = $b2->have_cplusplus; open(STDERR, ">&OLDERR") or die "Can't restore STDERR: $!"; close(OLDERR); is($res, 0, "have_cplusplus: fake missing c++" ); } # test found compiler { my $b3 = ExtUtils::CBuilder->new(quiet => 1); configure_fake_present_compilers($b3); is( $b3->have_compiler, 1, "have_compiler: fake present cc" ); } { my $b4 = ExtUtils::CBuilder->new(quiet => 1); configure_fake_present_compilers($b4); is( $b4->have_cplusplus, 1, "have_cpp_compiler: fake present c++" ); } # test missing cpp compiler # test one non-exported subroutine { my $type = ExtUtils::CBuilder::os_type(); if ($type) { pass( "OS type $type located for $^O" ); } else { pass( "OS type not yet listed for $^O" ); } } sub configure_fake_missing_compilers { my $b = shift; my $bogus_path = 'djaadjfkadjkfajdf'; $b->{config}{cc} = $bogus_path; $b->{config}{ld} = $bogus_path; $b->{have_cc} = undef; $b->{have_cxx} = undef; } sub configure_fake_present_compilers { my $b = shift; my $run_perl = "$perl -e1 --"; $b->{config}{cc} = $run_perl; $b->{config}{ld} = $run_perl; $b->{config}{cxx} = $run_perl; $b->{have_cc} = undef; $b->{have_cxx} = undef; } ExtUtils-CBuilder-0.280236/lib/0000775000175000017500000000000014011761123014420 5ustar ambsambsExtUtils-CBuilder-0.280236/lib/ExtUtils/0000775000175000017500000000000014011761123016201 5ustar ambsambsExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/0000775000175000017500000000000014011761123017672 5ustar ambsambsExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Base.pm0000644000175000017500000002504414011761123021105 0ustar ambsambspackage ExtUtils::CBuilder::Base; use strict; use warnings; use File::Spec; use File::Basename; use Cwd (); use Config; use Text::ParseWords; use IPC::Cmd qw(can_run); use File::Temp qw(tempfile); our $VERSION = '0.280236'; # VERSION # More details about C/C++ compilers: # http://developers.sun.com/sunstudio/documentation/product/compiler.jsp # http://gcc.gnu.org/ # http://publib.boulder.ibm.com/infocenter/comphelp/v101v121/index.jsp # http://msdn.microsoft.com/en-us/vstudio/default.aspx my %cc2cxx = ( # first line order is important to support wrappers like in pkgsrc cc => [ 'c++', 'CC', 'aCC', 'cxx', ], # Sun Studio, HP ANSI C/C++ Compilers gcc => [ 'g++' ], # GNU Compiler Collection xlc => [ 'xlC' ], # IBM C/C++ Set, xlc without thread-safety xlc_r => [ 'xlC_r' ], # IBM C/C++ Set, xlc with thread-safety cl => [ 'cl' ], # Microsoft Visual Studio ); sub new { my $class = shift; my $self = bless {@_}, $class; $self->{properties}{perl} = $class->find_perl_interpreter or warn "Warning: Can't locate your perl binary"; while (my ($k,$v) = each %Config) { $self->{config}{$k} = $v unless exists $self->{config}{$k}; } $self->{config}{cc} = $ENV{CC} if defined $ENV{CC}; $self->{config}{ccflags} = join(" ", $self->{config}{ccflags}, $ENV{CFLAGS}) if defined $ENV{CFLAGS}; $self->{config}{cxx} = $ENV{CXX} if defined $ENV{CXX}; $self->{config}{cxxflags} = $ENV{CXXFLAGS} if defined $ENV{CXXFLAGS}; $self->{config}{ld} = $ENV{LD} if defined $ENV{LD}; $self->{config}{ldflags} = join(" ", $self->{config}{ldflags}, $ENV{LDFLAGS}) if defined $ENV{LDFLAGS}; unless ( exists $self->{config}{cxx} ) { my ($ccbase, $ccpath, $ccsfx ) = fileparse($self->{config}{cc}, qr/\.[^.]*/); ## If the path is just "cc", fileparse returns $ccpath as "./" $ccpath = "" if $self->{config}{cc} =~ /^\Q$ccbase$ccsfx\E$/; foreach my $cxx (@{$cc2cxx{$ccbase}}) { my $cxx1 = File::Spec->catfile( $ccpath, $cxx . $ccsfx); if( can_run( $cxx1 ) ) { $self->{config}{cxx} = $cxx1; last; } my $cxx2 = $cxx . $ccsfx; if( can_run( $cxx2 ) ) { $self->{config}{cxx} = $cxx2; last; } if( can_run( $cxx ) ) { $self->{config}{cxx} = $cxx; last; } } unless ( exists $self->{config}{cxx} ) { $self->{config}{cxx} = $self->{config}{cc}; my $cflags = $self->{config}{ccflags}; $self->{config}{cxxflags} = '-x c++'; $self->{config}{cxxflags} .= " $cflags" if defined $cflags; } } return $self; } sub find_perl_interpreter { my $perl; File::Spec->file_name_is_absolute($perl = $^X) or -f ($perl = $Config::Config{perlpath}) or ($perl = $^X); # XXX how about using IPC::Cmd::can_run here? return $perl; } sub add_to_cleanup { my $self = shift; foreach (@_) { $self->{files_to_clean}{$_} = 1; } } sub cleanup { my $self = shift; foreach my $file (keys %{$self->{files_to_clean}}) { unlink $file; } } sub get_config { return %{ $_[0]->{config} }; } sub object_file { my ($self, $filename) = @_; # File name, minus the suffix (my $file_base = $filename) =~ s/\.[^.]+$//; return "$file_base$self->{config}{obj_ext}"; } sub arg_include_dirs { my $self = shift; return map {"-I$_"} @_; } sub arg_nolink { '-c' } sub arg_object_file { my ($self, $file) = @_; return ('-o', $file); } sub arg_share_object_file { my ($self, $file) = @_; return ($self->split_like_shell($self->{config}{lddlflags}), '-o', $file); } sub arg_exec_file { my ($self, $file) = @_; return ('-o', $file); } sub arg_defines { my ($self, %args) = @_; return map "-D$_=$args{$_}", sort keys %args; } sub compile { my ($self, %args) = @_; die "Missing 'source' argument to compile()" unless defined $args{source}; my $cf = $self->{config}; # For convenience my $object_file = $args{object_file} ? $args{object_file} : $self->object_file($args{source}); my $include_dirs_ref = (exists($args{include_dirs}) && ref($args{include_dirs}) ne "ARRAY") ? [ $args{include_dirs} ] : $args{include_dirs}; my @include_dirs = $self->arg_include_dirs( @{ $include_dirs_ref || [] }, $self->perl_inc(), ); my @defines = $self->arg_defines( %{$args{defines} || {}} ); my @extra_compiler_flags = $self->split_like_shell($args{extra_compiler_flags}); my @cccdlflags = $self->split_like_shell($cf->{cccdlflags}); my @ccflags = $self->split_like_shell($args{'C++'} ? $cf->{cxxflags} : $cf->{ccflags}); my @optimize = $self->split_like_shell($cf->{optimize}); my @flags = ( @include_dirs, @defines, @cccdlflags, @extra_compiler_flags, $self->arg_nolink, @ccflags, @optimize, $self->arg_object_file($object_file), ); my @cc = $self->split_like_shell($args{'C++'} ? $cf->{cxx} : $cf->{cc}); $self->do_system(@cc, @flags, $args{source}) or die "error building $object_file from '$args{source}'"; return $object_file; } sub have_compiler { my ($self, $is_cplusplus) = @_; my $have_compiler_flag = $is_cplusplus ? "have_cxx" : "have_cc"; my $suffix = $is_cplusplus ? ".cc" : ".c"; return $self->{$have_compiler_flag} if defined $self->{$have_compiler_flag}; my $result; my $attempts = 3; # tmpdir has issues for some people so fall back to current dir # don't clobber existing files (rare, but possible) my ( $FH, $tmpfile ) = tempfile( "compilet-XXXXX", SUFFIX => $suffix ); binmode $FH; if ( $is_cplusplus ) { print $FH "class Bogus { public: int boot_compilet() { return 1; } };\n"; } else { print $FH "int boot_compilet() { return 1; }\n"; } close $FH; my ($obj_file, @lib_files); eval { local $^W = 0; local $self->{quiet} = 1; $obj_file = $self->compile('C++' => $is_cplusplus, source => $tmpfile); @lib_files = $self->link(objects => $obj_file, module_name => 'compilet'); }; $result = $@ ? 0 : 1; foreach (grep defined, $tmpfile, $obj_file, @lib_files) { 1 while unlink; } return $self->{$have_compiler_flag} = $result; } sub have_cplusplus { push @_, 1; goto &have_compiler; } sub lib_file { my ($self, $dl_file, %args) = @_; $dl_file =~ s/\.[^.]+$//; $dl_file =~ tr/"//d; if (defined $args{module_name} and length $args{module_name}) { # Need to create with the same name as DynaLoader will load with. require DynaLoader; if (defined &DynaLoader::mod2fname) { my $lib = DynaLoader::mod2fname([split /::/, $args{module_name}]); my ($dev, $lib_dir, undef) = File::Spec->splitpath($dl_file); $dl_file = File::Spec->catpath($dev, $lib_dir, $lib); } } $dl_file .= ".$self->{config}{dlext}"; return $dl_file; } sub exe_file { my ($self, $dl_file) = @_; $dl_file =~ s/\.[^.]+$//; $dl_file =~ tr/"//d; return "$dl_file$self->{config}{_exe}"; } sub need_prelink { 0 } sub extra_link_args_after_prelink { return } sub prelink { my ($self, %args) = @_; my ($dl_file_out, $mksymlists_args) = _prepare_mksymlists_args(\%args); require ExtUtils::Mksymlists; # dl. abbrev for dynamic library ExtUtils::Mksymlists::Mksymlists( %{ $mksymlists_args } ); # Mksymlists will create one of these files return grep -e, map "$dl_file_out.$_", qw(ext def opt); } sub _prepare_mksymlists_args { my $args = shift; ($args->{dl_file} = $args->{dl_name}) =~ s/.*::// unless $args->{dl_file}; my %mksymlists_args = ( DL_VARS => $args->{dl_vars} || [], DL_FUNCS => $args->{dl_funcs} || {}, FUNCLIST => $args->{dl_func_list} || [], IMPORTS => $args->{dl_imports} || {}, NAME => $args->{dl_name}, # Name of the Perl module DLBASE => $args->{dl_base}, # Basename of DLL file FILE => $args->{dl_file}, # Dir + Basename of symlist file VERSION => (defined $args->{dl_version} ? $args->{dl_version} : '0.0'), ); return ($args->{dl_file}, \%mksymlists_args); } sub link { my ($self, %args) = @_; return $self->_do_link('lib_file', lddl => 1, %args); } sub link_executable { my ($self, %args) = @_; return $self->_do_link('exe_file', lddl => 0, %args); } sub _do_link { my ($self, $type, %args) = @_; my $cf = $self->{config}; # For convenience my $objects = delete $args{objects}; $objects = [$objects] unless ref $objects; my $out = $args{$type} || $self->$type($objects->[0], %args); my @temp_files; @temp_files = $self->prelink(%args, dl_name => $args{module_name}) if $args{lddl} && $self->need_prelink; my @linker_flags = ( $self->split_like_shell($args{extra_linker_flags}), $self->extra_link_args_after_prelink( %args, dl_name => $args{module_name}, prelink_res => \@temp_files ) ); my @output = $args{lddl} ? $self->arg_share_object_file($out) : $self->arg_exec_file($out); my @shrp = $self->split_like_shell($cf->{shrpenv}); my @ld = $self->split_like_shell($cf->{ld}); $self->do_system(@shrp, @ld, @output, @$objects, @linker_flags) or die "error building $out from @$objects"; return wantarray ? ($out, @temp_files) : $out; } sub do_system { my ($self, @cmd) = @_; print "@cmd\n" if !$self->{quiet}; return !system(@cmd); } sub split_like_shell { my ($self, $string) = @_; return () unless defined($string); return @$string if UNIVERSAL::isa($string, 'ARRAY'); $string =~ s/^\s+|\s+$//g; return () unless length($string); # Text::ParseWords replaces all 'escaped' characters with themselves, which completely # breaks paths under windows. As such, we forcibly replace backwards slashes with forward # slashes on windows. $string =~ s@\\@/@g if $^O eq 'MSWin32'; return Text::ParseWords::shellwords($string); } # if building perl, perl's main source directory sub perl_src { # N.B. makemaker actually searches regardless of PERL_CORE, but # only squawks at not finding it if PERL_CORE is set return unless $ENV{PERL_CORE}; my $Updir = File::Spec->updir; my $dir = File::Spec->curdir; # Try up to 5 levels upwards for (0..10) { if ( -f File::Spec->catfile($dir,"config_h.SH") && -f File::Spec->catfile($dir,"perl.h") && -f File::Spec->catfile($dir,"lib","Exporter.pm") ) { return Cwd::realpath( $dir ); } $dir = File::Spec->catdir($dir, $Updir); } warn "PERL_CORE is set but I can't find your perl source!\n"; return ''; # return empty string if $ENV{PERL_CORE} but can't find dir ??? } # directory of perl's include files sub perl_inc { my $self = shift; $self->perl_src() || File::Spec->catdir($self->{config}{archlibexp},"CORE"); } sub DESTROY { my $self = shift; local($., $@, $!, $^E, $?); $self->cleanup(); } 1; # vim: ts=2 sw=2 et: ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/0000775000175000017500000000000014011761123021456 5ustar ambsambsExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/os2.pm0000644000175000017500000000455314011761123022524 0ustar ambsambspackage ExtUtils::CBuilder::Platform::os2; use warnings; use strict; use ExtUtils::CBuilder::Platform::Unix; our $VERSION = '0.280236'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 } sub prelink { # Generate import libraries (XXXX currently near .DEF; should be near DLL!) my $self = shift; my %args = @_; my @res = $self->SUPER::prelink(%args); die "Unexpected number of DEF files" unless @res == 1; die "Can't find DEF file in the output" unless $res[0] =~ m,^(.*)\.def$,si; my $libname = "$1$self->{config}{lib_ext}"; # Put .LIB file near .DEF file $self->do_system('emximp', '-o', $libname, $res[0]) or die "emxexp: res=$?"; return (@res, $libname); } sub _do_link { my $self = shift; my ($how, %args) = @_; if ($how eq 'lib_file' and (defined $args{module_name} and length $args{module_name})) { # Now know the basename, find directory parts via lib_file, or objects my $objs = ( (ref $args{objects}) ? $args{objects} : [$args{objects}] ); my $near_obj = $self->lib_file(@$objs); my $exp_dir = ($near_obj =~ m,(.*)[/\\],s ? "$1/" : '' ); $args{dl_file} = $1 if $near_obj =~ m,(.*)\.,s; # put ExportList near OBJ # XXX _do_link does not have place to put libraries? push @$objs, $self->perl_inc() . "/libperl$self->{config}{lib_ext}"; $args{objects} = $objs; } # Some 'env' do exec(), thus return too early when run from ksh; # To avoid 'env', remove (useless) shrpenv local $self->{config}{shrpenv} = ''; return $self->SUPER::_do_link($how, %args); } sub extra_link_args_after_prelink { # Add .DEF file to the link line my ($self, %args) = @_; my @DEF = grep /\.def$/i, @{$args{prelink_res}}; die "More than one .def files created by 'prelink' stage" if @DEF > 1; # XXXX No "$how" argument here, so how to test for dynamic link? die "No .def file created by 'prelink' stage" unless @DEF or not @{$args{prelink_res}}; my @after_libs = ($OS2::is_aout ? () : $self->perl_inc() . "/libperl_override$self->{config}{lib_ext}"); # , "-L", "-lperl" (@after_libs, @DEF); } sub link_executable { # ldflags is not expecting .exe extension given on command line; remove -Zexe my $self = shift; local $self->{config}{ldflags} = $self->{config}{ldflags}; $self->{config}{ldflags} =~ s/(?SUPER::link_executable(@_); } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/cygwin.pm0000644000175000017500000000164414011761123023317 0ustar ambsambspackage ExtUtils::CBuilder::Platform::cygwin; use warnings; use strict; use File::Spec; use ExtUtils::CBuilder::Platform::Unix; our $VERSION = '0.280236'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); # TODO: If a specific exe_file name is requested, if the exe created # doesn't have that name, we might want to rename it. Apparently asking # for an exe of "foo" might result in "foo.exe". Alternatively, we should # make sure the return value is correctly "foo.exe". # C.f http://rt.cpan.org/Public/Bug/Display.html?id=41003 sub link_executable { my $self = shift; return $self->SUPER::link_executable(@_); } sub link { my ($self, %args) = @_; my $lib = $self->{config}{useshrplib} ? 'libperl.dll.a' : 'libperl.a'; $args{extra_linker_flags} = [ File::Spec->catfile($self->perl_inc(), $lib), $self->split_like_shell($args{extra_linker_flags}) ]; return $self->SUPER::link(%args); } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/android.pm0000644000175000017500000000230014011761123023425 0ustar ambsambspackage ExtUtils::CBuilder::Platform::android; use warnings; use strict; use File::Spec; use ExtUtils::CBuilder::Platform::Unix; use Config; our $VERSION = '0.280236'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); # The Android linker will not recognize symbols from # libperl unless the module explicitly depends on it. sub link { my ($self, %args) = @_; if ($self->{config}{useshrplib} eq 'true') { $args{extra_linker_flags} = [ $self->split_like_shell($args{extra_linker_flags}), '-L' . $self->perl_inc(), '-lperl', $self->split_like_shell($Config{perllibs}), ]; } # Several modules on CPAN rather rightfully expect being # able to pass $so_file to DynaLoader::dl_load_file and # have it Just Work. However, $so_file will more likely # than not be a relative path, and unless the module # author subclasses MakeMaker/Module::Build to modify # LD_LIBRARY_PATH, which would be insane, Android's linker # won't find the .so # So we make this all work by returning an absolute path. my($so_file, @so_tmps) = $self->SUPER::link(%args); $so_file = File::Spec->rel2abs($so_file); return wantarray ? ($so_file, @so_tmps) : $so_file; } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/dec_osf.pm0000644000175000017500000000065414011761123023421 0ustar ambsambspackage ExtUtils::CBuilder::Platform::dec_osf; use warnings; use strict; use ExtUtils::CBuilder::Platform::Unix; use File::Spec; our $VERSION = '0.280236'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub link_executable { my $self = shift; # $Config{ld} is 'ld' but that won't work: use the cc instead. local $self->{config}{ld} = $self->{config}{cc}; return $self->SUPER::link_executable(@_); } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/Unix.pm0000644000175000017500000000202714011761123022736 0ustar ambsambspackage ExtUtils::CBuilder::Platform::Unix; use warnings; use strict; use ExtUtils::CBuilder::Base; our $VERSION = '0.280236'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Base); sub link_executable { my $self = shift; # On some platforms (which ones??) $Config{cc} seems to be a better # bet for linking executables than $Config{ld}. Cygwin is a notable # exception. local $self->{config}{ld} = $self->{config}{cc} . " " . $self->{config}{ldflags}; return $self->SUPER::link_executable(@_); } sub link { my $self = shift; my $cf = $self->{config}; # Some platforms (notably Mac OS X 10.3, but some others too) expect # the syntax "FOO=BAR /bin/command arg arg" to work in %Config # (notably $Config{ld}). It usually works in system(SCALAR), but we # use system(LIST). We fix it up here with 'env'. local $cf->{ld} = $cf->{ld}; if (ref $cf->{ld}) { unshift @{$cf->{ld}}, 'env' if $cf->{ld}[0] =~ /^\s*\w+=/; } else { $cf->{ld} =~ s/^(\s*\w+=)/env $1/; } return $self->SUPER::link(@_); } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/VMS.pm0000644000175000017500000002406014011761123022461 0ustar ambsambspackage ExtUtils::CBuilder::Platform::VMS; use warnings; use strict; use ExtUtils::CBuilder::Base; our $VERSION = '0.280236'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Base); use File::Spec::Functions qw(catfile catdir); use Config; # We do prelink, but don't want the parent to redo it. sub need_prelink { 0 } sub arg_defines { my ($self, %args) = @_; s/"/""/g foreach values %args; my @config_defines; # VMS can only have one define qualifier; add the one from config, if any. if ($self->{config}{ccflags} =~ s{/ def[^=]+ =+ \(? ([^\/\)]*) } {}ix) { push @config_defines, $1; } return '' unless keys(%args) || @config_defines; return ('/define=(' . join(',', @config_defines, map "\"$_" . ( length($args{$_}) ? "=$args{$_}" : '') . "\"", sort keys %args) . ')'); } sub arg_include_dirs { my ($self, @dirs) = @_; # VMS can only have one include list, add the one from config. if ($self->{config}{ccflags} =~ s{/inc[^=]+(?:=)+(?:\()?([^\/\)]*)} {}i) { unshift @dirs, $1; } return unless @dirs; return ('/include=(' . join(',', @dirs) . ')'); } # We override the compile method because we consume the includes and defines # parts of ccflags in the process of compiling but don't save those parts # anywhere, so $self->{config}{ccflags} needs to be reset for each compile # operation. sub compile { my ($self, %args) = @_; $self->{config}{ccflags} = $Config{ccflags}; $self->{config}{ccflags} = $ENV{CFLAGS} if defined $ENV{CFLAGS}; return $self->SUPER::compile(%args); } sub _do_link { my ($self, $type, %args) = @_; my $objects = delete $args{objects}; $objects = [$objects] unless ref $objects; if ($args{lddl}) { # prelink will call Mksymlists, which creates the extension-specific # linker options file and populates it with the boot symbol. my @temp_files = $self->prelink(%args, dl_name => $args{module_name}); # We now add the rest of what we need to the linker options file. We # should replicate the functionality of C, # but there is as yet no infrastructure for handling object libraries, # so for now we depend on object files being listed individually on the # command line, which should work for simple cases. We do bring in our # own version of C so that any additional # libraries (including PERLSHR) can be added to the options file. my @optlibs = $self->_liblist_ext( $args{'libs'} ); my $optfile = 'sys$disk:[]' . $temp_files[0]; open my $opt_fh, '>>', $optfile or die "_do_link: Unable to open $optfile: $!"; for my $lib (@optlibs) {print $opt_fh "$lib\n" if length $lib } close $opt_fh; $objects->[-1] .= ','; push @$objects, $optfile . '/OPTIONS,'; # This one not needed for DEC C, but leave for completeness. push @$objects, $self->perl_inc() . 'perlshr_attr.opt/OPTIONS'; } return $self->SUPER::_do_link($type, %args, objects => $objects); } sub arg_nolink { return; } sub arg_object_file { my ($self, $file) = @_; return "/obj=$file"; } sub arg_exec_file { my ($self, $file) = @_; return ("/exe=$file"); } sub arg_share_object_file { my ($self, $file) = @_; return ("$self->{config}{lddlflags}=$file"); } # The following is reproduced almost verbatim from ExtUtils::Liblist::Kid::_vms_ext. # We can't just call that because it's tied up with the MakeMaker object hierarchy. sub _liblist_ext { my($self, $potential_libs,$verbose,$give_libs) = @_; $verbose ||= 0; my(@crtls,$crtlstr); @crtls = ( ($self->{'config'}{'ldflags'} =~ m-/Debug-i ? $self->{'config'}{'dbgprefix'} : '') . 'PerlShr/Share' ); push(@crtls, grep { not /\(/ } split /\s+/, $self->{'config'}{'perllibs'}); push(@crtls, grep { not /\(/ } split /\s+/, $self->{'config'}{'libc'}); # In general, we pass through the basic libraries from %Config unchanged. # The one exception is that if we're building in the Perl source tree, and # a library spec could be resolved via a logical name, we go to some trouble # to ensure that the copy in the local tree is used, rather than one to # which a system-wide logical may point. if ($self->perl_src) { my($lib,$locspec,$type); foreach $lib (@crtls) { if (($locspec,$type) = $lib =~ m{^([\w\$-]+)(/\w+)?} and $locspec =~ /perl/i) { if (lc $type eq '/share') { $locspec .= $self->{'config'}{'exe_ext'}; } elsif (lc $type eq '/library') { $locspec .= $self->{'config'}{'lib_ext'}; } else { $locspec .= $self->{'config'}{'obj_ext'}; } $locspec = catfile($self->perl_src, $locspec); $lib = "$locspec$type" if -e $locspec; } } } $crtlstr = @crtls ? join(' ',@crtls) : ''; unless ($potential_libs) { warn "Result:\n\tEXTRALIBS: \n\tLDLOADLIBS: $crtlstr\n" if $verbose; return ('', '', $crtlstr, '', ($give_libs ? [] : ())); } my(@dirs,@libs,$dir,$lib,%found,@fndlibs,$ldlib); my $cwd = cwd(); my($so,$lib_ext,$obj_ext) = @{$self->{'config'}}{'so','lib_ext','obj_ext'}; # List of common Unix library names and their VMS equivalents # (VMS equivalent of '' indicates that the library is automatically # searched by the linker, and should be skipped here.) my(@flibs, %libs_seen); my %libmap = ( 'm' => '', 'f77' => '', 'F77' => '', 'V77' => '', 'c' => '', 'malloc' => '', 'crypt' => '', 'resolv' => '', 'c_s' => '', 'socket' => '', 'X11' => 'DECW$XLIBSHR', 'Xt' => 'DECW$XTSHR', 'Xm' => 'DECW$XMLIBSHR', 'Xmu' => 'DECW$XMULIBSHR'); warn "Potential libraries are '$potential_libs'\n" if $verbose; # First, sort out directories and library names in the input foreach $lib (split ' ',$potential_libs) { push(@dirs,$1), next if $lib =~ /^-L(.*)/; push(@dirs,$lib), next if $lib =~ /[:>\]]$/; push(@dirs,$lib), next if -d $lib; push(@libs,$1), next if $lib =~ /^-l(.*)/; push(@libs,$lib); } push(@dirs,split(' ',$self->{'config'}{'libpth'})); # Now make sure we've got VMS-syntax absolute directory specs # (We don't, however, check whether someone's hidden a relative # path in a logical name.) foreach $dir (@dirs) { unless (-d $dir) { warn "Skipping nonexistent Directory $dir\n" if $verbose > 1; $dir = ''; next; } warn "Resolving directory $dir\n" if $verbose; if (!File::Spec->file_name_is_absolute($dir)) { $dir = catdir($cwd,$dir); } } @dirs = grep { length($_) } @dirs; unshift(@dirs,''); # Check each $lib without additions first LIB: foreach $lib (@libs) { if (exists $libmap{$lib}) { next unless length $libmap{$lib}; $lib = $libmap{$lib}; } my(@variants,$variant,$cand); my($ctype) = ''; # If we don't have a file type, consider it a possibly abbreviated name and # check for common variants. We try these first to grab libraries before # a like-named executable image (e.g. -lperl resolves to perlshr.exe # before perl.exe). if ($lib !~ /\.[^:>\]]*$/) { push(@variants,"${lib}shr","${lib}rtl","${lib}lib"); push(@variants,"lib$lib") if $lib !~ /[:>\]]/; } push(@variants,$lib); warn "Looking for $lib\n" if $verbose; foreach $variant (@variants) { my($fullname, $name); foreach $dir (@dirs) { my($type); $name = "$dir$variant"; warn "\tChecking $name\n" if $verbose > 2; $fullname = VMS::Filespec::rmsexpand($name); if (defined $fullname and -f $fullname) { # It's got its own suffix, so we'll have to figure out the type if ($fullname =~ /(?:$so|exe)$/i) { $type = 'SHR'; } elsif ($fullname =~ /(?:$lib_ext|olb)$/i) { $type = 'OLB'; } elsif ($fullname =~ /(?:$obj_ext|obj)$/i) { warn "Note (probably harmless): " ."Plain object file $fullname found in library list\n"; $type = 'OBJ'; } else { warn "Note (probably harmless): " ."Unknown library type for $fullname; assuming shared\n"; $type = 'SHR'; } } elsif (-f ($fullname = VMS::Filespec::rmsexpand($name,$so)) or -f ($fullname = VMS::Filespec::rmsexpand($name,'.exe'))) { $type = 'SHR'; $name = $fullname unless $fullname =~ /exe;?\d*$/i; } elsif (not length($ctype) and # If we've got a lib already, # don't bother ( -f ($fullname = VMS::Filespec::rmsexpand($name,$lib_ext)) or -f ($fullname = VMS::Filespec::rmsexpand($name,'.olb')))) { $type = 'OLB'; $name = $fullname unless $fullname =~ /olb;?\d*$/i; } elsif (not length($ctype) and # If we've got a lib already, # don't bother ( -f ($fullname = VMS::Filespec::rmsexpand($name,$obj_ext)) or -f ($fullname = VMS::Filespec::rmsexpand($name,'.obj')))) { warn "Note (probably harmless): " ."Plain object file $fullname found in library list\n"; $type = 'OBJ'; $name = $fullname unless $fullname =~ /obj;?\d*$/i; } if (defined $type) { $ctype = $type; $cand = $name; last if $ctype eq 'SHR'; } } if ($ctype) { push @{$found{$ctype}}, $cand; warn "\tFound as $cand (really $fullname), type $ctype\n" if $verbose > 1; push @flibs, $name unless $libs_seen{$fullname}++; next LIB; } } warn "Note (probably harmless): " ."No library found for $lib\n"; } push @fndlibs, @{$found{OBJ}} if exists $found{OBJ}; push @fndlibs, map { "$_/Library" } @{$found{OLB}} if exists $found{OLB}; push @fndlibs, map { "$_/Share" } @{$found{SHR}} if exists $found{SHR}; $lib = join(' ',@fndlibs); $ldlib = $crtlstr ? "$lib $crtlstr" : $lib; warn "Result:\n\tEXTRALIBS: $lib\n\tLDLOADLIBS: $ldlib\n" if $verbose; wantarray ? ($lib, '', $ldlib, '', ($give_libs ? \@flibs : ())) : $lib; } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/darwin.pm0000644000175000017500000000124114011761123023274 0ustar ambsambspackage ExtUtils::CBuilder::Platform::darwin; use warnings; use strict; use ExtUtils::CBuilder::Platform::Unix; our $VERSION = '0.280236'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub compile { my $self = shift; my $cf = $self->{config}; # -flat_namespace isn't a compile flag, it's a linker flag. But # it's mistakenly in Config.pm as both. Make the correction here. local $cf->{ccflags} = $cf->{ccflags}; $cf->{ccflags} =~ s/-flat_namespace//; # XCode 12 makes this fatal, breaking tons of XS modules $cf->{ccflags} .= ($cf->{ccflags} ? ' ' : '').'-Wno-error=implicit-function-declaration'; $self->SUPER::compile(@_); } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/Windows.pm0000644000175000017500000002140114011761123023442 0ustar ambsambspackage ExtUtils::CBuilder::Platform::Windows; use strict; use warnings; use File::Basename; use File::Spec; use ExtUtils::CBuilder::Base; use IO::File; our $VERSION = '0.280236'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Base); =begin comment The compiler-specific packages implement functions for generating properly formatted commandlines for the compiler being used. Each package defines two primary functions 'format_linker_cmd()' & 'format_compiler_cmd()' that accepts a list of named arguments (a hash) and returns a list of formatted options suitable for invoking the compiler. By default, if the compiler supports scripting of its operation then a script file is built containing the options while those options are removed from the commandline, and a reference to the script is pushed onto the commandline in their place. Scripting the compiler in this way helps to avoid the problems associated with long commandlines under some shells. =end comment =cut sub new { my $class = shift; my $self = $class->SUPER::new(@_); my $cf = $self->{config}; # Inherit from an appropriate compiler driver class my $driver = "ExtUtils::CBuilder::Platform::Windows::" . $self->_compiler_type; eval "require $driver" or die "Could not load compiler driver: $@"; unshift @ISA, $driver; return $self; } sub _compiler_type { my $self = shift; my $cc = $self->{config}{cc}; return ( $cc =~ /cl(\.exe)?$/ ? 'MSVC' : $cc =~ /bcc32(\.exe)?$/ ? 'BCC' : 'GCC'); } sub split_like_shell { # Since Windows will pass the whole command string (not an argument # array) to the target program and make the program parse it itself, # we don't actually need to do any processing here. (my $self, local $_) = @_; return @$_ if defined() && UNIVERSAL::isa($_, 'ARRAY'); return unless defined() && length(); return ($_); } sub do_system { # See above my $self = shift; my $cmd = join(" ", grep length, map {$a=$_;$a=~s/\t/ /g;$a=~s/^\s+|\s+$//;$a} grep defined, @_); return $self->SUPER::do_system($cmd); } sub arg_defines { my ($self, %args) = @_; s/"/\\"/g foreach values %args; return map qq{"-D$_=$args{$_}"}, sort keys %args; } sub compile { my ($self, %args) = @_; my $cf = $self->{config}; die "Missing 'source' argument to compile()" unless defined $args{source}; $args{include_dirs} = [ $args{include_dirs} ] if exists($args{include_dirs}) && ref($args{include_dirs}) ne "ARRAY"; my ($basename, $srcdir) = ( File::Basename::fileparse($args{source}, '\.[^.]+$') )[0,1]; $srcdir ||= File::Spec->curdir(); my @defines = $self->arg_defines( %{ $args{defines} || {} } ); my %spec = ( srcdir => $srcdir, builddir => $srcdir, basename => $basename, source => $args{source}, output => $args{object_file} || File::Spec->catfile($srcdir, $basename) . $cf->{obj_ext}, cc => $cf->{cc}, cflags => [ $self->split_like_shell($cf->{ccflags}), $self->split_like_shell($cf->{cccdlflags}), $self->split_like_shell($args{extra_compiler_flags}), ], optimize => [ $self->split_like_shell($cf->{optimize}) ], defines => \@defines, includes => [ @{$args{include_dirs} || []} ], perlinc => [ $self->perl_inc(), $self->split_like_shell($cf->{incpath}), ], use_scripts => 1, # XXX provide user option to change this??? ); $self->normalize_filespecs( \$spec{source}, \$spec{output}, $spec{includes}, $spec{perlinc}, ); my @cmds = $self->format_compiler_cmd(%spec); while ( my $cmd = shift @cmds ) { $self->do_system( @$cmd ) or die "error building $cf->{dlext} file from '$args{source}'"; } (my $out = $spec{output}) =~ tr/'"//d; return $out; } sub need_prelink { 1 } sub link { my ($self, %args) = @_; my $cf = $self->{config}; my @objects = ( ref $args{objects} eq 'ARRAY' ? @{$args{objects}} : $args{objects} ); my $to = join '', (File::Spec->splitpath($objects[0]))[0,1]; $to ||= File::Spec->curdir(); (my $file_base = $args{module_name}) =~ s/.*:://; my $output = $args{lib_file} || File::Spec->catfile($to, "$file_base.$cf->{dlext}"); # if running in perl source tree, look for libs there, not installed my $lddlflags = $cf->{lddlflags}; my $perl_src = $self->perl_src(); $lddlflags =~ s{\Q$cf->{archlibexp}\E[\\/]CORE}{$perl_src/lib/CORE} if $perl_src; my %spec = ( srcdir => $to, builddir => $to, startup => [ ], objects => \@objects, libs => [ ], output => $output, ld => $cf->{ld}, libperl => $cf->{libperl}, perllibs => [ $self->split_like_shell($cf->{perllibs}) ], libpath => [ $self->split_like_shell($cf->{libpth}) ], lddlflags => [ $self->split_like_shell($lddlflags) ], other_ldflags => [ $self->split_like_shell($args{extra_linker_flags} || '') ], use_scripts => 1, # XXX provide user option to change this??? ); unless ( $spec{basename} ) { ($spec{basename} = $args{module_name}) =~ s/.*:://; } $spec{srcdir} = File::Spec->canonpath( $spec{srcdir} ); $spec{builddir} = File::Spec->canonpath( $spec{builddir} ); $spec{output} ||= File::Spec->catfile( $spec{builddir}, $spec{basename} . '.'.$cf->{dlext} ); $spec{manifest} ||= $spec{output} . '.manifest'; $spec{implib} ||= File::Spec->catfile( $spec{builddir}, $spec{basename} . $cf->{lib_ext} ); $spec{explib} ||= File::Spec->catfile( $spec{builddir}, $spec{basename} . '.exp' ); if ($cf->{cc} eq 'cl') { $spec{dbg_file} ||= File::Spec->catfile( $spec{builddir}, $spec{basename} . '.pdb' ); } elsif ($cf->{cc} eq 'bcc32') { $spec{dbg_file} ||= File::Spec->catfile( $spec{builddir}, $spec{basename} . '.tds' ); } $spec{def_file} ||= File::Spec->catfile( $spec{srcdir} , $spec{basename} . '.def' ); $spec{base_file} ||= File::Spec->catfile( $spec{srcdir} , $spec{basename} . '.base' ); $self->add_to_cleanup( grep defined, @{[ @spec{qw(manifest implib explib dbg_file def_file base_file map_file)} ]} ); foreach my $opt ( qw(output manifest implib explib dbg_file def_file map_file base_file) ) { $self->normalize_filespecs( \$spec{$opt} ); } foreach my $opt ( qw(libpath startup objects) ) { $self->normalize_filespecs( $spec{$opt} ); } (my $def_base = $spec{def_file}) =~ tr/'"//d; $def_base =~ s/\.def$//; $self->prelink( %args, dl_name => $args{module_name}, dl_file => $def_base, dl_base => $spec{basename} ); my @cmds = $self->format_linker_cmd(%spec); while ( my $cmd = shift @cmds ) { $self->do_system( @$cmd ); } $spec{output} =~ tr/'"//d; return wantarray ? grep defined, @spec{qw[output manifest implib explib dbg_file def_file map_file base_file]} : $spec{output}; } # canonize & quote paths sub normalize_filespecs { my ($self, @specs) = @_; foreach my $spec ( grep defined, @specs ) { if ( ref $spec eq 'ARRAY') { $self->normalize_filespecs( map {\$_} grep defined, @$spec ) } elsif ( ref $spec eq 'SCALAR' ) { $$spec =~ tr/"//d if $$spec; next unless $$spec; $$spec = '"' . File::Spec->canonpath($$spec) . '"'; } elsif ( ref $spec eq '' ) { $spec = '"' . File::Spec->canonpath($spec) . '"'; } else { die "Don't know how to normalize " . (ref $spec || $spec) . "\n"; } } } # directory of perl's include files sub perl_inc { my $self = shift; my $perl_src = $self->perl_src(); if ($perl_src) { File::Spec->catdir($perl_src, "lib", "CORE"); } else { File::Spec->catdir($self->{config}{archlibexp},"CORE"); } } 1; __END__ =head1 NAME ExtUtils::CBuilder::Platform::Windows - Builder class for Windows platforms =head1 DESCRIPTION This module implements the Windows-specific parts of ExtUtils::CBuilder. Most of the Windows-specific stuff has to do with compiling and linking C code. Currently we support the 3 compilers perl itself supports: MSVC, BCC, and GCC. This module inherits from C, so any functionality not implemented here will be implemented there. The interfaces are defined by the L documentation. =head1 AUTHOR Ken Williams Most of the code here was written by Randy W. Sims . =head1 SEE ALSO perl(1), ExtUtils::CBuilder(3), ExtUtils::MakeMaker(3) =cut ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/aix.pm0000644000175000017500000000116114011761123022572 0ustar ambsambspackage ExtUtils::CBuilder::Platform::aix; use warnings; use strict; use ExtUtils::CBuilder::Platform::Unix; use File::Spec; our $VERSION = '0.280236'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 } sub link { my ($self, %args) = @_; my $cf = $self->{config}; (my $baseext = $args{module_name}) =~ s/.*:://; my $perl_inc = $self->perl_inc(); # Massage some very naughty bits in %Config local $cf->{lddlflags} = $cf->{lddlflags}; for ($cf->{lddlflags}) { s/\Q$(BASEEXT)\E/$baseext/; s/\Q$(PERL_INC)\E/$perl_inc/; } return $self->SUPER::link(%args); } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/Windows/0000775000175000017500000000000014011761123023110 5ustar ambsambsExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm0000644000175000017500000000626014011761123024220 0ustar ambsambspackage ExtUtils::CBuilder::Platform::Windows::MSVC; our $VERSION = '0.280236'; # VERSION use warnings; use strict; sub arg_exec_file { my ($self, $file) = @_; return "/OUT:$file"; } sub format_compiler_cmd { my ($self, %spec) = @_; foreach my $path ( @{ $spec{includes} || [] }, @{ $spec{perlinc} || [] } ) { $path = '-I' . $path; } %spec = $self->write_compiler_script(%spec) if $spec{use_scripts}; return [ grep {defined && length} ( $spec{cc},'-nologo','-c', @{$spec{includes}} , @{$spec{cflags}} , @{$spec{optimize}} , @{$spec{defines}} , @{$spec{perlinc}} , "-Fo$spec{output}" , $spec{source} , ) ]; } sub write_compiler_script { my ($self, %spec) = @_; my $script = File::Spec->catfile( $spec{srcdir}, $spec{basename} . '.ccs' ); $self->add_to_cleanup($script); print "Generating script '$script'\n" if !$self->{quiet}; my $SCRIPT = IO::File->new( ">$script" ) or die( "Could not create script '$script': $!" ); print $SCRIPT join( "\n", map { ref $_ ? @{$_} : $_ } grep defined, delete( @spec{ qw(includes cflags optimize defines perlinc) } ) ); push @{$spec{includes}}, '@"' . $script . '"'; return %spec; } sub format_linker_cmd { my ($self, %spec) = @_; my $cf = $self->{config}; foreach my $path ( @{$spec{libpath}} ) { $path = "-libpath:$path"; } my $output = $spec{output}; my $manifest = $spec{manifest}; $spec{def_file} &&= '-def:' . $spec{def_file}; $spec{output} &&= '-out:' . $spec{output}; $spec{manifest} &&= '-manifest ' . $spec{manifest}; $spec{implib} &&= '-implib:' . $spec{implib}; $spec{map_file} &&= '-map:' . $spec{map_file}; %spec = $self->write_linker_script(%spec) if $spec{use_scripts}; my @cmds; # Stores the series of commands needed to build the module. push @cmds, [ grep {defined && length} ( $spec{ld} , @{$spec{lddlflags}} , @{$spec{libpath}} , @{$spec{other_ldflags}} , @{$spec{startup}} , @{$spec{objects}} , $spec{map_file} , $spec{libperl} , @{$spec{perllibs}} , $spec{def_file} , $spec{implib} , $spec{output} , ) ]; # Embed the manifest file if it exists push @cmds, [ 'if', 'exist', $manifest, 'mt', '-nologo', $spec{manifest}, '-outputresource:' . "$output;2" ]; return @cmds; } sub write_linker_script { my ($self, %spec) = @_; my $script = File::Spec->catfile( $spec{srcdir}, $spec{basename} . '.lds' ); $self->add_to_cleanup($script); print "Generating script '$script'\n" if !$self->{quiet}; my $SCRIPT = IO::File->new( ">$script" ) or die( "Could not create script '$script': $!" ); print $SCRIPT join( "\n", map { ref $_ ? @{$_} : $_ } grep defined, delete( @spec{ qw(lddlflags libpath other_ldflags startup objects libperl perllibs def_file implib map_file) } ) ); push @{$spec{lddlflags}}, '@"' . $script . '"'; return %spec; } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm0000644000175000017500000000665714011761123024051 0ustar ambsambspackage ExtUtils::CBuilder::Platform::Windows::BCC; our $VERSION = '0.280236'; # VERSION use strict; use warnings; sub format_compiler_cmd { my ($self, %spec) = @_; foreach my $path ( @{ $spec{includes} || [] }, @{ $spec{perlinc} || [] } ) { $path = '-I' . $path; } %spec = $self->write_compiler_script(%spec) if $spec{use_scripts}; return [ grep {defined && length} ( $spec{cc}, '-c' , @{$spec{includes}} , @{$spec{cflags}} , @{$spec{optimize}} , @{$spec{defines}} , @{$spec{perlinc}} , "-o$spec{output}" , $spec{source} , ) ]; } sub write_compiler_script { my ($self, %spec) = @_; my $script = File::Spec->catfile( $spec{srcdir}, $spec{basename} . '.ccs' ); $self->add_to_cleanup($script); print "Generating script '$script'\n" if !$self->{quiet}; my $SCRIPT = IO::File->new( ">$script" ) or die( "Could not create script '$script': $!" ); # XXX Borland "response files" seem to be unable to accept macro # definitions containing quoted strings. Escaping strings with # backslash doesn't work, and any level of quotes are stripped. The # result is a floating point number in the source file where a # string is expected. So we leave the macros on the command line. print $SCRIPT join( "\n", map { ref $_ ? @{$_} : $_ } grep defined, delete( @spec{ qw(includes cflags optimize perlinc) } ) ); push @{$spec{includes}}, '@"' . $script . '"'; return %spec; } sub format_linker_cmd { my ($self, %spec) = @_; foreach my $path ( @{$spec{libpath}} ) { $path = "-L$path"; } push( @{$spec{startup}}, 'c0d32.obj' ) unless ( $spec{startup} && @{$spec{startup}} ); %spec = $self->write_linker_script(%spec) if $spec{use_scripts}; return [ grep {defined && length} ( $spec{ld} , @{$spec{lddlflags}} , @{$spec{libpath}} , @{$spec{other_ldflags}} , @{$spec{startup}} , @{$spec{objects}} , ',', $spec{output} , ',', $spec{map_file} , ',', $spec{libperl} , @{$spec{perllibs}} , ',', $spec{def_file} ) ]; } sub write_linker_script { my ($self, %spec) = @_; # To work around Borlands "unique" commandline syntax, # two scripts are used: my $ld_script = File::Spec->catfile( $spec{srcdir}, $spec{basename} . '.lds' ); my $ld_libs = File::Spec->catfile( $spec{srcdir}, $spec{basename} . '.lbs' ); $self->add_to_cleanup($ld_script, $ld_libs); print "Generating scripts '$ld_script' and '$ld_libs'.\n" if !$self->{quiet}; # Script 1: contains options & names of object files. my $LD_SCRIPT = IO::File->new( ">$ld_script" ) or die( "Could not create linker script '$ld_script': $!" ); print $LD_SCRIPT join( " +\n", map { @{$_} } grep defined, delete( @spec{ qw(lddlflags libpath other_ldflags startup objects) } ) ); # Script 2: contains name of libs to link against. my $LD_LIBS = IO::File->new( ">$ld_libs" ) or die( "Could not create linker script '$ld_libs': $!" ); print $LD_LIBS join( " +\n", (delete $spec{libperl} || ''), @{delete $spec{perllibs} || []}, ); push @{$spec{lddlflags}}, '@"' . $ld_script . '"'; push @{$spec{perllibs}}, '@"' . $ld_libs . '"'; return %spec; } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm0000644000175000017500000000747214011761123024052 0ustar ambsambspackage ExtUtils::CBuilder::Platform::Windows::GCC; our $VERSION = '0.280236'; # VERSION use warnings; use strict; sub format_compiler_cmd { my ($self, %spec) = @_; foreach my $path ( @{ $spec{includes} || [] }, @{ $spec{perlinc} || [] } ) { $path = '-I' . $path; } # split off any -arguments included in cc my @cc = split / (?=-)/, $spec{cc}; return [ grep {defined && length} ( @cc, '-c' , @{$spec{includes}} , @{$spec{cflags}} , @{$spec{optimize}} , @{$spec{defines}} , @{$spec{perlinc}} , '-o', $spec{output} , $spec{source} , ) ]; } sub format_linker_cmd { my ($self, %spec) = @_; my $cf = $self->{config}; # The Config.pm variable 'libperl' is hardcoded to the full name # of the perl import library (i.e. 'libperl56.a'). GCC will not # find it unless the 'lib' prefix & the extension are stripped. $spec{libperl} =~ s/^(?:lib)?([^.]+).*$/-l$1/; unshift( @{$spec{other_ldflags}}, '-nostartfiles' ) if ( $spec{startup} && @{$spec{startup}} ); %spec = $self->write_linker_script(%spec) if $spec{use_scripts}; foreach my $path ( @{$spec{libpath}} ) { $path = "-L$path"; } my @cmds; # Stores the series of commands needed to build the module. my $DLLTOOL = $cf->{dlltool} || 'dlltool'; push @cmds, [ $DLLTOOL, '--def' , $spec{def_file}, '--output-exp' , $spec{explib} ]; # split off any -arguments included in ld my @ld = split / (?=-)/, $spec{ld}; push @cmds, [ grep {defined && length} ( @ld , '-o', $spec{output} , "-Wl,--base-file,$spec{base_file}" , "-Wl,--enable-auto-image-base" , @{$spec{lddlflags}} , @{$spec{libpath}} , @{$spec{startup}} , @{$spec{objects}} , @{$spec{other_ldflags}} , $spec{libperl} , @{$spec{perllibs}} , $spec{explib} , $spec{map_file} ? ('-Map', $spec{map_file}) : '' ) ]; push @cmds, [ $DLLTOOL, '--def' , $spec{def_file}, '--output-exp' , $spec{explib}, '--base-file' , $spec{base_file} ]; push @cmds, [ grep {defined && length} ( @ld , '-o', $spec{output} , "-Wl,--enable-auto-image-base" , @{$spec{lddlflags}} , @{$spec{libpath}} , @{$spec{startup}} , @{$spec{objects}} , @{$spec{other_ldflags}} , $spec{libperl} , @{$spec{perllibs}} , $spec{explib} , $spec{map_file} ? ('-Map', $spec{map_file}) : '' ) ]; return @cmds; } sub write_linker_script { my ($self, %spec) = @_; my $script = File::Spec->catfile( $spec{srcdir}, $spec{basename} . '.lds' ); $self->add_to_cleanup($script); print "Generating script '$script'\n" if !$self->{quiet}; my $SCRIPT = IO::File->new( ">$script" ) or die( "Could not create script '$script': $!" ); print $SCRIPT ( 'SEARCH_DIR(' . $_ . ")\n" ) for @{delete $spec{libpath} || []}; # gcc takes only one startup file, so the first object in startup is # specified as the startup file and any others are shifted into the # beginning of the list of objects. if ( $spec{startup} && @{$spec{startup}} ) { print $SCRIPT 'STARTUP(' . shift( @{$spec{startup}} ) . ")\n"; unshift @{$spec{objects}}, @{delete $spec{startup} || []}; } print $SCRIPT 'INPUT(' . join( ',', @{delete $spec{objects} || []} ) . ")\n"; print $SCRIPT 'INPUT(' . join( ' ', (delete $spec{libperl} || ''), @{delete $spec{perllibs} || []}, ) . ")\n"; #it is important to keep the order 1.linker_script - 2.other_ldflags unshift @{$spec{other_ldflags}}, '"' . $script . '"'; return %spec; } 1; ExtUtils-CBuilder-0.280236/lib/ExtUtils/CBuilder.pm0000644000175000017500000002126414011761123020233 0ustar ambsambspackage ExtUtils::CBuilder; our $VERSION = '0.280236'; # VERSION use File::Spec (); use File::Path (); use File::Basename (); use Perl::OSType qw/os_type/; use warnings; use strict; our @ISA; # We only use this once - don't waste a symbol table entry on it. # More importantly, don't make it an inheritable method. my $load = sub { my $mod = shift; eval "use $mod"; die $@ if $@; @ISA = ($mod); }; { my @package = split /::/, __PACKAGE__; my $ostype = os_type(); if (grep {-e File::Spec->catfile($_, @package, 'Platform', $^O) . '.pm'} @INC) { $load->(__PACKAGE__ . "::Platform::$^O"); } elsif ( $ostype && grep {-e File::Spec->catfile($_, @package, 'Platform', $ostype) . '.pm'} @INC) { $load->(__PACKAGE__ . "::Platform::$ostype"); } else { $load->(__PACKAGE__ . "::Base"); } } 1; __END__ =head1 NAME ExtUtils::CBuilder - Compile and link C code for Perl modules =head1 SYNOPSIS use ExtUtils::CBuilder; my $b = ExtUtils::CBuilder->new(%options); $obj_file = $b->compile(source => 'MyModule.c'); $lib_file = $b->link(objects => $obj_file); =head1 DESCRIPTION This module can build the C portions of Perl modules by invoking the appropriate compilers and linkers in a cross-platform manner. It was motivated by the C project, but may be useful for other purposes as well. However, it is I intended as a general cross-platform interface to all your C building needs. That would have been a much more ambitious goal! =head1 METHODS =over 4 =item new Returns a new C object. A C parameter lets you override C settings for all operations performed by the object, as in the following example: # Use a different compiler than Config.pm says my $b = ExtUtils::CBuilder->new( config => { ld => 'gcc' } ); A C parameter tells C to not print its C commands before executing them: # Be quieter than normal my $b = ExtUtils::CBuilder->new( quiet => 1 ); =item have_compiler Returns true if the current system has a working C compiler and linker, false otherwise. To determine this, we actually compile and link a sample C library. The sample will be compiled in the system tempdir or, if that fails for some reason, in the current directory. =item have_cplusplus Just like have_compiler but for C++ instead of C. =item compile Compiles a C source file and produces an object file. The name of the object file is returned. The source file is specified in a C parameter, which is required; the other parameters listed below are optional. =over 4 =item C Specifies the name of the output file to create. Otherwise the C method will be consulted, passing it the name of the C file. =item C Specifies any additional directories in which to search for header files. May be given as a string indicating a single directory, or as a list reference indicating multiple directories. =item C Specifies any additional arguments to pass to the compiler. Should be given as a list reference containing the arguments individually, or if this is not possible, as a string containing all the arguments together. =item C Specifies that the source file is a C++ source file and sets appropriate compiler flags =back The operation of this method is also affected by the C, C, C, C, and C entries in C. =item link Invokes the linker to produce a library file from object files. In scalar context, the name of the library file is returned. In list context, the library file and any temporary files created are returned. A required C parameter contains the name of the object files to process, either in a string (for one object file) or list reference (for one or more files). The following parameters are optional: =over 4 =item lib_file Specifies the name of the output library file to create. Otherwise the C method will be consulted, passing it the name of the first entry in C. =item module_name Specifies the name of the Perl module that will be created by linking. On platforms that need to do prelinking (Win32, OS/2, etc.) this is a required parameter. =item extra_linker_flags Any additional flags you wish to pass to the linker. =back On platforms where C returns true, C will be called automatically. The operation of this method is also affected by the C, C, and C entries in C. =item link_executable Invokes the linker to produce an executable file from object files. In scalar context, the name of the executable file is returned. In list context, the executable file and any temporary files created are returned. A required C parameter contains the name of the object files to process, either in a string (for one object file) or list reference (for one or more files). The optional parameters are the same as C with exception for =over 4 =item exe_file Specifies the name of the output executable file to create. Otherwise the C method will be consulted, passing it the name of the first entry in C. =back =item object_file my $object_file = $b->object_file($source_file); Converts the name of a C source file to the most natural name of an output object file to create from it. For instance, on Unix the source file F would result in the object file F. =item lib_file my $lib_file = $b->lib_file($object_file); Converts the name of an object file to the most natural name of a output library file to create from it. For instance, on Mac OS X the object file F would result in the library file F. =item exe_file my $exe_file = $b->exe_file($object_file); Converts the name of an object file to the most natural name of an executable file to create from it. For instance, on Mac OS X the object file F would result in the executable file F, and on Windows it would result in F. =item prelink On certain platforms like Win32, OS/2, VMS, and AIX, it is necessary to perform some actions before invoking the linker. The C module does this, writing files used by the linker during the creation of shared libraries for dynamic extensions. The names of any files written will be returned as a list. Several parameters correspond to C options, as follows: Mksymlists() prelink() type -------------|-------------------|------------------- NAME | dl_name | string (required) DLBASE | dl_base | string FILE | dl_file | string DL_VARS | dl_vars | array reference DL_FUNCS | dl_funcs | hash reference FUNCLIST | dl_func_list | array reference IMPORTS | dl_imports | hash reference VERSION | dl_version | string Please see the documentation for C for the details of what these parameters do. =item need_prelink Returns true on platforms where C should be called during linking, and false otherwise. =item extra_link_args_after_prelink Returns list of extra arguments to give to the link command; the arguments are the same as for prelink(), with addition of array reference to the results of prelink(); this reference is indexed by key C. =back =head1 TO DO Currently this has only been tested on Unix and doesn't contain any of the Windows-specific code from the C project. I'll do that next. =head1 HISTORY This module is an outgrowth of the C project, to which there have been many contributors. Notably, Randy W. Sims submitted lots of code to support 3 compilers on Windows and helped with various other platform-specific issues. Ilya Zakharevich has contributed fixes for OS/2; John E. Malmberg and Peter Prymmer have done likewise for VMS. =head1 SUPPORT ExtUtils::CBuilder is maintained as part of the Perl 5 core. Please submit any bug reports via the F tool included with Perl 5. Bug reports will be included in the Perl 5 ticket system at L. The Perl 5 source code is available at L and ExtUtils-CBuilder may be found in the F directory of the repository. =head1 AUTHOR Ken Williams, kwilliams@cpan.org Additional contributions by The Perl 5 Porters. =head1 COPYRIGHT Copyright (c) 2003-2005 Ken Williams. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO perl(1), Module::Build(3) =cut ExtUtils-CBuilder-0.280236/dist.ini0000644000175000017500000000166514011761123015324 0ustar ambsambsname = ExtUtils-CBuilder author = Ken Williams author = The Perl 5 Porters license = Perl_5 copyright_holder = Ken Williams version = 0.280236 [CheckExtraTests] [CheckChangesHasContent] [OnlyCorePrereqs] starting_version = 5.014 [@Filter] -bundle = @Basic -remove = ExtraTests [PruneFiles] match = ^devtools/* [DualLife] [MetaConfig] [MetaJSON] [PodSyntaxTests] ; [EOLTests] [OurPkgVersion] [Prereqs] Cwd = 0 File::Basename = 0 File::Spec = 3.13 File::Temp = 0 IO::File = 0 IPC::Cmd = 0 Text::ParseWords = 0 Perl::OSType = 1 ExtUtils::MakeMaker = 6.30 [Prereqs / TestRequires] Test::More = 0.47 [MetaResources] repository.type = git repository.url = git://github.com/Perl-Toolchain-Gang/ExtUtils-CBuilder.git repository.web = http://github.com/Perl-Toolchain-Gang/ExtUtils-CBuilder bugtracker.web = http://rt.perl.org/rt3/ bugtracker.mailto = perlbug@perl.org homepage = http://search.cpan.org/dist/ExtUtils-CBuilder ExtUtils-CBuilder-0.280236/README.release0000644000175000017500000000252414011761123016152 0ustar ambsambsRelease instructions for dual-life ExtUtils::CBuilder 1. Check out a tag/commit corresponding to the release point. This should generally be a Perl release (dev or stable). Make sure your working tree is clear of extraneous files. E.g. $ git checkout v5.15.8 $ git clean -dxf 2. Rsync the ExtUtils-CBuilder directory to a temporary directory for release. E.g. $ rsync -av --delete dist/ExtUtils-CBuilder /tmp 3. Change to the temp directory $ cd /tmp/ExtUtils-CBuilder 4. Look at the Changes file. If it was not kept up to date in blead, take a minute to feel sad, then update it. Remember to copy the changes back to blead later. 5. Configure and then make a MANIFEST $ perl Makefile.PL $ make manifest 6. Build a release directory and examine its contents, paying particular attention to the MANIFEST and the META files $ make distdir 7. Test the release directory $ make disttest 8. If all looks good, create a tarball and upload it to CPAN (maybe install CPAN::Uploader or an equivalent tool) $ make dist $ cpan_upload ExtUtils-CBuilder-X.YYYZZZ.tar.gz 9. Update Porting/Maintainers.pl in the Perl repo with the new tarball name for ExtUtils-CBuilder. 10. If you updated Changes, copy that back to blead now 11. Commit any changes to blead (or submit it as a patch if you don't have a commit bit) ExtUtils-CBuilder-0.280236/Makefile.PL0000644000175000017500000000276214011761123015631 0ustar ambsambs# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.017. use strict; use warnings; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Compile and link C code for Perl modules", "AUTHOR" => "Ken Williams , The Perl 5 Porters", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "ExtUtils-CBuilder", "LICENSE" => "perl", "NAME" => "ExtUtils::CBuilder", "PREREQ_PM" => { "Cwd" => 0, "ExtUtils::MakeMaker" => "6.30", "File::Basename" => 0, "File::Spec" => "3.13", "File::Temp" => 0, "IO::File" => 0, "IPC::Cmd" => 0, "Perl::OSType" => 1, "Text::ParseWords" => 0 }, "TEST_REQUIRES" => { "Test::More" => "0.47" }, "VERSION" => "0.280236", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Cwd" => 0, "ExtUtils::MakeMaker" => "6.30", "File::Basename" => 0, "File::Spec" => "3.13", "File::Temp" => 0, "IO::File" => 0, "IPC::Cmd" => 0, "Perl::OSType" => 1, "Test::More" => "0.47", "Text::ParseWords" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; $WriteMakefileArgs{INSTALLDIRS} = 'perl' if "$]" >= 5.009003 && "$]" <= 5.011000; WriteMakefile(%WriteMakefileArgs); ExtUtils-CBuilder-0.280236/CONTRIBUTING0000644000175000017500000000072114011761123015502 0ustar ambsambs**DO NOT SUBMIT PULL REQUESTS OR ISSUES TO THIS REPOSITORY** ExtUtils::CBuilder is now maintained as part of the Perl 5 source. This repository exists to coordinate dual-life CPAN releases only. Please direct any contributions to the Perl 5 Porters team. See http://dev.perl.org/perl5/ for more details. Any bug reports for ExtUtils::CBuilder should be submitted via the 'perlbug' tool distributed with Perl 5. Patches should be submitted upstream to Perl 5. ExtUtils-CBuilder-0.280236/META.json0000644000175000017500000002153514011761123015277 0ustar ambsambs{ "abstract" : "Compile and link C code for Perl modules", "author" : [ "Ken Williams ", "The Perl 5 Porters" ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "ExtUtils-CBuilder", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Test::Pod" : "1.41" } }, "runtime" : { "requires" : { "Cwd" : "0", "ExtUtils::MakeMaker" : "6.30", "File::Basename" : "0", "File::Spec" : "3.13", "File::Temp" : "0", "IO::File" : "0", "IPC::Cmd" : "0", "Perl::OSType" : "1", "Text::ParseWords" : "0" } }, "test" : { "requires" : { "Test::More" : "0.47" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "perlbug@perl.org", "web" : "http://rt.perl.org/rt3/" }, "homepage" : "http://search.cpan.org/dist/ExtUtils-CBuilder", "repository" : { "type" : "git", "url" : "git://github.com/Perl-Toolchain-Gang/ExtUtils-CBuilder.git", "web" : "http://github.com/Perl-Toolchain-Gang/ExtUtils-CBuilder" } }, "version" : "0.280236", "x_Dist_Zilla" : { "perl" : { "version" : "5.032000" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::CheckExtraTests", "name" : "CheckExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "CheckChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::OnlyCorePrereqs", "config" : { "Dist::Zilla::Plugin::OnlyCorePrereqs" : { "also_disallow" : [], "check_dual_life_versions" : 1, "deprecated_ok" : 0, "phases" : [ "configure", "build", "runtime", "test" ], "skips" : [], "starting_version" : "5.014" } }, "name" : "OnlyCorePrereqs", "version" : "0.024" }, { "class" : "Dist::Zilla::Plugin::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." } }, "name" : "@Filter/GatherDir", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Filter/PruneCruft", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Filter/ManifestSkip", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Filter/MetaYAML", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Filter/License", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Filter/Readme", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Filter/ExecDir", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Filter/ShareDir", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : "9" } }, "name" : "@Filter/MakeMaker", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Filter/Manifest", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Filter/TestRelease", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Filter/ConfirmRelease", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Filter/UploadToCPAN", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::PruneFiles", "name" : "PruneFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::DualLife", "config" : { "Dist::Zilla::Plugin::DualLife" : { "eumm_bundled" : 0 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000037", "version" : "0.006" } }, "name" : "DualLife", "version" : "0.07" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "MetaConfig", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "MetaJSON", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "PodSyntaxTests", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::OurPkgVersion", "name" : "OurPkgVersion", "version" : "0.21" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "TestRequires", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.017" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.017" } }, "x_generated_by_perl" : "v5.32.0", "x_serialization_backend" : "Cpanel::JSON::XS version 4.25", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } ExtUtils-CBuilder-0.280236/README.mkdn0000644000175000017500000000072114011761123015460 0ustar ambsambs**DO NOT SUBMIT PULL REQUESTS OR ISSUES TO THIS REPOSITORY** ExtUtils::CBuilder is now maintained as part of the Perl 5 source. This repository exists to coordinate dual-life CPAN releases only. Please direct any contributions to the Perl 5 Porters team. See http://dev.perl.org/perl5/ for more details. Any bug reports for ExtUtils::CBuilder should be submitted via the 'perlbug' tool distributed with Perl 5. Patches should be submitted upstream to Perl 5. ExtUtils-CBuilder-0.280236/META.yml0000644000175000017500000001315614011761123015127 0ustar ambsambs--- abstract: 'Compile and link C code for Perl modules' author: - 'Ken Williams ' - 'The Perl 5 Porters' build_requires: Test::More: '0.47' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: ExtUtils-CBuilder requires: Cwd: '0' ExtUtils::MakeMaker: '6.30' File::Basename: '0' File::Spec: '3.13' File::Temp: '0' IO::File: '0' IPC::Cmd: '0' Perl::OSType: '1' Text::ParseWords: '0' resources: bugtracker: http://rt.perl.org/rt3/ homepage: http://search.cpan.org/dist/ExtUtils-CBuilder repository: git://github.com/Perl-Toolchain-Gang/ExtUtils-CBuilder.git version: '0.280236' x_Dist_Zilla: perl: version: '5.032000' plugins: - class: Dist::Zilla::Plugin::CheckExtraTests name: CheckExtraTests version: '0.029' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: CheckChangesHasContent version: '0.011' - class: Dist::Zilla::Plugin::OnlyCorePrereqs config: Dist::Zilla::Plugin::OnlyCorePrereqs: also_disallow: [] check_dual_life_versions: '1' deprecated_ok: '0' phases: - configure - build - runtime - test skips: [] starting_version: '5.014' name: OnlyCorePrereqs version: '0.024' - class: Dist::Zilla::Plugin::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: [] exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . name: '@Filter/GatherDir' version: '6.017' - class: Dist::Zilla::Plugin::PruneCruft name: '@Filter/PruneCruft' version: '6.017' - class: Dist::Zilla::Plugin::ManifestSkip name: '@Filter/ManifestSkip' version: '6.017' - class: Dist::Zilla::Plugin::MetaYAML name: '@Filter/MetaYAML' version: '6.017' - class: Dist::Zilla::Plugin::License name: '@Filter/License' version: '6.017' - class: Dist::Zilla::Plugin::Readme name: '@Filter/Readme' version: '6.017' - class: Dist::Zilla::Plugin::ExecDir name: '@Filter/ExecDir' version: '6.017' - class: Dist::Zilla::Plugin::ShareDir name: '@Filter/ShareDir' version: '6.017' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: '9' name: '@Filter/MakeMaker' version: '6.017' - class: Dist::Zilla::Plugin::Manifest name: '@Filter/Manifest' version: '6.017' - class: Dist::Zilla::Plugin::TestRelease name: '@Filter/TestRelease' version: '6.017' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Filter/ConfirmRelease' version: '6.017' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Filter/UploadToCPAN' version: '6.017' - class: Dist::Zilla::Plugin::PruneFiles name: PruneFiles version: '6.017' - class: Dist::Zilla::Plugin::DualLife config: Dist::Zilla::Plugin::DualLife: eumm_bundled: 0 Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000037' version: '0.006' name: DualLife version: '0.07' - class: Dist::Zilla::Plugin::MetaConfig name: MetaConfig version: '6.017' - class: Dist::Zilla::Plugin::MetaJSON name: MetaJSON version: '6.017' - class: Dist::Zilla::Plugin::PodSyntaxTests name: PodSyntaxTests version: '6.017' - class: Dist::Zilla::Plugin::OurPkgVersion name: OurPkgVersion version: '0.21' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: '6.017' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: TestRequires version: '6.017' - class: Dist::Zilla::Plugin::MetaResources name: MetaResources version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.017' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.017' x_generated_by_perl: v5.32.0 x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' ExtUtils-CBuilder-0.280236/NOTAS-Alberto0000644000175000017500000000042614011761123016047 0ustar ambsambs ---https://perldoc.perl.org/perlhack.html#Submitting-patches criar o patch depois do commit ambs@diabelli ExtUtils-CBuilder (blead)$ git format-patch 5a993d81c4b1abf13cd3ae4cbc04f26c7516bc37 com o hash do commit ANTERIOR 0001-Update-to-ExtUtils-CBuilder-0.280226.patch