debian/0000755000000000000000000000000012231166446007173 5ustar debian/watch0000644000000000000000000000036112144235722010221 0ustar # format version number, currently 3; this line is compulsory! version=3 # URL to the package page followed by a regex to search https://metacpan.org/release/File-MMagic-XS/ .*/File-MMagic-XS-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian/libfile-mmagic-xs-perl.examples0000644000000000000000000000001512144235722015155 0ustar benchmark.pl debian/rules0000755000000000000000000000046112144235722010251 0ustar #!/usr/bin/make -f PACKAGE := $(shell dh_listpackages) TMP := $(CURDIR)/debian/$(PACKAGE) %: dh $@ override_dh_auto_install: dh_auto_install # we install benchmark.pl as an example later [ ! -f $(TMP)/usr/lib/perl5/File/MMagic/benchmark.pl ] || rm $(TMP)/usr/lib/perl5/File/MMagic/benchmark.pl debian/copyright0000644000000000000000000001353712144235722011134 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: File-MMagic-XS Upstream-Contact: Daisuke Maki Source: https://metacpan.org/release/File-MMagic-XS/ Files: * Copyright: 2005-2007 Daisuke Maki License: Artistic or GPL-1+, and Apache-2.0 and other This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. . This is a complete port of the apache module mod_mime_magic. This is based on httpd-2.0.52's mod_mime_magic.c -- portions of this code was shamelessly borrowed from there. . Copyright 1999-2004 The Apache Software Foundation . Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. . mod_mime_magic: MIME type lookup via file magic numbers Copyright (c) 1996-1997 Cisco Systems, Inc. . This software was submitted by Cisco Systems to the Apache Software Foundation in July 1997. Future revisions and derivatives of this source code must acknowledge Cisco Systems as the original contributor of this module. All other licensing and usage conditions are those of the Apache Software Foundation. . Some of this code is derived from the free version of the file command originally posted to comp.sources.unix. Copyright info for that program is included below as required. --------------------------------------------------------------------------- - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin. . This software is not subject to any license of the American Telephone and Telegraph Company or of the Regents of the University of California. . Permission is granted to anyone to use this software for any purpose on any computer system, and to alter it and redistribute it freely, subject to the following restrictions: . 1. The author is not responsible for the consequences of use of this software, no matter how awful, even if they arise from flaws in it. . 2. origin of this software must not be misrepresented, either by explicit claim or by omission. Since few users ever read sources, credits must appear in the documentation. . 3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. Since few users ever read sources, credits must appear in the documentation. . 4. This notice may not be removed or altered. ------------------------------------------------------------------------- . For compliance with Mr Darwin's terms: this has been very significantly modified from the free "file" command. - all-in-one file for compilation convenience when moving from one version of Apache to the next. - Memory allocation is done through the Apache API's apr_pool_t structure. - All functions have had necessary Apache API request or server structures passed to them where necessary to call other Apache API routines. (i.e. usually for logging, files, or memory allocation in itself or a called function.) - struct magic has been converted from an array to a single-ended linked list because it only grows one record at a time, it's only accessed sequentially, and the Apache API has no equivalent of realloc(). - Functions have been changed to get their parameters from the server configuration instead of globals. (It should be reentrant now but has not been tested in a threaded environment.) - Places where it used to print results to stdout now saves them in a list where they're used to set the MIME type in the Apache request record. - Command-line flags have been removed since they will never be used here. . Ian Kluft Engineering Information Framework Central Engineering Cisco Systems, Inc. San Jose, CA, USA Files: ./xs/MMagicST.[ch] Copyright: - License: PD This is a public domain general purpose hash table package written by Peter Moore @ UCB. Files: ppport.h Copyright: Version 3.x, Copyright (c) 2004-2009, Marcus Holland-Moritz. Version 2.x, Copyright (C) 2001, Paul Marquess. Version 1.x, Copyright (C) 1999, Kenneth Albanowski. License: Artistic or GPL-1+ Files: ./inc/Module/* Copyright: 2002-2010, Brian Ingerson, Audrey Tang and Adam Kennedy License: GPL-1+ or Artistic Files: ./debian/* Copyright: 2008-2013, gregor herrmann 2010, Ansgar Burchardt License: Artistic or GPL-1+ Files: debian/patches/M::I::XSUtil.pm.diff Copyright: 2009-2010, Goro Fuji (gfx) License: Artistic or GPL-1+ License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. . On Debian systems, the complete text of the Apache License, Version 2.0 can be found in `/usr/share/common-licenses/Apache-2.0'. License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ 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. . On Debian systems, the complete text of the GNU General Public License version 1 can be found in `/usr/share/common-licenses/GPL-1' debian/source/0000755000000000000000000000000012144235722010470 5ustar debian/source/format0000644000000000000000000000001412144235722011676 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012144235722010617 5ustar debian/patches/M::I::XSUtil.pm.diff0000644000000000000000000004143212144235722014056 0ustar Description: ship a newer Module::Install::XSUtil that's compatible with recent perls Origin: vendor Bug: https://rt.cpan.org/Public/Bug/Display.html?id=63048 Bug-Debian: http://bugs.debian.org/708076 Forwarded: not-needed Author: gregor herrmann Last-Update: 2013-05-13 --- a/inc/Module/Install/XSUtil.pm +++ b/inc/Module/Install/XSUtil.pm @@ -1,9 +1,8 @@ -#line 1 package Module::Install::XSUtil; use 5.005_03; -$VERSION = '0.24'; +$VERSION = '0.44'; use Module::Install::Base; @ISA = qw(Module::Install::Base); @@ -18,19 +17,21 @@ use constant _VERBOSE => $ENV{MI_VERBOSE} ? 1 : 0; my %ConfigureRequires = ( - # currently nothing + 'ExtUtils::ParseXS' => 2.21, ); my %BuildRequires = ( - 'ExtUtils::ParseXS' => 2.21, # the newer, the better ); my %Requires = ( - 'XSLoader' => 0.10, # the newer, the better + 'XSLoader' => 0.02, ); my %ToInstall; +my $UseC99 = 0; +my $UseCplusplus = 0; + sub _verbose{ print STDERR q{# }, @_, "\n"; } @@ -46,8 +47,8 @@ $self->{xsu_initialized} = 1; if(!$self->cc_available()){ - print "This package requires a C compiler, but it's not available.\n"; - exit(0); + warn "This distribution requires a C compiler, but it's not available, stopped.\n"; + exit; } $self->configure_requires(%ConfigureRequires); @@ -64,7 +65,7 @@ $self->makemaker_args->{OPTIMIZE} = '-Zi'; } else{ - $self->makemaker_args->{OPTIMIZE} = '-g'; + $self->makemaker_args->{OPTIMIZE} = '-g -ggdb -g3'; } $self->cc_define('-DXS_ASSERT'); } @@ -92,25 +93,44 @@ ; } + # cf. https://github.com/sjn/toolchain-site/blob/219db464af9b2f19b04fec05547ac10180a469f3/lancaster-consensus.md my $want_xs; sub want_xs { - my $default = @_ ? shift : 1; # you're using this module, you /must/ want XS by default + my($self, $default) = @_; return $want_xs if defined $want_xs; + # you're using this module, you must want XS by default + # unless PERL_ONLY is true. + $default = !$ENV{PERL_ONLY} if not defined $default; + foreach my $arg(@ARGV){ - if($arg eq '--pp'){ + + my ($k, $v) = split '=', $arg; # MM-style named args + if ($k eq 'PUREPERL_ONLY' && defined $v) { + return $want_xs = !$v; + } + elsif($arg eq '--pp'){ # old-style return $want_xs = 0; } elsif($arg eq '--xs'){ return $want_xs = 1; } } + + if ($ENV{PERL_MM_OPT}) { + my($v) = $ENV{PERL_MM_OPT} =~ /\b PUREPERL_ONLY = (\S+) /xms; + if (defined $v) { + return $want_xs = !$v; + } + } + return $want_xs = $default; } } sub use_ppport{ my($self, $dppp_version) = @_; + return if $self->{_ppport_ok}++; $self->_xs_initialize(); @@ -142,28 +162,60 @@ return; } +sub use_xshelper { + my($self, $opt) = @_; + $self->_xs_initialize(); + $self->use_ppport(); + + my $file = 'xshelper.h'; + open my $fh, '>', $file or die "Cannot open $file for writing: $!"; + print $fh $self->_xshelper_h(); + close $fh or die "Cannot close $file: $!"; + if(defined $opt) { + if($opt eq '-clean') { + $self->clean_files($file); + } + else { + $self->realclean_files($file); + } + } + return; +} + +sub _gccversion { + my $res = `$Config{cc} --version`; + my ($version) = $res =~ /\(GCC\) ([0-9.]+)/; + no warnings 'numeric', 'uninitialized'; + return sprintf '%g', $version; +} + sub cc_warnings{ my($self) = @_; $self->_xs_initialize(); if(_is_gcc()){ - # Note: MSVC++ doesn't support C99, so -Wdeclaration-after-statement helps ensure C89 specs. $self->cc_append_to_ccflags(qw(-Wall)); - no warnings 'numeric'; - if($Config{gccversion} >= 4.0){ - $self->cc_append_to_ccflags('-Wextra -Wdeclaration-after-statement'); - if($Config{gccversion} >= 4.1){ - $self->cc_append_to_ccflags('-Wc++-compat'); + my $gccversion = _gccversion(); + if($gccversion >= 4.0){ + $self->cc_append_to_ccflags(qw(-Wextra)); + if(!($UseC99 or $UseCplusplus)) { + # Note: MSVC++ doesn't support C99, + # so -Wdeclaration-after-statement helps + # ensure C89 specs. + $self->cc_append_to_ccflags(qw(-Wdeclaration-after-statement)); + } + if($gccversion >= 4.1 && !$UseCplusplus) { + $self->cc_append_to_ccflags(qw(-Wc++-compat)); } } else{ - $self->cc_append_to_ccflags('-W -Wno-comment'); + $self->cc_append_to_ccflags(qw(-W -Wno-comment)); } } elsif(_is_msvc()){ - $self->cc_append_to_ccflags('-W3'); + $self->cc_append_to_ccflags(qw(-W3)); } else{ # TODO: support other compilers @@ -172,6 +224,60 @@ return; } +sub c99_available { + my($self) = @_; + + return 0 if not $self->cc_available(); + + require File::Temp; + require File::Basename; + + my $tmpfile = File::Temp->new(SUFFIX => '.c'); + + $tmpfile->print(<<'C99'); +// include a C99 header +#include +inline // a C99 keyword with C99 style comments +int test_c99() { + int i = 0; + i++; + int j = i - 1; // another C99 feature: declaration after statement + return j; +} +C99 + + $tmpfile->close(); + + system "$Config{cc} -c " . $tmpfile->filename; + + (my $objname = File::Basename::basename($tmpfile->filename)) =~ s/\Q.c\E$/$Config{_o}/; + unlink $objname or warn "Cannot unlink $objname (ignored): $!"; + + return $? == 0; +} + +sub requires_c99 { + my($self) = @_; + if(!$self->c99_available) { + warn "This distribution requires a C99 compiler, but $Config{cc} seems not to support C99, stopped.\n"; + exit; + } + $self->_xs_initialize(); + $UseC99 = 1; + return; +} + +sub requires_cplusplus { + my($self) = @_; + if(!$self->cc_available) { + warn "This distribution requires a C++ compiler, but $Config{cc} seems not to support C++, stopped.\n"; + exit; + } + $self->_xs_initialize(); + $UseCplusplus = 1; + return; +} + sub cc_append_to_inc{ my($self, @dirs) = @_; @@ -242,7 +348,7 @@ if ( ! $self->{xsu_loaded_checklib} ) { my $loaded_lib = 0; - foreach my $checklib qw(inc::Devel::CheckLib Devel::CheckLib) { + foreach my $checklib (qw(inc::Devel::CheckLib Devel::CheckLib)) { eval "use $checklib 0.4"; if (!$@) { $loaded_lib = 1; @@ -290,7 +396,7 @@ return; } -sub requires_xs{ +sub requires_xs_module { my $self = shift; return $self->requires() unless @_; @@ -339,7 +445,7 @@ $self->cc_append_to_inc (grep{ !$uniq{ $_ }++ } @inc); %uniq = (); - $self->cc_append_to_libs(grep{ !$uniq{ $_->[0] }++ } @libs); + $self->cc_libs(grep{ !$uniq{ $_->[0] }++ } @libs); return %added; } @@ -365,9 +471,10 @@ } }, @dirs); + my $xs_to = $UseCplusplus ? '.cpp' : '.c'; foreach my $src_file(@src_files){ my $c = $src_file; - if($c =~ s/ \.xs \z/.c/xms){ + if($c =~ s/ \.xs \z/$xs_to/xms){ $XS_ref->{$src_file} = $c; _verbose "xs: $src_file" if _VERBOSE; @@ -478,10 +585,14 @@ $cppflags .= ' ' . $mm->{DEFINE} if $mm->{DEFINE}; my $add_include = _is_msvc() ? '-FI' : '-include'; - $cppflags .= ' ' . join ' ', map{ qq{$add_include "$_"} } qw(EXTERN.h perl.h XSUB.h); + $cppflags .= ' ' . join ' ', + map{ qq{$add_include "$_"} } qw(EXTERN.h perl.h XSUB.h); my $cppcmd = qq{$Config{cpprun} $cppflags $h_file}; - + # remove all the -arch options to workaround gcc errors: + # "-E, -S, -save-temps and -M options are not allowed + # with multiple -arch flags" + $cppcmd =~ s/ -arch \s* \S+ //xmsg; _verbose("extract functions from: $cppcmd") if _VERBOSE; `$cppcmd`; }; @@ -546,12 +657,120 @@ return; } +sub _xshelper_h { + my $h = <<'XSHELPER_H'; +:/* THIS FILE IS AUTOMATICALLY GENERATED BY Module::Install::XSUtil $VERSION. */ +:/* +:=head1 NAME +: +:xshelper.h - Helper C header file for XS modules +: +:=head1 DESCRIPTION +: +: // This includes all the perl header files and ppport.h +: #include "xshelper.h" +: +:=head1 SEE ALSO +: +:L, where this file is distributed as a part of +: +:=head1 AUTHOR +: +:Fuji, Goro (gfx) Egfuji at cpan.orgE +: +:=head1 LISENCE +: +:Copyright (c) 2010, Fuji, Goro (gfx). All rights reserved. +: +:This library is free software; you can redistribute it and/or modify +:it under the same terms as Perl itself. +: +:=cut +:*/ +: +:#ifdef __cplusplus +:extern "C" { +:#endif +: +:#define PERL_NO_GET_CONTEXT /* we want efficiency */ +:#include +:#include +:#define NO_XSLOCKS /* for exceptions */ +:#include +: +:#ifdef __cplusplus +:} /* extern "C" */ +:#endif +: +:#include "ppport.h" +: +:/* portability stuff not supported by ppport.h yet */ +: +:#ifndef STATIC_INLINE /* from 5.13.4 */ +:# if defined(__GNUC__) || defined(__cplusplus) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) +:# define STATIC_INLINE static inline +:# else +:# define STATIC_INLINE static +:# endif +:#endif /* STATIC_INLINE */ +: +:#ifndef __attribute__format__ +:#define __attribute__format__(a,b,c) /* nothing */ +:#endif +: +:#ifndef LIKELY /* they are just a compiler's hint */ +:#define LIKELY(x) (!!(x)) +:#define UNLIKELY(x) (!!(x)) +:#endif +: +:#ifndef newSVpvs_share +:#define newSVpvs_share(s) Perl_newSVpvn_share(aTHX_ STR_WITH_LEN(s), 0U) +:#endif +: +:#ifndef get_cvs +:#define get_cvs(name, flags) get_cv(name, flags) +:#endif +: +:#ifndef GvNAME_get +:#define GvNAME_get GvNAME +:#endif +:#ifndef GvNAMELEN_get +:#define GvNAMELEN_get GvNAMELEN +:#endif +: +:#ifndef CvGV_set +:#define CvGV_set(cv, gv) (CvGV(cv) = (gv)) +:#endif +: +:/* general utility */ +: +:#if PERL_BCDVERSION >= 0x5008005 +:#define LooksLikeNumber(x) looks_like_number(x) +:#else +:#define LooksLikeNumber(x) (SvPOKp(x) ? looks_like_number(x) : (I32)SvNIOKp(x)) +:#endif +: +:#define newAV_mortal() (AV*)sv_2mortal((SV*)newAV()) +:#define newHV_mortal() (HV*)sv_2mortal((SV*)newHV()) +:#define newRV_inc_mortal(sv) sv_2mortal(newRV_inc(sv)) +:#define newRV_noinc_mortal(sv) sv_2mortal(newRV_noinc(sv)) +: +:#define DECL_BOOT(name) EXTERN_C XS(CAT2(boot_, name)) +:#define CALL_BOOT(name) STMT_START { \ +: PUSHMARK(SP); \ +: CALL_FPTR(CAT2(boot_, name))(aTHX_ cv); \ +: } STMT_END +XSHELPER_H + $h =~ s/^://xmsg; + $h =~ s/\$VERSION\b/$Module::Install::XSUtil::VERSION/xms; + return $h; +} package MY; # XXX: We must append to PM inside ExtUtils::MakeMaker->new(). -sub init_PM{ +sub init_PM { my $self = shift; $self->SUPER::init_PM(@_); @@ -579,7 +798,233 @@ return $cccmd } +sub xs_c { + my($self) = @_; + my $mm = $self->SUPER::xs_c(); + $mm =~ s/ \.c /.cpp/xmsg if $UseCplusplus; + return $mm; +} + +sub xs_o { + my($self) = @_; + my $mm = $self->SUPER::xs_o(); + $mm =~ s/ \.c /.cpp/xmsg if $UseCplusplus; + return $mm; +} + 1; __END__ -#line 774 +=for stopwords gfx API + +=head1 NAME + +Module::Install::XSUtil - Utility functions for XS modules + +=head1 VERSION + +This document describes Module::Install::XSUtil version 0.44. + +=head1 SYNOPSIS + + # in Makefile.PL + use inc::Module::Install; + + # Enables C compiler warnings + cc_warnings; + + # Uses ppport.h + # No need to include it. It's created here. + use_ppport 3.19; + + + # Sets C pre-processor macros. + cc_define q{-DUSE_SOME_FEATURE=42}; + + # Sets paths for header files + cc_include_paths 'include'; # all the header files are in include/ + + # Sets paths for source files + cc_src_paths 'src'; # all the XS and C source files are in src/ + + # Installs header files + install_headers; # all the header files in @cc_include_paths + + +=head1 DESCRIPTION + +Module::Install::XSUtil provides a set of utilities to setup distributions +which include or depend on XS module. + +See L and L for example. + +=head1 FUNCTIONS + +=head2 cc_available + +Returns true if a C compiler is available. YOU DO NOT NEED TO CALL +THIS FUNCTION YOURSELF: it will be called for you when this module is +initialized, and your Makefile.PL process will exit with 0 status. +Only explicitly call if you need to do some esoteric handling when +no compiler is available (for example, when you have a pure perl alternative) + +=head2 c99_available + +Returns true if a C compiler is available and it supports C99 features. + +=head2 want_xs ?$default + +Returns true if the user asked for the XS version or pure perl version of the +module. + +Will return true if C<--xs> is explicitly specified as the argument to +F, and false if C<--pp> is specified. If neither is explicitly +specified, will return the value specified by C<$default>. If you do not +specify the value of C<$default>, then it will be true. + + +=head2 use_ppport ?$version + +Creates F using C. + +This command calls C<< configure_requires 'Devel::PPPort' => $version >> +and adds C<-DUSE_PPPORT> to C's C. + +=head2 use_xshelper ?-clean|-realclean + +Create sF, which is a helper header file to include +F, F, F and F, and defines +some portability stuff which are not supported by F. + +Optional argument C<-clean> and C<-realclean> set C +or C to the generated file F respectably. + +This command includes C. + +=head2 cc_warnings + +Enables C compiler warnings. + +=head2 cc_define @macros + +Sets C macros as compiler options. + +=head2 cc_src_paths @source_paths + +Sets source file directories which include F<*.xs> or F<*.c>. + +=head2 cc_include_paths @include_paths + +Sets include paths for a C compiler. + +=head2 cc_inc_paths @include_paths; + +This B an alias to C, but from 0.42, +this is C, which +replaces the EUMM's C parameter. + +Don't use this function. Use C instead. + +=head2 cc_libs @libs + +Sets C's C. If a name starts C<->, it will be interpreted as is. +Otherwise prefixed C<-l>. + +e.g.: + + cc_libs -lfoo; + cc_libs 'foo'; # ditto. + cc_libs qw(-L/path/to/libs foo bar); # with library paths + +=head2 cc_assert_lib %args + +Checks if the given C library is installed via Devel::CheckLib. +Takes exactly what Devel::CheckLib takes. Note that you must pass +the path names explicitly. + +=head2 requires_c99 + +Tells the build system to use C99 features. + +=head2 requires_cplusplus + +Tells the build system to use C++ language. + +=head2 install_headers ?@header_files + +Declares providing header files, extracts functions from these header files, +and adds these functions to C's C. + +If I<@header_files> are omitted, all the header files in B will +be installed. + +=head2 cc_append_to_inc @include_paths + +Low level API. + +=head2 cc_append_to_libs @libraries + +Low level API. + +=head2 cc_append_to_ccflags @ccflags + +Low level API. + +=head2 cc_append_to_funclist @funclist + +Low level API. + +=head1 OPTIONS + +Under the control of this module, F accepts C<-g> option, which +sets C's C C<-g> (or something like). It will disable +optimization and enable some debugging features. + +=head1 DEPENDENCIES + +Perl 5.5.3 or later. + +=head1 NOTE + +In F, you might want to use C, which is +provided by C, in order to tell co-developers +that they need to install this plugin. + + author_requires 'Module::Install::XSUtil'; + +=head1 BUGS + +No bugs have been reported. + +Please report any bugs or feature requests to the author. + +=head1 ACKNOWLEDGEMENT + +Thanks to Taro Nishino for the test reports. + +Tanks to lestrrat for the suggestions and patches. + +=head1 AUTHOR + +Goro Fuji (gfx) Egfuji(at)cpan.orgE. + +=head1 SEE ALSO + +L. + +L. + +L. + +L. + +L. + +=head1 LICENSE AND COPYRIGHT + +Copyright (c) 2009-2010, Goro Fuji (gfx). All rights reserved. + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut debian/patches/format_string_fix.diff0000644000000000000000000000214112144235722015173 0ustar >From 2a247110eb4ec1828e844410dd83249bb5af1e1e Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Mon, 5 Mar 2012 22:13:56 +0200 Subject: [PATCH] Call croak() with a controlled format string Bug-Debian: http://bugs.debian.org/661539 Bug: https://rt.cpan.org/Public/Bug/Display.html?id=75568 This fixes builds with -Werror=format-security. The fatal error with an invalid offset contains a format string error that could be triggered with a crafted magic line. $ perl -MFile::MMagic::XS -e 'File::MMagic::XS->new->add_magic("%s%s%s%s")' Segmentation fault (core dumped) --- src/perl-mmagic-xs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/perl-mmagic-xs.c b/src/perl-mmagic-xs.c index 019afb0..2af0d6e 100644 --- a/src/perl-mmagic-xs.c +++ b/src/perl-mmagic-xs.c @@ -927,7 +927,7 @@ fmm_parse_magic_line(PerlFMM *state, char *l, int lineno) err = newSVpvf( "fmm_parse_magic_line: offset %s invalid", l); FMM_SET_ERROR(state, err); - croak(SvPV_nolen(err)); + croak("%s", SvPV_nolen(err)); } l = t; -- 1.7.9.1 debian/patches/series0000644000000000000000000000005412144235722012033 0ustar format_string_fix.diff M::I::XSUtil.pm.diff debian/compat0000644000000000000000000000000212144235722010366 0ustar 9 debian/control0000644000000000000000000000206112144235722010572 0ustar Source: libfile-mmagic-xs-perl Maintainer: Debian Perl Group Uploaders: gregor herrmann , Ansgar Burchardt , Dominic Hargreaves Section: perl Priority: optional Build-Depends: debhelper (>= 9.20120312), perl, perl (>= 5.11.1) | libextutils-parsexs-perl (>= 2.210000) Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libfile-mmagic-xs-perl.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libfile-mmagic-xs-perl.git Homepage: https://metacpan.org/release/File-MMagic-XS/ Package: libfile-mmagic-xs-perl Architecture: any Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends} Description: Perl module to guess file type (à la mod_mime_magic) File::MMagic::XS is a port of Apache2 mod_mime_magic.c in Perl, written in XS with the aim of being efficient and fast, especially for applications that need to be run for an extended amount of time. debian/changelog0000644000000000000000000000741012231166446011047 0ustar libfile-mmagic-xs-perl (0.09006-5build1) trusty; urgency=low * Rebuild for Perl 5.18. -- Colin Watson Mon, 21 Oct 2013 10:00:22 +0100 libfile-mmagic-xs-perl (0.09006-5) unstable; urgency=low [ gregor herrmann ] * debian/control: update {versioned,alternative} (build) dependencies. [ Salvatore Bonaccorso ] * Change Vcs-Git to canonical URI (git://anonscm.debian.org) * Change search.cpan.org based URIs to metacpan.org based URIs [ gregor herrmann ] * Update the embedded Module::Install::XSUtil. (Closes: #708076) * debian/copyright: switch formatting to Copyright-Format 1.0. Update years of packaging copyright. Refresh license stanzas. Add info about the new patch. * Set Standards-Version to 3.9.4 (no changes). -- gregor herrmann Mon, 13 May 2013 21:15:05 +0200 libfile-mmagic-xs-perl (0.09006-4) unstable; urgency=low * Bump debhelper compat level to 9 * Apply patch from Niko Tyni fixing FTBFS with -Werror=format-security (Closes: #661539) * Update Standards-Version (no changes) -- Dominic Hargreaves Sun, 01 Apr 2012 15:59:03 +0100 libfile-mmagic-xs-perl (0.09006-3) unstable; urgency=low [ Salvatore Bonaccorso ] * debian/copyright: Replace DEP5 Format-Specification URL from svn.debian.org to anonscm.debian.org URL. [ Dominic Hargreaves ] * Swap libextutils-parsexs-perl/perl alternate build-dependency around following migration of perl 5.14 to unstable so that it can be autobuilt -- Dominic Hargreaves Thu, 17 Nov 2011 20:24:20 +0000 libfile-mmagic-xs-perl (0.09006-2) unstable; urgency=low [ Ansgar Burchardt ] * Update my email address. * debian/control: Convert Vcs-* fields to Git. [ Dominic Hargreaves ] * Add alternative dependency on perl 5.14 for libextutils-parsexs-perl (Closes: #636771) * Update Standards-Version (no changes) -- Dominic Hargreaves Sat, 06 Aug 2011 16:57:28 +0100 libfile-mmagic-xs-perl (0.09006-1) unstable; urgency=low * New upstream release. -- gregor herrmann Sun, 23 May 2010 16:46:59 +0200 libfile-mmagic-xs-perl (0.09004-2) unstable; urgency=low * Build-depend on libextutils-parsexs-perl (>= 2.210000) instead of >= 2.21. Hurray for different version number semantics. -- Ansgar Burchardt Wed, 12 May 2010 01:13:48 +0900 libfile-mmagic-xs-perl (0.09004-1) unstable; urgency=low [ gregor herrmann ] * debian/control: Changed: Switched Vcs-Browser field to ViewSVN (source stanza). [ Nathan Handler ] * debian/watch: Update to ignore development releases. [ Ansgar Burchardt ] * New upstream release. * Add build-dep on perl (>= 5.10.1) for Devel::PPPort 3.19. * Add build-dep on libextutils-parsexs-perl (>= 2.21). perl (>= 5.12.0) is an alternative, but sbuild fails when both are given. * Remove build-dep on libtest-pod-perl, libtest-pod-coverage-perl: tests moved to xt/. * debian/control: Change short description a bit. * Use source format 3.0 (quilt). * Refresh rules for debhelper 7. * Convert debian/copyright to proposed machine-readable format. * Bump Standards-Version to 3.8.4 (no changes). * Add myself to Uploaders. -- Ansgar Burchardt Tue, 11 May 2010 21:52:20 +0900 libfile-mmagic-xs-perl (0.09003-2) unstable; urgency=low * debian/copyright: clarify copyright/licensing terms of included third-party code. * Set Standards-Version to 3.8.0 (no changes). * debian/control: change my email address. -- gregor herrmann Wed, 06 Aug 2008 20:49:26 -0300 libfile-mmagic-xs-perl (0.09003-1) unstable; urgency=low * Initial release (closes: #432508). -- gregor herrmann Sun, 06 Apr 2008 23:45:46 +0200