New package: perl-Text-BibTeX-0.88

This commit is contained in:
svenper 2019-08-26 00:44:43 +02:00 committed by Leah Neukirchen
parent 51f8b25fdc
commit 825e3fc6b7
3 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,14 @@
Void Linux uses -D_FORTIFY_SOURCE=2. Remove the flag to not interfere (just in case).
--- inc/MyBuilder.pm.orig 2019-04-29 17:02:41.000000000 +0200
+++ inc/MyBuilder.pm 2019-11-24 08:35:16.561126918 +0100
@@ -208,7 +208,7 @@
$object =~ s/\.c/.o/;
next if $self->up_to_date($file, $object);
$cbuilder->compile(object_file => $object,
- extra_compiler_flags=>["-D_FORTIFY_SOURCE=1",@EXTRA_FLAGS],
+ extra_compiler_flags=>[@EXTRA_FLAGS],
source => $file,
include_dirs => ["btparse/src"]);
}

View file

@ -0,0 +1,20 @@
--- Build.PL
+++ Build.PL
@@ -88,17 +88,7 @@ if ( $^O =~ /mswin32/i ) {
}
}
else {
- if ( $Config{archname} =~ /^x86_64|^ppc64|^s390x|^aarch64|^riscv64/ ) {
- $libdir =~ s/\bbin\b/lib64/;
- if ( !-d $libdir ) {
- my $test = $libdir;
- $test =~ s/lib64/lib/;
- $libdir = $test if -d $test;
- }
- }
- else {
$libdir =~ s/\bbin\b/lib/;
- }
$hdrdir = $libdir;
$hdrdir =~ s!/[^/]+/?$!/include!
}

View file

@ -0,0 +1,36 @@
# Template file for 'perl-Text-BibTeX'
pkgname=perl-Text-BibTeX
version=0.88
revision=1
wrksrc="${pkgname/perl-/}-${version}"
build_style=perl-ModuleBuild
hostmakedepends="perl-ExtUtils-LibBuilder perl-Config-AutoConf"
makedepends="perl perl-Capture-Tiny"
depends="${makedepends}"
short_desc="Text::BibTeX - interface to read and parse BibTeX files"
maintainer="svenper <svenper@tuta.io>"
license="Artistic-1.0-Perl, GPL-1.0-or-later"
homepage="https://metacpan.org/release/Text-BibTeX/"
distfiles="${CPAN_SITE}/Text/${pkgname/perl-/}-${version}.tar.gz"
checksum=b014586e68bdbcafb0a2cfa0401eb0a04ea5de8c4d5bc36dd0f7faeab6acf42c
if [ "$CROSS_BUILD" ]; then
_perlprefix=${XBPS_STATEDIR}/perlprefix-${XBPS_TARGET_MACHINE}
export PERL5LIB=$_perlprefix
do_build() {
mkdir -p $_perlprefix
cp "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl/Config"*.p? $_perlprefix
cp "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl/Errno.pm" $_perlprefix
sed -i -e "s;archlibexp => '\(.*\)';archlibexp => '${XBPS_CROSS_BASE}\1';" \
${_perlprefix}/Config.pm
sed -i -e "s;^archlibexp='\(.*\)';archlibexp='${XBPS_CROSS_BASE}\1';" \
${_perlprefix}/Config_heavy.pl
LD="$CC" ./Build ${make_build_args}
}
fi
do_install() {
LD="$CC" ./Build ${make_install_args} install
}