perl-Tk: enable cross build

This commit is contained in:
newbluemoon 2018-09-14 10:30:11 +02:00 committed by maxice8
parent bebef3b348
commit c7666b8e3e
2 changed files with 32 additions and 5 deletions

View file

@ -0,0 +1,27 @@
For libpng and libjpeg Makefile.PL tries to run a short test program to see if
the system libraries can be used. From native builds we know they can so remove
the test.
--- PNG/Makefile.PL.orig 2013-11-18 10:04:04.000000000 +0100
+++ PNG/Makefile.PL 2018-09-14 09:31:08.785202470 +0200
@@ -53,8 +53,7 @@
$all_libs = "$libpng_libs $zlib_libs";
}
-if ($Tk::MMtry::VERSION ge '4.007' &&
- try_run("config/has_png.c",[$all_cflags],[$all_libs]))
+if ($Tk::MMtry::VERSION ge '4.007')
{
warn "Using system's -lpng\n";
Tk::MMutil::TkExtMakefile(
--- JPEG/Makefile.PL.orig 2013-11-18 10:04:04.000000000 +0100
+++ JPEG/Makefile.PL 2018-09-14 09:35:28.041623709 +0200
@@ -6,7 +6,7 @@
use Tk::MMtry;
-if ($Tk::MMtry::VERSION ge '4.007' && try_run("config/has_jpeg.c",['-I/usr/local/include'],['-ljpeg']))
+if ($Tk::MMtry::VERSION ge '4.007')
{
push(@args, LIBS => ['-ljpeg'],
INC => '-I/usr/local/include',

View file

@ -4,16 +4,16 @@ version=804.034
revision=3
wrksrc="${pkgname#*-}-${version}"
build_style=perl-module
configure_args="X11INC=/usr/include"
hostmakedepends="perl libX11-devel libpng-devel libjpeg-turbo-devel"
makedepends="${hostmakedepends}"
configure_args="X11INC=${XBPS_CROSS_BASE}/usr/include
X11LIB=${XBPS_CROSS_BASE}/usr/lib"
hostmakedepends="perl pkg-config"
makedepends="perl libX11-devel libpng-devel libjpeg-turbo-devel"
short_desc='Tk graphical interface for Perl'
maintainer="Enguerrand de Rochefort <voidlinux@rochefort.de>"
homepage="https://metacpan.org/release/Tk"
license="GPL-1, Artistic"
license="Artistic-1.0-Perl, GPL-1.0-or-later"
distfiles="${CPAN_SITE}/Tk/Tk-${version}.tar.gz"
checksum=fea6b144c723528a2206c8cd9175844032ee9c14ee37791f0f151e5e5b293fe2
nocross="http://build.voidlinux.eu/builders/armv7l_builder/builds/21051/steps/shell_3/logs/stdio"
post_configure() {
sed -i 's,X11/Xproto.h,,; s,X11/Xutil.h,,' pTk/Makefile